fixed loading error
* fixed an issue with loading sttings when no cloudService is set
This commit is contained in:
parent
07d33df63a
commit
43a7e22254
|
@ -0,0 +1 @@
|
||||||
|
/application/
|
Binary file not shown.
Binary file not shown.
|
@ -114,4 +114,4 @@
|
||||||
</JFXButton>
|
</JFXButton>
|
||||||
<JFXButton fx:id="lastTimePlayedBtn" buttonType="RAISED" maxHeight="32.0" minWidth="100.0" onAction="#lastTimePlayedBtnAction" prefHeight="32.0" style="-fx-background-color: #ffffff; -fx-button-type: RAISED; -fx-text-fill: BLACK;" visible="false" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="516.5" AnchorPane.topAnchor="558.0" />
|
<JFXButton fx:id="lastTimePlayedBtn" buttonType="RAISED" maxHeight="32.0" minWidth="100.0" onAction="#lastTimePlayedBtnAction" prefHeight="32.0" style="-fx-background-color: #ffffff; -fx-button-type: RAISED; -fx-text-fill: BLACK;" visible="false" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="516.5" AnchorPane.topAnchor="558.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
Binary file not shown.
|
@ -133,21 +133,25 @@ public class CloudController {
|
||||||
|
|
||||||
public String getFolderID(String cloudService) {
|
public String getFolderID(String cloudService) {
|
||||||
String folderID = "";
|
String folderID = "";
|
||||||
if(cloudService.equals("GoogleDrive")) {
|
if (cloudService != null) {
|
||||||
folderID = googleDriveController.getFolderID();
|
if(cloudService.equals("GoogleDrive")) {
|
||||||
}
|
folderID = googleDriveController.getFolderID();
|
||||||
if(cloudService.equals("Dropbox")) {
|
}
|
||||||
|
if(cloudService.equals("Dropbox")) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return folderID;
|
return folderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFolderID(String folderID, String cloudService) {
|
public void setFolderID(String folderID, String cloudService) {
|
||||||
if(cloudService.equals("GoogleDrive")) {
|
if (cloudService != null) {
|
||||||
googleDriveController.setFolderID(folderID);
|
if (cloudService.equals("GoogleDrive")) {
|
||||||
}
|
googleDriveController.setFolderID(folderID);
|
||||||
if(cloudService.equals("Dropbox")) {
|
}
|
||||||
|
if (cloudService.equals("Dropbox")) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,12 +75,14 @@ public class Main extends Application {
|
||||||
gamesDBFile = new File(dirLinux + "/games.db");
|
gamesDBFile = new File(dirLinux + "/games.db");
|
||||||
localDB = new File(dirLinux+"/localRoms.db");
|
localDB = new File(dirLinux+"/localRoms.db");
|
||||||
pictureCache= new File(dirLinux+"/picture_cache");
|
pictureCache= new File(dirLinux+"/picture_cache");
|
||||||
|
pane.setPrefWidth(904); //this could be a kde plasma specific issue
|
||||||
}else{
|
}else{
|
||||||
directory = new File(dirWin);
|
directory = new File(dirWin);
|
||||||
configFile = new File(dirWin + "/config.xml");
|
configFile = new File(dirWin + "/config.xml");
|
||||||
gamesDBFile = new File(dirWin + "/games.db");
|
gamesDBFile = new File(dirWin + "/games.db");
|
||||||
localDB = new File(dirWin+"/localRoms.db");
|
localDB = new File(dirWin+"/localRoms.db");
|
||||||
pictureCache= new File(dirWin+"/picture_cache");
|
pictureCache= new File(dirWin+"/picture_cache");
|
||||||
|
pane.setPrefWidth(892);
|
||||||
}
|
}
|
||||||
|
|
||||||
//startup checks
|
//startup checks
|
||||||
|
|
|
@ -114,4 +114,4 @@
|
||||||
</JFXButton>
|
</JFXButton>
|
||||||
<JFXButton fx:id="lastTimePlayedBtn" buttonType="RAISED" maxHeight="32.0" minWidth="100.0" onAction="#lastTimePlayedBtnAction" prefHeight="32.0" style="-fx-background-color: #ffffff; -fx-button-type: RAISED; -fx-text-fill: BLACK;" visible="false" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="516.5" AnchorPane.topAnchor="558.0" />
|
<JFXButton fx:id="lastTimePlayedBtn" buttonType="RAISED" maxHeight="32.0" minWidth="100.0" onAction="#lastTimePlayedBtnAction" prefHeight="32.0" style="-fx-background-color: #ffffff; -fx-button-type: RAISED; -fx-text-fill: BLACK;" visible="false" AnchorPane.bottomAnchor="10.0" AnchorPane.leftAnchor="516.5" AnchorPane.topAnchor="558.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
|
@ -973,7 +973,7 @@ public class MainWindowController {
|
||||||
Image coverImage = new Image(coverFile.toURI().toString());
|
Image coverImage = new Image(coverFile.toURI().toString());
|
||||||
|
|
||||||
generatePosition();
|
generatePosition();
|
||||||
|
System.out.println("add " + getxPos()); //TODO debug
|
||||||
VBox.setLayoutX(getxPos());
|
VBox.setLayoutX(getxPos());
|
||||||
VBox.setLayoutY(getyPos());
|
VBox.setLayoutY(getyPos());
|
||||||
VBox.getChildren().addAll(gameTitleLabel,gameBtn);
|
VBox.getChildren().addAll(gameTitleLabel,gameBtn);
|
||||||
|
@ -1144,10 +1144,15 @@ public class MainWindowController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO xPosHelper based on window with
|
//TODO xPosHelper based on window with breite -24(windows, Linx = 36)
|
||||||
private void generatePosition() {
|
private void generatePosition() {
|
||||||
// System.out.println(main.primaryStage.getWidth());
|
int xPosHelperMax;
|
||||||
if(xPosHelper == 4){
|
if(System.getProperty("os.name").equals("Linux")){
|
||||||
|
xPosHelperMax = (int) Math.floor((main.pane.getPrefWidth() - 36) / 217);
|
||||||
|
} else {
|
||||||
|
xPosHelperMax = (int) Math.floor((main.pane.getPrefWidth() - 24) / 217);
|
||||||
|
}
|
||||||
|
if(xPosHelper == xPosHelperMax){
|
||||||
xPos = 17;
|
xPos = 17;
|
||||||
yPos = yPos + 345;
|
yPos = yPos + 345;
|
||||||
xPosHelper = 1;
|
xPosHelper = 1;
|
||||||
|
@ -1155,6 +1160,10 @@ public class MainWindowController {
|
||||||
xPos = xPos + 217;
|
xPos = xPos + 217;
|
||||||
xPosHelper++;
|
xPosHelper++;
|
||||||
}
|
}
|
||||||
|
// System.out.println("Breit: " + main.pane.getPrefWidth());
|
||||||
|
// System.out.println("xPosHelper: " + xPosHelper);
|
||||||
|
// System.out.println("yPos: " + yPos);
|
||||||
|
// System.out.println("xPos: " + xPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyColor() {
|
private void applyColor() {
|
||||||
|
@ -1227,7 +1236,11 @@ public class MainWindowController {
|
||||||
props.setProperty("color", getColor());
|
props.setProperty("color", getColor());
|
||||||
props.setProperty("fullscreen", String.valueOf(isFullscreen()));
|
props.setProperty("fullscreen", String.valueOf(isFullscreen()));
|
||||||
props.setProperty("cloudSync", String.valueOf(cloudSync));
|
props.setProperty("cloudSync", String.valueOf(cloudSync));
|
||||||
props.setProperty("cloudService", getCloudService());
|
if (getCloudService() == null) {
|
||||||
|
props.setProperty("cloudService", "");
|
||||||
|
} else {
|
||||||
|
props.setProperty("cloudService", getCloudService());
|
||||||
|
}
|
||||||
props.setProperty("folderID", main.cloudController.getFolderID(getCloudService()));
|
props.setProperty("folderID", main.cloudController.getFolderID(getCloudService()));
|
||||||
if(System.getProperty("os.name").equals("Linux")){
|
if(System.getProperty("os.name").equals("Linux")){
|
||||||
outputStream = new FileOutputStream(fileLinux);
|
outputStream = new FileOutputStream(fileLinux);
|
||||||
|
|
Loading…
Reference in New Issue