kbdA11yDialog: Avoid unnecessary ternary operators
A condition is already boolean, there's no point in explicitly turning it into true/false. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/710
This commit is contained in:
parent
52f85c9465
commit
fc964f975a
@ -27,7 +27,7 @@ class KbdA11yDialog extends GObject.Object {
|
||||
|
||||
if (whatChanged & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) {
|
||||
key = KEY_SLOW_KEYS_ENABLED;
|
||||
enabled = (newFlags & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) ? true : false;
|
||||
enabled = (newFlags & Clutter.KeyboardA11yFlags.SLOW_KEYS_ENABLED) > 0;
|
||||
title = enabled ?
|
||||
_("Slow Keys Turned On") :
|
||||
_("Slow Keys Turned Off");
|
||||
@ -36,7 +36,7 @@ class KbdA11yDialog extends GObject.Object {
|
||||
|
||||
} else if (whatChanged & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) {
|
||||
key = KEY_STICKY_KEYS_ENABLED;
|
||||
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) ? true : false;
|
||||
enabled = (newFlags & Clutter.KeyboardA11yFlags.STICKY_KEYS_ENABLED) > 0;
|
||||
title = enabled ?
|
||||
_("Sticky Keys Turned On") :
|
||||
_("Sticky Keys Turned Off");
|
||||
|
Loading…
Reference in New Issue
Block a user