aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-08 20:51:16 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-08 20:51:16 +0000
commitda2fbe31c29cadf4d8215d882d212ef40a0d1da0 (patch)
tree36af5407ebddfc3b2c0bf62485f02629a0b9357d /src
parent3b16991b0cc19cb330295bc0cd2e7da1704f445d (diff)
downloadayatana-indicator-sound-da2fbe31c29cadf4d8215d882d212ef40a0d1da0.tar.gz
ayatana-indicator-sound-da2fbe31c29cadf4d8215d882d212ef40a0d1da0.tar.bz2
ayatana-indicator-sound-da2fbe31c29cadf4d8215d882d212ef40a0d1da0.zip
skipping instructions sent
Diffstat (limited to 'src')
-rw-r--r--src/mpris2-controller.vala2
-rw-r--r--src/sound-service.c2
-rw-r--r--src/transport-widget.c26
-rw-r--r--src/transport-widget.h2
4 files changed, 27 insertions, 5 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index c7305f4..e5bc1f6 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -176,7 +176,7 @@ public class Mpris2Controller : GLib.Object
public void transport_update(TransportMenuitem.action command)
{
- //debug("transport_event input = %i", (int)command);
+ debug("transport_event input = %i", (int)command);
if(command == TransportMenuitem.action.PLAY_PAUSE){
this.player.PlayPause.begin();
}
diff --git a/src/sound-service.c b/src/sound-service.c
index c79b9f6..eeab33e 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -40,8 +40,10 @@ service_shutdown (IndicatorService *service, gpointer user_data)
if (mainloop != NULL) {
g_debug("Service shutdown !");
+/*
close_pulse_activites();
g_main_loop_quit(mainloop);
+*/
}
return;
diff --git a/src/transport-widget.c b/src/transport-widget.c
index acbdf0f..5d58201 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -336,7 +336,7 @@ static void
transport_widget_start_timing (TransportWidget* widget)
{
TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE (widget);
- priv->hold_timer = g_timeout_add (1200,
+ priv->hold_timer = g_timeout_add (800,
transport_widget_trigger_seek,
widget);
}
@@ -346,7 +346,7 @@ transport_widget_trigger_seek (gpointer userdata)
{
g_return_val_if_fail ( IS_TRANSPORT_WIDGET(userdata), FALSE );
TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE (TRANSPORT_WIDGET(userdata));
- priv->skip_frequency = g_timeout_add (500,
+ priv->skip_frequency = g_timeout_add (300,
transport_widget_seek,
userdata);
return FALSE;
@@ -360,10 +360,28 @@ transport_widget_trigger_seek (gpointer userdata)
static gboolean
transport_widget_seek (gpointer userdata)
{
-/*
g_return_val_if_fail ( IS_TRANSPORT_WIDGET(userdata), FALSE );
TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE (TRANSPORT_WIDGET(userdata));
-*/
+ GVariant* new_transport_state;
+ if(priv->current_command == TRANSPORT_NEXT){
+ g_debug ("we should be skipping forward");
+ new_transport_state = g_variant_new_int32 ((int)TRANSPORT_FORWIND);
+
+ dbusmenu_menuitem_handle_event ( priv->twin_item,
+ "Transport state change",
+ new_transport_state,
+ 0 );
+
+ }
+ else if(priv->current_command == TRANSPORT_PREVIOUS){
+ g_debug ("we should be skipping back");
+ new_transport_state = g_variant_new_int32 ((int)TRANSPORT_REWIND);
+
+ dbusmenu_menuitem_handle_event ( priv->twin_item,
+ "Transport state change",
+ new_transport_state,
+ 0 );
+ }
return TRUE;
}
diff --git a/src/transport-widget.h b/src/transport-widget.h
index d02f59b..c9354b1 100644
--- a/src/transport-widget.h
+++ b/src/transport-widget.h
@@ -39,6 +39,8 @@ typedef enum {
TRANSPORT_PREVIOUS,
TRANSPORT_PLAY_PAUSE,
TRANSPORT_NEXT,
+ TRANSPORT_REWIND,
+ TRANSPORT_FORWIND,
TRANSPORT_NADA
}TransportWidgetEvent;