GNOME Bugzilla – Bug 773152
'gnome-calendar --help' closes an opened calendar window
Last modified: 2017-09-07 15:08:54 UTC
running 'gnome-calendar --help' in terminal closes any opened calendar window. Also the help is shown in the terminal associated with the window that is closed (if any).
I can confirm the bug for gnome-calendar Version 3.24.3 Steps to reproduce: run 'gnome-calendar' open different terminal and run 'gnome-calendar --help' Displayed error-message: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying Help is displayed on terminal associated with the window. Maybe new bug or related: running 'gnome-calendar --version' displayes version on terminal associated with the window, but calendar does not close.
Created attachment 358651 [details] [review] application: handle command line options right Commandline arguments are now handled by the primary instance of the application. And so outputs for --help, and --version are shown there. Not where the application is invoked. So hook to handle-local-options so that the arguments are parsed locally, and sent unparsed ones to primary instance in case it is required. As a side effect, the arguments passed to --date and --uuid are not updated in the primary instance on subsequent runs (ie, when the primary instance is already up and running). So check the commandline arguments as they arrives rather than saving them to a variable, which won't then be updated.
Created attachment 358652 [details] [review] application: handle command line options right Commandline arguments are now handled by the primary instance of the application. And so outputs for --help, and --version are shown there. Not where the application is invoked. So hook to handle-local-options so that the arguments are parsed locally, and sent unparsed ones to primary instance in case it is required. As a side effect, the arguments passed to --date and --uuid are not updated in the primary instance on subsequent runs (ie, when the primary instance is already up and running). So check the commandline arguments as they arrives rather than saving them to a variable, which won't then be updated.
Attachment 358652 [details] pushed as 24a2e97 - application: handle command line options right