[evolution-patches] [addressbook] Patch for bug #303046
- From: Devashish <sdevashish novell com>
- To: patches <evolution-patches gnome org>
- Subject: [evolution-patches] [addressbook] Patch for bug #303046
- Date: Fri, 03 Feb 2006 14:13:32 +0530
Hi,
The attach patch fixes the bug
303046 – Select Contacts From Address Book Screen Doesn't Use Current
Contact Source
Thanks
Devashish Sharma
Index: libedataserverui/e-name-selector-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-dialog.c,v
retrieving revision 1.26
diff -u -p -r1.26 e-name-selector-dialog.c
--- libedataserverui/e-name-selector-dialog.c 1 Feb 2006 08:26:33 -0000 1.26
+++ libedataserverui/e-name-selector-dialog.c 3 Feb 2006 08:44:28 -0000
@@ -222,6 +222,29 @@ e_name_selector_dialog_init (ENameSelect
/* Create source menu */
widget = e_source_option_menu_new (name_selector_dialog->source_list);
+
+ GConfClient *gconf_client;
+ char *uid;
+
+ gconf_client = gconf_client_get_default();
+ uid = gconf_client_get_string (gconf_client, "/apps/evolution/addressbook/display/primary_addressbook",
+ NULL);
+ g_object_unref (gconf_client);
+ if (uid) {
+ ESource *source = e_source_list_peek_source_by_uid(name_selector_dialog->source_list, uid);
+ if (source) {
+ e_source_option_menu_select ((ESourceOptionMenu *)widget, source);
+ source_selected (name_selector_dialog, source);
+ }
+ else {
+ source_selected (name_selector_dialog, find_first_source (name_selector_dialog->source_list));
+ }
+ g_free (uid);
+ }
+ else {
+ source_selected (name_selector_dialog, find_first_source (name_selector_dialog->source_list));
+ }
+
g_signal_connect_swapped (widget, "source_selected", G_CALLBACK (source_selected), name_selector_dialog);
label = glade_xml_get_widget (name_selector_dialog->gui, "AddressBookLabel");
@@ -243,7 +266,6 @@ e_name_selector_dialog_init (ENameSelect
/* TODO: Remember last used source */
- source_selected (name_selector_dialog, find_first_source (name_selector_dialog->source_list));
/* Set up dialog defaults */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]