this.items = new ArrayList<FolderContainer> ();
- var config = new Rygel.Configuration ();
+ var config = Rygel.Configuration.get_default ();
var dirs = config.get_string_list ("Folder", "folders");
// either an error occured or the gconf key is not set
this.session = new Soup.SessionAsync ();
this.items = new ArrayList<MediathekRssContainer> ();
- var config = new Rygel.Configuration ();
+ var config = Rygel.Configuration.get_default ();
var feeds = config.get_int_list ("ZDFMediathek", "rss");
if (feeds.size == 0) {
protected static const string LPCM_TRANSCODER_KEY =
"enable-lpcm-transcoder";
+ // Our singleton
+ private static Configuration config;
+
protected GConf.Client gconf;
private string _host_ip;
}
}
+ public static Configuration get_default () {
+ if (config == null) {
+ config = new Configuration ();
+ }
+
+ return config;
+ }
+
public Configuration () {
this.gconf = GConf.Client.get_default ();
}
private GUPnP.Context context;
public MediaServerFactory () throws GLib.Error {
- this.config = new Configuration ();
+ this.config = Configuration.get_default ();
/* Set up GUPnP context */
this.context = create_upnp_context ();
ArrayList<PreferencesSection> sections;
public PreferencesDialog () throws Error {
- var config = new Configuration ();
+ var config = Configuration.get_default ();
this.builder = new Builder ();