mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-21 07:24:37 +00:00
Added options to start Cryptomator in background (references #418)
This commit is contained in:
@@ -22,6 +22,7 @@ public class PreferencesController implements FxController {
|
||||
private final Settings settings;
|
||||
private final BooleanBinding showWebDavSettings;
|
||||
public ChoiceBox<UiTheme> themeChoiceBox;
|
||||
public CheckBox startHiddenCheckbox;
|
||||
public CheckBox checkForUpdatesCheckbox;
|
||||
public CheckBox debugModeCheckbox;
|
||||
public ChoiceBox<VolumeImpl> volumeTypeChoicBox;
|
||||
@@ -40,6 +41,8 @@ public class PreferencesController implements FxController {
|
||||
themeChoiceBox.valueProperty().bindBidirectional(settings.theme());
|
||||
themeChoiceBox.setConverter(new UiThemeConverter());
|
||||
|
||||
startHiddenCheckbox.selectedProperty().bindBidirectional(settings.startHidden());
|
||||
|
||||
checkForUpdatesCheckbox.selectedProperty().bindBidirectional(settings.checkForUpdates());
|
||||
|
||||
debugModeCheckbox.selectedProperty().bindBidirectional(settings.debugMode());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.cryptomator.ui.traymenu;
|
||||
|
||||
import org.cryptomator.common.settings.Settings;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import java.awt.Desktop;
|
||||
@@ -14,12 +16,14 @@ class TrayMenuController {
|
||||
|
||||
private final FxApplicationStarter fxApplicationStarter;
|
||||
private final CountDownLatch shutdownLatch;
|
||||
private final Settings settings;
|
||||
private final PopupMenu menu;
|
||||
|
||||
@Inject
|
||||
TrayMenuController(FxApplicationStarter fxApplicationStarter, @Named("shutdownLatch") CountDownLatch shutdownLatch) {
|
||||
TrayMenuController(FxApplicationStarter fxApplicationStarter, @Named("shutdownLatch") CountDownLatch shutdownLatch, Settings settings) {
|
||||
this.fxApplicationStarter = fxApplicationStarter;
|
||||
this.shutdownLatch = shutdownLatch;
|
||||
this.settings = settings;
|
||||
this.menu = new PopupMenu();
|
||||
}
|
||||
|
||||
@@ -35,6 +39,11 @@ class TrayMenuController {
|
||||
if (Desktop.getDesktop().isSupported(Desktop.Action.APP_PREFERENCES)) {
|
||||
Desktop.getDesktop().setPreferencesHandler(this::showPreferencesWindow);
|
||||
}
|
||||
|
||||
// show window on start?
|
||||
if (!settings.startHidden().get()) {
|
||||
showMainWindow(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void rebuildMenu() {
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
<ChoiceBox fx:id="themeChoiceBox"/>
|
||||
</HBox>
|
||||
|
||||
<CheckBox fx:id="startHiddenCheckbox" text="%preferences.startHidden"/>
|
||||
|
||||
<CheckBox fx:id="checkForUpdatesCheckbox" text="%preferences.autoUpdateCheck"/>
|
||||
|
||||
<CheckBox fx:id="debugModeCheckbox" text="%preferences.debugLogging"/>
|
||||
|
||||
@@ -5,6 +5,7 @@ main.settingsBtn.tooltip=Settings
|
||||
preferences.title=Preferences
|
||||
preferences.autoUpdateCheck=Check for updates automatically
|
||||
preferences.debugLogging=Enable debug logging
|
||||
preferences.startHidden=Hide window when starting Cryptomator
|
||||
preferences.theme=Look & Feel
|
||||
preferences.volumeType=Volume type
|
||||
unlock.deleteSavedPasswordDialog.title=Delete Saved Password
|
||||
|
||||
@@ -4,6 +4,7 @@ main.closeBtn.tooltip=Close
|
||||
main.settingsBtn.tooltip=Settings
|
||||
preferences.autoUpdateCheck=Check for updates automatically
|
||||
preferences.debugLogging=Enable debug logging
|
||||
preferences.startHidden=Hide window when starting Cryptomator
|
||||
preferences.theme=Look & Feel
|
||||
preferences.volumeType=Volume type
|
||||
vaultlist.emptyList.onboardingInstruction=Click here to add a vault
|
||||
Reference in New Issue
Block a user