[gnome-software] trivial: Add a --quit command line argument
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Add a --quit command line argument
- Date: Tue, 28 Jun 2016 09:23:07 +0000 (UTC)
commit b027445ba93b1fe45a04c14d9ecd93507af1ecea
Author: Richard Hughes <richard hughsie com>
Date: Tue Jun 28 10:22:49 2016 +0100
trivial: Add a --quit command line argument
This makes valgrinding possible on the main process.
src/gs-application.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index eb25f05..d3bc3b1 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -108,6 +108,8 @@ gs_application_init (GsApplication *application)
_("Show verbose debugging information"), NULL },
{ "profile", 0, 0, G_OPTION_ARG_NONE, NULL,
_("Show profiling information for the service"), NULL },
+ { "quit", 0, 0, G_OPTION_ARG_NONE, NULL,
+ _("Quit the running instance"), NULL },
{ "prefer-local", '\0', 0, G_OPTION_ARG_NONE, NULL,
_("Prefer local file sources to AppStream"), NULL },
{ "version", 0, 0, G_OPTION_ARG_NONE, NULL,
@@ -874,6 +876,12 @@ gs_application_handle_local_options (GApplication *app, GVariantDict *options)
NULL);
return 0;
}
+ if (g_variant_dict_contains (options, "quit")) {
+ g_action_group_activate_action (G_ACTION_GROUP (app),
+ "quit",
+ NULL);
+ return 0;
+ }
if (g_variant_dict_lookup (options, "mode", "&s", &mode)) {
g_action_group_activate_action (G_ACTION_GROUP (app),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]