[gnome-shell/wip/swarm: 6/10] Search: cleanup unused code



commit d1abab53676a3f5d034a0bd9aa96f5d998334080
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Wed Jun 25 11:23:18 2014 +0200

    Search: cleanup unused code

 js/ui/search.js |   31 +------------------------------
 1 files changed, 1 insertions(+), 30 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index dc2729a..1a15dbd 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -231,24 +231,9 @@ const GridSearchResult = new Lang.Class({
         this.actor.style_class = 'grid-search-result';
 
         let content = provider.createResultObject(metaInfo);
-        let dragSource = null;
-
-        if (content == null) {
-            let actor = new St.Bin();
-            let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
-                                             { createIcon: this.metaInfo['createIcon'] });
-            actor.set_child(icon.actor);
-            actor.label_actor = icon.label;
-            dragSource = icon.icon;
-            content = { actor: actor, icon: icon };
-        } else {
-            if (content._delegate && content._delegate.getDragActorSource)
-                dragSource = content._delegate.getDragActorSource();
-        }
+        this._dragActorSource = content;
 
         this.actor.set_child(content.actor);
-        this.actor.label_actor = content.actor.label_actor;
-        this.icon = content.icon;
 
         let draggable = DND.makeDraggable(this.actor);
         draggable.connect('drag-begin',
@@ -263,11 +248,6 @@ const GridSearchResult = new Lang.Class({
                           Lang.bind(this, function() {
                               Main.overview.endItemDrag(this);
                           }));
-
-        if (!dragSource)
-            // not exactly right, but alignment problems are hard to notice
-            dragSource = content;
-        this._dragActorSource = dragSource;
     },
 
     getDragActorSource: function() {
@@ -488,15 +468,6 @@ const GridSearchResults = new Lang.Class({
         return this._grid.columnsForWidth(availableWidth) * this._grid.getRowLimit();
     },
 
-    _renderResults: function(metas) {
-        for (let i = 0; i < metas.length; i++) {
-            let display = new GridSearchResult(this.provider, metas[i]);
-            display.connect('activate', Lang.bind(this, this._activateResult));
-            display.actor.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
-            this._grid.addItem(display);
-        }
-    },
-
     _clearResultDisplay: function () {
         this._grid.removeAll();
     },


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