diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-04-13 17:11:32 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-04-13 17:11:32 +0800 |
commit | 1117be46a1f26a85bac16ee930204fa1f890c5cd (patch) | |
tree | b0d1d98e4a5176469e3685f2148ea2dd887d692a | |
parent | 6eee3479f40b71b0345d30a2ff1e4879aa9eb557 (diff) | |
download | gsoc2013-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
-rw-r--r-- | libempathy-gtk/empathy-avatar-chooser.c | 8 |
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); |