summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-05-24 11:19:20 +0200
committerNick Schermer <nick@xfce.org>2010-05-24 11:19:20 +0200
commit2dcc38ba30e1b0e82506884b069ab42a44e58346 (patch)
tree2f71a0b8eac0a1c6ce82cc18333fa24809c6d3ae /common
parentda81a2fc7455dadcd91d2f5e163cf485b928498e (diff)
downloadxfce4-panel-2dcc38ba30e1b0e82506884b069ab42a44e58346.tar.gz
Drop filtering debug domains.
But too much, since we basically want all the debug information for most of the bugs.
Diffstat (limited to 'common')
-rw-r--r--common/panel-debug.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/common/panel-debug.c b/common/panel-debug.c
index a8cd04aa..ebf26adf 100644
--- a/common/panel-debug.c
+++ b/common/panel-debug.c
@@ -30,10 +30,9 @@
enum
{
- DEBUG_LEVEL_UNKNOWN,
+ DEBUG_LEVEL_UNKNOWN = 0,
DEBUG_LEVEL_NONE,
- DEBUG_LEVEL_ALL_DOMAINS,
- DEBUG_LEVEL_FILTER_DOMAINS
+ DEBUG_LEVEL_ENABLED
};
@@ -49,12 +48,9 @@ panel_debug (const gchar *domain,
{
static volatile gsize level__volatile = DEBUG_LEVEL_UNKNOWN;
gsize level;
- static gchar **domains = NULL;
const gchar *value;
- guint i;
gchar *string;
va_list args;
- gboolean found;
panel_return_if_fail (domain != NULL);
panel_return_if_fail (message != NULL);
@@ -63,21 +59,10 @@ panel_debug (const gchar *domain,
if (g_once_init_enter (&level__volatile))
{
value = g_getenv ("PANEL_DEBUG");
- if (G_LIKELY (value == NULL))
- {
- level = DEBUG_LEVEL_NONE;
- }
- else if (strcmp (value, "1") == 0)
- {
- level = DEBUG_LEVEL_ALL_DOMAINS;
- }
+ if (G_UNLIKELY (value != NULL && *value == '1'))
+ level = DEBUG_LEVEL_ENABLED;
else
- {
- level = DEBUG_LEVEL_FILTER_DOMAINS;
- domains = g_strsplit (value, ":", -1);
- }
-
- panel_debug_enabled = (level != DEBUG_LEVEL_NONE);
+ level = DEBUG_LEVEL_NONE;
g_once_init_leave (&level__volatile, level);
}
@@ -86,15 +71,6 @@ panel_debug (const gchar *domain,
if (level__volatile == DEBUG_LEVEL_NONE)
return;
- if (level__volatile == DEBUG_LEVEL_FILTER_DOMAINS)
- {
- for (i = 0, found = FALSE; domains[i] != NULL && !found; i++)
- if (strcmp (domains[i], domain) == 0)
- found = TRUE;
- if (!found)
- return;
- }
-
va_start (args, message);
string = g_strdup_vprintf (message, args);
va_end (args);