Skip to content

Commit 6d3a04a

Browse files
author
emmanue1
committed
Update HELP menu
1 parent 22fc7ce commit 6d3a04a

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

app/src/main/java/org/jd/gui/controller/MainController.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ public MainController(Configuration configuration) {
103103
e -> openURI(history.forward()),
104104
e -> onSearch(),
105105
e -> onJdWebSite(),
106-
e -> onWikipedia(),
106+
e -> onJdGuiIssues(),
107+
e -> onJdCoreIssues(),
107108
e -> onPreferences(),
108109
e -> onAbout(),
109110
() -> panelClosed(),
@@ -355,12 +356,25 @@ protected void onJdWebSite() {
355356
}
356357
}
357358

358-
protected void onWikipedia() {
359+
protected void onJdGuiIssues() {
359360
if (Desktop.isDesktopSupported()) {
360361
Desktop desktop = Desktop.getDesktop();
361362
if (desktop.isSupported(Desktop.Action.BROWSE)) {
362363
try {
363-
desktop.browse(URI.create("http://en.wikipedia.org/wiki/Java_Decompiler"));
364+
desktop.browse(URI.create("https://github.com/java-decompiler/jd-gui/issues"));
365+
} catch (IOException e) {
366+
assert ExceptionUtil.printStackTrace(e);
367+
}
368+
}
369+
}
370+
}
371+
372+
protected void onJdCoreIssues() {
373+
if (Desktop.isDesktopSupported()) {
374+
Desktop desktop = Desktop.getDesktop();
375+
if (desktop.isSupported(Desktop.Action.BROWSE)) {
376+
try {
377+
desktop.browse(URI.create("https://github.com/java-decompiler/jd-core/issues"));
364378
} catch (IOException e) {
365379
assert ExceptionUtil.printStackTrace(e);
366380
}

app/src/main/java/org/jd/gui/view/MainView.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public MainView(
7676
ActionListener forwardActionListener,
7777
ActionListener searchActionListener,
7878
ActionListener jdWebSiteActionListener,
79-
ActionListener wikipediaActionListener,
79+
ActionListener jdGuiIssuesActionListener,
80+
ActionListener jdCoreIssuesActionListener,
8081
ActionListener preferencesActionListener,
8182
ActionListener aboutActionListener,
8283
Runnable panelClosedCallback,
@@ -187,7 +188,8 @@ public void keyReleased(KeyEvent e) {
187188
forwardAction = newAction("Forward", newImageIcon("/org/jd/gui/images/forward_nav.png"), false, forwardActionListener);
188189
Action searchAction = newAction("Search...", newImageIcon("/org/jd/gui/images/search_src.png"), false, searchActionListener);
189190
Action jdWebSiteAction = newAction("JD Web site", browser, "Open JD Web site", jdWebSiteActionListener);
190-
Action wikipediaAction = newAction("Wikipedia", browser, "Open Wikipedia page", wikipediaActionListener);
191+
Action jdGuiIssuesActionAction = newAction("JD-GUI issues", browser, "Open JD-GUI issues page", jdGuiIssuesActionListener);
192+
Action jdCoreIssuesActionAction = newAction("JD-Core issues", browser, "Open JD-Core issues page", jdCoreIssuesActionListener);
191193
Action preferencesAction = newAction("Preferences...", newImageIcon("/org/jd/gui/images/preferences.png"), true, "Open the preferences panel", preferencesActionListener);
192194
Action aboutAction = newAction("About...", true, "About JD-GUI", aboutActionListener);
193195

@@ -232,7 +234,8 @@ public void keyReleased(KeyEvent e) {
232234
menuBar.add(menu);
233235
if (browser) {
234236
menu.add(jdWebSiteAction);
235-
menu.add(wikipediaAction);
237+
menu.add(jdGuiIssuesActionAction);
238+
menu.add(jdCoreIssuesActionAction);
236239
menu.addSeparator();
237240
}
238241
menu.add(preferencesAction).setAccelerator(KeyStroke.getKeyStroke('P', menuShortcutKeyMask|InputEvent.SHIFT_MASK));

0 commit comments

Comments
 (0)