[rygel] tracker: Add base classes to WriteableContainers
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Add base classes to WriteableContainers
- Date: Wed, 29 Jun 2011 09:02:45 +0000 (UTC)
commit d68587cfe1a6734d1be6ae528c58be738c9169ba
Author: Jens Georg <mail jensge org>
Date: Wed Jun 29 11:02:04 2011 +0200
tracker: Add base classes to WriteableContainers
.../tracker/rygel-tracker-category-container.vala | 10 +++++++++-
src/plugins/tracker/rygel-tracker-music.vala | 1 +
src/plugins/tracker/rygel-tracker-pictures.vala | 1 +
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-category-container.vala b/src/plugins/tracker/rygel-tracker-category-container.vala
index 0dc6b2a..95d0402 100644
--- a/src/plugins/tracker/rygel-tracker-category-container.vala
+++ b/src/plugins/tracker/rygel-tracker-category-container.vala
@@ -29,6 +29,8 @@ using Gee;
public abstract class Rygel.Tracker.CategoryContainer : Rygel.SimpleContainer {
public ItemFactory item_factory;
+ private CategoryAllContainer all_container;
+
public CategoryContainer (string id,
MediaContainer parent,
string title,
@@ -37,9 +39,15 @@ public abstract class Rygel.Tracker.CategoryContainer : Rygel.SimpleContainer {
this.item_factory = item_factory;
- this.add_child_container (new CategoryAllContainer (this));
+ this.all_container = new CategoryAllContainer (this);
+
+ this.add_child_container (this.all_container);
this.add_child_container (new Tags (this, item_factory));
this.add_child_container (new Titles (this, this.item_factory));
this.add_child_container (new New (this, this.item_factory));
}
+
+ public void add_create_class (string create_class) {
+ this.all_container.create_classes.add (create_class);
+ }
}
diff --git a/src/plugins/tracker/rygel-tracker-music.vala b/src/plugins/tracker/rygel-tracker-music.vala
index 5551eab..e7b0b4a 100644
--- a/src/plugins/tracker/rygel-tracker-music.vala
+++ b/src/plugins/tracker/rygel-tracker-music.vala
@@ -35,6 +35,7 @@ public class Rygel.Tracker.Music : CategoryContainer {
this.add_child_container (new Genre (this));
this.search_classes.add (AudioItem.UPNP_CLASS);
this.search_classes.add (MusicItem.UPNP_CLASS);
+ this.add_create_class (AudioItem.UPNP_CLASS);
}
}
diff --git a/src/plugins/tracker/rygel-tracker-pictures.vala b/src/plugins/tracker/rygel-tracker-pictures.vala
index 64fef47..6f8eeec 100644
--- a/src/plugins/tracker/rygel-tracker-pictures.vala
+++ b/src/plugins/tracker/rygel-tracker-pictures.vala
@@ -32,6 +32,7 @@ public class Rygel.Tracker.Pictures : CategoryContainer {
this.add_child_container (new Years (this, this.item_factory));
this.search_classes.add (ImageItem.UPNP_CLASS);
+ this.add_create_class (ImageItem.UPNP_CLASS);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]