After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740157 - <app> --help doesn't work even when options were added
<app> --help doesn't work even when options were added
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-11-15 09:33 UTC by Lars Karlitski
Modified: 2014-11-15 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gapplication: enable --help when app has options (4.63 KB, patch)
2014-11-15 09:33 UTC, Lars Karlitski
committed Details | Review

Description Lars Karlitski 2014-11-15 09:33:39 UTC
When G_APPLICATION_HANDLES_COMMAND_LINE is set, --help doesn't work, even when
options were added with g_application_add_option.
Comment 1 Lars Karlitski 2014-11-15 09:33:41 UTC
Created attachment 290748 [details] [review]
gapplication: enable --help when app has options

This should already work according to the documentation, but doesn't
because main_options is consumed before the check in
g_application_parse_command_line().

Fix by moving the check for main_options up.
Comment 2 Allison Karlitskaya (desrt) 2014-11-15 16:12:28 UTC
Review of attachment 290748 [details] [review]:

Thanks.  Please go ahead.
Comment 3 Allison Karlitskaya (desrt) 2014-11-15 16:12:29 UTC
Review of attachment 290748 [details] [review]:

Thanks.  Please go ahead.
Comment 4 Lars Karlitski 2014-11-15 16:36:04 UTC
Attachment 290748 [details] pushed as 021c4ad - gapplication: enable --help when app has options