diff --git a/install4j/22.xx/openrocket-22.xx.install4j b/install4j/22.xx/openrocket-22.xx.install4j index 3a15e2134..d19b835af 100644 --- a/install4j/22.xx/openrocket-22.xx.install4j +++ b/install4j/22.xx/openrocket-22.xx.install4j @@ -1,6 +1,6 @@ - + @@ -175,16 +175,6 @@ return console.askOkCancel(message, true); !context.getBooleanVariable("sys.confirmedUpdateInstallation") - - - - - sys.installationDir - - - context.getVariable("sys.responseFile") == null - - @@ -211,30 +201,40 @@ return console.askOkCancel(message, true); - + - + - ${i18n:SelectComponentsLabel2} + ${i18n:SelectAssociationsLabel} - !context.isConsole() - + - selectionChangedScript + showSelectionButtons + selectionButtonPosition - + + + + + + + ${form:confirmationMessage} + + !context.isConsole() + + ${i18n:CreateDesktopIcon} createDesktopLinkAction - + ${i18n:AddToDock} @@ -244,21 +244,17 @@ return console.askOkCancel(message, true); - + - + + - - - OpenRocket - - + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} - context.getBooleanVariable("addToDockAction") + !context.getBooleanVariable("sys.programGroupDisabled") - + - Education;Science OpenRocket @@ -278,7 +274,17 @@ return console.askOkCancel(message, true); !context.getBooleanVariable("sys.programGroupDisabled") - + + + + + OpenRocket + + + + context.getBooleanVariable("addToDockAction") + + OpenRocket Model Rocket Simulator @@ -286,7 +292,6 @@ return console.askOkCancel(message, true); OpenRocket - ${compiler:sys.fullName} @@ -301,7 +306,7 @@ return console.askOkCancel(message, true); context.getBooleanVariable("createDesktopLinkAction") - + OpenRocket Design ork @@ -326,49 +331,6 @@ return console.askOkCancel(message, true); - - - - - ${i18n:SelectAssociationsLabel} - - - - - - - - - selectionButtonPosition - showSelectionButtons - - - - - ${i18n:CreateDesktopIcon} - - createDesktopLinkAction - - - - - ${i18n:AddToDock} - - addToDockAction - - Util.isMacOS() - - - - - - - - - ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} - - !context.getBooleanVariable("sys.programGroupDisabled") - ${compiler:sys.fullName} ${compiler:sys.version} diff --git a/swing/src/net/sf/openrocket/startup/OSXSetup.java b/swing/src/net/sf/openrocket/startup/OSXSetup.java index 614d50c8a..8e4a0a038 100644 --- a/swing/src/net/sf/openrocket/startup/OSXSetup.java +++ b/swing/src/net/sf/openrocket/startup/OSXSetup.java @@ -2,6 +2,8 @@ package net.sf.openrocket.startup; import java.awt.*; import java.awt.desktop.AboutHandler; +import java.awt.desktop.OpenFilesEvent; +import java.awt.desktop.OpenFilesHandler; import java.awt.desktop.PreferencesHandler; import java.awt.desktop.QuitHandler; @@ -13,6 +15,7 @@ import net.sf.openrocket.arch.SystemInfo.Platform; import net.sf.openrocket.gui.dialogs.AboutDialog; import net.sf.openrocket.gui.dialogs.preferences.PreferencesDialog; import net.sf.openrocket.gui.main.BasicFrame; +import net.sf.openrocket.gui.main.MRUDesignFile; import javax.swing.*; @@ -31,6 +34,14 @@ final class OSXSetup { // The image resource to use for the Dock Icon private static final String ICON_RSRC = "/pix/icon/icon-256.png"; + + /** + * The handler for file associations + */ + public static final OpenFilesHandler OPEN_FILE_HANDLER = (e) -> { + log.info("Opening file from association: " + e.getFiles().get(0)); + BasicFrame.open(e.getFiles().get(0), null); + }; /** * The handler for the Quit item in the OSX app menu @@ -81,6 +92,7 @@ final class OSXSetup { // Set handlers osxDesktop.setAboutHandler(ABOUT_HANDLER); + osxDesktop.setOpenFileHandler(OPEN_FILE_HANDLER); osxDesktop.setPreferencesHandler(PREFERENCES_HANDLER); osxDesktop.setQuitHandler(QUIT_HANDLER);