From 3ac6e14d20c1dfea42b4ae1e2df1967275f2dc7e Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 15 Oct 2014 11:28:51 +0200 Subject: applet: Add debug feature --- mate-volume-control/src/applet-main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mate-volume-control/src/applet-main.c') diff --git a/mate-volume-control/src/applet-main.c b/mate-volume-control/src/applet-main.c index 48c41a1..1b4bb0a 100644 --- a/mate-volume-control/src/applet-main.c +++ b/mate-volume-control/src/applet-main.c @@ -33,6 +33,7 @@ #include "gvc-applet.h" static gboolean show_version = FALSE; +static gboolean debug = FALSE; int main (int argc, char **argv) @@ -42,6 +43,7 @@ main (int argc, char **argv) UniqueApp *app; GOptionEntry entries[] = { { "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL }, + { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug, N_("Enable debug"), NULL }, { NULL } }; @@ -62,6 +64,9 @@ main (int argc, char **argv) g_print ("%s %s\n", argv[0], VERSION); return 0; } + if (debug == TRUE) { + g_setenv ("G_MESSAGES_DEBUG", "all", FALSE); + } app = unique_app_new (GVC_APPLET_DBUS_NAME, NULL); -- cgit v1.2.1