From 6a769632b218df6214ad196dd2d7d316b041f1a2 Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Thu, 28 May 2009 00:24:20 +0200 Subject: [PATCH] Use Configuration class instead of raw gconf --- .../mediathek/rygel-mediathek-root-container.vala | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/plugins/mediathek/rygel-mediathek-root-container.vala b/src/plugins/mediathek/rygel-mediathek-root-container.vala index ed1ed95..ddca46f 100644 --- a/src/plugins/mediathek/rygel-mediathek-root-container.vala +++ b/src/plugins/mediathek/rygel-mediathek-root-container.vala @@ -28,7 +28,6 @@ using GConf; public class Rygel.MediathekRootContainer : MediaContainer { private ArrayList items; internal SessionAsync session; - private GConf.Client gconf; public override void get_children (uint offset, uint max_count, @@ -101,22 +100,12 @@ public class Rygel.MediathekRootContainer : MediaContainer { this.session = new Soup.SessionAsync (); this.items = new ArrayList (); - this.gconf = GConf.Client.get_default (); - unowned SList feeds = null; + var config = new Rygel.Configuration (); + var feeds = config.get_int_list ("ZDFMediathek", "rss"); - // get subscribed feeds - try { - // TODO get gconf prefix from Rygel - feeds = gconf.get_list("/apps/rygel/ZDFMediathek/rss", - GConf.ValueType.INT); - - } catch (GLib.Error error) { - message ("Error on getting configuration: %s", error.message); - } - - if (feeds == null) { + if (feeds.size == 0) { message ("Could not get RSS items from GConf, using defaults"); - feeds.append (508); + feeds.add (508); } foreach (int id in feeds) { -- 2.7.4