Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: small adjustments in settings view #537

Merged
merged 3 commits into from
Mar 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ public class SettingsController {
@FXML
private Button gameDataDirectoryOpenButton;
@FXML
private Button gameDataDirectoryEditButton;
@FXML
private Label gameDirectoryLabel;
@FXML
private Label gameDataDirectoryLabel;
Expand Down Expand Up @@ -187,21 +185,6 @@ protected void openGameDataDirectoryAction() {
GuiUtils.openFileBrowser(stage, gameDataDirectory, BundleUtils.getLabel("message_error_gameDataDirectory"));
}

@FXML
protected void editGameDataDirectoryAction() {
final Path selectedFile = GuiUtils.chooseDirectoryDialog(stage, gameDataDirectory, BundleUtils.getLabel("settings_game_gameDataDirectory_edit_title"));
if (selectedFile != null) {
try {
FileUtils.ensureWritableDir(selectedFile);
gameDataDirectory = selectedFile;
updateDirectoryPathLabels();
} catch (IOException e) {
logger.error("The game data directory can not be created or used! '{}'", gameDataDirectory, e);
GuiUtils.showErrorMessageDialog(stage, BundleUtils.getLabel("message_error_gameDataDirectory") + "\n" + gameDataDirectory);
}
}
}

@FXML
protected void openLauncherDirectoryAction() {
GuiUtils.openFileBrowser(stage, launcherDirectory, BundleUtils.getLabel("message_error_launcherDirectory"));
Expand Down Expand Up @@ -263,7 +246,6 @@ private void setLabelStrings() {
initialHeapSizeLabel.setText(BundleUtils.getLabel("settings_game_initialHeapSize"));
gameDirectoryOpenButton.setText(BundleUtils.getLabel("settings_game_gameDirectory_open"));
gameDataDirectoryOpenButton.setText(BundleUtils.getLabel("settings_game_gameDataDirectory_open"));
gameDataDirectoryEditButton.setText(BundleUtils.getLabel("settings_game_gameDataDirectory_edit"));
gameDirectoryLabel.setText(BundleUtils.getLabel("settings_game_gameDirectory"));
gameDataDirectoryLabel.setText(BundleUtils.getLabel("settings_game_gameDataDirectory"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ settings_language_tr=T\u00FCrkisch
settings_language_uk=Ukrainisch
settings_launcher_chooseLanguage=Sprache ausw\u00E4hlen
settings_launcher_closeLauncherAfterGameStart=Launcher beim Spielstart schlie\u00DFen
settings_launcher_launcherDirectory=Launcher Installationsverzeichnis
settings_launcher_launcherDirectory=Launcher Nutzerdatenverzeichnis
settings_launcher_launcherDirectory_open=\u00D6ffnen
settings_launcher_saveDownloadedFiles=Heruntergeladene Pakete behalten
settings_launcher_searchForLauncherUpdates=Launcher-Aktualisierungen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ settings_launcher_chooseLanguage=Choose language
settings_launcher_closeLauncherAfterGameStart=Close launcher after game start
settings_launcher_downloadDirectory=Download directory
settings_launcher_downloadDirectory_open=Open
settings_launcher_launcherDirectory=Launcher Installation Directory
settings_launcher_launcherDirectory=Launcher User Data Directory
settings_launcher_launcherDirectory_open=Open
settings_launcher_saveDownloadedFiles=Save downloaded files
settings_launcher_searchForLauncherUpdates=Search for launcher updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
<HBox alignment="CENTER_LEFT" spacing="10.0" GridPane.columnIndex="1" GridPane.rowIndex="4">
<children>
<Button fx:id="gameDataDirectoryOpenButton" mnemonicParsing="false" onAction="#openGameDataDirectoryAction" text="Button" />
<Button fx:id="gameDataDirectoryEditButton" mnemonicParsing="false" onAction="#editGameDataDirectoryAction" text="Browse" />
</children>
</HBox>
<TitledPane animated="false" text="Advanced options" GridPane.columnSpan="2147483647"
Expand Down