cvs: pear /Gtk_MDB_Designer Designer.php /Gtk_MDB_Designer/Designer Column.php

From: Date: Thu, 01 Jan 2004 03:38:21 +0000
Subject: cvs: pear /Gtk_MDB_Designer Designer.php /Gtk_MDB_Designer/Designer Column.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-15250@lists.php.net to get a copy of this message
alan_k Wed Dec 31 22:38:21 2003 EDT Modified files: /pear/Gtk_MDB_Designer Designer.php /pear/Gtk_MDB_Designer/Designer Column.php Log: MDB Kludges Index: pear/Gtk_MDB_Designer/Designer.php diff -u pear/Gtk_MDB_Designer/Designer.php:1.14 pear/Gtk_MDB_Designer/Designer.php:1.15 --- pear/Gtk_MDB_Designer/Designer.php:1.14 Mon Mar 31 22:39:21 2003 +++ pear/Gtk_MDB_Designer/Designer.php Wed Dec 31 22:38:20 2003 @@ -16,7 +16,7 @@ // | Authors: Alan Knowles <alan@akbkhome.com> | // +----------------------------------------------------------------------+ // -// $Id: Designer.php,v 1.14 2003/04/01 03:39:21 alan_k Exp $ +// $Id: Designer.php,v 1.15 2004/01/01 03:38:20 alan_k Exp $ // // a database designer // @@ -245,11 +245,19 @@ if (!$this->drawingArea->window) { return; } - - $this->pixmap = new GdkPixmap($this->drawingArea->window, - //$this->database->maxX ,$this->database->maxY, - 5000,5000 - -1); + $size = 5000; + while (!$this->pixmap) { + if ($size < 1000) { + echo "unable to allocate pixmap - giving up\n"; + exit; + } + $this->pixmap = new GdkPixmap($this->drawingArea->window, + //$this->database->maxX ,$this->database->maxY, + $size,$size + -1); + $size -= 1000; + + } if (!$this->pixmap) { return; } Index: pear/Gtk_MDB_Designer/Designer/Column.php diff -u pear/Gtk_MDB_Designer/Designer/Column.php:1.13 pear/Gtk_MDB_Designer/Designer/Column.php:1.14 --- pear/Gtk_MDB_Designer/Designer/Column.php:1.13 Thu Jul 10 09:58:54 2003 +++ pear/Gtk_MDB_Designer/Designer/Column.php Wed Dec 31 22:38:21 2003 @@ -16,7 +16,7 @@ // | Authors: Alan Knowles <alan@akbkhome.com> | // +----------------------------------------------------------------------+ // -// $Id: Column.php,v 1.13 2003/07/10 13:58:54 alan_k Exp $ +// $Id: Column.php,v 1.14 2004/01/01 03:38:21 alan_k Exp $ // // The column dataobject // @@ -98,6 +98,19 @@ $r .= ' UNIQUE '; } + // Kludge.. as CHARS are silly in alot of databases + $r = str_replace(' CHAR ', ' VARCHAR ',$r); + + // booleans has a type in mysql!!! + switch ($db->phptype) { + case 'mysql': + $r = str_replace(' VARCHAR (1)', ' BOOL',$r); + break; + case 'pgsql': + $r = str_replace(' VARCHAR (1)', ' BOOLEAN',$r); + break; + } + // print_r($db); if ($this->sequence) { @@ -214,4 +227,4 @@ } -?> +

« previous php.pear.cvs (#15250) next »