[gnome-documents] mainToolbar: Remove useless signal connections



commit 640a0bae2e3c5e0cb26c703cab8962953527f369
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Mar 17 13:44:23 2014 +0100

    mainToolbar: Remove useless signal connections
    
    We do not use SearchMatchManager or SourceManager or anything inside
    them while setting the title. Hence there is no need to listen for the
    active search match or source.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686461

 src/mainToolbar.js |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 66a3147..082f09f 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -114,10 +114,6 @@ const OverviewToolbar = new Lang.Class({
             Lang.bind(this, this._setToolbarTitle));
         this._searchTypeId = Application.searchTypeManager.connect('active-changed',
             Lang.bind(this, this._setToolbarTitle));
-        this._searchMatchId = Application.searchMatchManager.connect('active-changed',
-            Lang.bind(this, this._setToolbarTitle));
-        this._searchSourceId = Application.sourceManager.connect('active-changed',
-            Lang.bind(this, this._setToolbarTitle));
         this._selectionModeId = Application.selectionController.connect('selection-mode-changed',
             Lang.bind(this, this._resetToolbarMode));
         this._resetToolbarMode();
@@ -140,16 +136,6 @@ const OverviewToolbar = new Lang.Class({
                     Application.searchTypeManager.disconnect(this._searchTypeId);
                     this._searchTypeId = 0;
                 }
-
-                if (this._searchMatchId != 0) {
-                    Application.searchMatchManager.disconnect(this._searchMatchId);
-                    this._searchMatchId = 0;
-                }
-
-                if (this._searchSourceId != 0) {
-                    Application.sourceManager.disconnect(this._searchSourceId);
-                    this._searchSourceId = 0;
-                }
             }));
     },
 


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