From 5e64711ac811e291e81a85c9071ee0270c7a1761 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Tue, 4 May 2004 01:45:17 +0000 Subject: Establish defaults for the phone number option menus. 2004-05-03 Hans Petter Jansson * 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 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/contact-editor/e-contact-editor.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 11439aaf87..2185e12d93 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-05-03 Hans Petter Jansson + + * 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. + 2004-05-03 Hans Petter Jansson * gui/contact-editor/e-contact-editor.c (show_help_cb): Implement. 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 : ""); } -- cgit v1.2.3