[gnome-software] trivial: Un-break --mode=moderate
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Un-break --mode=moderate
- Date: Fri, 16 Sep 2016 09:14:20 +0000 (UTC)
commit 1fed64d9a3a5be5e5c3a3bb1e3c5dbc4566de723
Author: Richard Hughes <richard hughsie com>
Date: Fri Sep 16 10:13:40 2016 +0100
trivial: Un-break --mode=moderate
src/gs-application.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index c042b80..9bd3606 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -841,6 +841,7 @@ gs_application_handle_local_options (GApplication *app, GVariantDict *options)
const gchar *local_filename;
const gchar *mode;
const gchar *search;
+ gint rc = -1;
g_autoptr(GError) error = NULL;
if (g_variant_dict_contains (options, "verbose"))
@@ -876,25 +877,30 @@ gs_application_handle_local_options (GApplication *app, GVariantDict *options)
g_action_group_activate_action (G_ACTION_GROUP (app),
"set-mode",
g_variant_new_string (mode));
+ rc = 0;
} else if (g_variant_dict_lookup (options, "search", "&s", &search)) {
g_action_group_activate_action (G_ACTION_GROUP (app),
"search",
g_variant_new_string (search));
+ rc = 0;
} else if (g_variant_dict_lookup (options, "details", "&s", &id)) {
g_action_group_activate_action (G_ACTION_GROUP (app),
"details",
g_variant_new ("(ss)", id, ""));
+ rc = 0;
} else if (g_variant_dict_lookup (options, "details-pkg", "&s", &pkgname)) {
g_action_group_activate_action (G_ACTION_GROUP (app),
"details-pkg",
g_variant_new_string (pkgname));
+ rc = 0;
} else if (g_variant_dict_lookup (options, "local-filename", "^&ay", &local_filename)) {
g_action_group_activate_action (G_ACTION_GROUP (app),
"filename",
g_variant_new ("(s)", local_filename));
+ rc = 0;
}
- return -1;
+ return rc;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]