From 12ea46655183a26ab59627c5adc43369d9729e50 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 2 Dec 2010 15:04:09 +0100 Subject: Bug #555324 - Ask for destination before "Save in Addressbook" inline vCard --- plugins/vcard-inline/vcard-inline.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'plugins/vcard-inline') diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c index 5891344d22..dfa19666e9 100644 --- a/plugins/vcard-inline/vcard-inline.c +++ b/plugins/vcard-inline/vcard-inline.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "addressbook/gui/merging/eab-contact-merging.h" #include "addressbook/gui/widgets/eab-contact-display.h" @@ -151,10 +152,22 @@ org_gnome_vcard_inline_save_cb (VCardInlinePObject *vcard_object) { ESource *source; GList *contact_list; + GtkWidget*dialog; g_return_if_fail (vcard_object->source_list != NULL); - source = e_source_list_peek_default_source (vcard_object->source_list); + dialog = e_source_selector_dialog_new (NULL, vcard_object->source_list); + + e_source_selector_dialog_select_default_source (E_SOURCE_SELECTOR_DIALOG (dialog)); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK) { + gtk_widget_destroy (dialog); + return; + } + + source = e_source_selector_dialog_peek_primary_selection (E_SOURCE_SELECTOR_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_return_if_fail (source != NULL); contact_list = g_list_copy (vcard_object->contact_list); -- cgit