[gnome-shell] shellDBus: Use floats instead of percentages for OSD levels
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shellDBus: Use floats instead of percentages for OSD levels
- Date: Sun, 28 Jul 2019 15:36:58 +0000 (UTC)
commit 89ce53e3ff7a0396c55920e3365d16de7f3e28d0
Author: Jonas Dreßler <verdre v0yd nl>
Date: Sat Jul 27 19:29:36 2019 +0200
shellDBus: Use floats instead of percentages for OSD levels
Due to typecasting being done when converting floats to integers in
gnome-settings-daemon, a volume of 0.9% in g-s-d will end up as 0% in
gnome-shell. This can lead to a mismatch of icons between the volume OSD
(the icon to use is determined by g-s-d itself) and the shells own
volume indicator (the icon to use is determined by the shell using the
volume received from g-s-d).
To fix this, simply get rid of the conversion from float to percentage
in g-s-d and back to floats in the shell and just send a float/double
value on DBus.
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/78
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
js/ui/shellDBus.js | 6 ------
1 file changed, 6 deletions(-)
---
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index a287a3fb6..e750c207f 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -94,12 +94,6 @@ var GnomeShell = class {
if (serializedIcon)
icon = Gio.Icon.new_for_string(serializedIcon);
- // Translate from percentages in the D-Bus API to floats
- if (!isNaN(level))
- level /= 100;
- if (!isNaN(maxLevel))
- maxLevel /= 100;
-
Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]