aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/mpris2-controller.vala')
-rw-r--r--src/mpris2-controller.vala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 59e3122..42d08c9 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -31,7 +31,6 @@ using Dbusmenu;
*/
public class Mpris2Controller : GLib.Object
{
- public static const string root_interface = "org.mpris.MediaPlayer2" ;
public MprisRoot mpris2_root {get; construct;}
public MprisPlayer player {get; construct;}
public FreeDesktopProperties properties_interface {get; construct;}
@@ -46,16 +45,16 @@ public class Mpris2Controller : GLib.Object
construct{
try {
this.mpris2_root = Bus.get_proxy_sync ( BusType.SESSION,
- root_interface.concat(".").concat(this.owner.mpris_name),
+ this.owner.dbus_name,
"/org/mpris/MediaPlayer2");
this.player = Bus.get_proxy_sync ( BusType.SESSION,
- root_interface.concat(".").concat(this.owner.mpris_name),
+ this.owner.dbus_name,
"/org/mpris/MediaPlayer2" );
this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION,
"org.freedesktop.Properties.PropertiesChanged",
"/org/mpris/MediaPlayer2" );
- this.properties_interface.PropertiesChanged += property_changed_cb;
+ this.properties_interface.PropertiesChanged.connect ( property_changed_cb );
}
catch (IOError e) {
error("Problems connecting to the session bus - %s", e.message);
@@ -66,8 +65,9 @@ public class Mpris2Controller : GLib.Object
HashTable<string, Variant?> changed_properties,
string[] invalid )
{
- debug("properties-changed for interface %s and owner %s", interface_source, this.owner.mpris_name);
- if(changed_properties == null || interface_source.has_prefix(this.root_interface) == false ){
+ debug("properties-changed for interface %s and owner %s", interface_source, this.owner.dbus_name);
+ if ( changed_properties == null ||
+ interface_source.has_prefix ( Mpris2Watcher.MPRIS_PREFIX ) == false ){
warning("Property-changed hash is null or this is an interface that doesn't concerns us");
return;
}