Browse Source

minor clean up

pull/7/head
Jannik 3 years ago
parent
commit
7434d0be25
  1. 6
      src/main/java/com/cemu_UI/application/Main.java
  2. 14
      src/main/java/com/cemu_UI/application/MainWindowController.java

6
src/main/java/com/cemu_UI/application/Main.java

@ -49,6 +49,7 @@ import javafx.scene.layout.AnchorPane;
public class Main extends Application {
private static Main main;
private Stage primaryStage;
private MainWindowController mainWindowController;
private CloudController cloudController;
@ -79,6 +80,7 @@ public class Main extends Application {
this.primaryStage = primaryStage;
mainWindowController = new MainWindowController(this);
main = this;
mainWindow();
initActions();
@ -299,6 +301,10 @@ public class Main extends Application {
primaryStage.heightProperty().addListener(heightListener);
primaryStage.maximizedProperty().addListener(maximizeListener);
}
public static Main getMain() {
return main;
}
public Stage getPrimaryStage() {
return primaryStage;

14
src/main/java/com/cemu_UI/application/MainWindowController.java

@ -20,7 +20,6 @@
*/
package com.cemu_UI.application;
import java.awt.Desktop;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
@ -34,7 +33,6 @@ import java.io.OutputStream;
import java.math.BigInteger;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.sql.SQLException;
@ -625,17 +623,7 @@ public class MainWindowController {
@Override
public void handle(MouseEvent mouseEvent) {
if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
Desktop.getDesktop().browse(new URI("https://git.mosad.xyz/Seil0/cemu_UI/issues/3"));
} catch (IOException | URISyntaxException e) {
LOGGER.error("An error ocoured while trying to open a Website.", e);
}
}
});
thread.start();
Main.getMain().getHostServices().showDocument("https://git.mosad.xyz/Seil0/cemu_UI/issues/3");
}
}
});

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close