rygel r413 - trunk/src/plugins/dvb



Author: zeeshanak
Date: Wed Jan  7 12:56:00 2009
New Revision: 413
URL: http://svn.gnome.org/viewvc/rygel?rev=413&view=rev

Log:
Use the name of the device group as it's title.

Modified:
   trunk/src/plugins/dvb/rygel-dvb-channel-group.vala
   trunk/src/plugins/dvb/rygel-dvb-content-dir.vala

Modified: trunk/src/plugins/dvb/rygel-dvb-channel-group.vala
==============================================================================
--- trunk/src/plugins/dvb/rygel-dvb-channel-group.vala	(original)
+++ trunk/src/plugins/dvb/rygel-dvb-channel-group.vala	Wed Jan  7 12:56:00 2009
@@ -37,7 +37,6 @@
     private const string DVB_SERVICE = "org.gnome.DVB";
 
     private const string GID_PREFIX = "GroupID:";
-    private const string TITLE_PREFIX = "Group ";
 
     public static dynamic DBus.Object channel_list;
 
@@ -49,12 +48,13 @@
     private uint gid; /* The DVB Daemon Device Group ID */
 
     public DVBChannelGroup (uint                gid,
+                            string              title,
                             string              parent_id,
                             dynamic DBus.Object channel_list,
                             Streamer            streamer) {
         base (GID_PREFIX + gid.to_string (), // UPnP ID
               parent_id,
-              TITLE_PREFIX + gid.to_string (),
+              title,
               0);
         this.gid = gid;
         //this.upnp_class = "object.container.channelGroup";

Modified: trunk/src/plugins/dvb/rygel-dvb-content-dir.vala
==============================================================================
--- trunk/src/plugins/dvb/rygel-dvb-content-dir.vala	(original)
+++ trunk/src/plugins/dvb/rygel-dvb-content-dir.vala	Wed Jan  7 12:56:00 2009
@@ -74,8 +74,13 @@
         this.groups = new List<DVBChannelGroup> ();
         foreach (uint group_id in dev_groups) {
             string channel_list_path = null;
+            string group_name =  null;
+
             try {
                 channel_list_path = manager.GetChannelList (group_id);
+
+                // Get the name of the group
+                group_name = manager.GetDeviceGroupName (group_id);
             } catch (GLib.Error error) {
                 critical ("error: %s", error.message);
                 return;
@@ -89,6 +94,7 @@
 
             // Create ChannelGroup for each registered device group
             this.groups.append (new DVBChannelGroup (group_id,
+                                                     group_name,
                                                      this.root_container.id,
                                                      channel_list,
                                                      streamer));



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