return simple_res.data;
}
+ public string substitute_keywords (string title) {
+ var new_title = title.replace ("@REALNAME@",
+ Environment.get_real_name ());
+ new_title = new_title.replace ("@USERNAME@",
+ Environment.get_user_name ());
+ new_title = new_title.replace ("@HOSTNAME@",
+ Environment.get_host_name ());
+
+ return new_title;
+ }
+
// Private methods
private MediaObject? find_object_sync (string id) {
MediaObject obj = null;
Value value;
props.Get (OBJECT_IFACE, "display-name", out value);
- this.title = value.get_string ().replace ("@REALNAME@",
- Environment.get_real_name ());
- this.title = this.title.replace ("@USERNAME@",
- Environment.get_user_name ());
- this.title = this.title.replace ("@HOSTNAME@",
- Environment.get_host_name ());
+ this.title = parent.substitute_keywords (value.get_string ());
props.Get (ITEM_IFACE, "type", out value);
string type = value.get_string ();