[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Settings: Add support for debug messages
noreply at xfce.org
noreply at xfce.org
Fri Aug 8 18:36:04 CEST 2014
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.
commit d767980348f32ffe451999310fd3944730145b1b
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Fri Aug 8 19:32:05 2014 +0300
Settings: Add support for debug messages
xfpm-settings has some XFPM_DEBUG messages but no way to enable
them, the patch adds the same --debug flag as xfpm's daemon has.
---
settings/xfpm-settings-main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/settings/xfpm-settings-main.c b/settings/xfpm-settings-main.c
index 345ca7d..9155f26 100644
--- a/settings/xfpm-settings-main.c
+++ b/settings/xfpm-settings-main.c
@@ -43,7 +43,7 @@
#include "xfpm-settings.h"
#include "xfpm-config.h"
#include "xfpm-dbus.h"
-
+#include "xfpm-debug.h"
#include "xfpm-unique.h"
int main (int argc, char **argv)
@@ -67,7 +67,8 @@ int main (int argc, char **argv)
gboolean has_power_button;
gboolean has_lid;
gboolean start_xfpm_if_not_running;
-
+ gboolean debug = FALSE;
+
GdkNativeWindow socket_id = 0;
gchar *device_id = NULL;
@@ -78,6 +79,7 @@ int main (int argc, char **argv)
{
{ "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &socket_id, N_("Settings manager socket"), N_("SOCKET ID") },
{ "device-id", 'd', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, &device_id, N_("Display a specific device by UpDevice object path"), N_("UpDevice object path") },
+ { "debug", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &debug, N_("Enable debugging"), NULL },
{ NULL, },
};
@@ -166,6 +168,8 @@ int main (int argc, char **argv)
return EXIT_FAILURE;
}
+ xfpm_debug_init (debug);
+
has_battery = xfpm_string_to_bool (g_hash_table_lookup (config_hash, "has-battery"));
has_lid = xfpm_string_to_bool (g_hash_table_lookup (config_hash, "has-lid"));
can_suspend = xfpm_string_to_bool (g_hash_table_lookup (config_hash, "can-suspend"));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list