soc.2008.themes: 22a06590: Fixes a bug in the blist theme where a l...

ffdragon at soc.pidgin.im ffdragon at soc.pidgin.im
Fri Aug 29 22:55:22 EDT 2008


-----------------------------------------------------------------
Revision: 22a0659074cef317fb0f96d98d9628d193dd224d
Ancestor: ddb5916cc2546a41ae60e13a617be76ee3d33b5a
Author: ffdragon at soc.pidgin.im
Date: 2008-08-30T01:10:22
Branch: im.pidgin.soc.2008.themes
URL: http://d.pidgin.im/viewmtn/revision/info/22a0659074cef317fb0f96d98d9628d193dd224d

Modified files:
        pidgin/gtkblist.c pidgin/gtkcellrendererexpander.c

ChangeLog: 

Fixes a bug in the blist theme where a line appears only under the expander

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	4f11457503d5214db515cd013d11562e10853021
+++ pidgin/gtkblist.c	f293b1c319bfc9aab60024a7a6d08b4a15e06875
@@ -6023,9 +6023,6 @@ static void pidgin_blist_update_group(Pu
 			bgcolor = pidgin_blist_theme_get_collapsed_background_color(theme);
 		else bgcolor = pidgin_blist_theme_get_expanded_background_color(theme);
 
-		if (bgcolor == NULL)
-			bgcolor = &(gtkblist->treeview->style->bg[GTK_STATE_ACTIVE]);
-
 		path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter);
 		expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path);
 		gtk_tree_path_free(path);
============================================================
--- pidgin/gtkcellrendererexpander.c	3dac1205d95c6007b6ebea7d33e6cd66035caa50
+++ pidgin/gtkcellrendererexpander.c	35188ce530c0a338f31f0398b2b4b31e74b8b1a8
@@ -228,7 +228,7 @@ static void pidgin_cell_renderer_expande
 }
 
 
-static void pidgin_cell_renderer_expander_render (GtkCellRenderer *cell,
+static void pidgin_cell_renderer_expander_render(GtkCellRenderer *cell,
 					       GdkWindow       *window,
 					       GtkWidget       *widget,
 					       GdkRectangle    *background_area,
@@ -237,7 +237,7 @@ static void pidgin_cell_renderer_expande
 					       guint            flags)
 {
 	PidginCellRendererExpander *cellexpander = (PidginCellRendererExpander *) cell;
-	
+	gboolean set;
 	gint width, height;
 	GtkStateType state;
 
@@ -270,7 +270,10 @@ static void pidgin_cell_renderer_expande
 			    cell_area->x + cell->xpad + (width / 2),
 			    cell_area->y + cell->ypad + (height / 2),
 			    cell->is_expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED);
-	if (cell->is_expanded)
+
+	/* only draw the line if the color isn't set - this prevents a bug where the hline appears only under the expander */
+	g_object_get(cellexpander, "cell-background-set", &set, NULL);
+	if (cell->is_expanded && !set)
 		gtk_paint_hline (widget->style, window, state, NULL, widget, NULL, 0, 
 				 widget->allocation.width, cell_area->y + cell_area->height);
 }


More information about the Commits mailing list