changeset 25105:fc3600ba68f1

fixed group coloring
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Fri, 18 Jul 2008 22:31:28 +0000
parents 2ccad3a8d9fe
children d17d6e83f428
files pidgin/gtkblist-theme.c pidgin/gtkblist.c
diffstat 2 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist-theme.c	Fri Jul 18 09:03:40 2008 +0000
+++ b/pidgin/gtkblist-theme.c	Fri Jul 18 22:31:28 2008 +0000
@@ -303,12 +303,12 @@
 	pspec = g_param_spec_pointer("collapsed-color", "Collapsed Background Color",
 				    "The background color of a collapsed group",
 				    G_PARAM_READWRITE);
-	g_object_class_install_property(obj_class, PROP_EXPANDED_COLOR, pspec);
+	g_object_class_install_property(obj_class, PROP_COLLAPSED_COLOR, pspec);
 
 	pspec = g_param_spec_pointer("collapsed-text", "Collapsed Text",
                                      "The text information for when a group is collapsed",
                                      G_PARAM_READWRITE);
-	g_object_class_install_property(obj_class, PROP_EXPANDED_TEXT, pspec);
+	g_object_class_install_property(obj_class, PROP_COLLAPSED_TEXT, pspec);
 
 	/* Buddy */
 	pspec = g_param_spec_pointer("buddy-bgcolor1", "Buddy Background Color 1",
--- a/pidgin/gtkblist.c	Fri Jul 18 09:03:40 2008 +0000
+++ b/pidgin/gtkblist.c	Fri Jul 18 22:31:28 2008 +0000
@@ -5980,7 +5980,7 @@
 		GtkTreeIter iter;
 		GtkTreePath *path;
 		gboolean expanded;
-		GdkColor *bgcolor;
+		GdkColor *bgcolor = NULL;
 		GdkPixbuf *avatar = NULL;
 		PidginBlistTheme *theme;
 
@@ -5989,15 +5989,11 @@
 
 		theme = pidgin_blist_get_theme();
 
-		/*if(theme == NULL){
+		if (theme == NULL)
 			bgcolor = &(gtkblist->treeview->style->bg[GTK_STATE_ACTIVE]);
-g_print("\nNULL\n");
-		}
-		else if(purple_blist_node_get_bool(gnode, "collapsed"))
-			bgcolor = (pidgin_blist_theme_get_collapsed_text_info(theme))->color;
-		else bgcolor = (pidgin_blist_theme_get_expanded_text_info(theme))->color;
-
-g_print("\n\n\%s\n\n", gdk_color_to_string(&bgcolor));*/
+		else if (purple_blist_node_get_bool(gnode, "collapsed") || count <= 0)
+			bgcolor = pidgin_blist_theme_get_collapsed_background_color(theme);
+		else bgcolor = pidgin_blist_theme_get_expanded_background_color(theme);
 
 		path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter);
 		expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path);
@@ -6015,7 +6011,7 @@
 				   STATUS_ICON_COLUMN, NULL,
 				   NAME_COLUMN, title,
 				   NODE_COLUMN, gnode,
-				   BGCOLOR_COLUMN, &bgcolor,
+				   BGCOLOR_COLUMN, bgcolor,
 				   GROUP_EXPANDER_COLUMN, TRUE,
 				   GROUP_EXPANDER_VISIBLE_COLUMN, TRUE,
 				   CONTACT_EXPANDER_VISIBLE_COLUMN, FALSE,