mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Simplify how users can open the log file when we need it
This commit is contained in:
@@ -57,8 +57,7 @@ public final class HelpMenu {
|
||||
private static JMenu getMenu_Troubleshooting() {
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
JMenu mnu = new JMenu(localizer.getMessage("lblTroubleshooting"));
|
||||
mnu.add(getMenuItem_UrlLink("How to Provide a Useful Bug Report", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=9621"));
|
||||
mnu.addSeparator();
|
||||
mnu.add(getMenuItem_OpenLogFile());
|
||||
mnu.add(getMenuItem_ReadMeFile());
|
||||
return mnu;
|
||||
}
|
||||
@@ -76,8 +75,8 @@ public final class HelpMenu {
|
||||
JMenu mnu = new JMenu(localizer.getMessage("lblGettingStarted"));
|
||||
mnu.add(getMenuItem_HowToPlayFile());
|
||||
mnu.addSeparator();
|
||||
mnu.add(getMenuItem_UrlLink("Forge Wiki", "http://www.slightlymagic.net/wiki/Forge", KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)));
|
||||
mnu.add(getMenuItem_UrlLink("What is Forge?", "http://www.slightlymagic.net/forum/viewtopic.php?f=26&t=468"));
|
||||
mnu.add(getMenuItem_UrlLink("Forge Wiki", "https://github.com/Card-Forge/forge/wiki", KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)));
|
||||
mnu.add(getMenuItem_UrlLink("What is Forge?", "https://github.com/Card-Forge/forge/wiki#what-is-forge"));
|
||||
return mnu;
|
||||
}
|
||||
|
||||
@@ -94,6 +93,13 @@ public final class HelpMenu {
|
||||
return menuItem;
|
||||
}
|
||||
|
||||
private static JMenuItem getMenuItem_OpenLogFile() {
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblOpenLogFile"));
|
||||
menuItem.addActionListener(getOpenFileAction(getAbsoluteFile(ForgeConstants.LOG_FILE)));
|
||||
return menuItem;
|
||||
}
|
||||
|
||||
private static JMenuItem getMenuItem_License() {
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
JMenuItem menuItem = new JMenuItem(localizer.getMessage("lblForgeLicense"));
|
||||
@@ -132,6 +138,14 @@ public final class HelpMenu {
|
||||
return file;
|
||||
}
|
||||
|
||||
protected static File getAbsoluteFile(String filename) {
|
||||
File file = null;
|
||||
if (FileUtil.doesFileExist(filename)) {
|
||||
file = new File(filename);
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see http://stackoverflow.com/questions/6273221/open-a-text-file-in-the-default-text-editor-via-java
|
||||
*/
|
||||
|
||||
@@ -256,7 +256,7 @@ lblYoureRunning=You''re running
|
||||
lblYouNeedAtLeastJavaVersion=You need at least version 1.8.0_101.
|
||||
lblImportPictures=Import data from a local directory.
|
||||
lblReportBug=Something broken?
|
||||
lblHowToPlay=Rules of the Game.
|
||||
lblHowToPlay=How to Play
|
||||
lblLicensing=Forge legal.
|
||||
ContentDownloaders=Content Downloaders
|
||||
ReleaseNotes=Release Notes
|
||||
@@ -344,6 +344,7 @@ lblTroubleshooting=Troubleshooting
|
||||
lblArticles=Articles
|
||||
lblGettingStarted=Getting Started
|
||||
lblHowtoPlay=How to Play
|
||||
lblOpenLogFile=Open Log File
|
||||
lblForgeLicense=Forge License
|
||||
lblReleaseNotes=Release Notes
|
||||
#GameMenu.java
|
||||
|
||||
@@ -110,9 +110,10 @@ public final class FModel {
|
||||
//Device
|
||||
if (GuiBase.isAndroid()) //todo get device on other mobile platforms
|
||||
System.out.println(GuiBase.getDeviceName() + " (RAM: " + GuiBase.getDeviceRAM() + "MB, Android " + GuiBase.getAndroidRelease() + " API Level " + GuiBase.getAndroidAPILevel() + ")");
|
||||
else
|
||||
else {
|
||||
System.out.println(System.getProperty("os.name") + " (" + System.getProperty("os.version") + " " + System.getProperty("os.arch") + ")");
|
||||
|
||||
System.out.println("Java Version - " + RuntimeVersion.of(System.getProperty("java.version")).toString());
|
||||
}
|
||||
ImageKeys.initializeDirs(
|
||||
ForgeConstants.CACHE_CARD_PICS_DIR, ForgeConstants.CACHE_CARD_PICS_SUBDIR,
|
||||
ForgeConstants.CACHE_TOKEN_PICS_DIR, ForgeConstants.CACHE_ICON_PICS_DIR,
|
||||
|
||||
Reference in New Issue
Block a user