tracker: Use term "picture" rather than "image"
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 2 Dec 2009 14:45:09 +0000 (16:45 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Wed, 2 Dec 2009 15:01:50 +0000 (17:01 +0200)
src/plugins/tracker/Makefile.am
src/plugins/tracker/rygel-tracker-picture-item-factory.vala [moved from src/plugins/tracker/rygel-tracker-image-item-factory.vala with 75% similarity]
src/plugins/tracker/rygel-tracker-root-container.vala
src/plugins/tracker/rygel-tracker-tags.vala

index da8120e..6d3b3b9 100644 (file)
@@ -22,7 +22,7 @@ librygel_media_tracker_la_SOURCES = \
                                    rygel-tracker-item-factory.vala \
                                    rygel-tracker-video-item-factory.vala \
                                    rygel-tracker-music-item-factory.vala \
-                                   rygel-tracker-image-item-factory.vala \
+                                   rygel-tracker-picture-item-factory.vala \
                                    rygel-tracker-plugin.vala \
                                    rygel-tracker-plugin-factory.vala \
                                    rygel-tracker-interfaces.vala
@@ -25,10 +25,10 @@ using GUPnP;
 using DBus;
 
 /**
- * Tracker image item factory.
+ * Tracker picture item factory.
  */
-public class Rygel.TrackerImageItemFactory : Rygel.TrackerItemFactory {
-    private enum ImageMetadata {
+public class Rygel.TrackerPictureItemFactory : Rygel.TrackerItemFactory {
+    private enum PictureMetadata {
         HEIGHT = Metadata.LAST_KEY,
         WIDTH,
 
@@ -37,7 +37,7 @@ public class Rygel.TrackerImageItemFactory : Rygel.TrackerItemFactory {
 
     private const string CATEGORY = "nmm:Photo";
 
-    public TrackerImageItemFactory () {
+    public TrackerPictureItemFactory () {
         base (CATEGORY, MediaItem.IMAGE_CLASS);
     }
 
@@ -48,11 +48,11 @@ public class Rygel.TrackerImageItemFactory : Rygel.TrackerItemFactory {
                                       throws GLib.Error {
         var item = base.create (id, uri, parent, metadata);
 
-        if (metadata[ImageMetadata.WIDTH] != "")
-            item.width = metadata[ImageMetadata.WIDTH].to_int ();
+        if (metadata[PictureMetadata.WIDTH] != "")
+            item.width = metadata[PictureMetadata.WIDTH].to_int ();
 
-        if (metadata[ImageMetadata.HEIGHT] != "")
-            item.height = metadata[ImageMetadata.HEIGHT].to_int ();
+        if (metadata[PictureMetadata.HEIGHT] != "")
+            item.height = metadata[PictureMetadata.HEIGHT].to_int ();
 
         return item;
     }
@@ -60,13 +60,13 @@ public class Rygel.TrackerImageItemFactory : Rygel.TrackerItemFactory {
     public override string[] get_metadata_keys () {
         var base_keys = base.get_metadata_keys ();
 
-        var keys = new string[ImageMetadata.LAST_KEY];
+        var keys = new string[PictureMetadata.LAST_KEY];
         for (var i = 0; i < base_keys.length; i++) {
             keys[i] = base_keys[i];
         }
 
-        keys[ImageMetadata.WIDTH] = "nfo:width";
-        keys[ImageMetadata.HEIGHT] = "nfo:height";
+        keys[PictureMetadata.WIDTH] = "nfo:width";
+        keys[PictureMetadata.HEIGHT] = "nfo:height";
 
         return keys;
     }
index dee8b0d..8db4b8e 100644 (file)
@@ -37,7 +37,7 @@ public class Rygel.TrackerRootContainer : Rygel.SimpleContainer {
                                         "16",
                                         this,
                                         "Pictures",
-                                        new TrackerImageItemFactory ()));
+                                        new TrackerPictureItemFactory ()));
         this.add_child (new TrackerSearchContainer (
                                         "15",
                                         this,
index ba813a0..d05103f 100644 (file)
@@ -35,7 +35,7 @@ public class Rygel.TrackerTags : Rygel.TrackerMetadataValues {
 
     public TrackerTags (string         id,
                         MediaContainer parent) {
-        base (id, parent, TITLE, new TrackerImageItemFactory (), KEY_CHAIN);
+        base (id, parent, TITLE, new TrackerPictureItemFactory (), KEY_CHAIN);
     }
 }