mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-21 04:01:27 +00:00
cleanup [ci skip]
This commit is contained in:
@@ -38,7 +38,7 @@ public class FxApplicationStarter {
|
||||
|
||||
private void start(boolean fromTrayMenu) {
|
||||
executor.submit(() -> {
|
||||
LOG.info("Starting JavaFX runtime...");
|
||||
LOG.debug("Starting JavaFX runtime...");
|
||||
Platform.startup(() -> {
|
||||
assert Platform.isFxApplicationThread();
|
||||
LOG.info("JavaFX Runtime started.");
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TrayIconController {
|
||||
|
||||
try {
|
||||
SystemTray.getSystemTray().add(trayIcon);
|
||||
LOG.info("initialized tray icon");
|
||||
LOG.debug("initialized tray icon");
|
||||
} catch (AWTException e) {
|
||||
LOG.error("Error adding tray icon", e);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import javafx.collections.ObservableList;
|
||||
import org.cryptomator.common.settings.Settings;
|
||||
import org.cryptomator.common.vaults.Vault;
|
||||
import org.cryptomator.ui.fxapp.FxApplication;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
@@ -19,8 +17,6 @@ import java.util.concurrent.CountDownLatch;
|
||||
|
||||
@TrayMenuScoped
|
||||
class TrayMenuController {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TrayMenuController.class);
|
||||
|
||||
private final FxApplicationStarter fxApplicationStarter;
|
||||
private final CountDownLatch shutdownLatch;
|
||||
@@ -43,14 +39,14 @@ class TrayMenuController {
|
||||
|
||||
public void initTrayMenu() {
|
||||
vaults.addListener(this::vaultListChanged);
|
||||
|
||||
|
||||
rebuildMenu();
|
||||
|
||||
|
||||
// register preferences shortcut
|
||||
if (Desktop.getDesktop().isSupported(Desktop.Action.APP_PREFERENCES)) {
|
||||
Desktop.getDesktop().setPreferencesHandler(this::showPreferencesWindow);
|
||||
}
|
||||
|
||||
|
||||
// show window on start?
|
||||
if (!settings.startHidden().get()) {
|
||||
showMainWindow(null);
|
||||
@@ -63,7 +59,7 @@ class TrayMenuController {
|
||||
|
||||
private void rebuildMenu() {
|
||||
menu.removeAll();
|
||||
|
||||
|
||||
MenuItem showMainWindowItem = new MenuItem("TODO show");
|
||||
showMainWindowItem.addActionListener(this::showMainWindow);
|
||||
menu.add(showMainWindowItem);
|
||||
|
||||
Reference in New Issue
Block a user