[gnome-documents/wip/split-view: 2/2] mainToolbar: Do not change the title to reflect the search parameters



commit 423cde06ef10b594c2a3e661a7183fb3ce157a1a
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Mar 17 13:52:51 2014 +0100

    mainToolbar: Do not change the title to reflect the search parameters
    
    In the new split view designs, the header bar should always have the
    stack switcher buttons while displaying search results.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686461

 src/mainToolbar.js |   28 +---------------------------
 1 files changed, 1 insertions(+), 27 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 082f09f..3028382 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -110,10 +110,6 @@ const OverviewToolbar = new Lang.Class({
         this.parent();
 
         // setup listeners to mode changes that affect the toolbar layout
-        this._searchStringId = Application.searchController.connect('search-string-changed',
-            Lang.bind(this, this._setToolbarTitle));
-        this._searchTypeId = Application.searchTypeManager.connect('active-changed',
-            Lang.bind(this, this._setToolbarTitle));
         this._selectionModeId = Application.selectionController.connect('selection-mode-changed',
             Lang.bind(this, this._resetToolbarMode));
         this._resetToolbarMode();
@@ -126,16 +122,6 @@ const OverviewToolbar = new Lang.Class({
                     Application.selectionController.disconnect(this._selectionModeId);
                     this._selectionModeId = 0;
                 }
-
-                if (this._searchStringId != 0) {
-                    Application.searchController.disconnect(this._searchStringId);
-                    this._searchStringId = 0;
-                }
-
-                if (this._searchTypeId != 0) {
-                    Application.searchTypeManager.disconnect(this._searchTypeId);
-                    this._searchTypeId = 0;
-                }
             }));
     },
 
@@ -175,20 +161,8 @@ const OverviewToolbar = new Lang.Class({
         let primary = null;
 
         if (!selectionMode) {
-            if (activeCollection) {
+            if (activeCollection)
                 primary = activeCollection.name;
-            } else {
-                let string = Application.searchController.getString();
-
-                if (string == '') {
-                    let searchType = Application.searchTypeManager.getActiveItem();
-
-                    if (searchType.id != 'all')
-                        primary = searchType.name;
-                } else {
-                    primary = _("Results for ā€œ%sā€").format(string);
-                }
-            }
         } else {
             let length = Application.selectionController.getSelection().length;
             let label = null;


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