diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644
index 0000000..b42b859
--- /dev/null
+++ b/bin/.gitignore
@@ -0,0 +1 @@
+/application/
diff --git a/bin/application/CloudController.class b/bin/application/CloudController.class
index ffeaede..884bd0b 100644
Binary files a/bin/application/CloudController.class and b/bin/application/CloudController.class differ
diff --git a/bin/application/Main.class b/bin/application/Main.class
index 34e215e..83ea261 100644
Binary files a/bin/application/Main.class and b/bin/application/Main.class differ
diff --git a/bin/application/MainWindow.fxml b/bin/application/MainWindow.fxml
index 9c8f6dc..d61b2d2 100644
--- a/bin/application/MainWindow.fxml
+++ b/bin/application/MainWindow.fxml
@@ -114,4 +114,4 @@
-
+
\ No newline at end of file
diff --git a/bin/application/MainWindowController.class b/bin/application/MainWindowController.class
index c3e361e..d639b9d 100644
Binary files a/bin/application/MainWindowController.class and b/bin/application/MainWindowController.class differ
diff --git a/src/application/CloudController.java b/src/application/CloudController.java
index 82cd22b..069c45b 100644
--- a/src/application/CloudController.java
+++ b/src/application/CloudController.java
@@ -133,21 +133,25 @@ public class CloudController {
public String getFolderID(String cloudService) {
String folderID = "";
- if(cloudService.equals("GoogleDrive")) {
- folderID = googleDriveController.getFolderID();
- }
- if(cloudService.equals("Dropbox")) {
-
+ if (cloudService != null) {
+ if(cloudService.equals("GoogleDrive")) {
+ folderID = googleDriveController.getFolderID();
+ }
+ if(cloudService.equals("Dropbox")) {
+
+ }
}
return folderID;
}
public void setFolderID(String folderID, String cloudService) {
- if(cloudService.equals("GoogleDrive")) {
- googleDriveController.setFolderID(folderID);
- }
- if(cloudService.equals("Dropbox")) {
-
+ if (cloudService != null) {
+ if (cloudService.equals("GoogleDrive")) {
+ googleDriveController.setFolderID(folderID);
+ }
+ if (cloudService.equals("Dropbox")) {
+
+ }
}
}
}
diff --git a/src/application/Main.java b/src/application/Main.java
index 84873a9..e3fddc4 100644
--- a/src/application/Main.java
+++ b/src/application/Main.java
@@ -75,12 +75,14 @@ public class Main extends Application {
gamesDBFile = new File(dirLinux + "/games.db");
localDB = new File(dirLinux+"/localRoms.db");
pictureCache= new File(dirLinux+"/picture_cache");
+ pane.setPrefWidth(904); //this could be a kde plasma specific issue
}else{
directory = new File(dirWin);
configFile = new File(dirWin + "/config.xml");
gamesDBFile = new File(dirWin + "/games.db");
localDB = new File(dirWin+"/localRoms.db");
pictureCache= new File(dirWin+"/picture_cache");
+ pane.setPrefWidth(892);
}
//startup checks
diff --git a/src/application/MainWindow.fxml b/src/application/MainWindow.fxml
index 9c8f6dc..d61b2d2 100644
--- a/src/application/MainWindow.fxml
+++ b/src/application/MainWindow.fxml
@@ -114,4 +114,4 @@
-
+
\ No newline at end of file
diff --git a/src/application/MainWindowController.java b/src/application/MainWindowController.java
index e206102..dc8f343 100644
--- a/src/application/MainWindowController.java
+++ b/src/application/MainWindowController.java
@@ -973,7 +973,7 @@ public class MainWindowController {
Image coverImage = new Image(coverFile.toURI().toString());
generatePosition();
-
+ System.out.println("add " + getxPos()); //TODO debug
VBox.setLayoutX(getxPos());
VBox.setLayoutY(getyPos());
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() {
-// System.out.println(main.primaryStage.getWidth());
- if(xPosHelper == 4){
+ int xPosHelperMax;
+ 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;
yPos = yPos + 345;
xPosHelper = 1;
@@ -1155,6 +1160,10 @@ public class MainWindowController {
xPos = xPos + 217;
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() {
@@ -1227,7 +1236,11 @@ public class MainWindowController {
props.setProperty("color", getColor());
props.setProperty("fullscreen", String.valueOf(isFullscreen()));
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()));
if(System.getProperty("os.name").equals("Linux")){
outputStream = new FileOutputStream(fileLinux);