Browse Source

Add some more module debug information.

upstream/xfce4-panel-4.10.1
Nick Schermer 11 years ago
parent
commit
2caf8648c6
  1. 3
      common/panel-debug.c
  2. 3
      common/panel-debug.h
  3. 9
      panel/panel-module-factory.c
  4. 4
      panel/panel-module.c

3
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 },
};

3
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;

9
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
}

4
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);

Loading…
Cancel
Save