diff --git a/source/net/filebot/Settings.java b/source/net/filebot/Settings.java index 2270ea1b..9a609dad 100644 --- a/source/net/filebot/Settings.java +++ b/source/net/filebot/Settings.java @@ -74,16 +74,33 @@ public final class Settings { return Boolean.parseBoolean(System.getProperty("useCreationDate")); } - public static boolean isMacApp() { - return "mas".equals(getApplicationDeployment()) || "app".equals(getApplicationDeployment()); + public static String getApplicationDeployment() { + return System.getProperty("application.deployment"); } public static boolean isAppStore() { - return "mas".equals(getApplicationDeployment()) || "usc".equals(getApplicationDeployment()); + return isApplicationDeployment("mas", "usc"); + } + + public static boolean isMacApp() { + return isApplicationDeployment("mas", "app"); } public static boolean isMacSandbox() { - return "mas".equals(getApplicationDeployment()); + return isApplicationDeployment("mas"); + } + + public static boolean isInstalled() { + return isApplicationDeployment("mas", "usc", "msi", "spk", "aur"); + } + + private static boolean isApplicationDeployment(String... ids) { + String current = getApplicationDeployment(); + for (String id : ids) { + if (current != null && current.equals(id)) + return true; + } + return false; } public static FileChooser getPreferredFileChooser() { @@ -103,10 +120,6 @@ public final class Settings { return Runtime.getRuntime().availableProcessors(); } - public static String getApplicationDeployment() { - return System.getProperty("application.deployment"); - } - public static File getApplicationFolder() { String applicationFolderPath = System.getProperty("application.dir"); File applicationFolder = null; diff --git a/source/net/filebot/ui/MainFrame.java b/source/net/filebot/ui/MainFrame.java index d8ae45d2..80bffe21 100644 --- a/source/net/filebot/ui/MainFrame.java +++ b/source/net/filebot/ui/MainFrame.java @@ -61,7 +61,7 @@ public class MainFrame extends JFrame { private static final PreferencesEntry persistentSelectedPanel = Settings.forPackage(MainFrame.class).entry("panel.selected").defaultValue("0"); public MainFrame() { - super(Settings.getApplicationName()); + super(Settings.isInstalled() ? Settings.getApplicationName() : Settings.getApplicationIdentifier()); try { // restore selected panel