| 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, |