[Xfce4-commits] <xfce4-panel:master> Add some more module debug information.
Nick Schermer
noreply at xfce.org
Thu Jan 6 20:50:03 CET 2011
Updating branch refs/heads/master
to 2caf8648c6519b67a5380d87380009d727332270 (commit)
from d2a239054f3b1eba1c87197b47ce13ee91bbf27d (commit)
commit 2caf8648c6519b67a5380d87380009d727332270
Author: Nick Schermer <nick at xfce.org>
Date: Thu Jan 6 20:47:22 2011 +0100
Add some more module debug information.
common/panel-debug.c | 3 ++-
common/panel-debug.h | 3 ++-
panel/panel-module-factory.c | 9 ++++++++-
panel/panel-module.c | 4 ++++
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/common/panel-debug.c b/common/panel-debug.c
index 6eecdd5..6e7fd3b 100644
--- a/common/panel-debug.c
+++ b/common/panel-debug.c
@@ -50,7 +50,8 @@ static const GDebugKey panel_debug_keys[] =
{ "systray", PANEL_DEBUG_SYSTRAY },
{ "gdb", PANEL_DEBUG_GDB },
{ "valgrind", PANEL_DEBUG_VALGRIND },
- { "module", PANEL_DEBUG_MODULE }
+ { "module", PANEL_DEBUG_MODULE },
+ { "module-factory", PANEL_DEBUG_MODULE_FACTORY },
};
diff --git a/common/panel-debug.h b/common/panel-debug.h
index 7ca93d5..5f73fbd 100644
--- a/common/panel-debug.h
+++ b/common/panel-debug.h
@@ -37,7 +37,8 @@ typedef enum
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 = 1 << 14,
+ PANEL_DEBUG_MODULE_FACTORY = 1 << 15
}
PanelDebugFlag;
diff --git a/panel/panel-module-factory.c b/panel/panel-module-factory.c
index 1433dba..529fe85 100644
--- a/panel/panel-module-factory.c
+++ b/panel/panel-module-factory.c
@@ -32,6 +32,7 @@
#include <libxfce4util/libxfce4util.h>
#include <common/panel-private.h>
+#include <common/panel-debug.h>
#include <libxfce4panel/libxfce4panel.h>
@@ -154,6 +155,8 @@ panel_module_factory_load_modules_dir (PanelModuleFactory *factory,
if (G_UNLIKELY (dir == NULL))
return;
+ panel_debug (PANEL_DEBUG_MODULE_FACTORY, "reading %s", path);
+
/* walk the directory */
for (;;)
{
@@ -309,8 +312,12 @@ panel_module_factory_force_all_external (void)
{
force_all_external = TRUE;
+ panel_debug (PANEL_DEBUG_MODULE_FACTORY,
+ "forcing all plugins to run external");
+
#ifndef NDEBUG
- g_message ("Forcing all plugins to run external.");
+ if (!panel_debug_has_domain (PANEL_DEBUG_YES))
+ g_message ("Forcing all plugins to run external.");
#endif
}
diff --git a/panel/panel-module.c b/panel/panel-module.c
index f9e0e74..ba39320 100644
--- a/panel/panel-module.c
+++ b/panel/panel-module.c
@@ -409,6 +409,10 @@ panel_module_new_from_desktop_file (const gchar *filename,
module->unique_mode = UNIQUE_TRUE;
else
module->unique_mode = UNIQUE_FALSE;
+
+ panel_debug_filtered (PANEL_DEBUG_MODULE, "new module %s, filename=%s, internal=%s",
+ name, module->filename,
+ PANEL_DEBUG_BOOL (module->mode == INTERNAL));
}
xfce_rc_close (rc);
More information about the Xfce4-commits
mailing list