Added: Link to FFDec Wiki on the Help menu

This commit is contained in:
Jindra Petřík
2024-11-09 09:40:10 +01:00
parent f55983fd08
commit b37cc5a00c
5 changed files with 25 additions and 1 deletions

View File

@@ -110,6 +110,11 @@ public class ApplicationInfo {
* Project page
*/
public static final String PROJECT_PAGE = "https://github.com/" + GIT_HUB_PROJECT;
/**
* Project Wiki
*/
public static final String WIKI_PAGE = PROJECT_PAGE + "/wiki";
/**
* URL for checking new updates

View File

@@ -804,6 +804,20 @@ public abstract class MainFrameMenu implements MenuBuilder {
ViewMessages.showMessageDialog(Main.getDefaultMessagesComponent(), translate("message.homepage").replace("%url%", homePageURL));
}
}
protected void wikiActionPerformed(ActionEvent evt) {
if (Main.isWorking()) {
return;
}
if (mainFrame.getPanel().checkEdited()) {
return;
}
String wikiURL = ApplicationInfo.WIKI_PAGE;
if (!View.navigateUrl(wikiURL)) {
ViewMessages.showMessageDialog(Main.getDefaultMessagesComponent(), translate("message.wiki").replace("%url%", wikiURL));
}
}
protected void aboutActionPerformed(ActionEvent evt) {
if (Main.isWorking()) {
@@ -1144,6 +1158,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
setMenuEnabled("/help/checkUpdates", !isWorking);
//setMenuEnabled("/help/helpUs", !isWorking);
setMenuEnabled("/help/homePage", !isWorking);
setMenuEnabled("/help/wiki", !isWorking);
setMenuEnabled("_/about", !isWorking);
setMenuEnabled("/help/about", !isWorking);
@@ -1455,6 +1470,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
addMenuItem("/help", translate("menu.help"), null, null, 0, null, false, null, false);
//addMenuItem("/help/helpUs", translate("menu.help.helpus"), "donate32", this::helpUsActionPerformed, PRIORITY_TOP, null, true, null, false);
addMenuItem("/help/homePage", translate("menu.help.homepage"), "homepage16", this::homePageActionPerformed, PRIORITY_MEDIUM, null, true, null, false);
addMenuItem("/help/wiki", translate("menu.help.wiki"), "wiki16", this::wikiActionPerformed, PRIORITY_MEDIUM, null, true, null, false);
addSeparator("/help");
addMenuItem("/help/checkUpdates", translate("menu.help.checkupdates"), "update16", this::checkUpdatesActionPerformed, PRIORITY_MEDIUM, null, true, null, false);
addMenuItem("/help/about", translate("menu.help.about"), "about32", this::aboutActionPerformed, PRIORITY_TOP, null, true, null, false);

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

View File

@@ -1014,4 +1014,7 @@ menu.file.view.easy = Simple editor
#after 21.1.3
menu.tools.solEditor = Sol editor
node.cookies = cookies
node.cookies = cookies
menu.help.wiki = Visit FFDec Wiki
message.wiki = Visit FFDec Wiki at: \r\n%url%