Skip to content

Commit

Permalink
Fixed error display on differen OS
Browse files Browse the repository at this point in the history
  • Loading branch information
t3rmian committed Nov 28, 2017
1 parent a7ee3de commit 368ff25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.t3r1jj</groupId>
<artifactId>GammaJ</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
<packaging>jar</packaging>

<properties>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/io/github/t3r1jj/gammaj/GammaJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class GammaJ extends Application {

private static final String appIconPath = "images/tray_icon.png";
private final ViewModel viewModel = ViewModel.getInstance();
private ViewModel viewModel;
private TrayManager trayManager;

@Override
Expand All @@ -53,8 +53,9 @@ public void start(Stage stage) throws Exception {
fXMLLoader.setControllerFactory(new ApplicationControllerFactory(getHostServices(), trayManager, viewModel));
Parent root = null;
try {
viewModel = ViewModel.getInstance();
root = fXMLLoader.load();
} catch (GammaWinapiCallException exception) {
} catch (UnsatisfiedLinkError | GammaWinapiCallException exception) {
JOptionPane.showConfirmDialog(null, resources.getString("initialization_error_message"),
resources.getString("initialization_error"), JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE);
Platform.exit();
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/bundles/LangBundle_en.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brightness=brightness

0 comments on commit 368ff25

Please sign in to comment.