Skip to content

Commit

Permalink
Better update experience
Browse files Browse the repository at this point in the history
  • Loading branch information
CoocooFroggy committed Jul 29, 2021
1 parent 6879111 commit 58429a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/FRUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public static boolean updateFRGUI(MainMenu mainMenuInstance) throws IOException,
// Disable the whole menu
setEnabled(mainMenuView, false, true);

// Switch to "Controls" tab
mainMenuInstance.getTabbedPane().setSelectedIndex(2);

String osName = System.getProperty("os.name").toLowerCase();
String frguiDownloadIdentifier = null;
if (osName.contains("mac")) {
Expand All @@ -84,13 +87,15 @@ public static boolean updateFRGUI(MainMenu mainMenuInstance) throws IOException,
}
return false;
} else {
mainMenuInstance.messageToLog("Downloading FutureRestore GUI...");
File downloadedFrgui = downloadFRGUI(mainMenuInstance, frguiDownloadIdentifier);

if (downloadedFrgui == null) {
// We already notify the user of error in downloadFRGUI()
return false;
}

mainMenuInstance.messageToLog("Installing FutureRestore GUI...");
if (installFrgui(downloadedFrgui, frguiDownloadIdentifier, mainMenuInstance)) {
System.out.println("All done updating FRGUI. Closing now...");
System.exit(0);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,10 @@ public JButton getNextButtonOptions() {
return nextButtonOptions;
}

public JTabbedPane getTabbedPane() {
return tabbedPane;
}

/**
* Method generated by IntelliJ IDEA GUI Designer
* >>> IMPORTANT!! <<<
Expand Down

0 comments on commit 58429a4

Please sign in to comment.