base.root (title);
try {
- config = MetaConfig.get_default ();
- var item_names = config.get_string_list (CONFIG_GROUP, ITEM_NAMES);
- foreach (string name in item_names)
- add_launch_item (name);
+ config = MetaConfig.get_default ();
+
+ var item_names = config.get_string_list (CONFIG_GROUP, ITEM_NAMES);
+ foreach (var name in item_names) {
+ add_launch_item (name);
+ }
} catch (Error err) {
- debug ("GstLaunch init failed: %s", err.message);
+ debug ("GstLaunch init failed: %s", err.message);
}
this.child_count = this.children.size;
}
void add_launch_item (string name) {
- try {
- string title = config.get_string (CONFIG_GROUP, "%s_title".printf (name));
- string mime_type = config.get_string (CONFIG_GROUP, "%s_mime".printf (name));
- string launch_line = config.get_string (CONFIG_GROUP, "%s_launch".printf (name));
- this.children.add (new GstLaunchItem (name, this, title, mime_type, launch_line));
- } catch (GLib.Error err) {
- debug ("GstLaunch failed item '%s': %s", name, err.message);
- }
+ try {
+ var title = config.get_string (CONFIG_GROUP,
+ "%s_title".printf (name));
+ var mime_type = config.get_string (CONFIG_GROUP,
+ "%s_mime".printf (name));
+ var launch_line = config.get_string (CONFIG_GROUP,
+ "%s_launch".printf (name));
+
+ this.children.add (new GstLaunchItem (name,
+ this,
+ title,
+ mime_type,
+ launch_line));
+ } catch (GLib.Error err) {
+ debug ("GstLaunch failed item '%s': %s", name, err.message);
+ }
}
}