[Xfce4-commits] <xfce4-panel:master> Drop filtering debug domains.

Nick Schermer noreply at xfce.org
Mon May 24 11:46:02 CEST 2010


Updating branch refs/heads/master
         to 2dcc38ba30e1b0e82506884b069ab42a44e58346 (commit)
       from da81a2fc7455dadcd91d2f5e163cf485b928498e (commit)

commit 2dcc38ba30e1b0e82506884b069ab42a44e58346
Author: Nick Schermer <nick at xfce.org>
Date:   Mon May 24 11:19:20 2010 +0200

    Drop filtering debug domains.
    
    But too much, since we basically want all the debug
    information for most of the bugs.

 common/panel-debug.c |   34 +++++-----------------------------
 1 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/common/panel-debug.c b/common/panel-debug.c
index a8cd04a..ebf26ad 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);



More information about the Xfce4-commits mailing list