[gnome-settings-daemon] common: Add verbose option to test-plugin.h
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] common: Add verbose option to test-plugin.h
- Date: Tue, 11 Oct 2016 09:11:49 +0000 (UTC)
commit 40ee41125cd54a55b7256be174adad8c06f90d0b
Author: Bastien Nocera <hadess hadess net>
Date: Mon Sep 26 12:40:31 2016 +0200
common: Add verbose option to test-plugin.h
https://bugzilla.gnome.org/show_bug.cgi?id=772370
plugins/common/test-plugin.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/common/test-plugin.h b/plugins/common/test-plugin.h
index 72441c9..727b381 100644
--- a/plugins/common/test-plugin.h
+++ b/plugins/common/test-plugin.h
@@ -27,9 +27,11 @@
static MANAGER *manager = NULL;
static int timeout = -1;
+static gboolean verbose = FALSE;
static GOptionEntry entries[] = {
{ "exit-time", 0, 0, G_OPTION_ARG_INT, &timeout, "Exit after n seconds time", NULL },
+ { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Verbose", NULL },
{NULL}
};
@@ -82,8 +84,6 @@ main (int argc, char **argv)
textdomain (GETTEXT_PACKAGE);
notify_init ("gnome-settings-daemon");
- g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
-
gdk_set_allowed_backends ("x11");
error = NULL;
@@ -93,6 +93,9 @@ main (int argc, char **argv)
exit (1);
}
+ if (verbose)
+ g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
+
if (timeout > 0) {
guint id;
id = g_timeout_add_seconds (timeout, (GSourceFunc) gtk_main_quit, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]