minor clean up
This commit is contained in:
		| @ -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; | ||||
|  | ||||
| @ -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"); | ||||
| 				} | ||||
| 			} | ||||
| 		}); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user