mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-13 21:05:01 -05:00
* 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"));
|
return Boolean.parseBoolean(System.getProperty("useCreationDate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isMacApp() {
|
public static String getApplicationDeployment() {
|
||||||
return "mas".equals(getApplicationDeployment()) || "app".equals(getApplicationDeployment());
|
return System.getProperty("application.deployment");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isAppStore() {
|
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() {
|
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() {
|
public static FileChooser getPreferredFileChooser() {
|
||||||
@ -103,10 +120,6 @@ public final class Settings {
|
|||||||
return Runtime.getRuntime().availableProcessors();
|
return Runtime.getRuntime().availableProcessors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getApplicationDeployment() {
|
|
||||||
return System.getProperty("application.deployment");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static File getApplicationFolder() {
|
public static File getApplicationFolder() {
|
||||||
String applicationFolderPath = System.getProperty("application.dir");
|
String applicationFolderPath = System.getProperty("application.dir");
|
||||||
File applicationFolder = null;
|
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");
|
private static final PreferencesEntry<String> persistentSelectedPanel = Settings.forPackage(MainFrame.class).entry("panel.selected").defaultValue("0");
|
||||||
|
|
||||||
public MainFrame() {
|
public MainFrame() {
|
||||||
super(Settings.getApplicationName());
|
super(Settings.isInstalled() ? Settings.getApplicationName() : Settings.getApplicationIdentifier());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// restore selected panel
|
// restore selected panel
|
||||||
|
Loading…
Reference in New Issue
Block a user