GNOME Bugzilla – Bug 697652
Help options generated even when help disabled
Last modified: 2013-04-12 15:07:43 UTC
Created attachment 241075 [details] [review] don't show help options when help is disabled Function "g_option_context_get_help()" appends help options (--help-all, ...) to the resulting string even if help was disabled before by "g_option_context_set_help_enabled(.., FALSE)". Attached patch fixes this. This is problem in vinagre for example. It shows several help options but just 2 of them works (those which are explicitly added to the GOptionContext). The rest can not be parsed by "g_option_context_parse()" because they were disabled. Marek
Review of attachment 241075 [details] [review]: Looks good. Thanks for writing the patch ! It would be great if we could add a testcase to glib/tests/option-context.c that fails without this fix.
Created attachment 241139 [details] [review] add test for disabled help options (In reply to comment #1) > Review of attachment 241075 [details] [review]: > > Looks good. Thanks for writing the patch ! > It would be great if we could add a testcase to glib/tests/option-context.c > that fails without this fix. Thanks. Can I commit the fix to 3.8 or do you thing that this is just for master? Attached is a test case which fails if the fix is not applied.
Review of attachment 241075 [details] [review]: .
Review of attachment 241139 [details] [review]: looks good
Thank you for your reviews, I've pushed them both to glib-2-36 and master. Marke