From e12d64b4eb485713e28eb1b5da075343fc715ea5 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Wed, 17 Dec 2003 00:52:18 +0000 Subject: Implement. Makes the source menu reflect the source for the current book. 2003-12-16 Hans Petter Jansson * gui/contact-editor/e-contact-editor.c (set_source_field): Implement. Makes the source menu reflect the source for the current book. svn path=/trunk/; revision=23955 --- addressbook/gui/contact-editor/e-contact-editor.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'addressbook/gui/contact-editor') diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index d29f700d1b..517d21b9bb 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -55,6 +55,7 @@ #include "e-util/e-gui-utils.h" #include "widgets/misc/e-dateedit.h" #include "widgets/misc/e-url-entry.h" +#include "widgets/misc/e-source-option-menu.h" #include "shell/evolution-shell-component-utils.h" #include "eab-contact-merging.h" @@ -2034,6 +2035,18 @@ set_phone_field(EContactEditor *editor, GtkWidget *entry, const char *phone_numb set_field(editor, GTK_ENTRY(entry), phone_number ? phone_number : ""); } +static void +set_source_field (EContactEditor *editor) +{ + GtkWidget *source_menu; + ESource *source; + + source_menu = glade_xml_get_widget (editor->gui, "source-option-menu-source"); + source = e_book_get_source (editor->book); + + e_source_option_menu_select (E_SOURCE_OPTION_MENU (source_menu), source); +} + static void set_fields(EContactEditor *editor) { @@ -2096,6 +2109,7 @@ set_fields(EContactEditor *editor) } set_address_field(editor, i); + set_source_field (editor); } static void -- cgit v1.2.3