diff options
author | Chris Toshok <toshok@ximian.com> | 2002-09-23 10:08:33 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-09-23 10:08:33 +0800 |
commit | b1f059527b0683e4583397c9dd310f26cae5c2a8 (patch) | |
tree | b96acfd4698814e577d00e09d02e89eb87cb6f84 | |
parent | eda4e47a7d1908d498560cb20adfd5d6a835f49d (diff) | |
download | gsoc2013-evolution-b1f059527b0683e4583397c9dd310f26cae5c2a8.tar.gz gsoc2013-evolution-b1f059527b0683e4583397c9dd310f26cae5c2a8.tar.zst gsoc2013-evolution-b1f059527b0683e4583397c9dd310f26cae5c2a8.zip |
[ Fixes #30481 ] initialize the select names dialog with the default
2002-09-22 Chris Toshok <toshok@ximian.com>
[ Fixes #30481 ]
* gui/component/select-names/e-select-names.c
(e_select_names_init): initialize the select names dialog with the
default contacts folder.
svn path=/trunk/; revision=18160
-rw-r--r-- | addressbook/ChangeLog | 7 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 29 |
2 files changed, 29 insertions, 7 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index f9e4f4bcf2..570f1f8d32 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,12 @@ 2002-09-22 Chris Toshok <toshok@ximian.com> + [ Fixes #30481 ] + * gui/component/select-names/e-select-names.c + (e_select_names_init): initialize the select names dialog with the + default contacts folder. + +2002-09-22 Chris Toshok <toshok@ximian.com> + [ Fixes #28165, 29171 ] * gui/component/select-names/e-select-names-manager.c (uris_listener): check to see if the value has really changed. diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 2d91290be4..9dfebe4ca2 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -494,6 +494,10 @@ e_select_names_init (ESelectNames *e_select_names) const char *selector_types[] = { "contacts", "ldap-contacts", NULL }; char *filename; char *uri; + char *contacts_uri, *contacts_path; + Bonobo_ConfigDatabase db; + + db = addressbook_config_database (NULL); gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL); e_select_names->gui = gui; @@ -554,11 +558,25 @@ e_select_names_init (ESelectNames *e_select_names) gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_query), e_select_names); + contacts_path = bonobo_config_get_string_with_default (db, "/DefaultFolders/contacts_path", + "evolution:/local/Contacts", + NULL); + + filename = gnome_util_prepend_user_home("evolution/local/Contacts"); + uri = g_strdup_printf("file://%s", filename); + + contacts_uri = bonobo_config_get_string_with_default (db, "/DefaultFolders/contacts_uri", + uri, + NULL); + + g_free (filename); + g_free (uri); + button = glade_xml_get_widget (gui, "folder-selector"); evolution_folder_selector_button_construct (EVOLUTION_FOLDER_SELECTOR_BUTTON (button), global_shell_client, _("Find contact in"), - "evolution:/local/Contacts", + contacts_path, selector_types); if (button && EVOLUTION_IS_FOLDER_SELECTOR_BUTTON (button)) gtk_signal_connect(GTK_OBJECT(button), "selected", @@ -570,13 +588,10 @@ e_select_names_init (ESelectNames *e_select_names) GTK_SIGNAL_FUNC (selection_change), e_select_names); selection_change (e_table_scrolled_get_table (e_select_names->table), e_select_names); - filename = gnome_util_prepend_user_home("evolution/local/Contacts"); - uri = g_strdup_printf("file://%s", filename); - - addressbook_model_set_uri(e_select_names, e_select_names->model, uri); + addressbook_model_set_uri(e_select_names, e_select_names->model, contacts_uri); - g_free(uri); - g_free(filename); + g_free (contacts_uri); + g_free (contacts_path); } static void e_select_names_child_free(char *key, ESelectNamesChild *child, ESelectNames *e_select_names) |