summaryrefslogtreecommitdiff
path: root/mate-volume-control
diff options
context:
space:
mode:
authorMoritz Bruder <[email protected]>2017-04-28 10:12:41 +0200
committerMoritz Bruder <[email protected]>2017-04-28 13:21:30 +0200
commitf0ac002063cd7587da494e1ed62b67ddad7f80ff (patch)
treea2d2fac302b19fc636c6606109f3485f00c264e7 /mate-volume-control
parent63388f5e2832988e05ad5077a64f7cc153d02078 (diff)
downloadmate-media-f0ac002063cd7587da494e1ed62b67ddad7f80ff.tar.bz2
mate-media-f0ac002063cd7587da494e1ed62b67ddad7f80ff.tar.xz
applet: show volume in popup even when muted
Diffstat (limited to 'mate-volume-control')
-rw-r--r--mate-volume-control/gvc-stream-status-icon.c14
1 files 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 ("<b>%s: %s</b>\n<small>%s</small>",
+ markup = g_strdup_printf ("<b>%s: %s %u%%</b>\n<small>%s</small>",
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 ("<b>%s: %u%%</b>\n"
"<small>%0.2f dB\n%s</small>",
icon->priv->display_name,
- display_volume,
+ volume_percent,
decibel,
description);
} else {
markup = g_strdup_printf ("<b>%s: %u%%</b>\n"
"<small>-&#8734; dB\n%s</small>",
icon->priv->display_name,
- display_volume,
+ volume_percent,
description);
}
} else {
markup = g_strdup_printf ("<b>%s: %u%%</b>\n<small>%s</small>",
icon->priv->display_name,
- display_volume,
+ volume_percent,
description);
}
} else {