[rygel] core: Fix build against vala 0.11.4



commit b0c0aa0db2969d90f33454b4e4b4b17295490278
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Jan 17 15:15:02 2011 +0200

    core: Fix build against vala 0.11.4

 src/plugins/tracker/rygel-tracker-years.vala |    2 +-
 src/rygel/rygel-http-byte-seek.vala          |    2 +-
 src/rygel/rygel-http-time-seek.vala          |    2 +-
 src/rygel/rygel-item-creator.vala            |    4 ++--
 src/rygel/rygel-root-device-factory.vala     |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-years.vala b/src/plugins/tracker/rygel-tracker-years.vala
index 60173b3..410ef07 100644
--- a/src/plugins/tracker/rygel-tracker-years.vala
+++ b/src/plugins/tracker/rygel-tracker-years.vala
@@ -38,7 +38,7 @@ public class Rygel.Tracker.Years : MetadataValues {
     }
 
     protected override string? create_title_for_value (string value) {
-        return value.ndup (4);
+        return value.substring (4);
     }
 
     protected override string create_filter (string variable, string value) {
diff --git a/src/rygel/rygel-http-byte-seek.vala b/src/rygel/rygel-http-byte-seek.vala
index b220a65..f83eb98 100644
--- a/src/rygel/rygel-http-byte-seek.vala
+++ b/src/rygel/rygel-http-byte-seek.vala
@@ -44,7 +44,7 @@ internal class Rygel.HTTPByteSeek : Rygel.HTTPSeek {
                                                        range);
             }
 
-            range_tokens = range.offset (6).split ("-", 2);
+            range_tokens = range.substring (6).split ("-", 2);
             if (range_tokens[0] == null || range_tokens[1] == null) {
                 throw new HTTPSeekError.INVALID_RANGE (_("Invalid Range '%s'"),
                                                        range);
diff --git a/src/rygel/rygel-http-time-seek.vala b/src/rygel/rygel-http-time-seek.vala
index ce30b13..2a1f5d8 100644
--- a/src/rygel/rygel-http-time-seek.vala
+++ b/src/rygel/rygel-http-time-seek.vala
@@ -45,7 +45,7 @@ internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {
                                                        range);
             }
 
-            range_tokens = range.offset (4).split ("-", 2);
+            range_tokens = range.substring (4).split ("-", 2);
             if (range_tokens[0] == null || range_tokens[1] == null) {
                 throw new HTTPSeekError.INVALID_RANGE (_("Invalid Range '%s'"),
                                                        range);
diff --git a/src/rygel/rygel-item-creator.vala b/src/rygel/rygel-item-creator.vala
index b742878..8fa6ee8 100644
--- a/src/rygel/rygel-item-creator.vala
+++ b/src/rygel/rygel-item-creator.vala
@@ -296,8 +296,8 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
 
         while (item == null) {
             try {
-                item = yield container.find_object (this.item.id,
-                                                    this.cancellable)
+                item = (yield container.find_object (this.item.id,
+                                                     this.cancellable))
                        as MediaItem;
             } catch (Error error) {
                 warning ("Error from container '%s' on trying to find newly " +
diff --git a/src/rygel/rygel-root-device-factory.vala b/src/rygel/rygel-root-device-factory.vala
index ace60d7..c0b24f4 100644
--- a/src/rygel/rygel-root-device-factory.vala
+++ b/src/rygel/rygel-root-device-factory.vala
@@ -276,7 +276,7 @@ internal class Rygel.RootDeviceFactory {
                               width + "x" +
                               height + "x" +
                               depth + "." + icon_info.file_extension;
-            var local_path = uri.offset (7);
+            var local_path = uri.substring (7);
 
             this.context.host_path (local_path, remote_path);
             icon_node->new_child (null, "url", remote_path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]