]> git.0d.be Git - empathy.git/commitdiff
have EmpathyContactWidget set the account on the account chooser
authorDavyd Madeley <davyd@madeley.id.au>
Wed, 25 Feb 2009 04:55:56 +0000 (13:55 +0900)
committerDavyd Madeley <davyd@madeley.id.au>
Wed, 15 Jul 2009 10:12:16 +0000 (11:12 +0100)
libempathy-gtk/empathy-contact-menu.c
libempathy-gtk/empathy-contact-widget.c

index 5792903c2daefaa66bfbe57ad5e70d2363ee68cb..03db5fda1ec357b4b6eca84bdbf7b93ac8f34a28 100644 (file)
@@ -136,7 +136,6 @@ empathy_contact_add_menu_item_activated (GtkMenuItem *item,
                toplevel = NULL;
        }
 
-       /* FIXME - the contact dialog doesn't set the source account right */
        empathy_new_contact_dialog_show_with_contact (GTK_WINDOW (toplevel),
                                                      contact);
 }
index f078f524808d5a37bd476edf23da3b16e9601842..a9a673c43c44333151d04693a96fa9456a9fcd84 100644 (file)
@@ -400,6 +400,13 @@ contact_widget_set_contact (EmpathyContactWidget *information,
       information->factory = empathy_tp_contact_factory_dup_singleton (connection);
     }
 
+  /* set the selected account to be the account this contact came from */
+  if (contact && EMPATHY_IS_ACCOUNT_CHOOSER (information->widget_account)) {
+      empathy_account_chooser_set_account (
+                     EMPATHY_ACCOUNT_CHOOSER (information->widget_account),
+                     empathy_contact_get_account (contact));
+  }
+
   /* Update information for widgets */
   contact_widget_contact_update (information);
   contact_widget_groups_update (information);