]> git.0d.be Git - empathy.git/commitdiff
Simplify contact_list_view_cell_set_background()
authorXavier Claessens <xclaesse@src.gnome.org>
Sat, 29 Dec 2007 15:49:18 +0000 (15:49 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 29 Dec 2007 15:49:18 +0000 (15:49 +0000)
svn path=/trunk/; revision=506

libempathy-gtk/empathy-contact-list-view.c

index 73afd299af4cf1762150c9c92b9deac70049490d..9b6a98a6abc41e5bcb1417e5fb778f494ff2e9fd 100644 (file)
@@ -1034,27 +1034,21 @@ contact_list_view_cell_set_background (EmpathyContactListView *view,
 
        style = gtk_widget_get_style (GTK_WIDGET (view));
 
-       if (!is_group) {
-               if (is_active) {
-                       color = style->bg[GTK_STATE_SELECTED];
-
-                       /* Here we take the current theme colour and add it to
-                        * the colour for white and average the two. This
-                        * gives a colour which is inline with the theme but
-                        * slightly whiter.
-                        */
-                       color.red = (color.red + (style->white).red) / 2;
-                       color.green = (color.green + (style->white).green) / 2;
-                       color.blue = (color.blue + (style->white).blue) / 2;
-
-                       g_object_set (cell,
-                                     "cell-background-gdk", &color,
-                                     NULL);
-               } else {
-                       g_object_set (cell,
-                                     "cell-background-gdk", NULL,
-                                     NULL);
-               }
+       if (!is_group && is_active) {
+               color = style->bg[GTK_STATE_SELECTED];
+
+               /* Here we take the current theme colour and add it to
+                * the colour for white and average the two. This
+                * gives a colour which is inline with the theme but
+                * slightly whiter.
+                */
+               color.red = (color.red + (style->white).red) / 2;
+               color.green = (color.green + (style->white).green) / 2;
+               color.blue = (color.blue + (style->white).blue) / 2;
+
+               g_object_set (cell,
+                             "cell-background-gdk", &color,
+                             NULL);
        } else {
                g_object_set (cell,
                              "cell-background-gdk", NULL,