[gnome-documents] preview: more cleanups



commit ba51f09adadcf7122a6a6b4bed0a780a91689321
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Jul 19 14:49:15 2012 -0400

    preview: more cleanups

 src/preview.js   |    6 +++---
 src/searchbar.js |    5 -----
 2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index 1bdb9b8..bf07b3c 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -222,7 +222,7 @@ const PreviewFullscreen = new Lang.Class({
                                           factor: 0.95 }));
 
         // create toolbar
-        this._fsToolbar = new PreviewFullscreenToolbar();
+        this._fsToolbar = new PreviewFullscreenToolbar(previewView);
         this._fsToolbar.setModel(model);
 
         layout.add(this._fsToolbar.actor,
@@ -461,8 +461,8 @@ const PreviewFullscreenToolbar = new Lang.Class({
     Name: 'PreviewFullscreenToolbar',
     Extends: PreviewToolbar,
 
-    _init: function() {
-        this.parent();
+    _init: function(previewView) {
+        this.parent(previewView);
 
         log(this.actor);
 
diff --git a/src/searchbar.js b/src/searchbar.js
index 1654c26..b189953 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -278,7 +278,6 @@ const Searchbar = new Lang.Class({
         this._searchMatchId = 0;
 
         this._in = false;
-        this._visible = false;
 
         this.widget = new Gtk.Toolbar();
         this.widget.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);
@@ -384,8 +383,6 @@ const Searchbar = new Lang.Class({
 
     show: function() {
         let eventDevice = Gtk.get_current_event_device();
-
-        this._visible = true;
         this._searchEntry.show();
 
         Tweener.addTween(this.actor, { height: this.widget.get_preferred_height()[1],
@@ -399,8 +396,6 @@ const Searchbar = new Lang.Class({
     },
 
     hide: function() {
-        this._visible = false;
-
         Tweener.addTween(this.actor, { height: 0,
                                        time: 0.20,
                                        transition: 'easeOutQuad',



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