[Xfce4-commits] <xfce4-panel:master> Sort debugging keys and fix PANEL_DEBUG=all.
Nick Schermer
noreply at xfce.org
Thu Jan 6 22:14:01 CET 2011
Updating branch refs/heads/master
to bef973edc48ce2b4d2a2c84bb4aa1104b23659cf (commit)
from 2caf8648c6519b67a5380d87380009d727332270 (commit)
commit bef973edc48ce2b4d2a2c84bb4aa1104b23659cf
Author: Nick Schermer <nick at xfce.org>
Date: Thu Jan 6 22:09:27 2011 +0100
Sort debugging keys and fix PANEL_DEBUG=all.
common/panel-debug.c | 29 ++++++++++++++++++-----------
common/panel-debug.h | 34 +++++++++++++++++++---------------
2 files changed, 37 insertions(+), 26 deletions(-)
diff --git a/common/panel-debug.c b/common/panel-debug.c
index 6e7fd3b..abb5607 100644
--- a/common/panel-debug.c
+++ b/common/panel-debug.c
@@ -37,21 +37,24 @@ static PanelDebugFlag panel_debug_flags = 0;
/* additional debug levels */
static const GDebugKey panel_debug_keys[] =
{
+ /* external plugin proxy modes */
+ { "gdb", PANEL_DEBUG_GDB },
+ { "valgrind", PANEL_DEBUG_VALGRIND },
+
+ /* domains for debug messages in the code */
+ { "application", PANEL_DEBUG_APPLICATION },
+ { "applicationsmenu", PANEL_DEBUG_APPLICATIONSMENU },
+ { "base-window", PANEL_DEBUG_BASE_WINDOW },
+ { "display-layout", PANEL_DEBUG_DISPLAY_LAYOUT },
+ { "external46", PANEL_DEBUG_EXTERNAL46 },
+ { "external", PANEL_DEBUG_EXTERNAL },
{ "main", PANEL_DEBUG_MAIN },
+ { "module-factory", PANEL_DEBUG_MODULE_FACTORY },
+ { "module", PANEL_DEBUG_MODULE },
{ "positioning", PANEL_DEBUG_POSITIONING },
- { "display-layout", PANEL_DEBUG_DISPLAY_LAYOUT },
{ "struts", PANEL_DEBUG_STRUTS },
- { "application", PANEL_DEBUG_APPLICATION },
- { "external", PANEL_DEBUG_EXTERNAL },
- { "external46", PANEL_DEBUG_EXTERNAL46 },
- { "tasklist", PANEL_DEBUG_TASKLIST },
- { "base-window", PANEL_DEBUG_BASE_WINDOW },
- { "applicationsmenu", PANEL_DEBUG_APPLICATIONSMENU },
{ "systray", PANEL_DEBUG_SYSTRAY },
- { "gdb", PANEL_DEBUG_GDB },
- { "valgrind", PANEL_DEBUG_VALGRIND },
- { "module", PANEL_DEBUG_MODULE },
- { "module-factory", PANEL_DEBUG_MODULE_FACTORY },
+ { "tasklist", PANEL_DEBUG_TASKLIST }
};
@@ -72,6 +75,10 @@ panel_debug_init (void)
/* always enable (unfiltered) debugging messages */
PANEL_SET_FLAG (panel_debug_flags, PANEL_DEBUG_YES);
+
+ /* unset gdb and valgrind in 'all' mode */
+ if (g_ascii_strcasecmp (value, "all") == 0)
+ PANEL_UNSET_FLAG (panel_debug_flags, PANEL_DEBUG_GDB | PANEL_DEBUG_VALGRIND);
}
g_once_init_leave (&inited__volatile, 1);
diff --git a/common/panel-debug.h b/common/panel-debug.h
index 5f73fbd..9d882da 100644
--- a/common/panel-debug.h
+++ b/common/panel-debug.h
@@ -24,21 +24,25 @@
typedef enum
{
PANEL_DEBUG_YES = 1 << 0, /* always enabled if PANEL_DEBUG is not %NULL */
- PANEL_DEBUG_MAIN = 1 << 1,
- PANEL_DEBUG_POSITIONING = 1 << 2,
- PANEL_DEBUG_DISPLAY_LAYOUT = 1 << 3,
- PANEL_DEBUG_STRUTS = 1 << 4,
- PANEL_DEBUG_APPLICATION = 1 << 5,
- PANEL_DEBUG_EXTERNAL = 1 << 6,
- PANEL_DEBUG_EXTERNAL46 = 1 << 7,
- PANEL_DEBUG_TASKLIST = 1 << 8,
- PANEL_DEBUG_BASE_WINDOW = 1 << 9,
- PANEL_DEBUG_APPLICATIONSMENU = 1 << 10,
- PANEL_DEBUG_GDB = 1 << 11, /* run plugin in gdb */
- PANEL_DEBUG_VALGRIND = 1 << 12, /* run plugin in valgrind */
- PANEL_DEBUG_SYSTRAY = 1 << 13,
- PANEL_DEBUG_MODULE = 1 << 14,
- PANEL_DEBUG_MODULE_FACTORY = 1 << 15
+
+ /* external plugin proxy modes */
+ PANEL_DEBUG_GDB = 1 << 1, /* run external plugins in gdb */
+ PANEL_DEBUG_VALGRIND = 1 << 2, /* run external plugins in valgrind */
+
+ /* filter domains */
+ PANEL_DEBUG_APPLICATION = 1 << 3,
+ PANEL_DEBUG_APPLICATIONSMENU = 1 << 4,
+ PANEL_DEBUG_BASE_WINDOW = 1 << 5,
+ PANEL_DEBUG_DISPLAY_LAYOUT = 1 << 6,
+ PANEL_DEBUG_EXTERNAL = 1 << 7,
+ PANEL_DEBUG_EXTERNAL46 = 1 << 8,
+ PANEL_DEBUG_MAIN = 1 << 9,
+ PANEL_DEBUG_MODULE = 1 << 10,
+ PANEL_DEBUG_MODULE_FACTORY = 1 << 11,
+ PANEL_DEBUG_POSITIONING = 1 << 12,
+ PANEL_DEBUG_STRUTS = 1 << 13,
+ PANEL_DEBUG_SYSTRAY = 1 << 14,
+ PANEL_DEBUG_TASKLIST = 1 << 15
}
PanelDebugFlag;
More information about the Xfce4-commits
mailing list