[gnome-documents] embed: return the fullscreen toolbar from getMainToolbar() when fullscreen



commit 160390b091cf4ed7b6c3841bf32913bba81e2c65
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jan 15 10:53:09 2013 -0500

    embed: return the fullscreen toolbar from getMainToolbar() when fullscreen
    
    So that events will be delivered to it correctly.

 src/embed.js   |    6 +++++-
 src/preview.js |    4 ++++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index 92432b3..070ed49 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -535,7 +535,11 @@ const Embed = new Lang.Class({
     },
 
     getMainToolbar: function() {
-        return this._toolbar;
+        let fullscreen = Application.modeController.getFullscreen();
+        if (fullscreen)
+            return this._preview.getFullscreenToolbar();
+        else
+            return this._toolbar;
     },
 
     getPreview: function() {
diff --git a/src/preview.js b/src/preview.js
index 34d7eaa..d2e756d 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -349,6 +349,10 @@ const PreviewView = new Lang.Class({
 
     getModel: function() {
         return this._model;
+    },
+
+    getFullscreenToolbar: function() {
+        return this._fsToolbar;
     }
 });
 Signals.addSignalMethods(PreviewView.prototype);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]