From b37cc5a00c06ecc10fff8fad2f5a1f75ba59cc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 9 Nov 2024 09:40:10 +0100 Subject: [PATCH] Added: Link to FFDec Wiki on the Help menu --- .../jpexs/decompiler/flash/ApplicationInfo.java | 5 +++++ .../decompiler/flash/gui/MainFrameMenu.java | 16 ++++++++++++++++ .../decompiler/flash/gui/graphics/wiki16.png | Bin 0 -> 542 bytes .../decompiler/flash/gui/graphics/wiki32.png | Bin 0 -> 858 bytes .../flash/gui/locales/MainFrame.properties | 5 ++++- 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/com/jpexs/decompiler/flash/gui/graphics/wiki16.png create mode 100644 src/com/jpexs/decompiler/flash/gui/graphics/wiki32.png diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java index b29ceeacf..180db5f41 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ApplicationInfo.java @@ -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 diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java index a1ca1952f..1bf03bb3f 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java @@ -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); diff --git a/src/com/jpexs/decompiler/flash/gui/graphics/wiki16.png b/src/com/jpexs/decompiler/flash/gui/graphics/wiki16.png new file mode 100644 index 0000000000000000000000000000000000000000..e48ff95e35ee0c86992ea52a2ad1c325860fb572 GIT binary patch literal 542 zcmV+(0^$9MP)O&!U!PZ(ak)p^%xW-&e~6~RN?}LOsE?ihU|xLHmK601_&`M zCCVEXg3(y;?fvFb1xJ4#nd4(_2wl}R9CMRzqtda2RSqD28-?5iVJdk6AfRPb;#hz4 z#~n&0`zfY1*6?awlZ0xM1XC#(P`2i7m`e+sf81KCVE^X>$tDU-+RO3@F zW)$!xx5-2+vG<~;&Oil_9$9L6-Nq1kbXIY85nZh~#^I5XOf4vIl4jIBUUe68E3@Yy zFc&l~T$0>zHYOH44om4) zJagQ!nLWLC1vKJ~M{nWT{TVn%pbMB0JiQ`p*aB`pem~P#GJol66TlWR!F=xF<<|r7 z-Us`|mmgp-p8+8fu3tO@8bf1s0YHW7JWFtrl&DR>vVoVcadhg{k!;qqs^0}2Y1nq6 zoIs^uVz511O7kk)aTO#|p_kV%S?L4J|fpTPT`x(OzUgeid{jyPsS>JBoq3 zANF9&Vn~7dYiHB8Hz-QSOIwk98lQXhrBeY^ex1D*11Jwk>G`O7)q|FyisR<%T}cBC zmV)lzEDW67l-(3H;DlOiaj?cfpq*n1s$`Ss;Q7^aqZqjJZZERP(I51tAiQ-AMv#kb z1of>q--DB*FrXq-7Su;%pf3foA*wy5pp@j1*xCoIc(Y@g5Q;yD49vwJVy_5St0340 zMt4F^tf?P2CsorNMzx8%q_X@N25L4qaLDMqO(a}uTVN~a=qDcu@VfWt}Xml&@|Az*++ny!` zy~nX!pD7+hdY=#W6m2k-qNnwiX4@YT9t*%iI-z{WMO)T69|5axDAI>YHvlGI?e6b< zIv*||g@yf{&oIrW>GIYsVScZyHNK8d$N&Wqy-+ps||(Hst4oUgsxl kKV74g`A4f