diff options
author | Larry Ewing <lewing@ximian.com> | 2004-05-02 02:20:29 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2004-05-02 02:20:29 +0800 |
commit | 9e173e858deaf29b7401dc1636a97756d63b1029 (patch) | |
tree | 269b51b712c5e90608596a6cde555bb28897c795 | |
parent | 232fdbda2116b07923f2a1495aa8f440d71da924 (diff) | |
download | gsoc2013-evolution-9e173e858deaf29b7401dc1636a97756d63b1029.tar.gz gsoc2013-evolution-9e173e858deaf29b7401dc1636a97756d63b1029.tar.zst gsoc2013-evolution-9e173e858deaf29b7401dc1636a97756d63b1029.zip |
sensitize the details dialog where appropriate. Don't try to read from
2004-05-01 Larry Ewing <lewing@ximian.com>
* gui/component/addressbook-config.c: sensitize the details dialog
where appropriate. Don't try to read from widgets that don't
exist.
svn path=/trunk/; revision=25735
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 18 |
2 files changed, 17 insertions, 7 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 152faed889..a82bd5c531 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-05-01 Larry Ewing <lewing@ximian.com> + + * gui/component/addressbook-config.c: sensitize the details dialog + where appropriate. Don't try to read from widgets that don't + exist. + 2004-04-30 Chris Toshok <toshok@ximian.com> * util/e-destination.c (e_destination_set_contact): don't use diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index ddd6fb21ef..963e62c405 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -339,7 +339,8 @@ source_to_dialog_new (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")); + if (dialog->binddn) + gtk_entry_set_text (GTK_ENTRY (dialog->binddn), SOURCE_PROP_STRING (source, "binddn")); 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)); @@ -376,10 +377,6 @@ source_to_dialog_new (AddressbookSourceDialog *dialog) } gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->auth_optionmenu), dialog->auth); - - gtk_widget_set_sensitive (dialog->auth_label_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE); - gtk_widget_set_sensitive (dialog->auth_entry_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE); - gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->scope_optionmenu), dialog->scope); gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->ssl_optionmenu), dialog->ssl); #endif @@ -618,8 +615,9 @@ setup_general_tab (AddressbookSourceDialog *dialog, ModifyFunc modify_func) add_focus_handler (dialog->email, general_tab_help, 1); dialog->binddn = glade_xml_get_widget (dialog->gui, "dn-entry"); - g_signal_connect (dialog->binddn, "changed", - G_CALLBACK (modify_func), dialog); + if (dialog->binddn) + g_signal_connect (dialog->binddn, "changed", + G_CALLBACK (modify_func), dialog); if (general_tab_help) add_focus_handler (dialog->binddn, general_tab_help, 2); @@ -1022,8 +1020,14 @@ add_folder_modify (GtkWidget *widget, AddressbookSourceDialog *sdialog) valid = general_tab_check (sdialog); if (valid) valid = connecting_tab_check (sdialog); + + gtk_widget_set_sensitive (glade_xml_get_widget (sdialog->gui, "details-label"), valid); + + gtk_widget_set_sensitive (glade_xml_get_widget (sdialog->gui, "details-vbox"), valid); + if (valid) valid = searching_tab_check (sdialog); + else #endif gtk_widget_set_sensitive (sdialog->ok_button, valid); |