[gtk/debug-envvars-cleanup: 15/16] Only print supported debug flags
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/debug-envvars-cleanup: 15/16] Only print supported debug flags
- Date: Thu, 22 Sep 2022 02:01:57 +0000 (UTC)
commit c7a7e550dc4dfb5656ef9d5340eacd9a960a3d7c
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 21 21:51:58 2022 -0400
Only print supported debug flags
It is a bit disorienting to print a lot of unavailable
debug flags, with some working ones mixed in. Just show
the ones that work.
gdk/gdk.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 2550c0f294..2c145a0898 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -256,16 +256,12 @@ gdk_parse_debug_var (const char *variable,
fprintf (stderr, "Supported %s values:\n", variable);
for (i = 0; i < nkeys; i++) {
- fprintf (stderr, " %s%*s%s", keys[i].key, (int)(max_width - strlen (keys[i].key)), " ",
keys[i].help);
- if (!debug_enabled && !keys[i].always_enabled)
- fprintf (stderr, " [unavailable]");
- fprintf (stderr, "\n");
+ if (debug_enabled || keys[i].always_enabled)
+ fprintf (stderr, " %s%*s%s\n", keys[i].key, (int)(max_width - strlen (keys[i].key)), " ",
keys[i].help);
}
fprintf (stderr, " %s%*s%s\n", "all", max_width - 3, " ", "Enable all values");
fprintf (stderr, " %s%*s%s\n", "help", max_width - 4, " ", "Print this help");
fprintf (stderr, "\nMultiple values can be given, separated by : or space.\n");
- if (!debug_enabled)
- fprintf (stderr, "Values marked as [unavailable] are only accessible if GTK is built with
G_ENABLE_DEBUG.\n");
}
if (invert)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]