aboutsummaryrefslogtreecommitdiff
path: root/src/sound-state-manager.c
diff options
context:
space:
mode:
authorDylan McCall <dylanmccall@ubuntu.com>2011-04-04 20:14:19 -0700
committerDylan McCall <dylanmccall@ubuntu.com>2011-04-04 20:14:19 -0700
commit1c1adfebc0a8c9fc1a64f89fa879823ff316ecec (patch)
tree550bacf75c64d9db6d459f465ffaeeb600d81665 /src/sound-state-manager.c
parent15c7802a9f753b0d06e7690ae24402644cd12bfe (diff)
downloadayatana-indicator-sound-1c1adfebc0a8c9fc1a64f89fa879823ff316ecec.tar.gz
ayatana-indicator-sound-1c1adfebc0a8c9fc1a64f89fa879823ff316ecec.tar.bz2
ayatana-indicator-sound-1c1adfebc0a8c9fc1a64f89fa879823ff316ecec.zip
Sound state manager volume notification is based on new volume instead of current (old) volume.
Notifications use notification variants of audio-volume-* icons.
Diffstat (limited to 'src/sound-state-manager.c')
-rw-r--r--src/sound-state-manager.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sound-state-manager.c b/src/sound-state-manager.c
index 7095a39..c851407 100644
--- a/src/sound-state-manager.c
+++ b/src/sound-state-manager.c
@@ -24,6 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "sound-state-manager.h"
#include "dbus-shared-names.h"
+#include "sound-state.h"
typedef struct _SoundStateManagerPrivate SoundStateManagerPrivate;
@@ -170,19 +171,20 @@ sound_state_manager_show_notification (SoundStateManager *self,
char *icon;
const int notify_value = CLAMP((int)value, -1, 101);
- SoundState state = sound_state_manager_get_current_state (self);
+
+ SoundState state = sound_state_get_from_volume ((int)value);
if (state == ZERO_LEVEL) {
// Not available for all the themes
- icon = "audio-volume-off";
+ icon = "notification-audio-volume-off";
} else if (state == LOW_LEVEL) {
- icon = "audio-volume-low";
+ icon = "notification-audio-volume-low";
} else if (state == MEDIUM_LEVEL) {
- icon = "audio-volume-medium";
+ icon = "notification-audio-volume-medium";
} else if (state == HIGH_LEVEL) {
- icon = "audio-volume-high";
+ icon = "notification-audio-volume-high";
} else {
- icon = "audio-volume-muted";
+ icon = "notification-audio-volume-muted";
}
notify_notification_update(priv->notification, PACKAGE_NAME, NULL, icon);