[gnome-shell] searchDisplay: Remove getVisibleResultCount
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] searchDisplay: Remove getVisibleResultCount
- Date: Wed, 29 May 2013 15:33:58 +0000 (UTC)
commit 1ec82d2ddd76d2348324b34c4a7d443c5cc64f54
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Feb 8 18:34:24 2013 -0500
searchDisplay: Remove getVisibleResultCount
This is only used in one place, so we can quickly substitute
where it's needed.
https://bugzilla.gnome.org/show_bug.cgi?id=693836
js/ui/searchDisplay.js | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 3785b5e..f502316 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -294,10 +294,6 @@ const ListSearchResults = new Lang.Class({
return newResults;
},
- getVisibleResultCount: function() {
- return this._content.get_n_children();
- },
-
_renderResults: function(metas) {
for (let i = 0; i < metas.length; i++) {
let display = new ListSearchResult(this.provider, metas[i], this._terms);
@@ -311,7 +307,7 @@ const ListSearchResults = new Lang.Class({
},
getFirstResult: function() {
- if (this.getVisibleResultCount() > 0)
+ if (this._content.get_n_children() > 0)
return this._content.get_child_at_index(0)._delegate;
else
return null;
@@ -340,10 +336,6 @@ const GridSearchResults = new Lang.Class({
return newResults;
},
- getVisibleResultCount: function() {
- return this._grid.visibleItemsCount();
- },
-
_renderResults: function(metas) {
for (let i = 0; i < metas.length; i++) {
let display = new GridSearchResult(this.provider, metas[i], this._terms);
@@ -357,7 +349,7 @@ const GridSearchResults = new Lang.Class({
},
getFirstResult: function() {
- if (this.getVisibleResultCount() > 0)
+ if (this._grid.visibleItemsCount() > 0)
return this._grid.getItemAtIndex(0)._delegate;
else
return null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]