aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-config.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-03-24 06:09:42 +0800
committerChris Toshok <toshok@src.gnome.org>2003-03-24 06:09:42 +0800
commit00748269b5245e7cf6a3bf3fce2a255f3f50f77b (patch)
treece59d54f26a07244be44ecc8a8c34ecd610a8016 /addressbook/gui/component/addressbook-config.c
parent104f97db77e2e2dbcdc798e9d3f1ddf89e4ebe01 (diff)
downloadgsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.tar
gsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.tar.gz
gsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.tar.bz2
gsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.tar.lz
gsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.tar.xz
gsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.tar.zst
gsoc2013-evolution-00748269b5245e7cf6a3bf3fce2a255f3f50f77b.zip
[ fixes bug #31786 ] fix some gtk warnings. (set_advanced_button_state):
2003-03-23 Chris Toshok <toshok@ximian.com> [ fixes bug #31786 ] * gui/component/addressbook-config.c (addressbook_source_dialog_set_source): fix some gtk warnings. (set_advanced_button_state): the advanced dialog isn't present in the glade file anymore, so ifdef everything dealing with it. (addressbook_edit_server_dialog): same. * gui/component/ldap-config.glade: remove all the unused Advanced UI stuff to lessen the amount of strings needing translation. svn path=/trunk/; revision=20472
Diffstat (limited to 'addressbook/gui/component/addressbook-config.c')
-rw-r--r--addressbook/gui/component/addressbook-config.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 31dff3a7bc..8d0e7b1be5 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -290,12 +290,12 @@ static void
addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, AddressbookSource *source)
{
char *string;
- gtk_entry_set_text (GTK_ENTRY (dialog->display_name), source ? source->name : "");
- gtk_entry_set_text (GTK_ENTRY (dialog->host), source ? source->host : "");
- gtk_entry_set_text (GTK_ENTRY (dialog->email), source ? source->email_addr : "");
- gtk_entry_set_text (GTK_ENTRY (dialog->binddn), source ? source->binddn : "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->display_name), source && source->name ? source->name : "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->host), source && source->host ? source->host : "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->email), source && source->email_addr ? source->email_addr : "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->binddn), source && source->binddn ? source->binddn : "");
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO(dialog->port_combo)->entry), source ? source->port : LDAP_PORT_STRING);
- gtk_entry_set_text (GTK_ENTRY (dialog->rootdn), source ? source->rootdn : "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->rootdn), source && source->rootdn ? source->rootdn : "");
string = g_strdup_printf ("%d", source ? source->limit : 100);
gtk_entry_set_text (GTK_ENTRY (dialog->limit_spinbutton), string);
@@ -1140,12 +1140,14 @@ set_advanced_button_state (AddressbookSourceDialog *dialog)
#endif
}
else {
+#ifdef NEW_ADVANCED_UI
gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 1);
/* hide the advanced tabs of the main notebook */
gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 5);
gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 4);
gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 3);
+#endif
}
}
@@ -1343,7 +1345,9 @@ addressbook_edit_server_dialog (GtkTreeModel *model,
AddressbookSource *source;
AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1);
GtkWidget *general_tab_help;
+#ifdef NEW_ADVANCED_UI
GtkWidget *fewer_options_button, *more_options_button;
+#endif
gtk_tree_model_get (model, model_row,
2, &source,
@@ -1387,14 +1391,17 @@ addressbook_edit_server_dialog (GtkTreeModel *model,
/* XXX setup_dn_customization_tab */
#endif
+ sdialog->notebook = glade_xml_get_widget (sdialog->gui, "account-editor-notebook");
+
sdialog->ok_button = glade_xml_get_widget (sdialog->gui, "account-editor-ok-button");
sdialog->cancel_button = glade_xml_get_widget (sdialog->gui, "account-editor-cancel-button");
+#if NEW_ADVANCED_UI
sdialog->advanced_button_notebook = glade_xml_get_widget (sdialog->gui, "account-editor-advanced-button-notebook");
fewer_options_button = glade_xml_get_widget (sdialog->gui, "account-editor-fewer-options-button");
more_options_button = glade_xml_get_widget (sdialog->gui, "account-editor-more-options-button");
+#endif
- sdialog->notebook = glade_xml_get_widget (sdialog->gui, "account-editor-notebook");
#ifdef NEW_ADVANCED_UI
sdialog->objectclasses_label = glade_xml_get_widget (sdialog->gui, "account-editor-objectclasses-label");
g_object_ref (sdialog->objectclasses_label);
@@ -1420,8 +1427,6 @@ addressbook_edit_server_dialog (GtkTreeModel *model,
g_signal_connect (more_options_button,
"clicked", advanced_button_clicked, sdialog);
-#else
- gtk_widget_hide (sdialog->advanced_button_notebook);
#endif
#ifdef NEW_ADVANCED_UI