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, 6 insertions, 2 deletions
diff --git a/src/service.vala b/src/service.vala
index 3ac6b89..923aba2 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -43,7 +43,7 @@ public class IndicatorSound.Service: Object {
warn_notification.closed.connect((n) => {
n.clear_actions();
waiting_user_approve_warn=false;
- volume_sync_action.set_state(new Variant.uint64 (++volume_sync_number_));
+ increment_volume_sync_action();
});
BusWatcher.watch_namespace (GLib.BusType.SESSION,
"org.freedesktop.Notifications",
@@ -639,7 +639,7 @@ public class IndicatorSound.Service: Object {
warn_notification.add_action ("cancel", _("Cancel"), (n, a) => {
_pre_warn_volume = null;
waiting_user_approve_warn = false;
- volume_sync_action.set_state(new Variant.uint64 (++volume_sync_number_));
+ increment_volume_sync_action();
});
waiting_user_approve_warn = true;
show_notification(warn_notification);
@@ -832,6 +832,10 @@ public class IndicatorSound.Service: Object {
return volume_sync_action;
}
+ void increment_volume_sync_action () {
+ volume_sync_action.set_state(new Variant.uint64 (++volume_sync_number_));
+ }
+
uint export_actions = 0;
Variant action_state_for_player (MediaPlayer player, bool show_track = true) {