aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-widget.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:26:05 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:26:05 +0800
commite544975ba6c4c5b448034ad748f4e73b4e75fdbc (patch)
tree10e40dee650f64bc41a73a319647cb4e14e23a25 /libempathy-gtk/empathy-contact-widget.c
parent1025757ce5cfcf597acf3c1a813cada46f29fa46 (diff)
downloadgsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.tar
gsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.tar.gz
gsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.tar.bz2
gsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.tar.lz
gsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.tar.xz
gsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.tar.zst
gsoc2013-empathy-e544975ba6c4c5b448034ad748f4e73b4e75fdbc.zip
Update AvatarChooser::account when changed in ContactWidget
svn path=/trunk/; revision=1676
Diffstat (limited to 'libempathy-gtk/empathy-contact-widget.c')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 6b70bcaaf..f3a9d33f6 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -105,6 +105,8 @@ static void contact_widget_contact_update (EmpathyContactWidget *information);
static void contact_widget_change_contact (EmpathyContactWidget *information);
static void contact_widget_avatar_changed_cb (EmpathyAvatarChooser *chooser,
EmpathyContactWidget *information);
+static void contact_widget_update_avatar_chooser_account (
+ EmpathyContactWidget *information);
static void contact_widget_account_changed_cb (GtkComboBox *widget,
EmpathyContactWidget *information);
static gboolean contact_widget_id_focus_out_cb (GtkWidget *widget,
@@ -527,6 +529,7 @@ contact_widget_contact_setup (EmpathyContactWidget *information)
g_signal_connect (information->widget_account, "changed",
G_CALLBACK (contact_widget_account_changed_cb),
information);
+ contact_widget_update_avatar_chooser_account (information);
}
else
{
@@ -727,10 +730,31 @@ contact_widget_avatar_changed_cb (EmpathyAvatarChooser *chooser,
}
}
+
+static void
+contact_widget_update_avatar_chooser_account (EmpathyContactWidget *information)
+{
+ McAccount *account;
+ EmpathyAccountChooser *account_chooser;
+
+ g_assert (EMPATHY_IS_ACCOUNT_CHOOSER (information->widget_account));
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (information->widget_account);
+
+ if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_AVATAR)
+ {
+ g_assert (EMPATHY_IS_AVATAR_CHOOSER (information->widget_avatar));
+
+ account = empathy_account_chooser_get_account (account_chooser);
+ g_object_set (information->widget_avatar, "account", account, NULL);
+ }
+}
+
+
static void
contact_widget_account_changed_cb (GtkComboBox *widget,
EmpathyContactWidget *information)
{
+ contact_widget_update_avatar_chooser_account (information);
contact_widget_change_contact (information);
}