diff --git a/creator-tools/src/main/java/com/skcraft/launcher/creator/Creator.java b/creator-tools/src/main/java/com/skcraft/launcher/creator/Creator.java index b37af60..6311f2c 100644 --- a/creator-tools/src/main/java/com/skcraft/launcher/creator/Creator.java +++ b/creator-tools/src/main/java/com/skcraft/launcher/creator/Creator.java @@ -70,7 +70,7 @@ public class Creator { final Creator creator = new Creator(); SwingUtilities.invokeAndWait(() -> { - UIManager.getDefaults().put("SplitPane.border", BorderFactory.createEmptyBorder()); + SwingHelper.setSwingProperties("Modpack Creator"); SwingHelper.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); try { diff --git a/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java b/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java index c4249ef..6082c1c 100644 --- a/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java +++ b/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java @@ -101,10 +101,12 @@ public class PackManagerFrame extends JFrame { } private void initMenu() { - newPackMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK)); - newPackAtLocationMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK | Event.SHIFT_MASK)); - editConfigMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, Event.CTRL_MASK)); - openFolderMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK | Event.SHIFT_MASK)); + int ctrlKeyMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); + + newPackMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrlKeyMask)); + newPackAtLocationMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrlKeyMask | Event.SHIFT_MASK)); + editConfigMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E, ctrlKeyMask)); + openFolderMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrlKeyMask | Event.SHIFT_MASK)); testMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)); testOnlineMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0)); buildMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F10, Event.SHIFT_MASK)); diff --git a/launcher/src/main/java/com/skcraft/launcher/Launcher.java b/launcher/src/main/java/com/skcraft/launcher/Launcher.java index 4056565..604ec54 100644 --- a/launcher/src/main/java/com/skcraft/launcher/Launcher.java +++ b/launcher/src/main/java/com/skcraft/launcher/Launcher.java @@ -42,6 +42,8 @@ import java.util.Properties; import java.util.concurrent.Executors; import java.util.logging.Level; +import static com.skcraft.launcher.util.SharedLocale.tr; + /** * The main entry point for the launcher. */ @@ -390,8 +392,8 @@ public final class Launcher { public void run() { try { Launcher launcher = createFromArguments(args); + SwingHelper.setSwingProperties(tr("launcher.appTitle", launcher.getVersion())); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - UIManager.getDefaults().put("SplitPane.border", BorderFactory.createEmptyBorder()); launcher.showLauncherWindow(); } catch (Throwable t) { log.log(Level.WARNING, "Load failure", t); diff --git a/launcher/src/main/java/com/skcraft/launcher/swing/SwingHelper.java b/launcher/src/main/java/com/skcraft/launcher/swing/SwingHelper.java index f0ef9fd..bee13ba 100644 --- a/launcher/src/main/java/com/skcraft/launcher/swing/SwingHelper.java +++ b/launcher/src/main/java/com/skcraft/launcher/swing/SwingHelper.java @@ -452,4 +452,10 @@ public final class SwingHelper { return false; } } + + public static void setSwingProperties(String appName) { + UIManager.getDefaults().put("SplitPane.border", BorderFactory.createEmptyBorder()); + System.setProperty("com.apple.mrj.application.apple.menu.about.name", appName); + System.setProperty("apple.laf.useScreenMenuBar", "true"); + } } diff --git a/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties b/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties index 18996ee..8ede25f 100644 --- a/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties +++ b/launcher/src/main/resources/com/skcraft/launcher/lang/Launcher.properties @@ -65,6 +65,7 @@ launcher.options=Options... launcher.updateLauncher=Update launcher... launcher.downloadUpdates=Download modpack updates launcher.title=SKCraft Launcher (v{0}) +launcher.appTitle=SKCraft Launcher launcher.refreshList=Refresh list launcher.checkingTitle=Getting available modpacks... launcher.checkingStatus=Getting available modpacks... Please wait.