aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-04-13 17:11:32 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-04-13 17:11:32 +0800
commit1117be46a1f26a85bac16ee930204fa1f890c5cd (patch)
treeb0d1d98e4a5176469e3685f2148ea2dd887d692a /libempathy-gtk
parent6eee3479f40b71b0345d30a2ff1e4879aa9eb557 (diff)
downloadgsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.tar
gsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.tar.gz
gsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.tar.bz2
gsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.tar.lz
gsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.tar.xz
gsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.tar.zst
gsoc2013-empathy-1117be46a1f26a85bac16ee930204fa1f890c5cd.zip
Set the default image when clearing the avatar, even if there were no avatar previously. That happens when the widget is created. Fixe bug #566905
From: Xavier Claessens <xclaesse@gmail.com> svn path=/trunk/; revision=2817
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 5d1c90fcb..04a5ed63e 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -578,13 +578,11 @@ avatar_chooser_clear_image (EmpathyAvatarChooser *chooser)
EmpathyAvatarChooserPriv *priv = GET_PRIV (chooser);
GtkWidget *image;
- if (priv->avatar == NULL) {
- return;
+ if (priv->avatar != NULL) {
+ empathy_avatar_unref (priv->avatar);
+ priv->avatar = NULL;
}
- empathy_avatar_unref (priv->avatar);
- priv->avatar = NULL;
-
image = gtk_image_new_from_icon_name ("stock_person", GTK_ICON_SIZE_DIALOG);
gtk_button_set_image (GTK_BUTTON (chooser), image);
g_signal_emit (chooser, signals[CHANGED], 0);