GNOME Bugzilla – Bug 691255
presentation mode
Last modified: 2013-02-15 21:57:17 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).
Created attachment 236279 [details] [review] Add a presentation mode
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.
Created attachment 236307 [details] [review] Add a presentation mode
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
Attachment 236307 [details] pushed as 61d077f - Add a presentation mode