diff options
author | Ted Gould <ted@gould.cx> | 2015-02-19 10:23:01 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2015-02-19 10:23:01 -0600 |
commit | 29c24529be0f644ae5ef4f51cfa0963a2eb708ac (patch) | |
tree | cd4cf99a4ede784c009df0d8b2909684f9928741 /src | |
parent | ca51b91cc03c9e5169caea71e9691bb2345f6d82 (diff) | |
download | ayatana-indicator-sound-29c24529be0f644ae5ef4f51cfa0963a2eb708ac.tar.gz ayatana-indicator-sound-29c24529be0f644ae5ef4f51cfa0963a2eb708ac.tar.bz2 ayatana-indicator-sound-29c24529be0f644ae5ef4f51cfa0963a2eb708ac.zip |
Round the value because apparently i386 ends up at 59.9 in the test and truncation causes a failure.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/service.vala | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 115c2eb..194dfc9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -171,6 +171,7 @@ add_library( target_link_libraries( indicator-sound-service-lib ${SOUNDSERVICE_LIBRARIES} + -lm ) ########################### diff --git a/src/service.vala b/src/service.vala index c19da9d..20f670f 100644 --- a/src/service.vala +++ b/src/service.vala @@ -328,7 +328,7 @@ public class IndicatorSound.Service: Object { /* Put it all into the notification */ sync_notification.clear_hints (); sync_notification.update (_("Volume"), volume_label, icon); - sync_notification.set_hint ("value", (int32)(volume_control.volume.volume * 100.0)); + sync_notification.set_hint ("value", (int32)Math.round(volume_control.volume.volume * 100.0)); sync_notification.set_hint ("x-canonical-value-bar-tint", tint); sync_notification.set_hint ("x-canonical-private-synchronous", "true"); sync_notification.set_hint ("x-canonical-non-shaped-icon", "true"); |