]> git.0d.be Git - empathy.git/commitdiff
Create avatar pixbuf only if the theme shows avatars
authorXavier Claessens <xclaesse@src.gnome.org>
Sat, 16 Feb 2008 09:22:44 +0000 (09:22 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 16 Feb 2008 09:22:44 +0000 (09:22 +0000)
svn path=/trunk/; revision=639

libempathy-gtk/empathy-theme-boxes.c

index 30ae59f30f7a4b61887f8191aae8fa4f2333f41d..7285a9e9e061f033a4f7d623a00b871db0e571e4 100644 (file)
@@ -597,15 +597,16 @@ theme_boxes_maybe_append_header (EmpathyTheme        *theme,
        box = gtk_hbox_new (FALSE, 0);
 
 
-       avatar = empathy_chat_view_get_avatar_pixbuf_with_cache (contact);
-       if (avatar && empathy_theme_get_show_avatars (theme)) {
-               GtkWidget *image;
+       if (empathy_theme_get_show_avatars (theme)) {
+               avatar = empathy_chat_view_get_avatar_pixbuf_with_cache (contact);
+               if (avatar) {
+                       GtkWidget *image;
 
-               image = gtk_image_new_from_pixbuf (avatar);
-
-               gtk_box_pack_start (GTK_BOX (box), image,
-                                   FALSE, TRUE, 2);
+                       image = gtk_image_new_from_pixbuf (avatar);
 
+                       gtk_box_pack_start (GTK_BOX (box), image,
+                                           FALSE, TRUE, 2);
+               }
        }
 
        g_signal_connect_object (view, "size-allocate",