* show version number in window title for non-installed / portable profiles
This commit is contained in:
parent
f1685b50e3
commit
229ad65aab
|
@ -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;
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MainFrame extends JFrame {
|
|||
private static final PreferencesEntry<String> 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
|
||||
|
|
Loading…
Reference in New Issue