aboutsummaryrefslogtreecommitdiff
path: root/src/info-notification.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/info-notification.vala')
-rw-r--r--src/info-notification.vala21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/info-notification.vala b/src/info-notification.vala
index 986c9ce..36be8a1 100644
--- a/src/info-notification.vala
+++ b/src/info-notification.vala
@@ -21,15 +21,13 @@ using Notify;
public class IndicatorSound.InfoNotification: Notification
{
- protected override Notify.Notification create_notification()
- {
+ protected override Notify.Notification create_notification () {
return new Notify.Notification(_("Volume"), "", "audio-volume-muted");
}
- public void show(VolumeControl.ActiveOutput active_output,
- double volume,
- bool is_high_volume)
- {
+ public void show (VolumeControl.ActiveOutput active_output,
+ double volume,
+ bool is_high_volume) {
if (!notify_server_supports("x-canonical-private-synchronous"))
return;
@@ -47,15 +45,13 @@ public class IndicatorSound.InfoNotification: Notification
n.set_hint ("x-canonical-private-synchronous", "true");
n.set_hint ("x-canonical-value-bar-tint", is_high_volume ? "true" : "false");
n.set_hint ("value", (int32)(volume * 100.0));
- show_();
+ show_notification();
}
- private static string get_notification_label (VolumeControl.ActiveOutput active_output)
- {
+ private static string get_notification_label (VolumeControl.ActiveOutput active_output) {
string volume_label = "";
- switch (active_output)
- {
+ switch (active_output) {
case VolumeControl.ActiveOutput.SPEAKERS:
volume_label = _("Speakers");
break;
@@ -87,8 +83,7 @@ public class IndicatorSound.InfoNotification: Notification
private static string get_volume_notification_icon (VolumeControl.ActiveOutput active_output,
double volume,
- bool is_high_volume)
- {
+ bool is_high_volume) {
string icon = "";
if (is_high_volume) {