Make sure the doc server is running when the help button is clicked
This commit is contained in:
parent
924c60fb0e
commit
d330fabe36
|
@ -20,6 +20,7 @@ import ctbrec.Hmac;
|
|||
import ctbrec.Settings;
|
||||
import ctbrec.Settings.DirectoryStructure;
|
||||
import ctbrec.Settings.ProxyType;
|
||||
import ctbrec.docs.DocServer;
|
||||
import ctbrec.recorder.Recorder;
|
||||
import ctbrec.sites.Site;
|
||||
import ctbrec.ui.DesktopIntegration;
|
||||
|
@ -366,7 +367,16 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
|
||||
private Button createHelpButton(String text, String url) {
|
||||
Button postProcessingHelpButton = new Button(text);
|
||||
postProcessingHelpButton.setOnAction(e -> DesktopIntegration.open(url));
|
||||
postProcessingHelpButton.setOnAction(e -> {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
DocServer.start();
|
||||
} catch (Exception ex) {
|
||||
LOG.error("Couldn't start documentation server", ex);
|
||||
}
|
||||
}).start();
|
||||
DesktopIntegration.open(url);
|
||||
});
|
||||
return postProcessingHelpButton;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue