aboutsummaryrefslogtreecommitdiff
path: root/src/transport-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-10-26 17:03:20 -0400
committerConor Curran <conor.curran@canonical.com>2010-10-26 17:03:20 -0400
commita33f50636cea5d6c1972d1772a59cbb4a0c951b5 (patch)
treef3ee17a5ca213a44035564fdbd4aa8d54c290a19 /src/transport-widget.c
parent8067376fb719ac5bf577a3e85d080eec765ec465 (diff)
downloadayatana-indicator-sound-a33f50636cea5d6c1972d1772a59cbb4a0c951b5.tar.gz
ayatana-indicator-sound-a33f50636cea5d6c1972d1772a59cbb4a0c951b5.tar.bz2
ayatana-indicator-sound-a33f50636cea5d6c1972d1772a59cbb4a0c951b5.zip
initial transport state fixed
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r--src/transport-widget.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index e7f0b4d..c16e791 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -1272,6 +1272,11 @@ transport_widget_set_twin_item(TransportWidget* self,
priv->twin_item = twin_item;
g_signal_connect(G_OBJECT(priv->twin_item), "property-changed",
G_CALLBACK(transport_widget_property_update), self);
+ gint initial_state = dbusmenu_menuitem_property_get_int( twin_item,
+ DBUSMENU_TRANSPORT_MENUITEM_PLAY_STATE );
+ g_debug("TRANSPORT WIDGET - INITIAL UPDATE = %i", initial_state);
+ transport_widget_toggle_play_pause( self,
+ (TransportWidgetState)initial_state);
}
/**
@@ -1290,8 +1295,7 @@ transport_widget_property_update(DbusmenuMenuitem* item, gchar* property,
{
int update_value = g_value_get_int(value);
//g_debug("transport_widget_update_state - with value %i", update_value);
- transport_widget_toggle_play_pause(bar,
- (TransportWidgetState)update_value);
+ transport_widget_toggle_play_pause(bar, (TransportWidgetState)update_value);
}
}