aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-08 21:43:50 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-08 21:43:50 +0000
commit7576ffb4d9b247d1db2e44a7ea0f4ec8b5101f20 (patch)
tree870ceb5ca7ab8555fa23bd880df6569d6caab273 /src
parentda2fbe31c29cadf4d8215d882d212ef40a0d1da0 (diff)
downloadayatana-indicator-sound-7576ffb4d9b247d1db2e44a7ea0f4ec8b5101f20.tar.gz
ayatana-indicator-sound-7576ffb4d9b247d1db2e44a7ea0f4ec8b5101f20.tar.bz2
ayatana-indicator-sound-7576ffb4d9b247d1db2e44a7ea0f4ec8b5101f20.zip
seeking is working, need a tidy up
Diffstat (limited to 'src')
-rw-r--r--src/mpris2-controller.vala6
-rw-r--r--src/mpris2-interfaces.vala1
-rw-r--r--src/transport-menu-item.vala4
3 files changed, 10 insertions, 1 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index e5bc1f6..dae8dfb 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -186,6 +186,12 @@ public class Mpris2Controller : GLib.Object
else if(command == TransportMenuitem.action.NEXT){
this.player.Next.begin();
}
+ else if(command == TransportMenuitem.action.REWIND){
+ this.player.Seek.begin(-1);
+ }
+ else if(command == TransportMenuitem.action.FORWIND){
+ this.player.Seek.begin(1);
+ }
}
public bool connected()
diff --git a/src/mpris2-interfaces.vala b/src/mpris2-interfaces.vala
index 5506a47..5dab1d2 100644
--- a/src/mpris2-interfaces.vala
+++ b/src/mpris2-interfaces.vala
@@ -42,6 +42,7 @@ public interface MprisPlayer : Object {
public abstract async void PlayPause() throws IOError;
public abstract async void Next() throws IOError;
public abstract async void Previous() throws IOError;
+ public abstract async void Seek(int64 offset) throws IOError;
// signals
public signal void Seeked(int64 new_position);
}
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala
index b0009d9..d5ae283 100644
--- a/src/transport-menu-item.vala
+++ b/src/transport-menu-item.vala
@@ -26,7 +26,9 @@ public class TransportMenuitem : PlayerItem
public enum action{
PREVIOUS,
PLAY_PAUSE,
- NEXT
+ NEXT,
+ REWIND,
+ FORWIND
}
public enum state{