diff options
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/service.vala b/src/service.vala index 48b0cbe..dbf7d35 100644 --- a/src/service.vala +++ b/src/service.vala @@ -73,6 +73,18 @@ public class IndicatorSound.Service: Object { }); sharedsettings.bind ("allow-amplified-volume", this, "allow-amplified-volume", SettingsBindFlags.GET); + + /* Hide the notification when the menu is shown */ + var shown_action = actions.lookup_action ("indicator-shown") as SimpleAction; + shown_action.change_state.connect ((state) => { + if (state.get_boolean()) { + try { + sync_notification.close(); + } catch (Error e) { + warning("Unable to close synchronous volume notification: %s", e.message); + } + } + }); } ~Service() { |