[gnome-documents] embed: only create the fullscreen toolbar when the document is loaded
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] embed: only create the fullscreen toolbar when the document is loaded
- Date: Mon, 5 Mar 2012 22:23:56 +0000 (UTC)
commit 72639912b3cbc60b9d95fce7805dd90c07b72a5c
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 5 15:07:49 2012 -0500
embed: only create the fullscreen toolbar when the document is loaded
There's no point in creating it earlier, since we can't fullscreen
before then.
src/embed.js | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index 613b58c..43bb81a 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -173,13 +173,13 @@ ViewEmbed.prototype = {
_onFullscreenChanged: function(controller, fullscreen) {
this._motionTimeoutId = 0;
- if (fullscreen) {
- this._createFullscreenToolbar();
+ if (fullscreen)
this._filter.start();
- } else {
+ else
this._filter.stop();
+
+ if (!fullscreen)
this._destroyFullscreenToolbar();
- }
Gtk.Settings.get_default().gtk_application_prefer_dark_theme = fullscreen;
this._toolbar.widget.visible = !fullscreen;
@@ -295,16 +295,12 @@ ViewEmbed.prototype = {
}
this._docModel = EvView.DocumentModel.new_with_document(evDoc);
+ this._toolbar.setModel(this._docModel);
this._spinnerBox.moveOut();
Global.modeController.setCanFullscreen(true);
this._preview = new Preview.PreviewView(this._docModel);
-
- if (this._fsToolbar)
- this._fsToolbar.setModel(this._docModel);
-
- this._toolbar.setModel(this._docModel);
-
+ this._createFullscreenToolbar();
this._scrolledWinPreview.add(this._preview.widget);
this._preview.widget.grab_focus();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]