diff --git a/.travis.yml b/.travis.yml index 2b13164..6f0089a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ addons: - libgee-0.8-dev - libpulse-dev - libgtk-3-dev + - libnotify-dev - ninja-build - meson @@ -20,4 +21,4 @@ script: - mkdir builddir - meson ./ ./builddir - ninja -C builddir - - ninja -C builddir test \ No newline at end of file + - ninja -C builddir test diff --git a/src/mictray.vala b/src/mictray.vala index f650d1d..8b74539 100644 --- a/src/mictray.vala +++ b/src/mictray.vala @@ -30,7 +30,7 @@ class MicTrayApp : Gtk.Application { status_icon.update(); - if (config.show_notifications && pulse.old_volume != pulse.volume) + if (config.show_notifications && pulse.old_volume != pulse.volume || pulse.old_muted != pulse.muted) { try { diff --git a/src/pulse.vala b/src/pulse.vala index badc9f4..103dbc3 100644 --- a/src/pulse.vala +++ b/src/pulse.vala @@ -9,6 +9,7 @@ public class Pulse : Object public int volume; public int old_volume; public bool muted; + public bool old_muted; public Callback change_callback; public Callback source_change_callback; @@ -184,6 +185,7 @@ public class Pulse : Object this.old_volume = this.volume; this.volume = (int)((info.volume.avg() / (float)PulseAudio.Volume.NORM) * 100); + this.old_muted = this.muted; this.muted = (bool)info.mute; this.change_callback();