mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
show online docs and log file from help menu
This commit is contained in:
parent
f0c239d625
commit
c0e44b2c55
2 changed files with 15 additions and 0 deletions
|
@ -270,6 +270,19 @@ public class AppController implements Initializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void showDocumentation(ActionEvent event) throws IOException {
|
||||||
|
AppServices.get().getApplication().getHostServices().showDocument("https://sparrowwallet.com/docs");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showLogFile(ActionEvent event) throws IOException {
|
||||||
|
File logFile = new File(Storage.getSparrowHome(), "sparrow.log");
|
||||||
|
if(logFile.exists()) {
|
||||||
|
AppServices.get().getApplication().getHostServices().showDocument(logFile.toPath().toUri().toString());
|
||||||
|
} else {
|
||||||
|
AppServices.showErrorDialog("Log file unavailable", "Cannot find log file at " + logFile.getCanonicalPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void showAbout(ActionEvent event) {
|
public void showAbout(ActionEvent event) {
|
||||||
Stage aboutStage = getAboutStage();
|
Stage aboutStage = getAboutStage();
|
||||||
aboutStage.show();
|
aboutStage.show();
|
||||||
|
|
|
@ -91,6 +91,8 @@
|
||||||
</Menu>
|
</Menu>
|
||||||
<Menu fx:id="helpMenu" mnemonicParsing="false" text="Help">
|
<Menu fx:id="helpMenu" mnemonicParsing="false" text="Help">
|
||||||
<MenuItem mnemonicParsing="false" text="Show Introduction" onAction="#showIntroduction"/>
|
<MenuItem mnemonicParsing="false" text="Show Introduction" onAction="#showIntroduction"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Show Online Documentation" onAction="#showDocumentation"/>
|
||||||
|
<MenuItem mnemonicParsing="false" text="Show Log File" onAction="#showLogFile"/>
|
||||||
<MenuItem styleClass="osxHide" mnemonicParsing="false" text="About Sparrow" onAction="#showAbout"/>
|
<MenuItem styleClass="osxHide" mnemonicParsing="false" text="About Sparrow" onAction="#showAbout"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</menus>
|
</menus>
|
||||||
|
|
Loading…
Reference in a new issue