[gnome-documents] application: add back a Fullscreen action
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] application: add back a Fullscreen action
- Date: Wed, 21 Dec 2011 17:34:05 +0000 (UTC)
commit 59ae3dbb9cbd2bca0d2d0dc6ce6d7e360bde8977
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 21 18:33:31 2011 +0100
application: add back a Fullscreen action
The action is enabled only when we're in preview mode.
src/application.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 0a60d9b..4613793 100644
--- a/src/application.js
+++ b/src/application.js
@@ -86,6 +86,18 @@ Application.prototype = {
}));
this.application.add_action(quitAction);
+ let fsAction = new Gio.SimpleAction({ name: 'fullscreen' });
+ fsAction.connect('activate', Lang.bind(this,
+ function() {
+ Global.modeController.toggleFullscreen();
+ }));
+ Global.modeController.connect('window-mode-changed', Lang.bind(this,
+ function() {
+ let mode = Global.modeController.getWindowMode();
+ fsAction.set_enabled(mode == WindowMode.WindowMode.PREVIEW);
+ }));
+ this.application.add_action(fsAction);
+
let viewAsAction = Gio.SimpleAction.new_stateful('view-as',
GLib.VariantType.new('s'),
Utils.listSettingToMenu());
@@ -100,6 +112,7 @@ Application.prototype = {
this.application.add_action(viewAsAction);
let menu = new Gio.Menu();
+ menu.append(_("Fullscreen"), 'app.fullscreen');
menu.append(_("Quit"), 'app.quit');
let viewAs = new Gio.Menu();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]