diff --git a/PlayWall/assets/de/tobias/playpad/assets/lang/_de.properties b/PlayWall/assets/de/tobias/playpad/assets/lang/_de.properties index 04503329016b89a0ca508c7e1caf597e0509334b..9eb27f1ec8539aa03b41a1afd05c1c417de97d21 100644 --- a/PlayWall/assets/de/tobias/playpad/assets/lang/_de.properties +++ b/PlayWall/assets/de/tobias/playpad/assets/lang/_de.properties @@ -205,6 +205,10 @@ CartAction.Mode.PLAY_HOLD=Play/Hold UI.Dialog.AutoUpdate.Header=Updates UI.Dialog.AutoUpdate.Content=Es sind Updates verf�gbar. M�chten Sie diese jetzt installieren? (Weitere Informationen finden Sie in den Update Einstellungen.) +# Update Channel - BaseName +UpdateChannel.STABLE=Stabil +UpdateChannel.BETA=Beta + # Error - Layout Error.Layout.Load=Es gab einen Fehler beim Laden des Layouts ({}) diff --git a/PlayWall/src/de/tobias/playpad/Strings.java b/PlayWall/src/de/tobias/playpad/Strings.java index 541ce90562766394013c93d71e52c38b888e7bb5..04c0cc3b3039adcf15798c37c2e9dde296f52f70 100644 --- a/PlayWall/src/de/tobias/playpad/Strings.java +++ b/PlayWall/src/de/tobias/playpad/Strings.java @@ -198,6 +198,9 @@ public class Strings { public static final String UI_Dialog_AutoUpdate_Header = "UI.Dialog.AutoUpdate.Header"; public static final String UI_Dialog_AutoUpdate_Content = "UI.Dialog.AutoUpdate.Content"; + // Update Channel - Basename + public static final String Update_Channel_BaseName = "UpdateChannel."; + // Error - Layout public static final String Error_Layout_Load = "Error.Layout.Load"; diff --git a/PlayWall/src/de/tobias/playpad/viewcontroller/option/UpdateTabViewController.java b/PlayWall/src/de/tobias/playpad/viewcontroller/option/UpdateTabViewController.java index 3e3ba0532a413ea2c6de6b266f18bfc2671e381a..a954277ec30ecee7fc62b97f6cd2cf0e81365ddb 100644 --- a/PlayWall/src/de/tobias/playpad/viewcontroller/option/UpdateTabViewController.java +++ b/PlayWall/src/de/tobias/playpad/viewcontroller/option/UpdateTabViewController.java @@ -22,6 +22,7 @@ import de.tobias.playpad.update.Updatable; import de.tobias.playpad.update.UpdateChannel; import de.tobias.playpad.update.UpdateRegistery; import de.tobias.playpad.viewcontroller.SettingsTabViewController; +import de.tobias.playpad.viewcontroller.cell.EnumCell; import de.tobias.playpad.viewcontroller.cell.UpdateCell; import de.tobias.playpad.viewcontroller.dialog.UpdaterDialog; import de.tobias.utils.application.ApplicationInfo; @@ -81,8 +82,8 @@ public class UpdateTabViewController extends SettingsTabViewController { updateButton.setDisable(openUpdateList.getItems().isEmpty()); ApplicationInfo info = ApplicationUtils.getApplication().getInfo(); - String currentVersionString = Localization.getString(Strings.UI_Window_Settings_Updates_CurrentVersion, info.getVersion(), - info.getBuild()); + String currentVersionString = Localization.getString(Strings.UI_Window_Settings_Updates_CurrentVersion, + info.getVersion(), info.getBuild()); currentVersionLabel.setText(currentVersionString); } @@ -90,9 +91,10 @@ public class UpdateTabViewController extends SettingsTabViewController { public void init() { openUpdateList.setCellFactory(list -> new UpdateCell()); updateChannelComboBox.getItems().setAll(UpdateChannel.values()); + updateChannelComboBox.setCellFactory(list -> new EnumCell<>(Strings.Update_Channel_BaseName)); + updateChannelComboBox.setButtonCell(new EnumCell<>(Strings.Update_Channel_BaseName)); - updateChannelComboBox.valueProperty().addListener((a, b, c) -> - { + updateChannelComboBox.valueProperty().addListener((a, b, c) -> { Profile.currentProfile().getProfileSettings().setUpdateChannel(c); }); @@ -117,8 +119,7 @@ public class UpdateTabViewController extends SettingsTabViewController { if (profile != null) { openUpdateList.setPlaceholder(progressIndecator); - Worker.runLater(() -> - { + Worker.runLater(() -> { // Search for updates try { UpdateRegistery.lookupUpdates(profile.getProfileSettings().getUpdateChannel()); @@ -127,8 +128,7 @@ public class UpdateTabViewController extends SettingsTabViewController { showErrorMessage(Localization.getString(Strings.Error_Update_Download, e.getLocalizedMessage())); } - Platform.runLater(() -> - { + Platform.runLater(() -> { openUpdateList.setPlaceholder(placeholderLabel); openUpdateList.getItems().setAll(UpdateRegistery.getAvailableUpdates()); updateButton.setDisable(openUpdateList.getItems().isEmpty()); @@ -144,8 +144,8 @@ public class UpdateTabViewController extends SettingsTabViewController { } public static void update(Window dialogOwner) { - String parameter = UpdateRegistery - .buildParamaterString(ApplicationUtils.getApplication().getPath(PathType.DOWNLOAD, DOWNLOAD_FOLDER).toString()); + String parameter = UpdateRegistery.buildParamaterString( + ApplicationUtils.getApplication().getPath(PathType.DOWNLOAD, DOWNLOAD_FOLDER).toString()); if (OS.getType() == OSType.Windows) { windowsUpdate(dialogOwner, parameter); } else { @@ -173,10 +173,9 @@ public class UpdateTabViewController extends SettingsTabViewController { UpdaterDialog dialog = new UpdaterDialog(dialogOwner); dialog.show(); - Worker.runLater(() -> - { - String updaterURL = ApplicationUtils.getApplication().getInfo().getUserInfo().get(AppUserInfoStrings.UPDATER_PROGRAM) - + UPDATER_JAR; + Worker.runLater(() -> { + String updaterURL = ApplicationUtils.getApplication().getInfo().getUserInfo() + .get(AppUserInfoStrings.UPDATER_PROGRAM) + UPDATER_JAR; Path path = ApplicationUtils.getApplication().getPath(PathType.DOWNLOAD, UPDATER_JAR); try { downloadUpdater(updaterURL, path); @@ -213,8 +212,7 @@ public class UpdateTabViewController extends SettingsTabViewController { UpdaterDialog dialog = new UpdaterDialog(dialogOwner); dialog.show(); - Worker.runLater(() -> - { + Worker.runLater(() -> { ApplicationInfo info = ApplicationUtils.getApplication().getInfo(); String updaterURL = info.getUserInfo().get(AppUserInfoStrings.UPDATER_PROGRAM) + UPDATER_EXE; Path path = ApplicationUtils.getApplication().getPath(PathType.DOWNLOAD, UPDATER_EXE); @@ -258,7 +256,8 @@ public class UpdateTabViewController extends SettingsTabViewController { } private static void startJarFile(String parameter, Path fileJarFolder) throws IOException { - ProcessBuilder builder = new ProcessBuilder("java", "-jar", fileJarFolder.toAbsolutePath().toString(), parameter); + ProcessBuilder builder = new ProcessBuilder("java", "-jar", fileJarFolder.toAbsolutePath().toString(), + parameter); builder.start(); System.exit(0); }