[Xfce4-commits] <xfce4-panel:master> Print version numbers of panel and 4.6 plugins in debug mode.
Nick Schermer
noreply at xfce.org
Mon May 24 11:46:04 CEST 2010
Updating branch refs/heads/master
to 89e52d284340fb0f300de5928dac0f1059962b8a (commit)
from 53810134a132de3764374130e2df131c7521975e (commit)
commit 89e52d284340fb0f300de5928dac0f1059962b8a
Author: Nick Schermer <nick at xfce.org>
Date: Mon May 24 11:33:23 2010 +0200
Print version numbers of panel and 4.6 plugins in debug mode.
common/panel-debug.h | 1 +
libxfce4panel/xfce-panel-macros-46.h | 16 ++++++++++++----
panel/main.c | 4 ++++
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/common/panel-debug.h b/common/panel-debug.h
index 349033e..ac37028 100644
--- a/common/panel-debug.h
+++ b/common/panel-debug.h
@@ -19,6 +19,7 @@
#ifndef __PANEL_DEBUG_H__
#define __PANEL_DEBUG_H__
+#define PANEL_DEBUG_DOMAIN_MAIN "main"
#define PANEL_DEBUG_DOMAIN_POSITIONING "positioning"
#define PANEL_DEBUG_DOMAIN_STRUTS "struts"
#define PANEL_DEBUG_DOMAIN_APPLICATION "application"
diff --git a/libxfce4panel/xfce-panel-macros-46.h b/libxfce4panel/xfce-panel-macros-46.h
index 16c93c3..4dbc32c 100644
--- a/libxfce4panel/xfce-panel-macros-46.h
+++ b/libxfce4panel/xfce-panel-macros-46.h
@@ -546,6 +546,18 @@ enum /*< skip >*/
GdkNativeWindow socket_id; \
GdkColormap *colormap = NULL; \
const gchar *value; \
+ gchar *base_name; \
+ \
+ value = g_getenv ("PANEL_DEBUG"); \
+ if (value != NULL && *value == '1') \
+ { \
+ _xpp_debug = TRUE; \
+ \
+ base_name = g_filename_display_basename (argv[0]);\
+ g_printerr ("xfce4-panel(%s): compiled against libxfce4panel %s", \
+ base_name, LIBXFCE4PANEL_VERSION); \
+ g_free (base_name); \
+ } \
\
if (G_UNLIKELY (argc < PLUGIN_ARGV_ARGUMENTS)) \
{ \
@@ -553,10 +565,6 @@ enum /*< skip >*/
return PLUGIN_EXIT_FAILURE; \
} \
\
- value = g_getenv ("PANEL_DEBUG"); \
- if (value != NULL && value[0] == '1' && value[1] == '\0') \
- _xpp_debug = TRUE; \
- \
if (G_UNLIKELY (preinit_func != NULL)) \
{ \
if (!((XfcePanelPluginPreInit) preinit_func) (argc, argv)) \
diff --git a/panel/main.c b/panel/main.c
index 5e7207e..fe4f63d 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -42,6 +42,7 @@
#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-private.h>
+#include <common/panel-debug.h>
#include <libxfce4panel/libxfce4panel.h>
#include <panel/panel-application.h>
#include <panel/panel-dbus-service.h>
@@ -136,6 +137,9 @@ main (gint argc, gchar **argv)
const gchar *error_msg;
XfceSMClient *sm_client;
+ panel_debug (PANEL_DEBUG_DOMAIN_MAIN, "panel version %s with Xfce %s",
+ LIBXFCE4PANEL_VERSION, xfce_version_string ());
+
/* set translation domain */
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
More information about the Xfce4-commits
mailing list