2020
2121import com .sun .javafx .PlatformUtil ;
2222import com .sun .javafx .scene .control .skin .LabeledText ;
23- import eu .hansolo .enzo .notification .Notification ;
2423import javafx .application .Platform ;
2524import javafx .beans .value .ObservableValue ;
2625import javafx .collections .FXCollections ;
@@ -853,9 +852,10 @@ public void backgroundSettingsHandler() {
853852 chooseTimeToRunButton .setVisible (true );
854853 forceCheckForBlobs .setVisible (true );
855854 startBackgroundButton .setVisible (true );
856- if (appPrefs .getBoolean ("Background setup" , false )) {
855+ if (! appPrefs .getBoolean ("Background setup" , false )) {
857856 startBackgroundButton .setDisable (true );
858857 forceCheckForBlobs .setDisable (true );
858+ chooseTimeToRunButton .setDisable (true );
859859 }
860860 } else {
861861 backgroundSettingsButton .setDefaultButton (false );
@@ -873,6 +873,7 @@ public void backgroundSettingsHandler() {
873873 btn .setText ("Load " + btn .getText ().substring ("Use " .length ()));
874874 }
875875 });
876+ chooseTimeToRunButton .setDisable (false );
876877 chooseTimeToRunButton .setVisible (false );
877878 forceCheckForBlobs .setDisable (false );
878879 forceCheckForBlobs .setVisible (false );
@@ -994,16 +995,35 @@ public void debugLogHandler() {
994995 }
995996 }
996997
997- public void showWiki () {
998+ public void showWiki (ActionEvent event ) {
998999 try {
9991000 Desktop .getDesktop ().browse (new URI ("https://github.com/airsquared/blobsaver/wiki" ));
10001001 } catch (IOException | URISyntaxException e ) {
10011002 e .printStackTrace ();
10021003 }
1003- }
1004-
1005- public void throwException () {
1006- throw new EnumConstantNotPresentException (Notification .Notifier .class , "" );
1004+ String url ;
1005+ switch (((MenuItem ) event .getTarget ()).getText ()) {
1006+ case "What are blobs?" :
1007+ url = "https://github.com/airsquared/blobsaver/wiki/What-are-blobs-and-why-do-you-need-them%3F" ;
1008+ break ;
1009+ case "Getting the required information" :
1010+ url = "https://github.com/airsquared/blobsaver/wiki/Getting-the-required-information" ;
1011+ break ;
1012+ case "Setting it up to run in the background" :
1013+ url = "https://github.com/airsquared/blobsaver/wiki/Setting-up-the-background" ;
1014+ break ;
1015+ case "Running on system startup" :
1016+ url = "https://github.com/airsquared/blobsaver/wiki/Running-on-system-startup" ;
1017+ break ;
1018+ default :
1019+ url = "https://github.com/airsquared/blobsaver/wiki" ;
1020+ break ;
1021+ }
1022+ try {
1023+ Desktop .getDesktop ().browse (new URI (url ));
1024+ } catch (IOException | URISyntaxException e ) {
1025+ e .printStackTrace ();
1026+ }
10071027 }
10081028
10091029 private void log (String msg ) {
0 commit comments