[network-manager-applet/lr/vpn-add-idle] connection-editor: ignore --help in main() option context



commit 346630de3f849a75b1fb7336d8ec8c1c1cf0aeda
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Jul 12 19:22:03 2018 +0200

    connection-editor: ignore --help in main() option context
    
    It's solely used for parsing --keep-above and doesn't know anything
    about actual options and thus prints irrelevant help. Skip that and let
    the GtkApplication::command-line signal handler parse it and print help
    instead.

 src/connection-editor/main.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/connection-editor/main.c b/src/connection-editor/main.c
index ce214d17..2beba815 100644
--- a/src/connection-editor/main.c
+++ b/src/connection-editor/main.c
@@ -288,6 +288,7 @@ main (int argc, char *argv[])
 
        opt_ctx = g_option_context_new (NULL);
        g_option_context_add_main_entries (opt_ctx, entries, NULL);
+       g_option_context_set_help_enabled (opt_ctx, FALSE);
        g_option_context_set_ignore_unknown_options (opt_ctx, TRUE);
        g_option_context_parse (opt_ctx, &argc, &argv, NULL);
        g_option_context_free (opt_ctx);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]