diff options
author | Sivaiah Nallagatla <snallagatla@novell.com> | 2004-02-04 00:03:22 +0800 |
---|---|---|
committer | Sivaiah Nallagatla <siva@src.gnome.org> | 2004-02-04 00:03:22 +0800 |
commit | 974669ea4bc44f532c385137ac407ba5aa14d9ce (patch) | |
tree | 821f21a86509ed934c0720a67bc2f672ed7cf455 /addressbook/gui | |
parent | dd5a050770d1e0d53c3280356af5ff6ddf383567 (diff) | |
download | gsoc2013-evolution-974669ea4bc44f532c385137ac407ba5aa14d9ce.tar.gz gsoc2013-evolution-974669ea4bc44f532c385137ac407ba5aa14d9ce.tar.zst gsoc2013-evolution-974669ea4bc44f532c385137ac407ba5aa14d9ce.zip |
use gtk_spin_button_* apis to get and set values for download limit spin
2004-02-03 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
svn path=/trunk/; revision=24582
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 71f768c5eb..eaf0093c77 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -240,10 +240,11 @@ dialog_to_source (AddressbookSourceDialog *dialog, ESource *source, gboolean tem #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 @@ source_to_dialog (AddressbookSourceDialog *dialog) #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") ? |