aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/service.vala b/src/service.vala
index aa992ff..14d4893 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -140,7 +140,7 @@ public class IndicatorSound.Service {
static Variant serialize_themed_icon (string icon_name)
{
var icon = new ThemedIcon.with_default_fallbacks (icon_name);
- return g_icon_serialize (icon);
+ return icon.serialize ();
}
void update_root_icon () {
@@ -266,8 +266,10 @@ public class IndicatorSound.Service {
bool update_player_actions () {
foreach (var player in this.players) {
SimpleAction? action = this.actions.lookup_action (player.id) as SimpleAction;
- if (action != null)
+ if (action != null) {
action.set_state (this.action_state_for_player (player));
+ action.set_enabled (player.can_raise);
+ }
}
this.player_action_update_id = 0;
@@ -290,7 +292,7 @@ public class IndicatorSound.Service {
this.menus.@foreach ( (profile, menu) => menu.add_player (player));
SimpleAction action = new SimpleAction.stateful (player.id, null, this.action_state_for_player (player));
- action.activate.connect ( () => { player.launch (); });
+ action.activate.connect ( () => { player.activate (); });
this.actions.add_action (action);
var play_action = new SimpleAction.stateful ("play." + player.id, null, player.state);