im.pidgin.pidgin: a6134133e4aaabe5472511722ebd1f17e07134cc

sadrul at pidgin.im sadrul at pidgin.im
Fri Dec 21 04:35:44 EST 2007


-----------------------------------------------------------------
Revision: a6134133e4aaabe5472511722ebd1f17e07134cc
Ancestor: 70b3c6fe54dd2678b33b1b1da78c4e66acd20931
Author: sadrul at pidgin.im
Date: 2007-12-21T09:03:20
Branch: im.pidgin.pidgin

Modified files:
        pidgin/gtkconv.c

ChangeLog: 

This fixes the tab-coloring issue that's been bugging seanegn.

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	b7237a49a766d72614f1c0ebc19139c59cb32824
+++ pidgin/gtkconv.c	a4c13291d5cf51b3653ee86a0cb31f842d44fbf1
@@ -7912,6 +7912,7 @@ pidgin_conversations_init(void)
 		/* Set default tab colors */
 		GString *str = g_string_new(NULL);
 		GtkSettings *settings = gtk_settings_get_default();
+		GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now;
 		struct {
 			const char *stylename;
 			const char *labelname;
@@ -7926,8 +7927,9 @@ pidgin_conversations_init(void)
 		};
 		int iter;
 		for (iter = 0; styles[iter].stylename; iter++) {
-			if (!gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE))
-				/* Apparently both ACTIVE and NORMAL are required */
+			now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE);
+			if (parent == now ||
+					(parent && now && parent->rc_style == now->rc_style)) {
 				g_string_append_printf(str, "style \"%s\" {\n"
 						"fg[ACTIVE] = \"%s\"\n"
 						"}\n"
@@ -7935,6 +7937,7 @@ pidgin_conversations_init(void)
 						styles[iter].stylename,
 						styles[iter].color,
 						styles[iter].labelname, styles[iter].stylename);
+			}
 		}
 		gtk_rc_parse_string(str->str);
 		g_string_free(str, TRUE);
@@ -9335,6 +9338,7 @@ pidgin_conv_tab_pack(PidginWindow *win, 
 		gtkconv->tabby = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
 	else
 		gtkconv->tabby = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+	gtk_widget_set_name(gtkconv->tabby, "tab-container");
 
 	/* select the correct ordering for verticle tabs */
 	if (angle == 90) {


More information about the Commits mailing list