aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-12-02 22:04:09 +0800
committerMilan Crha <mcrha@redhat.com>2010-12-02 22:04:09 +0800
commit12ea46655183a26ab59627c5adc43369d9729e50 (patch)
tree1053ddddb4fe6cc02f57c212fc5282e4e2a590a5 /plugins
parent4ab4abecde472fb1be21e5a7b0965019c837b11e (diff)
downloadgsoc2013-evolution-12ea46655183a26ab59627c5adc43369d9729e50.tar.gz
gsoc2013-evolution-12ea46655183a26ab59627c5adc43369d9729e50.tar.zst
gsoc2013-evolution-12ea46655183a26ab59627c5adc43369d9729e50.zip
Bug #555324 - Ask for destination before "Save in Addressbook" inline vCard
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vcard-inline/vcard-inline.c15
1 files changed, 14 insertions, 1 deletions
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 <libebook/e-contact.h>
#include <gtkhtml/gtkhtml-embedded.h>
#include <libedataserverui/e-book-auth-util.h>
+#include <libedataserverui/e-source-selector-dialog.h>
#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);