first minipatch (aesthetical fixes & fix for the date support in the mysql backend)



This patch fixes the bugs in configure.in, POTFILES.in that I specified
in my last email (there are real bugs, aren't they? nobody can compile
without such a patch, doesn't it?)

It adds a cute hpaned between the list of tables and the list of
"columns" of the selected table (in brief, click in the "Browse" button,
and look at your screen).

It tries to fix a bug with the mysql backend.  If you have a
date/time/timestamp in your database, and you try to see this
date/time/timestamp, you will see weird dates.  I was thinking that this
patch will solve the problem, but actually it doesn't produce any
visible result (don't ask me why...).  I will try to solve this problem
tomorrow (now definitevely I have to come back to my real work).

Cheers,

-- 
Joaquín Cuenca Abela
e-mail: tempo2@celium.net
? aclocal.m4
? intl
? ABOUT-NLS
? config.guess
? config.sub
? ltconfig
? ltmain.sh
? config.h.in
? stamp-h.in
? Makefile.in
? configure
? config.log
? config.h
? libtool
? config.status
? stamp-h
? config.cache
? Makefile
? gnome-db.spec
? stamp.h
? toto.patch
? components/Makefile.in
? components/Makefile
? components/.deps
? components/.libs
? components/gnomedb-components
? doc/Makefile.in
? doc/Makefile
? frontend/Makefile.in
? frontend/Makefile
? frontend/.deps
? frontend/.libs
? frontend/gnomedb-fe
? lib/Makefile.in
? lib/Makefile
? lib/.deps
? lib/.libs
? lib/gnome-db-component.lo
? lib/gnome-db-container.lo
? lib/gnome-db-control-widget.lo
? lib/gnome-db-control.lo
? lib/gnome-db-factory.lo
? lib/libgnomedbcomponents.la
? lib/gnome-db-browser.lo
? lib/gnome-db-combo.lo
? lib/gnome-db-dataset.lo
? lib/gnome-db-designer.lo
? lib/gnome-db-dsn-config.lo
? lib/gnome-db-error-dlg.lo
? lib/gnome-db-error.lo
? lib/gnome-db-grid.lo
? lib/gnome-db-icon-list.lo
? lib/gnome-db-init.lo
? lib/gnome-db-list.lo
? lib/gnome-db-log-viewer.lo
? lib/gnome-db-login-dlg.lo
? lib/gnome-db-login.lo
? lib/gnome-db-print.lo
? lib/gnome-db-report.lo
? lib/gnome-db-shortcut.lo
? lib/gnome-db.lo
? lib/libgnomedb.la
? libgda/config.guess
? libgda/config.sub
? libgda/ltconfig
? libgda/ltmain.sh
? libgda/aclocal.m4
? libgda/config.h.in
? libgda/stamp-h.in
? libgda/Makefile.in
? libgda/configure
? libgda/config.log
? libgda/config.h
? libgda/libtool
? libgda/config.status
? libgda/stamp-h
? libgda/config.cache
? libgda/Makefile
? libgda/stamp.h
? libgda/bindings/Makefile.in
? libgda/bindings/Makefile
? libgda/bindings/c++/Makefile.in
? libgda/bindings/c++/Makefile
? libgda/bindings/c++/.deps
? libgda/bindings/c++/.libs
? libgda/bindings/c++/gdaBatch.lo
? libgda/bindings/c++/gdaCommand.lo
? libgda/bindings/c++/gdaConnection.lo
? libgda/bindings/c++/gdaError.lo
? libgda/bindings/c++/gdaErrorList.lo
? libgda/bindings/c++/gdaField.lo
? libgda/bindings/c++/gdaRecordset.lo
? libgda/bindings/c++/gdaValue.lo
? libgda/bindings/c++/libgda-clientcpp.la
? libgda/doc/Makefile.in
? libgda/doc/Makefile
? libgda/idl/Makefile.in
? libgda/idl/Makefile
? libgda/lib/Makefile.in
? libgda/lib/Makefile
? libgda/lib/gda-client/Makefile.in
? libgda/lib/gda-client/Makefile
? libgda/lib/gda-client/.deps
? libgda/lib/gda-client/gda-stubs.c
? libgda/lib/gda-client/gda-skels.c
? libgda/lib/gda-client/gda-common.c
? libgda/lib/gda-client/gda.h
? libgda/lib/gda-client/.libs
? libgda/lib/gda-client/gda-stubs.lo
? libgda/lib/gda-client/gda-common.lo
? libgda/lib/gda-client/gda-batch.lo
? libgda/lib/gda-client/gda-command.lo
? libgda/lib/gda-client/gda-connection-pool.lo
? libgda/lib/gda-client/gda-connection.lo
? libgda/lib/gda-client/gda-error.lo
? libgda/lib/gda-client/gda-field.lo
? libgda/lib/gda-client/gda-recordset.lo
? libgda/lib/gda-client/gda-report.lo
? libgda/lib/gda-client/libgda-client.la
? libgda/lib/gda-common/Makefile.in
? libgda/lib/gda-common/Makefile
? libgda/lib/gda-common/.deps
? libgda/lib/gda-common/.libs
? libgda/lib/gda-common/gda-config.lo
? libgda/lib/gda-common/gda-corba.lo
? libgda/lib/gda-common/gda-log.lo
? libgda/lib/gda-common/gda-thread.lo
? libgda/lib/gda-common/gda-xml-database.lo
? libgda/lib/gda-common/gda-xml-file.lo
? libgda/lib/gda-common/gda-xml-query.lo
? libgda/lib/gda-common/libgda-common.la
? libgda/lib/gda-server/Makefile.in
? libgda/lib/gda-server/Makefile
? libgda/lib/gda-server/.deps
? libgda/lib/gda-server/gda-stubs.c
? libgda/lib/gda-server/gda-skels.c
? libgda/lib/gda-server/gda-common.c
? libgda/lib/gda-server/gda.h
? libgda/lib/gda-server/.libs
? libgda/lib/gda-server/gda-common.lo
? libgda/lib/gda-server/gda-skels.lo
? libgda/lib/gda-server/gda-server-command.lo
? libgda/lib/gda-server/gda-server-connection.lo
? libgda/lib/gda-server/gda-server-error.lo
? libgda/lib/gda-server/gda-server-field.lo
? libgda/lib/gda-server/gda-server-impl-command.lo
? libgda/lib/gda-server/gda-server-impl-connection.lo
? libgda/lib/gda-server/gda-server-impl-factory.lo
? libgda/lib/gda-server/gda-server-impl-recordset.lo
? libgda/lib/gda-server/gda-server-impl.lo
? libgda/lib/gda-server/gda-server-init.lo
? libgda/lib/gda-server/gda-server-recordset.lo
? libgda/lib/gda-server/libgda-server.la
? libgda/po/Makefile.in
? libgda/po/POTFILES
? libgda/po/Makefile
? libgda/po/Makefile.in.in
? libgda/po/Makefile.am
? libgda/po/cat-id-tbl.c
? libgda/po/libgda.pot
? libgda/po/stamp-cat-id
? libgda/providers/Makefile.in
? libgda/providers/Makefile
? libgda/providers/gda-interbase-server/Makefile.in
? libgda/providers/gda-interbase-server/Makefile
? libgda/providers/gda-ldap-server/Makefile.in
? libgda/providers/gda-ldap-server/Makefile
? libgda/providers/gda-mdb-server/Makefile.in
? libgda/providers/gda-mdb-server/Makefile
? libgda/providers/gda-mysql-server/Makefile.in
? libgda/providers/gda-mysql-server/Makefile
? libgda/providers/gda-mysql-server/.deps
? libgda/providers/gda-mysql-server/.libs
? libgda/providers/gda-mysql-server/gda-mysql-command.lo
? libgda/providers/gda-mysql-server/gda-mysql-connection.lo
? libgda/providers/gda-mysql-server/gda-mysql-recordset.lo
? libgda/providers/gda-mysql-server/libgda-mysql.la
? libgda/providers/gda-mysql-server/gda-mysql-srv
? libgda/providers/gda-odbc-server/Makefile.in
? libgda/providers/gda-odbc-server/Makefile
? libgda/providers/gda-oracle-server/Makefile.in
? libgda/providers/gda-oracle-server/Makefile
? libgda/providers/gda-postgres-server/Makefile.in
? libgda/providers/gda-postgres-server/Makefile
? libgda/providers/gda-sybase-server/Makefile.in
? libgda/providers/gda-sybase-server/Makefile
? libgda/tools/Makefile.in
? libgda/tools/Makefile
? libgda/tools/gda-config
? libgda/tools/gda-buildserver
? libgda/tools/gda-buildclient
? libgda/tools/.deps
? libgda/tools/.libs
? libgda/tools/gda-run
? manager/Makefile.in
? manager/Makefile
? manager/.deps
? manager/.libs
? manager/gnomedb-mgr
? po/Makefile.in.in
? po/POTFILES
? po/Makefile.in
? po/Makefile
? po/stamp-cat-id
? po/cat-id-tbl.c
? po/ca.gmo
? po/da.gmo
? po/de.gmo
? po/el.gmo
? po/es.gmo
? po/fr.gmo
? po/ga.gmo
? po/gl.gmo
? po/hu.gmo
? po/it.gmo
? po/ja.gmo
? po/no.gmo
? po/pl.gmo
? po/ru.gmo
? po/sl.gmo
? po/sv.gmo
? po/uk.gmo
? po/gnome-db.pot
? tools/Makefile.in
? tools/Makefile
? tools/gnomedb-config
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-db2/configure.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 configure.in
--- configure.in	2000/08/14 17:28:30	1.1.1.1
+++ configure.in	2000/08/16 13:13:50
@@ -138,6 +138,7 @@
 
 AC_OUTPUT([
 Makefile
+macros/Makefile
 gnome-db.spec
 po/Makefile.in
 doc/Makefile
Index: lib/gnome-db-browser.c
===================================================================
RCS file: /cvs/gnome/gnome-db2/lib/gnome-db-browser.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gnome-db-browser.c
--- lib/gnome-db-browser.c	2000/08/14 17:28:36	1.1.1.1
+++ lib/gnome-db-browser.c	2000/08/16 13:13:51
@@ -401,11 +401,17 @@
   GtkWidget *table;
   GtkWidget *box;
   GtkWidget *button;
-  
+  GtkWidget *paned;
+
   frame = gnome_db_new_frame_widget(NULL);
   gtk_box_pack_start(GTK_BOX(brw), frame, 1, 1, 0);
-  table = gtk_table_new(6, 4, FALSE);
-  gtk_container_add(GTK_CONTAINER(frame), table);
+
+  paned = gtk_hpaned_new();
+  gtk_container_add(GTK_CONTAINER(frame), paned);
+  gtk_widget_show(paned);
+
+  table = gtk_table_new(3, 4, FALSE);
+  gtk_paned_add2(GTK_PANED(paned), table);
   gtk_widget_show(table);
   
   brw->object_list = gnome_db_list_new(0, 0);
@@ -416,13 +422,10 @@
   gtk_signal_connect(GTK_OBJECT(brw->object_list), "select_row",
                      GTK_SIGNAL_FUNC(select_object_cb), (gpointer) brw);
   gtk_widget_show(brw->object_list);
-  gtk_table_attach(GTK_TABLE(table), brw->object_list, 0, 3, 0, 5,
-                   GTK_FILL | GTK_EXPAND | GTK_SHRINK,
-                   GTK_FILL,
-                   3, 3);
+  gtk_paned_add1(GTK_PANED(paned), brw->object_list);
 
   brw->object_description = gnome_db_new_grid_widget(NULL);
-  gtk_table_attach(GTK_TABLE(table), brw->object_description, 3, 6, 1, 4,
+  gtk_table_attach(GTK_TABLE(table), brw->object_description, 0, 3, 1, 4,
                    GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                    GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                    3, 3);
@@ -467,13 +470,13 @@
   gtk_widget_show(brw->aggrs_button);
   gtk_box_pack_start(GTK_BOX(box), brw->aggrs_button, 0, 0, 0);
   
-  gtk_table_attach(GTK_TABLE(table), box, 3, 6, 0, 1, GTK_FILL, GTK_FILL, 1, 1);
+  gtk_table_attach(GTK_TABLE(table), box, 0, 3, 0, 1, GTK_FILL, GTK_FILL, 1, 1);
   gtk_widget_show(box);
   
   /* create button bar */
   box = gtk_hbox_new(TRUE, 0);
   gtk_widget_show(box);
-  gtk_table_attach(GTK_TABLE(table), box, 3, 6, 4, 5, GTK_FILL, GTK_FILL, 1, 1);
+  gtk_table_attach(GTK_TABLE(table), box, 0, 3, 4, 5, GTK_FILL, GTK_FILL, 1, 1);
                    
   button = gnome_pixmap_button(gnome_stock_new_with_icon(GNOME_STOCK_MENU_PROP),
                                _("Data"));
Index: libgda/po/POTFILES.in
===================================================================
RCS file: /cvs/gnome/libgda/po/POTFILES.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 POTFILES.in
--- libgda/po/POTFILES.in	2000/08/10 09:32:56	1.1.1.1
+++ libgda/po/POTFILES.in	2000/08/16 13:13:51
@@ -0,0 +1,82 @@
+bindings/python/gda-clnt/gda_clnt.c
+bindings/python/gda-clnt/gda_clnt_batch.c
+bindings/python/gda-clnt/gda_clnt_command.c
+bindings/python/gda-clnt/gda_clnt_connection.c
+bindings/python/gda-common/gda_common.c
+bindings/python/gda-common/gda_common_dsn.c
+bindings/python/gda-common/gda_common_log.c
+bindings/python/gda-common/gda_common_server.c
+lib/gda-client/gda-batch.c
+lib/gda-client/gda-command.c
+lib/gda-client/gda-connection-pool.c
+lib/gda-client/gda-connection.c
+lib/gda-client/gda-error.c
+lib/gda-client/gda-field.c
+lib/gda-client/gda-recordset.c
+lib/gda-client/gda-report.c
+lib/gda-common/gda-config.c
+lib/gda-common/gda-corba.c
+lib/gda-common/gda-log.c
+lib/gda-common/gda-thread.c
+lib/gda-common/gda-xml-database.c
+lib/gda-common/gda-xml-file.c
+lib/gda-common/gda-xml-query.c
+lib/gda-server/gda-server-command.c
+lib/gda-server/gda-server-connection.c
+lib/gda-server/gda-server-error.c
+lib/gda-server/gda-server-field.c
+lib/gda-server/gda-server-impl-command.c
+lib/gda-server/gda-server-impl-connection.c
+lib/gda-server/gda-server-impl-factory.c
+lib/gda-server/gda-server-impl-recordset.c
+lib/gda-server/gda-server-impl.c
+lib/gda-server/gda-server-init.c
+lib/gda-server/gda-server-recordset.c
+providers/gda-ldap-server/gda-ldap-command.c
+providers/gda-ldap-server/gda-ldap-connection.c
+providers/gda-ldap-server/gda-ldap-recordset.c
+providers/gda-ldap-server/main-ldap.c
+providers/gda-interbase-server/gda-interbase-command.c
+providers/gda-interbase-server/gda-interbase-connection.c
+providers/gda-interbase-server/gda-interbase-recordset.c
+providers/gda-interbase-server/main-interbase.c
+providers/gda-mdb-server/gda-mdb-command.c
+providers/gda-mdb-server/gda-mdb-connection.c
+providers/gda-mdb-server/gda-mdb-recordset.c
+providers/gda-mdb-server/main-mdb.c
+providers/gda-mysql-server/gda-mysql-command.c
+providers/gda-mysql-server/gda-mysql-connection.c
+providers/gda-mysql-server/gda-mysql-recordset.c
+providers/gda-mysql-server/main-mysql.c
+providers/gda-odbc-server/gda-odbc-command.c
+providers/gda-odbc-server/gda-odbc-connection.c
+providers/gda-odbc-server/gda-odbc-recordset.c
+providers/gda-odbc-server/main-odbc.c
+providers/gda-oracle-server/gda-oracle-command.c
+providers/gda-oracle-server/gda-oracle-connection.c
+providers/gda-oracle-server/gda-oracle-recordset.c
+providers/gda-oracle-server/main-oracle.c
+providers/gda-postgres-server/gda-builtin-res.c
+providers/gda-postgres-server/gda-postgres-command.c
+providers/gda-postgres-server/gda-postgres-connection.c
+providers/gda-postgres-server/gda-postgres-recordset.c
+providers/gda-postgres-server/main-postgres.c
+providers/gda-sybase-server/gda-sybase-command.c
+providers/gda-sybase-server/gda-sybase-connection.c
+providers/gda-sybase-server/gda-sybase-error.c
+providers/gda-sybase-server/gda-sybase-recordset.c
+providers/gda-sybase-server/gda-sybase-types.c
+providers/gda-sybase-server/main-sybase.c
+tools/gda-run.c
+intl/bindtextdom.c
+intl/cat-compat.c
+intl/dcgettext.c
+intl/dgettext.c
+intl/explodename.c
+intl/finddomain.c
+intl/gettext.c
+intl/intl-compat.c
+intl/l10nflist.c
+intl/loadmsgcat.c
+intl/localealias.c
+intl/textdomain.c
Index: libgda/providers/gda-mysql-server/gda-mysql-recordset.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/gda-mysql-server/gda-mysql-recordset.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gda-mysql-recordset.c
--- libgda/providers/gda-mysql-server/gda-mysql-recordset.c	2000/08/10 09:32:33	1.1.1.1
+++ libgda/providers/gda-mysql-server/gda-mysql-recordset.c	2000/08/16 13:13:52
@@ -19,12 +19,54 @@
 
 #include "gda-mysql.h"
 
+/* private functions */
+/* Converting YYYY-MM-DD to struct tm */
+static struct tm *
+str_to_tmstruct_date2(gchar *date)
+{
+  int day, month, year;
+  char *ptr;
+  char mdate[11];
+  struct tm *stm;
+  
+  stm = (struct tm *) g_malloc(sizeof(struct tm));
+  if ((date==NULL) || (*date=='\0')) 
+    {
+      g_free(stm);
+      return NULL;
+    }
+
+  strncpy(mdate, date, 10);
+  mdate[10] = '\0';
+  ptr=(char *) strtok(mdate, "-/.");
+  year = atoi(ptr);
+  if (!(ptr=(char *) strtok(NULL, "-/."))) 
+    {
+      g_free(stm);
+      return NULL; /* Error */
+    }
+  month=atoi(ptr);
+  if (!(ptr=(char *) strtok(NULL, "-/."))) 
+    {
+      g_free(stm);
+      return NULL; /* Error */
+    }
+  day=atoi(ptr);
+  
+  stm->tm_mday = day;
+  stm->tm_mon = month -1;
+  stm->tm_year = year - 1900;
+  
+  return stm;
+}
+
 static void
 fill_field_values (Gda_ServerRecordset *recset, MYSQL_Recordset *mysql_recset)
 {
   gint   rowlength;
   gint   fieldidx;
   GList* node;
+  struct tm *stm;
 
   g_return_if_fail(recset != NULL);
   g_return_if_fail(mysql_recset != NULL);
@@ -61,6 +103,22 @@
 		case FIELD_TYPE_DOUBLE :
 		  gda_server_field_set_double(field, atof(mysql_recset->array[fieldidx]));
 		  break;
+		case FIELD_TYPE_DATE :
+		  stm = str_to_tmstruct_date2(mysql_recset->array[fieldidx]);
+		  if (stm)
+		    {
+		      GDate *date;
+
+		      date = g_date_new_dmy(stm->tm_mday, stm->tm_mon,
+					    stm->tm_year+1900);
+		      g_print("Day %d, month %d, year %d\n", stm->tm_mday, stm->tm_mon, stm->tm_year+1900);
+		      gda_server_field_set_date(field, date);
+		      g_date_free(date);
+		      g_free(stm);
+		    }
+		  else
+		    gda_server_field_set_date(field, NULL);
+
 		case FIELD_TYPE_STRING :
 		default :
 		  gda_server_field_set_varchar(field, mysql_recset->array[fieldidx]);
Index: po/POTFILES.in
===================================================================
RCS file: /cvs/gnome/gnome-db2/po/POTFILES.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 POTFILES.in
--- po/POTFILES.in	2000/08/14 17:28:54	1.1.1.1
+++ po/POTFILES.in	2000/08/16 13:13:52
@@ -0,0 +1,54 @@
+components/gnomedb-com-browser.c
+components/gnomedb-com-log.c
+components/gnomedb-com-main.c
+frontend/gnomedb-fe-callbacks.c
+frontend/gnomedb-fe-config.c
+frontend/gnomedb-fe-connection.c
+frontend/gnomedb-fe-designer.c
+frontend/gnomedb-fe-dsnconfig.c
+frontend/gnomedb-fe-log.c
+frontend/gnomedb-fe-main.c
+frontend/gnomedb-fe-workarea.c
+lib/gnome-db-browser.c
+lib/gnome-db-combo.c
+lib/gnome-db-component.c
+lib/gnome-db-container.c
+lib/gnome-db-control-widget.c
+lib/gnome-db-control.c
+lib/gnome-db-dataset.c
+lib/gnome-db-designer.c
+lib/gnome-db-dsn-config.c
+lib/gnome-db-error-dlg.c
+lib/gnome-db-error.c
+lib/gnome-db-factory.c
+lib/gnome-db-grid.c
+lib/gnome-db-icon-list.c
+lib/gnome-db-init.c
+lib/gnome-db-list.c
+lib/gnome-db-log-viewer.c
+lib/gnome-db-login-dlg.c
+lib/gnome-db-login.c
+lib/gnome-db-print.c
+lib/gnome-db-report.c
+lib/gnome-db-shortcut.c
+lib/gnome-db.c
+manager/gnomedb-mgr-callbacks.c
+manager/gnomedb-mgr-components.c
+manager/gnomedb-mgr-config.c
+manager/gnomedb-mgr-container.c
+manager/gnomedb-mgr-gda.c
+manager/gnomedb-mgr-main.c
+manager/gnomedb-mgr-providers.c
+po/cat-id-tbl.c
+intl/bindtextdom.c
+intl/cat-compat.c
+intl/dcgettext.c
+intl/dgettext.c
+intl/explodename.c
+intl/finddomain.c
+intl/gettext.c
+intl/intl-compat.c
+intl/l10nflist.c
+intl/loadmsgcat.c
+intl/localealias.c
+intl/textdomain.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]