Skip to content

Commit

Permalink
fixes #787
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin Schrenk committed Jan 9, 2019
1 parent 8fc647e commit f760347
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2014, 2017 Sebastian Stenzel
* All rights reserved.
* This program and the accompanying materials are made available under the terms of the accompanying LICENSE file.
*
*
* Contributors:
* Sebastian Stenzel - initial API and implementation
* Jean-Noël Charon - confirmation dialog on vault removal
Expand Down Expand Up @@ -110,7 +110,7 @@ public class MainController implements ViewController {

@Inject
public MainController(@Named("mainWindow") Stage mainWindow, ExecutorService executorService, @Named("fileOpenRequests") BlockingQueue<Path> fileOpenRequests, ExitUtil exitUtil, Localization localization,
VaultFactory vaultFactoy, ViewControllerLoader viewControllerLoader, UpgradeStrategies upgradeStrategies, VaultList vaults, AutoUnlocker autoUnlocker) {
VaultFactory vaultFactoy, ViewControllerLoader viewControllerLoader, UpgradeStrategies upgradeStrategies, VaultList vaults, AutoUnlocker autoUnlocker) {
this.mainWindow = mainWindow;
this.executorService = executorService;
this.fileOpenRequests = fileOpenRequests;
Expand Down Expand Up @@ -331,7 +331,7 @@ private void didClickAddExistingVaults(ActionEvent event) {

/**
* adds the given directory or selects it if it is already in the list of directories.
*
*
* @param path to a vault directory or masterkey file
*/
public void addVault(final Path path, boolean select) {
Expand Down Expand Up @@ -432,7 +432,13 @@ private void didPressKeyOnList(KeyEvent e) {
}

private void didPressKeyOnRoot(KeyEvent event) {
if ((event.isMetaDown() || event.isControlDown()) && event.getCode().isDigitKey()) {
boolean triggered;
if (SystemUtils.IS_OS_MAC) {
triggered = event.isMetaDown();
} else {
triggered = event.isControlDown() && !event.isAltDown();
}
if (triggered && event.getCode().isDigitKey()) {
int digit = Integer.valueOf(event.getText());
switch (digit) {
case 0: {
Expand Down

0 comments on commit f760347

Please sign in to comment.