Rework and document OS class

This commit is contained in:
DaCool
2023-11-12 13:57:18 +00:00
committed by harlekin
parent 1ef0b2f4b7
commit d2b9985be8
5 changed files with 89 additions and 29 deletions

View File

@@ -392,7 +392,7 @@ public class Settings implements Activity {
// priority
// ui display low -> high but the actual values are reversed
// -19 is highest priority
boolean high_priority_support = os.getSupportHighPriority();
boolean high_priority_support = os.isHighPrioritySupported();
priority = new JSlider(high_priority_support ? -19 : 0, 19);
Hashtable<Integer, JLabel> labelTablePriority = new Hashtable<>();
labelTablePriority.put(high_priority_support ? -19 : 0, new JLabel("Low"));
@@ -418,7 +418,7 @@ public class Settings implements Activity {
JLabel priorityLabel = new JLabel("Priority");
priorityLabel.setToolTipText(SwingTooltips.PRIORITY.getText());
boolean showPrioritySlider = os.checkNiceAvailability();
boolean showPrioritySlider = os.isNiceAvailable();
priority.setVisible(showPrioritySlider);
priorityLabel.setVisible(showPrioritySlider);
@@ -746,7 +746,7 @@ public class Settings implements Activity {
// ui display low -> high but the actual values are reversed
// -19 is highest priority
OS os = OS.getOS();
boolean high_priority_support = os.getSupportHighPriority();
boolean high_priority_support = os.isHighPrioritySupported();
if (high_priority_support) {
// inverse
config.setUsePriority(-1 * priority.getValue());