[glib] GApplication: ignore --help if not handling args
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GApplication: ignore --help if not handling args
- Date: Mon, 20 Oct 2014 13:01:11 +0000 (UTC)
commit f4af8d1d007edcfa5949315be563b3aa8792f250
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Oct 4 12:47:33 2014 -0400
GApplication: ignore --help if not handling args
If the user didn't register any arguments for parsing, also ignore
--help. This fixes a regression in meld.
https://bugzilla.gnome.org/show_bug.cgi?id=737869
gio/gapplication.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index ebbc450..1fa1955 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -498,9 +498,15 @@ g_application_parse_command_line (GApplication *application,
* G_APPLICATION_HANDLES_COMMAND_LINE then we have to assume that
* their primary instance commandline handler may want to deal with
* the arguments. We must therefore ignore them.
+ *
+ * We must also ignore --help in this case since some applications
+ * will try to handle this from the remote side. See #737869.
*/
if (application->priv->main_options == NULL && (application->priv->flags &
G_APPLICATION_HANDLES_COMMAND_LINE))
- g_option_context_set_ignore_unknown_options (context, TRUE);
+ {
+ g_option_context_set_ignore_unknown_options (context, TRUE);
+ g_option_context_set_help_enabled (context, FALSE);
+ }
/* In the case that we are not explicitly marked as a service or a
* launcher then we want to add the "--gapplication-service" option to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]