Pass account to the temporary contact dialog
authorArtem Garmash <artemgarmash@gmail.com>
Sat, 16 Jan 2010 23:39:13 +0000 (01:39 +0200)
committerArtem Garmash <artem.garmash@nokia.com>
Sun, 27 Jun 2010 19:13:43 +0000 (22:13 +0300)
src/el-home-applet.c

index 8586e74..5f2c386 100644 (file)
@@ -1094,12 +1094,14 @@ create_temporary_contact_dialog (const gchar *remote_id,
 {
         GtkWidget *dialog = NULL;
         const gchar *vcard = NULL;
+        McAccount *account = NULL;
 
         if (account_id) {
             vcard = osso_abook_account_manager_get_vcard_field (NULL, account_id);
+            account = osso_abook_account_manager_lookup_by_name (NULL, account_id);
         }
 
-        if (vcard) {
+        if (vcard && account) {
                 EVCardAttribute *attribute = e_vcard_attribute_new (NULL, vcard);
 
                 e_vcard_attribute_add_value (attribute, remote_id);
@@ -1107,7 +1109,7 @@ create_temporary_contact_dialog (const gchar *remote_id,
                         (NULL,
                          NULL, /*EBook            *book,*/
                          attribute,
-                         NULL /*McAccount        *account*/);
+                         account);
                 g_signal_connect (dialog,
                                   "response",
                                   G_CALLBACK (gtk_widget_destroy),