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 --- .../gui/contact-editor/contact-editor.glade | 256 +++++++++++++++------ .../gui/contact-editor/e-contact-editor-strings.h | 4 +- addressbook/gui/contact-editor/e-contact-editor.c | 34 ++- 3 files changed, 214 insertions(+), 80 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade index 910fa873cd..4e6b00888e 100644 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ b/addressbook/gui/contact-editor/contact-editor.glade @@ -15,6 +15,12 @@ False False False + interface.c + interface.h + callbacks.c + callbacks.h + support.c + support.h True e-contact-editor-strings.h @@ -22,6 +28,7 @@ GtkWindow contact editor + True False Contact Editor GTK_WINDOW_TOPLEVEL @@ -34,6 +41,7 @@ GtkNotebook notebook-contact-editor + True True True True @@ -47,6 +55,7 @@ GtkTable table-contact-editor-general 7 + True 11 8 False @@ -56,6 +65,7 @@ GtkEntry entry-phone1 + True True True True @@ -80,6 +90,7 @@ GtkEntry entry-phone2 + True True True True @@ -104,6 +115,7 @@ GtkEntry entry-phone3 + True True True True @@ -128,6 +140,7 @@ GtkEntry entry-phone4 + True True True True @@ -152,6 +165,7 @@ GtkLabel label-phone3 + True GTK_JUSTIFY_CENTER False @@ -178,6 +192,7 @@ GtkLabel label-phone2 + True GTK_JUSTIFY_CENTER False @@ -204,6 +219,7 @@ GtkLabel label-phone1 + True GTK_JUSTIFY_CENTER False @@ -230,6 +246,7 @@ GtkLabel label-phone4 + True GTK_JUSTIFY_LEFT False @@ -258,6 +275,7 @@ text-address 1 1 + True True True @@ -280,7 +298,8 @@ GtkLabel label-email1 - + True + GTK_JUSTIFY_CENTER False 0 @@ -306,6 +325,7 @@ GtkButton button-fullname + True True @@ -327,6 +347,7 @@ GtkAccelLabel accellabel-jobtitle + True GTK_JUSTIFY_CENTER False @@ -353,6 +374,7 @@ GtkAccelLabel accellabel-company + True GTK_JUSTIFY_CENTER False @@ -379,6 +401,7 @@ GtkAccelLabel accellabel-fileas + True GTK_JUSTIFY_CENTER False @@ -405,6 +428,7 @@ GtkAccelLabel accellabel-web + True GTK_JUSTIFY_LEFT False @@ -431,6 +455,7 @@ GtkAlignment alignment2 + True 0 0 0 @@ -453,6 +478,7 @@ GtkCheckButton checkbutton-mailingaddress + True False True @@ -464,6 +490,7 @@ GtkButton button-address + True True @@ -485,6 +512,7 @@ GtkAlignment alignment3 + True 1 0.5 0 @@ -507,6 +535,7 @@ GtkButton button-email1 + True Placeholder @@ -517,6 +546,7 @@ GtkAlignment alignment5 + True 1 0.5 0 @@ -539,6 +569,7 @@ GtkButton button-phone4 + True Placeholder @@ -549,6 +580,7 @@ GtkAlignment alignment7 + True 1 0.5 0 @@ -571,6 +603,7 @@ GtkButton button-phone2 + True Placeholder @@ -581,6 +614,7 @@ GtkAlignment alignment8 + True 1 0.5 0 @@ -603,6 +637,7 @@ GtkButton button-phone1 + True Placeholder @@ -613,6 +648,7 @@ GtkHSeparator hseparator4 + True 4 8 @@ -632,6 +668,7 @@ GtkAlignment alignment6 + True 1 0.5 0 @@ -654,6 +691,7 @@ GtkButton button-phone3 + True Placeholder @@ -664,6 +702,7 @@ GtkEntry entry-fullname + True True True True @@ -688,6 +727,7 @@ GtkEntry entry-jobtitle + True True True True @@ -712,6 +752,7 @@ GtkEntry entry-company + True True True True @@ -736,6 +777,7 @@ GtkEntry entry-email1 + True True True True @@ -760,6 +802,7 @@ GtkEntry entry-web + True True True True @@ -784,6 +827,7 @@ GtkHSeparator hseparator5 + True 0 4 @@ -803,6 +847,7 @@ GtkCombo combo-file-as + True False True True @@ -828,6 +873,7 @@ GtkEntry GtkCombo:entry entry-file-as + True True True True @@ -839,6 +885,7 @@ GtkHSeparator hseparator6 + True 0 4 @@ -858,6 +905,7 @@ GtkHBox hbox5 + True False 0 @@ -878,6 +926,7 @@ GtkText text-comments + True True True @@ -891,6 +940,7 @@ GtkVScrollbar vscrollbar-comments + True GTK_UPDATE_CONTINUOUS 0 0 @@ -909,6 +959,7 @@ GtkAlignment alignment10 + True 0.5 0 1 @@ -931,6 +982,7 @@ GtkCheckButton checkbutton-htmlmail + True False True @@ -942,6 +994,7 @@ GtkAlignment alignment4 + True 1 0.5 0 @@ -964,6 +1017,7 @@ GtkButton button-address1 + True Placeholder @@ -974,6 +1028,7 @@ GtkLabel label-address1 + True GTK_JUSTIFY_CENTER False @@ -1002,6 +1057,7 @@ GtkLabel Notebook:tab label15 + True GTK_JUSTIFY_CENTER False @@ -1015,6 +1071,7 @@ GtkTable table-contact-editor-details 7 + True 9 6 False @@ -1024,6 +1081,7 @@ GtkLabel label21 + True GTK_JUSTIFY_CENTER False @@ -1050,6 +1108,7 @@ GtkLabel label22 + True GTK_JUSTIFY_CENTER False @@ -1076,6 +1135,7 @@ GtkLabel label23 + True GTK_JUSTIFY_CENTER False @@ -1102,6 +1162,7 @@ GtkLabel label24 + True GTK_JUSTIFY_CENTER False @@ -1128,6 +1189,7 @@ GtkLabel label25 + True GTK_JUSTIFY_CENTER False @@ -1154,6 +1216,7 @@ GtkLabel label28 + True GTK_JUSTIFY_CENTER False @@ -1180,6 +1243,7 @@ GtkLabel label31 + True GTK_JUSTIFY_CENTER False @@ -1206,6 +1270,7 @@ GtkLabel label30 + True GTK_JUSTIFY_CENTER False @@ -1232,6 +1297,7 @@ GtkLabel label29 + True GTK_JUSTIFY_CENTER False @@ -1258,6 +1324,7 @@ GtkLabel label32 + True GTK_JUSTIFY_CENTER False @@ -1284,6 +1351,7 @@ GtkEntry entry-spouse + True True True True @@ -1308,6 +1376,7 @@ GtkEntry entry-department + True True True True @@ -1332,6 +1401,7 @@ GtkEntry entry-office + True True True True @@ -1356,6 +1426,7 @@ GtkEntry entry-profession + True True True True @@ -1380,6 +1451,7 @@ GtkEntry entry-nickname + True True True True @@ -1404,6 +1476,7 @@ GtkEntry entry-fburl + True True True True @@ -1428,6 +1501,7 @@ GnomeDateEdit dateedit-anniversary + True False False False @@ -1452,6 +1526,7 @@ GnomeDateEdit dateedit-birthday + True False False False @@ -1476,6 +1551,7 @@ GtkEntry entry-assistant + True True True True @@ -1500,6 +1576,7 @@ GtkEntry entry-manager + True True True True @@ -1524,6 +1601,7 @@ GtkHBox hbox7 + True False 6 @@ -1544,6 +1622,7 @@ GtkLabel label33 + True GTK_JUSTIFY_CENTER False @@ -1561,6 +1640,7 @@ GtkHSeparator hseparator8 + True 0 True @@ -1572,6 +1652,7 @@ GtkHSeparator hseparator7 + True 0 6 @@ -1593,6 +1674,7 @@ GtkLabel Notebook:tab label16 + True GTK_JUSTIFY_CENTER False @@ -1607,6 +1689,7 @@ GnomeDialog dialog2 + True False GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE @@ -1621,6 +1704,7 @@ GtkVBox GnomeDialog:vbox dialog-vbox2 + True False 8 @@ -1629,51 +1713,10 @@ True - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area2 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button28 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button29 - True - True - GNOME_STOCK_BUTTON_APPLY - - - - GtkButton - button30 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - GtkTable table2 + True 2 2 False @@ -1688,6 +1731,7 @@ GtkEntry entry2 + True True True True @@ -1712,6 +1756,7 @@ GtkVBox vbox1 + True False 0 @@ -1732,6 +1777,7 @@ GtkButton button31 + True True @@ -1744,6 +1790,7 @@ GtkButton button32 + True True @@ -1758,6 +1805,7 @@ GtkScrolledWindow scrolledwindow1 200 + True GTK_POLICY_ALWAYS GTK_POLICY_ALWAYS GTK_UPDATE_CONTINUOUS @@ -1780,6 +1828,7 @@ GtkCList clist1 + True True 1 80 @@ -1791,6 +1840,7 @@ GtkLabel CList:title label20 + True GTK_JUSTIFY_CENTER False @@ -1802,39 +1852,12 @@ - - - - - GnomeDialog - dialog-add-phone - False - New phone type - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - vbox2 - False - 8 - - 4 - True - True - GtkHButtonBox GnomeDialog:action_area - hbuttonbox1 + dialog-action_area2 + True GTK_BUTTONBOX_END 8 85 @@ -1850,26 +1873,67 @@ GtkButton - button43 + button28 + True True True - - GNOME_STOCK_PIXMAP_ADD + GNOME_STOCK_BUTTON_OK GtkButton - button44 + button29 + True + True + True + GNOME_STOCK_BUTTON_APPLY + + + + GtkButton + button30 + True True True GNOME_STOCK_BUTTON_CANCEL + + + + + GnomeDialog + dialog-add-phone + True + False + New phone type + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + False + False + False + + + GtkVBox + GnomeDialog:vbox + vbox2 + True + False + 8 + + 4 + True + True + GtkFrame frame-add-phone 4 + True 0 GTK_SHADOW_ETCHED_IN @@ -1883,6 +1947,7 @@ GtkAlignment alignment9 9 + True 0.5 0.5 1 @@ -1891,6 +1956,7 @@ GtkEntry entry-add-phone + True True True True @@ -1899,6 +1965,44 @@ + + + GtkHButtonBox + GnomeDialog:action_area + hbuttonbox1 + True + GTK_BUTTONBOX_END + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + button43 + True + True + True + + GNOME_STOCK_PIXMAP_ADD + + + + GtkButton + button44 + True + True + True + GNOME_STOCK_BUTTON_CANCEL + + diff --git a/addressbook/gui/contact-editor/e-contact-editor-strings.h b/addressbook/gui/contact-editor/e-contact-editor-strings.h index 42be016fbc..436a8b7216 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-strings.h +++ b/addressbook/gui/contact-editor/e-contact-editor-strings.h @@ -9,7 +9,7 @@ gchar *s = N_("Business Fax"); gchar *s = N_("Home"); gchar *s = N_("Business"); gchar *s = N_("Mobile"); -gchar *s = N_("Email"); +gchar *s = N_("Primary Email"); gchar *s = N_("\tFull Name..."); gchar *s = N_("Job Title:"); gchar *s = N_("Company:"); @@ -36,5 +36,5 @@ gchar *s = N_("Add"); gchar *s = N_("Delete"); gchar *s = N_("Phone Types"); gchar *s = N_("New phone type"); -gchar *s = N_("Add"); gchar *s = N_("New phone type"); +gchar *s = N_("Add"); diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 6205ecdcc6..b24941bca3 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/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