[Fwd: Re: [gnome-db] Bug in gnomedb 1.0.4 - data source selector widget]



-- 
Daniel Espinosa Ortiz <esodan yahoo com mx>
--- Begin Message ---
Attached you'll find the diff file (patch) for a bug in the
gnome-db-data-source-selector.c, when you try to use the
gnome-db-login-dialog; was a missing code (taked from the 1.0.3
version).

And a patch where the menu_item from the gnome-db-option-menu, is not
correctly obtained.

In the near future, I think the gtk_option_menu need be remplaced for
gtk_combo_box new in the GNOME 2.6.

El dom, 01-08-2004 a las 05:31, Rodrigo Moya escribió:
> On Mon, 2004-07-19 at 21:25 -0500, Daniel Espinosa Ortiz wrote:
> > Ofcourse, but please tell me how.
> > 
> > Now I have a version with the patch of all the bugs I summit, but how?
> > 
> > Do I need a CVS copy and have a diff file? Please, tell me how becouse I
> > haven't experience with the CVS work.
> > 
> yes, you need to send patches made from the CVS version or a released
> tarball. The preferred way is via CVS, since the other way might create
> conflicts between the patches.
> 
> It is very easy though to use the CVS version:
> 
> 1) get it:
> 
> cvs -z3 -d :pserver:anonymous anoncvs gnome org:/cvs/gnome co libgnomedb
> 
> 2) modify the files
> 
> 3) send the patch:
> 
> cvs -z3 diff -u > /tmp/patch
> 
> /tmp/patch will contain the differences between the CVS version and your
> local copy.
> 
> > Could I send the entry tar.gz file with my corrections or just the files
> > I change (I don't perfectly remember wich).
> > 
> unless you send a diff file, better not to send that tar.gz. If you
> can't get CVS, use the diff command to get the patch file:
> 
> $ diff -u original_sources_dir modified_tarball_dir > /tmp/patch
> 
> although that could create an unappliable patch, so as I said, better to
> use the CVS version please.
-- 
Daniel Espinosa Ortiz <esodan yahoo com mx>
Index: libgnomedb/libgnomedb/gnome-db-data-source-selector.c
===================================================================
RCS file: /cvs/gnome/libgnomedb/libgnomedb/gnome-db-data-source-selector.c,v
retrieving revision 1.11
diff -u -r1.11 gnome-db-data-source-selector.c
--- libgnomedb/libgnomedb/gnome-db-data-source-selector.c	4 Apr 2004 16:07:35 -0000	1.11
+++ libgnomedb/libgnomedb/gnome-db-data-source-selector.c	3 Aug 2004 19:05:36 -0000
@@ -46,11 +46,25 @@
 show_data_sources (GnomeDbDataSourceSelector *selector, const gchar *name)
 {
 	GdaDataSourceInfo *dsn_info = NULL;
+	GList *dsn_list, *l;
 
 	g_return_if_fail (GNOME_DB_IS_DATA_SOURCE_SELECTOR (selector));
 
 	gtk_option_menu_remove_menu (GTK_OPTION_MENU (selector));
+	/* load data sources */
+	dsn_list = gnome_db_config_get_data_source_list ();
+	for (l = dsn_list; l != NULL; l = l->next) {
+		GdaDataSourceInfo *dsn_info = (GdaDataSourceInfo *) l->data;
 
+		if (!dsn_info)
+			continue;
+
+		if (name != NULL && strcmp (name, dsn_info->name) != 0)
+			continue;
+
+		/* add the data source to the option menu */
+		gnome_db_option_menu_add_item (GTK_OPTION_MENU (selector), dsn_info->name);
+	}
 	if (name != NULL) {
 		dsn_info = gnome_db_config_find_data_source (name);
 		if (dsn_info != NULL) {
Index: libgnomedb/libgnomedb/gnome-db-login.c
===================================================================
RCS file: /cvs/gnome/libgnomedb/libgnomedb/gnome-db-login.c,v
retrieving revision 1.23
diff -u -r1.23 gnome-db-login.c
--- libgnomedb/libgnomedb/gnome-db-login.c	14 Nov 2003 13:25:28 -0000	1.23
+++ libgnomedb/libgnomedb/gnome-db-login.c	3 Aug 2004 19:05:36 -0000
@@ -326,6 +326,8 @@
 gnome_db_login_set_dsn (GnomeDbLogin *login, const gchar *dsn)
 {
 	g_return_if_fail (GNOME_DB_IS_LOGIN (login));
+	g_return_if_fail (GTK_IS_OPTION_MENU(login->priv->dsn_entry));
+
 	gnome_db_option_menu_set_selection (GTK_OPTION_MENU (login->priv->dsn_entry), dsn);
 }
 
Index: libgnomedb/libgnomedb/gnome-db-util.c
===================================================================
RCS file: /cvs/gnome/libgnomedb/libgnomedb/gnome-db-util.c,v
retrieving revision 1.57
diff -u -r1.57 gnome-db-util.c
--- libgnomedb/libgnomedb/gnome-db-util.c	9 Mar 2004 10:56:28 -0000	1.57
+++ libgnomedb/libgnomedb/gnome-db-util.c	3 Aug 2004 19:05:37 -0000
@@ -608,10 +608,13 @@
 gnome_db_option_menu_get_selection (GtkOptionMenu *option_menu)
 {
 	GtkWidget *menu_item;
+	GtkWidget *menu;
 
 	g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), NULL);
 
-	menu_item = option_menu->menu_item;
+	menu = gtk_option_menu_get_menu(option_menu);
+	menu_item = gtk_menu_get_active(menu);
+
 	if (GTK_IS_MENU_ITEM (menu_item)) {
 		return (const gchar *) g_object_get_data (G_OBJECT (menu_item),
 							  "GNOME:Database:MenuItemLabel");

--- End Message ---


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