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 754763 - gtkmm-documentation: examples/book/application/command_line_handling no longer shows a window
gtkmm-documentation: examples/book/application/command_line_handling no longe...
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2015-09-09 08:23 UTC by Murray Cumming
Modified: 2015-09-09 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2015-09-09 08:23:27 UTC
Running the gtkmm-documentation/examples/book/application/command_line_handling example now doesn't result in a window showing. Gtk::Application::run() seems to just return, stopping the program.

I noticed this same behaviour yesterday when trying to run my little prefixsuffix app. The other gtkmm-documentation/examples/book/application/ examples seem to be working OK.

I guess that some part of my recent C++11 move operations changes has done this.
Comment 1 Kjell Ahlstedt 2015-09-09 13:00:32 UTC
No, it's not related the move operations. It's because glib bug 750796 has been
fixed. Gio::Application::signal_handle_local_options() now works as described:
"If you have handled your options and want to exit the process, return a
non-negative option, 0 for success, and a positive value for failure.
To continue, return -1 to let the default option processing continue."

ExampleApplication::on_handle_local_options() in
gtkmm-documentation/examples/book/application/command_line_handling returns
EXIT_SUCCESS, i.e. 0, and the program ends without opening a window.
This is useful for processing options like --help and --version.
Comment 2 Murray Cumming 2015-09-09 15:22:27 UTC
Thanks. So this seems to fix it:
https://git.gnome.org/browse/gtkmm-documentation/commit/?id=8e44ba1a0de61d718ff903a1849fb2e9bbd05796

It would be nice if there was some generic way to output the help/usage after complaining about invalid command line parameters.