aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-editor.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-09 14:26:21 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-09 14:26:21 +0800
commitc4e2cf13b8e7e97036f88fe5097cd50491fc1908 (patch)
tree853f43d3a896a885a46634045d2b90f4dc6c8541 /addressbook/gui/contact-editor/e-contact-editor.c
parent32d76b8032a8c42b6fda2ccdded568b8bdea2eeb (diff)
downloadgsoc2013-evolution-c4e2cf13b8e7e97036f88fe5097cd50491fc1908.tar.gz
gsoc2013-evolution-c4e2cf13b8e7e97036f88fe5097cd50491fc1908.tar.zst
gsoc2013-evolution-c4e2cf13b8e7e97036f88fe5097cd50491fc1908.zip
Fixed some indentation.
2000-05-09 Christopher James Lahey <clahey@helixcode.com> * 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
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-editor.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c34
1 files changed, 32 insertions, 2 deletions
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) {