[Xfce4-commits] [apps/xfce4-volumed-pulse] 44/62: harmonize types, volume is in -1~101 for notifs

noreply at xfce.org noreply at xfce.org
Thu Sep 8 10:33:06 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 146f3768c10ff9958740432c4bd610d68a2d445d
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Thu May 24 23:24:41 2012 +0200

    harmonize types, volume is in -1~101 for notifs
---
 src/xvd_notify.c | 2 +-
 src/xvd_pulse.c  | 2 +-
 src/xvd_pulse.h  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xvd_notify.c b/src/xvd_notify.c
index 340a332..0641804 100644
--- a/src/xvd_notify.c
+++ b/src/xvd_notify.c
@@ -67,7 +67,7 @@ xvd_notify_notification(XvdInstance *Inst,
 void 
 xvd_notify_volume_notification(XvdInstance *Inst)
 {
-	guint32 vol = xvd_get_readable_volume (&Inst->volume);
+	gint vol = xvd_get_readable_volume (&Inst->volume);
 	if (vol == 0)
 		xvd_notify_notification (Inst, (Inst->mute) ? "audio-volume-muted" : "audio-volume-off", vol);
 	else if (vol < 34)
diff --git a/src/xvd_pulse.c b/src/xvd_pulse.c
index e0b575d..e5044f8 100644
--- a/src/xvd_pulse.c
+++ b/src/xvd_pulse.c
@@ -197,7 +197,7 @@ xvd_toggle_mute (XvdInstance *i)
 }
 
 
-guint32
+gint
 xvd_get_readable_volume (const pa_cvolume *vol)
 {
   guint new_vol = 0;
diff --git a/src/xvd_pulse.h b/src/xvd_pulse.h
index 4f06e8c..94fb118 100644
--- a/src/xvd_pulse.h
+++ b/src/xvd_pulse.h
@@ -47,8 +47,8 @@ void     xvd_update_volume       (XvdInstance        *i,
 void     xvd_toggle_mute         (XvdInstance        *i);
 
 /**
- * Returns a volume as guint32 (e.g. usable on notifications)
+ * Returns a percentage volume (i.e. between 0 and 100, usable on notifications)
  */
-guint32  xvd_get_readable_volume (const pa_cvolume   *vol);
+gint     xvd_get_readable_volume (const pa_cvolume   *vol);
 
 #endif

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


More information about the Xfce4-commits mailing list