[gnome-shell] searchDisplay: Remove pendingClear
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] searchDisplay: Remove pendingClear
- Date: Wed, 29 May 2013 15:33:13 +0000 (UTC)
commit 62e1c08dd69d95eb010cc6b8ee1fa08bba79a9c4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Feb 8 16:05:28 2013 -0500
searchDisplay: Remove pendingClear
It turns out that every time we call getResultsForDisplay is
directly after a setResults, so pendingClear is always true.
https://bugzilla.gnome.org/show_bug.cgi?id=693836
js/ui/searchDisplay.js | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 469d9e9..ec8650c 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -205,13 +205,10 @@ const ListSearchResults = new Lang.Class({
this._notDisplayedResult = [];
this._terms = [];
- this._pendingClear = false;
},
getResultsForDisplay: function() {
- let alreadyVisible = this._pendingClear ? 0 : this.getVisibleResultCount();
- let canDisplay = MAX_LIST_SEARCH_RESULTS_ROWS - alreadyVisible;
-
+ let canDisplay = MAX_LIST_SEARCH_RESULTS_ROWS;
let newResults = this._notDisplayedResult.splice(0, canDisplay);
return newResults;
},
@@ -228,7 +225,6 @@ const ListSearchResults = new Lang.Class({
// copy the lists
this._notDisplayedResult = results.slice(0);
this._terms = terms.slice(0);
- this._pendingClear = true;
},
_keyFocusIn: function(icon) {
@@ -245,7 +241,6 @@ const ListSearchResults = new Lang.Class({
clear: function () {
this._content.destroy_all_children();
- this._pendingClear = false;
},
getFirstResult: function() {
@@ -271,14 +266,10 @@ const GridSearchResults = new Lang.Class({
this._notDisplayedResult = [];
this._terms = [];
- this._pendingClear = false;
},
getResultsForDisplay: function() {
- let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount();
- let canDisplay = this._grid.childrenInRow(this.actor.width) * this._grid.getRowLimit()
- - alreadyVisible;
-
+ let canDisplay = this._grid.childrenInRow(this.actor.width) * this._grid.getRowLimit();
let newResults = this._notDisplayedResult.splice(0, canDisplay);
return newResults;
},
@@ -295,7 +286,6 @@ const GridSearchResults = new Lang.Class({
// copy the lists
this._notDisplayedResult = results.slice(0);
this._terms = terms.slice(0);
- this._pendingClear = true;
},
_keyFocusIn: function(icon) {
@@ -312,7 +302,6 @@ const GridSearchResults = new Lang.Class({
clear: function () {
this._grid.removeAll();
- this._pendingClear = false;
},
getFirstResult: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]