[rygel] tracker: Seperate class of "All" container
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Seperate class of "All" container
- Date: Fri, 19 Feb 2010 16:32:56 +0000 (UTC)
commit 581511f7f1f807af6878b2ae270ff469b958001f
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Feb 19 16:25:36 2010 +0200
tracker: Seperate class of "All" container
src/plugins/tracker/Makefile.am | 1 +
.../rygel-tracker-category-all-container.vala | 35 ++++++++++++++++++++
.../tracker/rygel-tracker-category-container.vala | 5 +--
3 files changed, 37 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/tracker/Makefile.am b/src/plugins/tracker/Makefile.am
index c8c0136..fb56d89 100644
--- a/src/plugins/tracker/Makefile.am
+++ b/src/plugins/tracker/Makefile.am
@@ -20,6 +20,7 @@ librygel_media_tracker_la_SOURCES = \
rygel-tracker-tags.vala \
rygel-tracker-years.vala \
rygel-tracker-search-container.vala \
+ rygel-tracker-category-all-container.vala \
rygel-tracker-query.vala \
rygel-tracker-selection-query.vala \
rygel-tracker-insertion-query.vala \
diff --git a/src/plugins/tracker/rygel-tracker-category-all-container.vala b/src/plugins/tracker/rygel-tracker-category-all-container.vala
new file mode 100644
index 0000000..b2aaf70
--- /dev/null
+++ b/src/plugins/tracker/rygel-tracker-category-all-container.vala
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
+ * Copyright (C) 2008-2010 Nokia Corporation.
+ *
+ * Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
+ * <zeeshan ali nokia com>
+ *
+ * This file is part of Rygel.
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+using Gee;
+
+/**
+ * A simple search container that contains all the items in a category.
+ */
+public class Rygel.TrackerCategoryAllContainer : Rygel.TrackerSearchContainer {
+ public TrackerCategoryAllContainer (TrackerCategoryContainer parent) {
+ base ("All" + parent.id, parent, "All", parent.item_factory);
+ }
+}
+
diff --git a/src/plugins/tracker/rygel-tracker-category-container.vala b/src/plugins/tracker/rygel-tracker-category-container.vala
index 3f89ad8..1105022 100644
--- a/src/plugins/tracker/rygel-tracker-category-container.vala
+++ b/src/plugins/tracker/rygel-tracker-category-container.vala
@@ -37,10 +37,7 @@ public class Rygel.TrackerCategoryContainer : Rygel.SimpleContainer {
this.item_factory = item_factory;
- this.add_child (new TrackerSearchContainer (this.id + "All",
- this,
- "All",
- this.item_factory));
+ this.add_child (new TrackerCategoryAllContainer (this));
try {
var uri = Filename.to_uri (item_factory.upload_dir, null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]