diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-31 15:04:28 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-31 15:04:28 -0600 |
commit | cdec72148f56ca1d897e91e23c7f8eec7b0ba148 (patch) | |
tree | ccb11bf8c13370cabd52f5dc90165880df922dbd /src/info-notification.vala | |
parent | f94de8d944e0f10ca6f37d17fb4b0e5ab33a9b60 (diff) | |
download | ayatana-indicator-sound-cdec72148f56ca1d897e91e23c7f8eec7b0ba148.tar.gz ayatana-indicator-sound-cdec72148f56ca1d897e91e23c7f8eec7b0ba148.tar.bz2 ayatana-indicator-sound-cdec72148f56ca1d897e91e23c7f8eec7b0ba148.zip |
use the 'unowned' keyword when picking from lists of hardcoded strings
Diffstat (limited to 'src/info-notification.vala')
-rw-r--r-- | src/info-notification.vala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/info-notification.vala b/src/info-notification.vala index 9088cb8..861cbee 100644 --- a/src/info-notification.vala +++ b/src/info-notification.vala @@ -32,10 +32,10 @@ public class IndicatorSound.InfoNotification: Notification return; /* Determine Label */ - string volume_label = get_notification_label (active_output); + unowned string volume_label = get_notification_label (active_output); /* Choose an icon */ - string icon = get_volume_notification_icon (active_output, volume, is_high_volume); + unowned string icon = get_volume_notification_icon (active_output, volume, is_high_volume); /* Reset the notification */ var n = _notification; @@ -48,8 +48,8 @@ public class IndicatorSound.InfoNotification: Notification show_notification (); } - private static string get_notification_label (VolumeControl.ActiveOutput active_output) { - string volume_label = ""; + private static unowned string get_notification_label (VolumeControl.ActiveOutput active_output) { + unowned string volume_label = ""; switch (active_output) { case VolumeControl.ActiveOutput.SPEAKERS: @@ -81,10 +81,10 @@ public class IndicatorSound.InfoNotification: Notification return volume_label; } - private static string get_volume_notification_icon (VolumeControl.ActiveOutput active_output, - double volume, - bool is_high_volume) { - string icon = ""; + private static unowned string get_volume_notification_icon (VolumeControl.ActiveOutput active_output, + double volume, + bool is_high_volume) { + unowned string icon = ""; if (is_high_volume) { switch (active_output) { @@ -106,10 +106,10 @@ public class IndicatorSound.InfoNotification: Notification return icon; } - private static string get_volume_icon (VolumeControl.ActiveOutput active_output, - double volume) + private static unowned string get_volume_icon (VolumeControl.ActiveOutput active_output, + double volume) { - string icon = ""; + unowned string icon = ""; switch (active_output) { case VolumeControl.ActiveOutput.SPEAKERS: |