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 773152 - 'gnome-calendar --help' closes an opened calendar window
'gnome-calendar --help' closes an opened calendar window
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: General
3.22.x
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-18 11:21 UTC by Mohammed Sadiq
Modified: 2017-09-07 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: handle command line options right (5.53 KB, patch)
2017-08-29 07:20 UTC, Mohammed Sadiq
none Details | Review
application: handle command line options right (5.53 KB, patch)
2017-08-29 07:29 UTC, Mohammed Sadiq
committed Details | Review

Description Mohammed Sadiq 2016-10-18 11:21:28 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).
Comment 1 Michael Nieß 2017-08-25 18:32:12 UTC
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.
Comment 2 Mohammed Sadiq 2017-08-29 07:20:55 UTC
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.
Comment 3 Mohammed Sadiq 2017-08-29 07:29:15 UTC
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.
Comment 4 Georges Basile Stavracas Neto 2017-09-07 15:08:50 UTC
Attachment 358652 [details] pushed as 24a2e97 - application: handle command line options right