aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2004-05-04 09:45:17 +0800
committerHans Petter <hansp@src.gnome.org>2004-05-04 09:45:17 +0800
commit5e64711ac811e291e81a85c9071ee0270c7a1761 (patch)
tree619fc368ec378078583d1d17831c87730757f62e /addressbook/gui
parent3419e14e5bd86e19252fda5fba9c393b59f78396 (diff)
downloadgsoc2013-evolution-5e64711ac811e291e81a85c9071ee0270c7a1761.tar.gz
gsoc2013-evolution-5e64711ac811e291e81a85c9071ee0270c7a1761.tar.zst
gsoc2013-evolution-5e64711ac811e291e81a85c9071ee0270c7a1761.zip
Establish defaults for the phone number option menus.
2004-05-03 Hans Petter Jansson <hpj@ximian.com> * gui/contact-editor/e-contact-editor.c (phones_default): Establish defaults for the phone number option menus. (fill_in_phone_record): Fall back to defaults. svn path=/trunk/; revision=25774
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 0b9868b38c..22e39c36cd 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -159,6 +159,9 @@ phones [] = {
{ E_CONTACT_PHONE_TTYTDD, EVC_X_TTYTDD, NULL }
};
+/* Defaults from the table above */
+gint phones_default [] = { 1, 6, 2, 9 };
+
static EContactField addresses[] = {
E_CONTACT_ADDRESS_WORK,
E_CONTACT_ADDRESS_HOME,
@@ -681,7 +684,8 @@ fill_in_phone_record (EContactEditor *editor, gint record, const gchar *phone, g
g_free (widget_name);
gtk_option_menu_set_history (GTK_OPTION_MENU (phone_type_option_menu),
- phone_type >= 0 ? phone_type : 0);
+ phone_type >= 0 ? phone_type :
+ phones_default [record - 1]);
set_entry_text (editor, GTK_ENTRY (phone_entry), phone ? phone : "");
}