changeset 32579:38e3ec8251d3

If gedit can do it, then so can we! References #4351.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 10 May 2009 06:24:26 +0000
parents 978dd52814c7
children 08b6fd5e36ae
files pidgin/gtkblist.c
diffstat 1 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sat May 09 20:10:22 2009 +0000
+++ b/pidgin/gtkblist.c	Sun May 10 06:24:26 2009 +0000
@@ -5276,11 +5276,28 @@
 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;