[gtk+] x11: Fix debug code
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Fix debug code
- Date: Mon, 27 Sep 2010 15:40:02 +0000 (UTC)
commit f0d337a0ca6f9e2ed2bf4cae95199082214f24f8
Author: Benjamin Otte <otte redhat com>
Date: Mon Sep 27 17:33:39 2010 +0200
x11: Fix debug code
With recent changes, nobody compiled with debug enabled. Fix that.
gdk/x11/gdkvisual-x11.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index a4d639d..b3fef17 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -279,10 +279,22 @@ _gdk_visual_init (GdkScreen *screen)
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_MISC)
- for (i = 0; i < nvisuals; i++)
- g_message ("visual: %s: %d",
- visual_names[visuals[i]->visual.type],
- visuals[i]->visual.depth);
+ {
+ static const gchar *const visual_names[] =
+ {
+ "static gray",
+ "grayscale",
+ "static color",
+ "pseudo color",
+ "true color",
+ "direct color",
+ };
+
+ for (i = 0; i < nvisuals; i++)
+ g_message ("visual: %s: %d",
+ visual_names[visuals[i]->type],
+ visuals[i]->depth);
+ }
#endif /* G_ENABLE_DEBUG */
screen_x11->navailable_depths = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]