aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/mpris2-controller.vala43
-rw-r--r--src/transport-widget.c1
3 files changed, 1 insertions, 44 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e85ed93..4bc6ff8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -62,7 +62,6 @@ music_bridge_VALASOURCES = \
music-player-bridge.vala \
transport-menu-item.vala \
metadata-menu-item.vala \
- scrub-menu-item.vala \
title-menu-item.vala \
player-controller.vala \
mpris2-controller.vala \
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 4717f41..bab20ae 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -83,11 +83,8 @@ public class Mpris2Controller : GLib.Object
this.player = (MprisPlayer) connection.get_object (root_interface.concat(".").concat(this.owner.name.down()),
"/org/mpris/MediaPlayer2",
root_interface.concat(".Player"));
- this.player.Seeked += onSeeked;
-
this.properties_interface = (FreeDesktopProperties) connection.get_object("org.freedesktop.Properties.PropertiesChanged",//root_interface.concat(".").concat(this.owner.name.down()),
- "/org/mpris/MediaPlayer2");
-
+ "/org/mpris/MediaPlayer2");
this.properties_interface.PropertiesChanged += property_changed_cb;
} catch (DBus.Error e) {
@@ -98,8 +95,6 @@ public class Mpris2Controller : GLib.Object
public void property_changed_cb(string interface_source, HashTable<string, Value?> changed_properties, string[] invalid )
{
debug("properties-changed for interface %s and owner %s", interface_source, this.owner.name.down());
- debug("is the invalid array null : %s", (invalid == null).to_string());
- debug("invalid length : %i", invalid.length);
if(changed_properties == null || interface_source.has_prefix(this.root_interface) == false ){
warning("Property-changed hash is null or this is an interface that doesn't concerns us");
@@ -207,42 +202,6 @@ public class Mpris2Controller : GLib.Object
}
}
}
- /**
- TODO: SetPosition on the player object is not working with rhythmbox,
- runtime error - "dbus function not supported"
- */
- public void set_track_position(double position)
- {
- debug("Set position with pos (0-100) %f", position);
- Value? time_value = this.player.Metadata.lookup("mpris:length");
- if(time_value == null){
- warning("Can't fetch the duration of the track therefore cant set the position");
- return;
- }
- // work in microseconds (scale up by 10 TTP-of 6)
- int64 total_time = time_value.get_int64();
- debug("total time of track = %i", (int)total_time);
- double new_time_position = total_time * (position/100.0);
- debug("new position = %f", (new_time_position));
-
- Value? v = this.player.Metadata.lookup("mpris:trackid");
- if(v != null){
- if(v.holds (typeof (string))){
- DBus.ObjectPath path = new ObjectPath(v.get_string());
- try{
- this.player.SetPosition(path, (int64)(new_time_position));
- }
- catch(DBus.Error e){
- error("DBus Error calling the player objects SetPosition method %s",
- e.message);
- }
- }
- }
- }
-
- public void onSeeked(int64 position){
- debug("Seeked signal callback with pos = %i", (int)position/1000);
- }
public bool connected()
{
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 979f6fd..2dfcbef 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -46,7 +46,6 @@ static void transport_widget_finalize (GObject *object);
static void transport_widget_set_twin_item(TransportWidget* self,
DbusmenuMenuitem* twin_item);
-
static gboolean transport_widget_expose_event(GtkWidget* widget,
GdkEventExpose* event);