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 767103 - mainToolbar: Add fullscreen and nightmode to toolbar
mainToolbar: Add fullscreen and nightmode to toolbar
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: books
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Books Maintainers
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-06-01 11:53 UTC by Bastien Nocera
Modified: 2016-06-03 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mainToolbar: Add fullscreen and nightmode to toolbar (4.44 KB, patch)
2016-06-01 11:53 UTC, Bastien Nocera
none Details | Review
mainToolbar: Add fullscreen and nightmode to toolbar (4.38 KB, patch)
2016-06-02 13:45 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-06-01 11:53:45 UTC
.
Comment 1 Bastien Nocera 2016-06-01 11:53:49 UTC
Created attachment 328878 [details] [review]
mainToolbar: Add fullscreen and nightmode to toolbar

For gnome-books.

This also changes the fullscreen action to a stateful one, which is
useful for multi-screen setups, where the app menu is still visible even
with the window fullscreened.
Comment 2 Cosimo Cecchi 2016-06-02 08:22:04 UTC
Review of attachment 328878 [details] [review]:

Few minor comments, looks good otherwise.

::: src/mainToolbar.js
@@ +91,3 @@
     },
 
+    _onFullscreenStateChanged: function(source, actionName, state) {

You could get the state using g_action_group_get_action_state() and simplify the signature of this method (so that you don't need to pass all the parameters below).

@@ +103,3 @@
+                                                action_name: 'app.fullscreen' });
+        this.toolbar.pack_end(fullscreenButton);
+    },

Is fullscreenStateId used?

@@ +106,3 @@
+            Lang.bind(this, this._onFullscreenStateChanged));
+        this._fullscreenButton = fullscreenButton;
+    addFullscreenButton: function() {

Extra whitespace before opening paren
Comment 3 Bastien Nocera 2016-06-02 13:45:33 UTC
(In reply to Cosimo Cecchi from comment #2)
> Review of attachment 328878 [details] [review] [review]:
> 
> Few minor comments, looks good otherwise.
> 
> ::: src/mainToolbar.js
> @@ +91,3 @@
>      },
>  
> +    _onFullscreenStateChanged: function(source, actionName, state) {
> 
> You could get the state using g_action_group_get_action_state() and simplify
> the signature of this method (so that you don't need to pass all the
> parameters below).

Fixed.

> @@ +103,3 @@
> +                                                action_name:
> 'app.fullscreen' });
> +        this.toolbar.pack_end(fullscreenButton);
> +    },
> 
> Is fullscreenStateId used?

It's not, I removed it.

> @@ +106,3 @@
> +            Lang.bind(this, this._onFullscreenStateChanged));
> +        this._fullscreenButton = fullscreenButton;
> +    addFullscreenButton: function() {
> 
> Extra whitespace before opening paren

Fixed.
Comment 4 Bastien Nocera 2016-06-02 13:45:47 UTC
Created attachment 328957 [details] [review]
mainToolbar: Add fullscreen and nightmode to toolbar

For gnome-books.

This also changes the fullscreen action to a stateful one, which is
useful for multi-screen setups, where the app menu is still visible even
with the window fullscreened.
Comment 5 Cosimo Cecchi 2016-06-03 10:48:46 UTC
Review of attachment 328957 [details] [review]:

Thanks, looks good.
Comment 6 Bastien Nocera 2016-06-03 11:13:16 UTC
Attachment 328957 [details] pushed as a36a7dd - mainToolbar: Add fullscreen and nightmode to toolbar