[Xfce4-commits] [apps/xfce4-volumed-pulse] 57/62: Do not show notifications when nothing changed

noreply at xfce.org noreply at xfce.org
Thu Sep 8 10:33:19 CEST 2016


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/xfce4-volumed-pulse.

commit 6058cce016d583f1e74ee7db9ae0cab7579c9a9b
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Sat May 26 15:41:02 2012 +0200

    Do not show notifications when nothing changed
    
    Pulse seems to emit a sink updated signal when a new sound program starts (e.g.
    when the browser loads a flash video). Don't display a notification in this
    case.
---
 src/xvd_pulse.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xvd_pulse.c b/src/xvd_pulse.c
index fb2234e..a5678b0 100644
--- a/src/xvd_pulse.c
+++ b/src/xvd_pulse.c
@@ -578,7 +578,9 @@ xvd_update_sink_callback (pa_context         *c,
 
 #ifdef HAVE_LIBNOTIFY
       /* notify user of the possible changes */
-      xvd_notify_volume_callback (c, 1, i);
+      if (xvd_get_readable_volume (&old_volume) != xvd_get_readable_volume (&i->volume)
+          || old_mute != i->mute)
+        xvd_notify_volume_callback (c, 1, i);
 #endif
     }
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list