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 691255 - presentation mode
presentation mode
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on: 693749
Blocks:
 
 
Reported: 2013-01-06 22:10 UTC by William Jon McCann
Modified: 2013-02-15 21:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a presentation mode (20.18 KB, patch)
2013-02-15 17:35 UTC, William Jon McCann
needs-work Details | Review
Add a presentation mode (20.28 KB, patch)
2013-02-15 21:25 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2013-01-06 22:10:09 UTC
I think it would be nice to have an easy way to present a document.

Perhaps a Present item in the gear menu that shows a dialog to select the destination display/device.

The presentation could just be a fullscreen window with the document set to fill the display (fit width).
Comment 1 William Jon McCann 2013-02-15 17:35:02 UTC
Created attachment 236279 [details] [review]
Add a presentation mode
Comment 2 Cosimo Cecchi 2013-02-15 19:46:15 UTC
Review of attachment 236279 [details] [review]:

Thanks Jon, this is looking good. I have some comments:

::: src/presentation.js
@@ +92,3 @@
+        this.view.show();
+
+        this._uninhibitIdle();

Should call this._inhibitIdle() here

@@ +110,3 @@
+            return;
+
+        Application.inhibit(this._inhibitId);

Should be Application.application.uninhibit()

@@ +141,3 @@
+    _onActivated: function(box, child) {
+        this.output = child.output;
+        this.emit('output-activated', this.output);

This could also destroy the dialog automatically (and you wouldn't have to call close() from the preview)

@@ +190,3 @@
+
+        let gdkscreen = Gdk.Screen.get_default();
+        this._screen = new GnomeDesktop.RRScreen({ gdk_screen: gdkscreen });

Hrm, the gnome_rr_screen_new() seems to some magic (e.g. ensuring there's a single GnomeRRScreen for each GdkScreen).
Can you call GnomeDesktop.RRScreen.new() instead and avoid the init below maybe?

@@ +215,3 @@
+            out.y = y;
+
+            this.list.push(out);

Can you store GnomeRROutput objects directly instead of having the PresentationOutput wrapper?

::: src/preview.js
@@ +131,3 @@
+
+        this._onActionStateChanged(Application.application, 'bookmark-page',
+            Application.application.get_action_state('bookmark-page'));

This looks like a copy/paste typo, but I don't think we need the same check for the present-current action, do we?

@@ +220,3 @@
+    _promptPresentation: function() {
+        let outputs = new Presentation.PresentationOutputs();
+    },

I think the output list should be created loaded already.

@@ +229,3 @@
+                function(chooser, output) {
+                    if (output) {
+    },

It'd be cleaner to pass the output down to _showPresentation() and call setOutput() from there if it's not null.
Comment 3 William Jon McCann 2013-02-15 21:25:35 UTC
Created attachment 236307 [details] [review]
Add a presentation mode
Comment 4 Cosimo Cecchi 2013-02-15 21:32:42 UTC
Review of attachment 236307 [details] [review]:

Looks good to push with these two nits fixed.

::: src/presentation.js
@@ +110,3 @@
+            return;
+
+        Application.application.uninhibit(this._inhibitId);

Should also set this._inhibitId to zero here.

::: src/preview.js
@@ +215,3 @@
+        if (output)
+            this._presentation.setOutput(output);
+        Application.application.change_action_state('present-current', GLib.Variant.new('b', false));

Extra whitespace
Comment 5 William Jon McCann 2013-02-15 21:57:14 UTC
Attachment 236307 [details] pushed as 61d077f - Add a presentation mode