Skip to content

Commit 0f7694c

Browse files
committed
disabled hotkeys for linux
1 parent 75286d1 commit 0f7694c

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/main/java/de/doubleslash/keeptime/view/SettingsController.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ public class SettingsController {
6161

6262
@FXML
6363
private Label versionLabel;
64+
65+
@FXML
66+
private Label useHotkeyLabel;
67+
68+
@FXML
69+
private Label hotkeyLabel;
70+
71+
@FXML
72+
private Label globalKeyloggerLabel;
6473

6574
private final Logger log = LoggerFactory.getLogger(this.getClass());
6675
private Controller controller;
@@ -69,6 +78,13 @@ public class SettingsController {
6978

7079
@FXML
7180
private void initialize() {
81+
if(System.getProperty("os.name").contains("Linux")) {
82+
83+
useHotkeyCheckBox.setVisible(false);
84+
useHotkeyLabel.setVisible(false);
85+
hotkeyLabel.setVisible(false);
86+
globalKeyloggerLabel.setVisible(false);
87+
}
7288
versionLabel.setText(Main.VERSION);
7389
saveButton.setOnAction(ae -> {
7490
log.info("Save clicked");

src/main/resources/settings.fxml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@
100100
<children>
101101
<HBox spacing="10.0">
102102
<children>
103-
<Label text="Hotkey" />
104-
<Label alignment="TOP_LEFT" contentDisplay="TOP" disable="true" prefWidth="100.0" text="(global keylogger!)" />
103+
<Label fx:id="hotkeyLabel" text="Hotkey" />
104+
<Label fx:id="globalKeyloggerLabel" alignment="TOP_LEFT" contentDisplay="TOP" disable="true" prefWidth="100.0" text="(global keylogger!)" />
105105
</children>
106106
</HBox>
107107
<HBox spacing="10.0">
108108
<children>
109-
<Label alignment="TOP_LEFT" contentDisplay="TOP" prefWidth="100.0" text="Use Hotkey" />
109+
<Label fx:id="useHotkeyLabel" alignment="TOP_LEFT" contentDisplay="TOP" prefWidth="100.0" text="Use Hotkey" />
110110
<CheckBox fx:id="useHotkeyCheckBox" mnemonicParsing="false" text="Use Hotkey (Strg+Win)" />
111111
</children>
112112
</HBox>

0 commit comments

Comments
 (0)