[rygel] tracker: Move 'Tags' container into Pictures
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Move 'Tags' container into Pictures
- Date: Sat, 5 Dec 2009 01:21:44 +0000 (UTC)
commit 1bc92166284f259b429a51ff93afc1b8f53b69ad
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 2 16:55:00 2009 +0200
tracker: Move 'Tags' container into Pictures
This also implies 'Pictures' gets its own container class.
src/plugins/tracker/Makefile.am | 1 +
src/plugins/tracker/rygel-tracker-pictures.vala | 40 ++++++++++++++++++++
.../tracker/rygel-tracker-root-container.vala | 7 +---
src/plugins/tracker/rygel-tracker-tags.vala | 7 ++-
4 files changed, 46 insertions(+), 9 deletions(-)
---
diff --git a/src/plugins/tracker/Makefile.am b/src/plugins/tracker/Makefile.am
index 6d3b3b9..3000041 100644
--- a/src/plugins/tracker/Makefile.am
+++ b/src/plugins/tracker/Makefile.am
@@ -13,6 +13,7 @@ librygel_media_tracker_la_SOURCES = \
rygel-media-tracker.vala \
rygel-tracker-root-container.vala \
rygel-tracker-music.vala \
+ rygel-tracker-pictures.vala \
rygel-tracker-metadata-values.vala \
rygel-tracker-tags.vala \
rygel-tracker-search-container.vala \
diff --git a/src/plugins/tracker/rygel-tracker-pictures.vala b/src/plugins/tracker/rygel-tracker-pictures.vala
new file mode 100644
index 0000000..86222a0
--- /dev/null
+++ b/src/plugins/tracker/rygel-tracker-pictures.vala
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2009 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;
+
+/**
+ * Container listing Pictures content hierarchy.
+ */
+public class Rygel.TrackerPictures : Rygel.SimpleContainer {
+ public TrackerPictures (string id,
+ MediaContainer parent,
+ string title) {
+ base (id, parent, title);
+
+ var item_factory = new TrackerPictureItemFactory ();
+
+ this.add_child (new TrackerTags ("19", this, item_factory));
+ }
+}
+
diff --git a/src/plugins/tracker/rygel-tracker-root-container.vala b/src/plugins/tracker/rygel-tracker-root-container.vala
index 8db4b8e..f3cccd0 100644
--- a/src/plugins/tracker/rygel-tracker-root-container.vala
+++ b/src/plugins/tracker/rygel-tracker-root-container.vala
@@ -34,18 +34,13 @@ public class Rygel.TrackerRootContainer : Rygel.SimpleContainer {
base.root (title);
this.add_child (new TrackerSearchContainer (
- "16",
- this,
- "Pictures",
- new TrackerPictureItemFactory ()));
- this.add_child (new TrackerSearchContainer (
"15",
this,
"Videos",
new TrackerVideoItemFactory ()));
this.add_child (new TrackerMusic ("14", this, "Music"));
- this.add_child (new TrackerTags ("19", this));
+ this.add_child (new TrackerPictures ("16", this, "Pictures"));
}
}
diff --git a/src/plugins/tracker/rygel-tracker-tags.vala b/src/plugins/tracker/rygel-tracker-tags.vala
index d05103f..00f87a0 100644
--- a/src/plugins/tracker/rygel-tracker-tags.vala
+++ b/src/plugins/tracker/rygel-tracker-tags.vala
@@ -33,9 +33,10 @@ public class Rygel.TrackerTags : Rygel.TrackerMetadataValues {
private const string TITLE = "Tags";
private const string[] KEY_CHAIN = { "nao:hasTag", "nao:prefLabel", null };
- public TrackerTags (string id,
- MediaContainer parent) {
- base (id, parent, TITLE, new TrackerPictureItemFactory (), KEY_CHAIN);
+ public TrackerTags (string id,
+ MediaContainer parent,
+ TrackerItemFactory item_factory) {
+ base (id, parent, TITLE, item_factory, KEY_CHAIN);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]