cpw.qulogic.gtk3: 3e0647ac: If gedit can do it, then so can we!

qulogic at pidgin.im qulogic at pidgin.im
Mon May 18 23:50:39 EDT 2009


-----------------------------------------------------------------
Revision: 3e0647ac67738fe7125b4c3197af282eda9634e6
Ancestor: fc4f9578d64888311400c7f0692cb4a5f2d4cd38
Author: qulogic at pidgin.im
Date: 2009-05-10T06:24:26
Branch: im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/3e0647ac67738fe7125b4c3197af282eda9634e6

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

If gedit can do it, then so can we!

References #4351.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	37e86b7e90ea0b69e4980f03fa23dcf97f78bfb0
+++ pidgin/gtkblist.c	e4f2fcfc54e429969f32a84e86ca017b7b8c89e3
@@ -5276,11 +5276,28 @@ headline_style_set (GtkWidget *widget,
 headline_style_set (GtkWidget *widget,
 		    GtkStyle  *prev_style)
 {
+	GtkStyle *style;
 #if GTK_CHECK_VERSION(2,12,0)
-	/* TODO: Need to figure out how to do this in 2.12+ */
+	GtkWidget *window;
+
+	if (gtkblist->changing_style)
+		return;
+
+	/* This is a hack needed to use the tooltip background colour */
+	window = gtk_window_new(GTK_WINDOW_POPUP);
+	gtk_widget_set_name(window, "gtk-tooltip");
+	gtk_widget_ensure_style(window);
+	style = gtk_widget_get_style(window);
+
+	gtkblist->changing_style = TRUE;
+	gtk_widget_set_style(gtkblist->headline_hbox, style);
+	gtkblist->changing_style = FALSE;
+
+	gtk_widget_destroy(window);
+
+	gtk_widget_queue_draw(gtkblist->headline_hbox);
 #else
 	GtkTooltips *tooltips;
-	GtkStyle *style;
 
 	if (gtkblist->changing_style)
 		return;


More information about the Commits mailing list