From 2a213e4b36abf3d5bab853a9ede50080bf1d7f86 Mon Sep 17 00:00:00 2001 From: Moritz Bruder Date: Fri, 28 Apr 2017 10:12:41 +0200 Subject: applet: show volume in popup even when muted --- mate-volume-control/gvc-stream-status-icon.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mate-volume-control/gvc-stream-status-icon.c b/mate-volume-control/gvc-stream-status-icon.c index 2620c8b..c5f0115 100644 --- a/mate-volume-control/gvc-stream-status-icon.c +++ b/mate-volume-control/gvc-stream-status-icon.c @@ -415,33 +415,33 @@ update_icon (GvcStreamStatusIcon *icon) description = mate_mixer_stream_control_get_label (icon->priv->control); + guint volume_percent = (guint) round (100.0 * volume / normal); if (muted) { - markup = g_strdup_printf ("%s: %s\n%s", + markup = g_strdup_printf ("%s: %s %u%%\n%s", icon->priv->display_name, - _("Muted"), + _("Muted at"), + volume_percent, description); } else if (flags & MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE) { - guint display_volume = (guint) round (100.0 * volume / normal); - if (flags & MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL) { if (decibel > -MATE_MIXER_INFINITY) { markup = g_strdup_printf ("%s: %u%%\n" "%0.2f dB\n%s", icon->priv->display_name, - display_volume, + volume_percent, decibel, description); } else { markup = g_strdup_printf ("%s: %u%%\n" "-∞ dB\n%s", icon->priv->display_name, - display_volume, + volume_percent, description); } } else { markup = g_strdup_printf ("%s: %u%%\n%s", icon->priv->display_name, - display_volume, + volume_percent, description); } } else { -- cgit v1.2.1