aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/vcard-inline
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-12-02 22:04:09 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:06 +0800
commitcfffc1befe8fd0d2f3f7e66121ca421470c908db (patch)
tree6f0dfd53f7ac091433074ff3faa186adaa18ab8e /plugins/vcard-inline
parentcb83f7e4032b9cb32653bbdaf392f5db008b5558 (diff)
downloadgsoc2013-evolution-cfffc1befe8fd0d2f3f7e66121ca421470c908db.tar.gz
gsoc2013-evolution-cfffc1befe8fd0d2f3f7e66121ca421470c908db.tar.zst
gsoc2013-evolution-cfffc1befe8fd0d2f3f7e66121ca421470c908db.zip
Bug #555324 - Ask for destination before "Save in Addressbook" inline vCard
Diffstat (limited to 'plugins/vcard-inline')
-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);