[evolution-patches] address book patch to fix #53432



Hi,
The attached patch solves the problem of showing always 100 for download
limit instead of the last configured value in search page of address
book properties dialog.  The configured value is stored in gconf , but
is not shown correctly in search page because of the incorrect api used
to set the value. Changed the apis used from gtk_entry_* to
gtk_spin_button_*

Thanks,
Siva
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1562
diff -u -r1.1562 ChangeLog
--- ChangeLog	30 Jan 2004 22:52:37 -0000	1.1562
+++ ChangeLog	31 Jan 2004 10:14:22 -0000
@@ -1,3 +1,10 @@
+2004 -01-31 Sivaiah Nallagatla <snallagatla novell com>
+	
+	* gui/component/addressbook-config.c (dialog_to_source)
+	(source_to_dialog) : use gtk_spin_button_* apis to get and set 
+	values for download limit spin button instead of gtk_entry 
+	Fixes #53432 
+		
 2004-01-30  Chris Toshok  <toshok ximian com>
 
 	* gui/contact-editor/e-contact-editor.c: enable d&d drop photos.
Index: gui/component/addressbook-config.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-config.c,v
retrieving revision 1.66
diff -u -r1.66 addressbook-config.c
--- gui/component/addressbook-config.c	29 Jan 2004 20:04:38 -0000	1.66
+++ gui/component/addressbook-config.c	31 Jan 2004 10:14:22 -0000
@@ -240,10 +240,11 @@
 #ifdef HAVE_LDAP
 		e_source_set_property (source, "email_addr", gtk_entry_get_text (GTK_ENTRY (dialog->email)));
 		e_source_set_property (source, "binddn", gtk_entry_get_text (GTK_ENTRY (dialog->binddn)));
-		e_source_set_property (source, "limit", gtk_entry_get_text (GTK_ENTRY (dialog->limit_spinbutton)));
+		str = g_strdup_printf ("%d", gtk_spin_button_get_value_as_int (GTK_ENTRY (dialog->limit_spinbutton)));
+		e_source_set_property (source, "limit", str);
+		g_free (str);
 		e_source_set_property (source, "ssl", ldap_unparse_ssl (dialog->ssl));
 		e_source_set_property (source, "auth", ldap_unparse_auth (dialog->auth));
-
 		str = g_strdup_printf ("%s:%s/%s?" /* trigraph prevention */ "?%s",
 				       gtk_entry_get_text (GTK_ENTRY (dialog->host)),
 				       gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (dialog->port_combo)->entry)),
@@ -329,10 +330,10 @@
 #ifdef HAVE_LDAP
 	gtk_entry_set_text (GTK_ENTRY (dialog->email), SOURCE_PROP_STRING (source, "email_addr"));
 	gtk_entry_set_text (GTK_ENTRY (dialog->binddn), SOURCE_PROP_STRING (source, "binddn"));
-	gtk_entry_set_text (GTK_ENTRY (dialog->limit_spinbutton),
-			    source && e_source_get_property (source, "limit") ?
-			    e_source_get_property (source, "limit") : "100");
-
+	gtk_spin_button_set_value ( GTK_SPIN_BUTTON (dialog->limit_spinbutton),
+				    g_strtod ( source && e_source_get_property (source, "limit") ?
+					       e_source_get_property (source, "limit") : "100", NULL));
+	
 	dialog->auth = source && e_source_get_property (source, "auth") ?
 		ldap_parse_auth (e_source_get_property (source, "auth")) : ADDRESSBOOK_LDAP_AUTH_NONE;
 	dialog->ssl = source && e_source_get_property (source, "ssl") ?


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