empathy r2816 - branches/gnome-2-26/libempathy-gtk



Author: xclaesse
Date: Mon Apr 13 09:09:54 2009
New Revision: 2816
URL: http://svn.gnome.org/viewvc/empathy?rev=2816&view=rev

Log:
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>

Modified:
   branches/gnome-2-26/libempathy-gtk/empathy-avatar-chooser.c

Modified: branches/gnome-2-26/libempathy-gtk/empathy-avatar-chooser.c
==============================================================================
--- branches/gnome-2-26/libempathy-gtk/empathy-avatar-chooser.c	(original)
+++ branches/gnome-2-26/libempathy-gtk/empathy-avatar-chooser.c	Mon Apr 13 09:09:54 2009
@@ -578,13 +578,11 @@
 	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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]