[gtk+] testgtk: gtk_widget_set_colormap() => gtk_window_set_visual()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testgtk: gtk_widget_set_colormap() => gtk_window_set_visual()
- Date: Sun, 26 Sep 2010 13:28:36 +0000 (UTC)
commit d7ede44daeb3d2c63668c2bfc395d919cb059ffe
Author: Benjamin Otte <otte redhat com>
Date: Sat Aug 28 20:04:08 2010 +0200
testgtk: gtk_widget_set_colormap() => gtk_window_set_visual()
tests/testgtk.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 7314119..f891f6e 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -250,16 +250,16 @@ build_alpha_widgets (void)
}
static void
-on_alpha_screen_changed (GtkWidget *widget,
+on_alpha_screen_changed (GtkWindow *window,
GdkScreen *old_screen,
GtkWidget *label)
{
- GdkScreen *screen = gtk_widget_get_screen (widget);
- GdkColormap *colormap = gdk_screen_get_rgba_colormap (screen);
+ GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (window));
+ GdkVisual *visual = gdk_screen_get_rgba_visual (screen);
- if (!colormap)
+ if (!visual)
{
- colormap = gdk_screen_get_default_colormap (screen);
+ visual = gdk_screen_get_system_visual (screen);
gtk_label_set_markup (GTK_LABEL (label), "<b>Screen doesn't support alpha</b>");
}
else
@@ -267,7 +267,7 @@ on_alpha_screen_changed (GtkWidget *widget,
gtk_label_set_markup (GTK_LABEL (label), "<b>Screen supports alpha</b>");
}
- gtk_widget_set_colormap (widget, colormap);
+ gtk_window_set_visual (window, visual);
}
static void
@@ -311,7 +311,7 @@ create_alpha_window (GtkWidget *widget)
label = gtk_label_new (NULL);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
- on_alpha_screen_changed (window, NULL, label);
+ on_alpha_screen_changed (GTK_WINDOW (window), NULL, label);
g_signal_connect (window, "screen-changed",
G_CALLBACK (on_alpha_screen_changed), label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]