code cleanup & processbuilder

* use a processBuilder to start the new application after updating
This commit is contained in:
Jannik 2018-04-08 13:30:55 +02:00
parent 78fa84758d
commit e12da3d116
1 changed files with 35 additions and 35 deletions

View File

@ -181,34 +181,34 @@ public class MainWindowController {
@FXML @FXML
public JFXSlider fontsizeSlider; public JFXSlider fontsizeSlider;
@FXML @FXML
private Label homeflixSettingsLbl; private Label homeflixSettingsLbl;
@FXML @FXML
private Label mainColorLbl; private Label mainColorLbl;
@FXML @FXML
private Label fontsizeLbl; private Label fontsizeLbl;
@FXML @FXML
private Label languageLbl; private Label languageLbl;
@FXML @FXML
private Label updateLbl; private Label updateLbl;
@FXML @FXML
private Label branchLbl; private Label branchLbl;
@FXML @FXML
private Label sourcesLbl; private Label sourcesLbl;
@FXML @FXML
private Label versionLbl; private Label versionLbl;
@FXML @FXML
private ImageView posterImageView; private ImageView posterImageView;
private ImageView imv1; private ImageView imv1;
@FXML @FXML
private TreeItem<FilmTabelDataType> filmRoot = new TreeItem<>(new FilmTabelDataType("", "", "", "", false, false, imv1)); private TreeItem<FilmTabelDataType> filmRoot = new TreeItem<>(new FilmTabelDataType("", "", "", "", false, false, imv1));
@ -222,22 +222,22 @@ public class MainWindowController {
private TreeTableColumn<FilmTabelDataType, String> columnEpisode = new TreeTableColumn<>("Episode"); private TreeTableColumn<FilmTabelDataType, String> columnEpisode = new TreeTableColumn<>("Episode");
@FXML @FXML
private TreeTableColumn<FilmTabelDataType, ImageView> columnFavorite = new TreeTableColumn<>("Favorite"); private TreeTableColumn<FilmTabelDataType, ImageView> columnFavorite = new TreeTableColumn<>("Favorite");
@FXML @FXML
private TreeItem<SourceDataType> sourceRoot =new TreeItem<>(new SourceDataType("", "")); private TreeItem<SourceDataType> sourceRoot = new TreeItem<>(new SourceDataType("", ""));
@FXML @FXML
private TableColumn<SourceDataType, String> sourceColumn; private TableColumn<SourceDataType, String> sourceColumn;
@FXML @FXML
private TableColumn<SourceDataType, String> modeColumn; private TableColumn<SourceDataType, String> modeColumn;
private boolean menuTrue = false; private boolean menuTrue = false;
private boolean settingsTrue = false; private boolean settingsTrue = false;
private boolean autoUpdate = false; private boolean autoUpdate = false;
private boolean useBeta = false; private boolean useBeta = false;
private boolean autoplay = false; private boolean autoplay = false;
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName()); private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
private int hashA = -647380320; private int hashA = -647380320;
private String version = "0.6.99"; private String version = "0.6.99";
private String buildNumber = "147"; private String buildNumber = "147";
private String versionName = "glowing vampire"; private String versionName = "glowing vampire";
@ -331,18 +331,18 @@ public class MainWindowController {
filmsTreeTable.getColumns().add(columnFavorite); filmsTreeTable.getColumns().add(columnFavorite);
filmsTreeTable.getColumns().add(columnSeason); filmsTreeTable.getColumns().add(columnSeason);
filmsTreeTable.getColumns().add(columnEpisode); filmsTreeTable.getColumns().add(columnEpisode);
filmsTreeTable.getColumns().get(0).setVisible(false); //hide columnStreamUrl (important) filmsTreeTable.getColumns().get(0).setVisible(false); // hide columnStreamUrl (important)
// context menu for treeTableViewfilm // context menu for treeTableViewfilm
filmsTreeTable.setContextMenu(menu); filmsTreeTable.setContextMenu(menu);
// sourcesTreeTable // sourcesTreeTable
sourceColumn.setCellValueFactory(cellData -> cellData.getValue().pathProperty()); sourceColumn.setCellValueFactory(cellData -> cellData.getValue().pathProperty());
modeColumn.setCellValueFactory(cellData -> cellData.getValue().modeProperty()); modeColumn.setCellValueFactory(cellData -> cellData.getValue().modeProperty());
sourcesTable.setItems(sourcesList); sourcesTable.setItems(sourcesList);
} }
//Initializing the actions // Initializing the actions
private void initActions() { private void initActions() {
HamburgerBackArrowBasicTransition burgerTask = new HamburgerBackArrowBasicTransition(menuHam); HamburgerBackArrowBasicTransition burgerTask = new HamburgerBackArrowBasicTransition(menuHam);