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 753199 - Places dialog is showed when there is only one page
Places dialog is showed when there is only one page
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.16.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-03 21:21 UTC by Alessandro Bono
Modified: 2015-08-31 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preview: don't show places dialog with only one page (1.91 KB, patch)
2015-08-03 21:22 UTC, Alessandro Bono
none Details | Review
places: revert commit 5da94839422a70d0ce20e4073e074ebbd1147525 (1.43 KB, patch)
2015-08-03 21:32 UTC, Alessandro Bono
rejected Details | Review
preview: don't show places dialog with only one page (2.22 KB, patch)
2015-08-19 15:17 UTC, Alessandro Bono
none Details | Review
preview: don't show places dialog with only one page (2.22 KB, patch)
2015-08-19 15:37 UTC, Alessandro Bono
committed Details | Review

Description Alessandro Bono 2015-08-03 21:21:13 UTC
The bookmark list isn't necessary if there is only one page.
I think that this was the intent of the code, because it does:
this._bookmarkPage.enabled = hasMultiplePages && this._bookmarks;
this._showPlaces.enabled = hasMultiplePages;
the problem is that this._showPlaces wasn't the action name, but was the function name.
Comment 1 Alessandro Bono 2015-08-03 21:22:44 UTC
Created attachment 308703 [details] [review]
preview: don't show places dialog with only one page
Comment 2 Alessandro Bono 2015-08-03 21:32:47 UTC
Created attachment 308704 [details] [review]
places: revert commit 5da94839422a70d0ce20e4073e074ebbd1147525
Comment 3 Alessandro Bono 2015-08-03 21:50:54 UTC
Review of attachment 308704 [details] [review]:

This isn't necessary because we have cases when we don't have a index. So only the bookmark list is showed.
Comment 4 Debarshi Ray 2015-08-19 14:35:55 UTC
Review of attachment 308703 [details] [review]:

Thanks for catching this, Alessandro. One small nitpick:

::: src/preview.js
@@ +139,3 @@
             }));
+        this._showPlaces = Application.application.lookup_action('places');
+        let showPlacesId = this._showPlaces.connect('activate', Lang.bind(this, this._showPlacesDialog));

I prefer to call the variable for the GAction 'this._places', and keep this._showPlaces as the method name. The other similar variables are named after the corresponding GAction names, so this would be consistent.
Comment 5 Alessandro Bono 2015-08-19 15:17:47 UTC
Created attachment 309608 [details] [review]
preview: don't show places dialog with only one page

https://bugzilla.gnome.org/show_bug.cgi?id=753199#c4
Comment 6 Alessandro Bono 2015-08-19 15:37:41 UTC
Created attachment 309610 [details] [review]
preview: don't show places dialog with only one page
Comment 7 Debarshi Ray 2015-08-20 04:59:06 UTC
Review of attachment 309610 [details] [review]:

Perfect. I added pointers to the original commits that introduced the typo before pushing.