aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-14 15:41:18 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-14 15:41:18 +0000
commit8149cc1e2de25648a2a4271e503bdd6184b7af50 (patch)
treefbaec3687cc84ddf1dc45bbc2f6e8b6454ab8e9e
parent5e227767d23fd43fd5504e42d3b80b8076effa15 (diff)
downloadayatana-indicator-sound-8149cc1e2de25648a2a4271e503bdd6184b7af50.tar.gz
ayatana-indicator-sound-8149cc1e2de25648a2a4271e503bdd6184b7af50.tar.bz2
ayatana-indicator-sound-8149cc1e2de25648a2a4271e503bdd6184b7af50.zip
working as good as this will ever be considering the poor startup performances of clients
-rw-r--r--src/player-controller.vala3
-rw-r--r--src/sound-service.c6
-rw-r--r--src/transport-menu-item.vala14
3 files changed, 6 insertions, 17 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 7e5f38e..020109d 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -133,7 +133,8 @@ public class PlayerController : GLib.Object
public void hibernate()
{
update_state(PlayerController.state.OFFLINE);
- this.custom_items[widget_order.TRANSPORT].reset(TransportMenuitem.attributes_format());
+ TransportMenuitem transport = this.custom_items[widget_order.TRANSPORT] as TransportMenuitem;
+ transport.change_play_state (Transport.State.PAUSED);
this.custom_items[widget_order.METADATA].reset(MetadataMenuitem.attributes_format());
TitleMenuitem title = this.custom_items[widget_order.TITLE] as TitleMenuitem;
title.toggle_active_triangle(false);
diff --git a/src/sound-service.c b/src/sound-service.c
index 9f44624..20d9137 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -39,10 +39,8 @@ service_shutdown (IndicatorService *service, gpointer user_data)
{
if (mainloop != NULL) {
g_debug("Service shutdown !");
-/*
- close_pulse_activites();
- g_main_loop_quit(mainloop);
-*/
+ close_pulse_activites();
+ g_main_loop_quit(mainloop);
}
return;
}
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala
index 0bcd23a..e767a90 100644
--- a/src/transport-menu-item.vala
+++ b/src/transport-menu-item.vala
@@ -44,9 +44,7 @@ public class TransportMenuitem : PlayerItem
public void handle_cached_action()
{
if (this.cached_action != Transport.Action.NO_ACTION){
- debug ("TRYING TO FIRE OF A CACHED ACTION %i", (int)this.cached_action);
- Timeout.add_seconds (2, send_cached_action);
- //this.owner.mpris_bridge.transport_update(this.cached_action);
+ Timeout.add_seconds (4, send_cached_action);
}
}
@@ -57,10 +55,8 @@ public class TransportMenuitem : PlayerItem
return false;
}
- public void change_play_state(Transport.State update)
+ public void change_play_state (Transport.State update)
{
- //debug("UPDATING THE TRANSPORT DBUSMENUITEM PLAY STATE WITH VALUE %i",
- // (int)update);
int temp = (int)update;
this.property_set_int(MENUITEM_PLAY_STATE, temp);
}
@@ -69,8 +65,6 @@ public class TransportMenuitem : PlayerItem
Variant input_value,
uint timestamp)
{
- debug ( "Handle event in transport menu item - is the player actually running %s",
- this.running.to_string() );
Variant v = input_value;
if ( input_value.is_of_type (VariantType.VARIANT)){
v = input_value.get_variant();
@@ -79,13 +73,9 @@ public class TransportMenuitem : PlayerItem
int32 input = v.get_int32();
if (this.running == true){
- //debug("transport menu item -> handle_event with value %s", input.to_string());
- //debug("transport owner name = %s", this.owner.app_info.get_name());
this.owner.mpris_bridge.transport_update((Transport.Action)input);
}
else{
- debug("transport cached action = %i", (Transport.Action)input);
-
this.cached_action = (Transport.Action)input;
this.owner.instantiate();
}