aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-12-13 17:46:42 +0000
committerConor Curran <conor.curran@canonical.com>2010-12-13 17:46:42 +0000
commit2a35f9b78b75cd95090142b891c401a46eec9bf3 (patch)
tree9817caf23baf835dbbfa48ccb5689b24522fc1af /src/mpris2-controller.vala
parentf800967fcabf6a9d7e6223ff8d6591f042496588 (diff)
downloadayatana-indicator-sound-2a35f9b78b75cd95090142b891c401a46eec9bf3.tar.gz
ayatana-indicator-sound-2a35f9b78b75cd95090142b891c401a46eec9bf3.tar.bz2
ayatana-indicator-sound-2a35f9b78b75cd95090142b891c401a46eec9bf3.zip
started along the road of removing the familiar db backend and replacing with the g-settings entry approach
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;
}