From c4e2cf13b8e7e97036f88fe5097cd50491fc1908 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 9 May 2000 06:26:21 +0000 Subject: Fixed some indentation. 2000-05-09 Christopher James Lahey * backend/ebook/e-card-simple.c: Fixed some indentation. * contact-editor/contact-editor.glade, contact-editor/e-contact-editor-strings.h: Changed Email to Primary Email. * contact-editor/e-contact-editor.c: Added checkmarks to indicate if data exists in the pull down menus for the phone, address, and email fields. svn path=/trunk/; revision=2933 --- addressbook/contact-editor/e-contact-editor.c | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'addressbook/contact-editor/e-contact-editor.c') diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c index 6205ecdcc6..b24941bca3 100644 --- a/addressbook/contact-editor/e-contact-editor.c +++ b/addressbook/contact-editor/e-contact-editor.c @@ -646,7 +646,7 @@ static void e_contact_editor_build_ui_info(GList *list, GnomeUIInfo **infop) { GnomeUIInfo *info; - GnomeUIInfo singleton = { GNOME_APP_UI_ITEM, NULL, NULL, NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, 0, 0, 0, NULL }; + GnomeUIInfo singleton = { GNOME_APP_UI_TOGGLEITEM, NULL, NULL, NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, 0, 0, 0, NULL }; GnomeUIInfo end = GNOMEUIINFO_END; int length; int i; @@ -811,6 +811,16 @@ _phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor editor->phone_popup = gnome_popup_menu_new(editor->phone_info); } + for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) { + const ECardPhone *phone = e_card_simple_get_phone(editor->simple, i); + gboolean checked; + checked = phone && phone->number && *phone->number; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget), + checked); + gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget), + TRUE); + } + result = _arrow_pressed (widget, button, editor, editor->phone_popup, &editor->phone_list, &editor->phone_info, label, entry, "Add new phone number type"); if (result != -1) { @@ -829,7 +839,7 @@ _email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor int result; if (editor->email_list == NULL) { static char *info[] = { - N_("Email"), + N_("Primary Email"), N_("Email 2"), N_("Email 3") }; @@ -847,6 +857,16 @@ _email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor editor->email_popup = gnome_popup_menu_new(editor->email_info); } + for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) { + const char *string = e_card_simple_get_email(editor->simple, i); + gboolean checked; + checked = string && *string; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget), + checked); + gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget), + TRUE); + } + result = _arrow_pressed (widget, button, editor, editor->email_popup, &editor->email_list, &editor->email_info, "label-email1", "entry-email1", "Add new Email type"); if (result != -1) { @@ -880,6 +900,16 @@ _address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEdito editor->address_popup = gnome_popup_menu_new(editor->address_info); } + for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) { + const ECardAddrLabel *address = e_card_simple_get_address(editor->simple, i); + gboolean checked; + checked = address && address->data && *address->data; + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget), + checked); + gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget), + TRUE); + } + result = _arrow_pressed (widget, button, editor, editor->address_popup, &editor->address_list, &editor->address_info, "label-address1", "text-address", "Add new Address type"); if (result != -1) { -- cgit v1.2.3