Skip to content

Commit

Permalink
making the blugin request more sane
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Oct 20, 2024
1 parent bd55e4b commit ae408a2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.neuronrobotics.bowlerstudio.scripting.DownloadManager;
import com.neuronrobotics.bowlerstudio.scripting.GitHubWebFlow;
import com.neuronrobotics.bowlerstudio.scripting.IApprovalForDownload;
import com.neuronrobotics.bowlerstudio.scripting.IDownloadManagerEvents;
import com.neuronrobotics.bowlerstudio.scripting.IURLOpen;
import com.neuronrobotics.bowlerstudio.scripting.PasswordManager;
import com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine;
Expand Down Expand Up @@ -359,6 +360,18 @@ public void open(URI toOpe) {
reporter.uncaughtException(Thread.currentThread(), e);

}
DownloadManager.setDownloadEvents(new IDownloadManagerEvents() {

@Override
public void startDownload() {
SplashManager.renderSplashFrame(0, "Downloading...");
}

@Override
public void finishDownload() {
SplashManager.closeSplash();
}
});
DownloadManager.setApproval(new IApprovalForDownload() {
private ButtonType buttonType = null;

Expand All @@ -369,7 +382,7 @@ public boolean get(String name, String url) {
BowlerKernel.runLater(() -> {
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);
alert.setTitle("Message");
alert.setHeaderText("Would you like to download: " + name + "\nfrom:\n" + url);
alert.setHeaderText("Would you like add the " + name + "plugin?" );
Node root = alert.getDialogPane();
Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();
stage.setOnCloseRequest(ev -> alert.hide());
Expand Down

0 comments on commit ae408a2

Please sign in to comment.