[gnome-documents] manager: move up getFilter() to the manager
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] manager: move up getFilter() to the manager
- Date: Wed, 19 Oct 2011 23:04:19 +0000 (UTC)
commit ecfa125ca6e18bbae5f1535e27237bf88d0155ec
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Oct 15 03:27:49 2011 -0400
manager: move up getFilter() to the manager
Conflicts:
src/manager.js
src/categories.js | 5 -----
src/query.js | 4 ++--
src/sources.js | 4 ----
3 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/src/categories.js b/src/categories.js
index 1193618..9179595 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -98,11 +98,6 @@ CategoryManager.prototype = {
// this._categories[category.id] = category;
this.setActiveItem(recent);
- },
-
- getActiveCategoryFilter: function() {
- let active = this.getActiveItem();
- return active.getFilter();
}
};
Signals.addSignalMethods(CategoryManager.prototype);
diff --git a/src/query.js b/src/query.js
index 3e688df..03ce360 100644
--- a/src/query.js
+++ b/src/query.js
@@ -121,9 +121,9 @@ QueryBuilder.prototype = {
sparql += '(' + this._buildFilterSearch() + ')';
sparql += ' && ';
- sparql += Global.sourceManager.getActiveSourceFilter();
+ sparql += Global.sourceManager.getFilter();
sparql += ' && ';
- sparql += Global.categoryManager.getActiveCategoryFilter();
+ sparql += Global.categoryManager.getFilter();
sparql += ' && ';
sparql += this._buildFilterType();
diff --git a/src/sources.js b/src/sources.js
index 4f04ab3..d5bfbd7 100644
--- a/src/sources.js
+++ b/src/sources.js
@@ -137,10 +137,6 @@ SourceManager.prototype = {
setActiveItem: function(item) {
if (Manager.BaseManager.prototype.setActiveItem.call(this, item))
Global.settings.set_string('active-source', item.id);
- },
-
- getActiveSourceFilter: function() {
- return this.getActiveItem().getFilter();
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]