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 629136 - Close button activated despite nothing to close
Close button activated despite nothing to close
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
git-master
Other Linux
: Normal trivial
: ---
Assigned To: David Hampton
Chris Shoemaker
Depends on:
Blocks:
 
 
Reported: 2010-09-09 05:48 UTC by Juergen
Modified: 2018-06-29 22:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (8.96 KB, image/png)
2010-09-09 05:48 UTC, Juergen
  Details
Proposed fix (2.61 KB, patch)
2013-07-23 00:37 UTC, Guilherme Salgado
none Details | Review
Proposed fix (2.48 KB, patch)
2013-07-23 14:02 UTC, Guilherme Salgado
committed Details | Review

Description Juergen 2010-09-09 05:48:22 UTC
Created attachment 169827 [details]
Screenshot

when I do File->new->new File and 'Abort', the Close button becomes activated again. See attachement
Comment 1 Guilherme Salgado 2013-07-18 21:47:04 UTC
This only happens when you have a book open (which causes the 'Close' button to be sensitive), then hit 'File->New File' and then 'Cancel'. If you start with --nofile then the 'Close' button is not sensitive and remains so after you cancel the 'New File' dialog.

I'll see if I can fix it
Comment 2 Guilherme Salgado 2013-07-23 00:37:50 UTC
Created attachment 249852 [details] [review]
Proposed fix

So, it turns out the sensitivity of the close button is handled by gnc_main_window_switch_page(), which makes it insensitive when the page is immutable. However, that function is obviously not called when you hit 'File -> New File' and cancel it, so the close button sensitivity doesn't get updated.

One way to fix this is to move the code responsible for updating the close button sensitiveness to gnc_main_window_generate_title, where the sensitivity of the save button is handled. Having that as a side-effect of an unrelated function is certainly not the most elegant solution, but since the sensitivity of the save button is already handled there, I thought I'd give it a try and see what others think.
Comment 3 Guilherme Salgado 2013-07-23 14:02:11 UTC
Created attachment 249891 [details] [review]
Proposed fix

Revert a comment change I did because I thought iff was a typo
Comment 4 Christian Stimming 2013-08-15 08:10:08 UTC
Comment on attachment 249891 [details] [review]
Proposed fix

Thanks for the patch and sorry for the delay. The change looks good and it is great that it fixes this bug.
Comment 5 Christian Stimming 2013-08-15 19:44:52 UTC
Comment on attachment 249891 [details] [review]
Proposed fix

r23132, thanks!
Comment 6 John Ralls 2018-06-29 22:44:24 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=629136. Please update any external references or bookmarks.