aboutsummaryrefslogtreecommitdiff
path: root/src/transport-widget.c
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/transport-widget.c
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/transport-widget.c')
-rw-r--r--src/transport-widget.c26
1 files changed, 22 insertions, 4 deletions
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;
}