[gnome-documents] filters: cosmetic fixes



commit 175dc2f4e9127da136c3ba8199860b8680d47d15
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Oct 30 02:20:18 2011 -0400

    filters: cosmetic fixes

 src/filters.js |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/filters.js b/src/filters.js
index 9dd1621..5a626e4 100644
--- a/src/filters.js
+++ b/src/filters.js
@@ -48,10 +48,11 @@ SearchFilterController.prototype = {
     },
 
     setDropownState: function(state) {
-        if (state != this._dropdownState) {
-            this._dropdownState = state;
-            this.emit('search-dropdown-changed', this._dropdownState);
-        }
+        if (this._dropdownState == state)
+            return;
+
+        this._dropdownState = state;
+        this.emit('search-dropdown-changed', this._dropdownState);
     },
 
     getDropdownState: function() {
@@ -59,13 +60,14 @@ SearchFilterController.prototype = {
     },
 
     setSearchVisible: function(visible) {
-        if (visible != this._searchVisible) {
-            this._searchVisible = visible;
-            this.emit('search-visible-changed', this._searchVisible);
+        if (this._searchVisible == visible)
+            return;
+
+        this._searchVisible = visible;
+        this.emit('search-visible-changed', this._searchVisible);
 
-            if (!this._searchVisible)
-                this.setDropownState(false);
-        }
+        if (!this._searchVisible)
+            this.setDropownState(false);
     },
 
     getSearchVisible: function() {



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