pidgin/gtkplugin.c

changeset 37422
07dcc28b6039
parent 37234
bfacdb2fbfdc
child 37575
32611080681c
equal deleted inserted replaced
37421:ee3bd4532a33 37422:07dcc28b6039
806 806
807 static gboolean 807 static gboolean
808 pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, cairo_t *cr, gpointer data) 808 pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, cairo_t *cr, gpointer data)
809 { 809 {
810 PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin"); 810 PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin");
811 #if GTK_CHECK_VERSION(3,0,0)
812 GtkStyleContext *context = gtk_widget_get_style_context(tipwindow); 811 GtkStyleContext *context = gtk_widget_get_style_context(tipwindow);
813 gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOOLTIP); 812 gtk_style_context_add_class(context, GTK_STYLE_CLASS_TOOLTIP);
814 gtk_render_layout(context, cr, 6, 6, layout); 813 gtk_render_layout(context, cr, 6, 6, layout);
815 #else
816 gtk_paint_layout(tipwindow->style, tipwindow->window, GTK_STATE_NORMAL, FALSE,
817 NULL, tipwindow, "tooltip",
818 6, 6, layout);
819 #endif
820 return TRUE; 814 return TRUE;
821 } 815 }
822 816
823 static gboolean 817 static gboolean
824 pidgin_plugins_create_tooltip(GtkWidget *tipwindow, GtkTreePath *path, 818 pidgin_plugins_create_tooltip(GtkWidget *tipwindow, GtkTreePath *path,

mercurial