[gtk+] tests: Update testtooltips for deprecations
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Update testtooltips for deprecations
- Date: Sun, 12 Oct 2014 03:55:03 +0000 (UTC)
commit c96945b3909f64c24aac6192fc3b27e4ee10d06b
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 12 05:21:01 2014 +0200
tests: Update testtooltips for deprecations
tests/testtooltips.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/tests/testtooltips.c b/tests/testtooltips.c
index b8d1e13..4e1552d 100644
--- a/tests/testtooltips.c
+++ b/tests/testtooltips.c
@@ -39,6 +39,17 @@ query_tooltip_cb (GtkWidget *widget,
}
static gboolean
+draw_tooltip (GtkWidget *widget,
+ cairo_t *cr,
+ gpointer unused)
+{
+ cairo_set_source_rgb (cr, 0, 0, 1);
+ cairo_paint (cr);
+
+ return FALSE;
+}
+
+static gboolean
query_tooltip_custom_cb (GtkWidget *widget,
gint x,
gint y,
@@ -46,10 +57,10 @@ query_tooltip_custom_cb (GtkWidget *widget,
GtkTooltip *tooltip,
gpointer data)
{
- GdkRGBA color = { 0, 0, 1, 1 };
GtkWindow *window = gtk_widget_get_tooltip_window (widget);
- gtk_widget_override_background_color (GTK_WIDGET (window), 0, &color);
+ gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
+ g_signal_connect (window, "draw", G_CALLBACK (draw_tooltip), NULL);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]