Show version in frame title when auto-update is not supported (e.g. MSI package)
This commit is contained in:
parent
699795e1d8
commit
c0b0c1c8a6
|
@ -103,8 +103,8 @@ public final class Settings {
|
|||
return isApplicationDeployment("mas");
|
||||
}
|
||||
|
||||
public static boolean isInstalled() {
|
||||
return isApplicationDeployment("mas", "appx", "snap", "msi", "spk", "aur");
|
||||
public static boolean isAutoUpdateEnabled() {
|
||||
return isApplicationDeployment("mas", "appx", "snap", "spk", "aur");
|
||||
}
|
||||
|
||||
private static boolean isApplicationDeployment(String... ids) {
|
||||
|
|
|
@ -52,7 +52,7 @@ public class MainFrame extends JFrame {
|
|||
private HeaderPanel headerPanel;
|
||||
|
||||
public MainFrame(PanelBuilder[] panels) {
|
||||
super(isInstalled() ? getApplicationName() : String.format("%s %s", getApplicationName(), getApplicationVersion()));
|
||||
super(isAutoUpdateEnabled() ? getApplicationName() : String.format("%s %s", getApplicationName(), getApplicationVersion()));
|
||||
|
||||
selectionList = new PanelSelectionList(panels);
|
||||
headerPanel = new HeaderPanel();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package net.filebot.ui;
|
||||
|
||||
import static net.filebot.Settings.*;
|
||||
|
||||
import java.awt.Dimension;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
|
@ -14,7 +12,7 @@ import net.miginfocom.swing.MigLayout;
|
|||
public class SinglePanelFrame extends JFrame {
|
||||
|
||||
public SinglePanelFrame(PanelBuilder builder) {
|
||||
super(String.format("%s %s", getApplicationName(), builder.getName()));
|
||||
super(builder.getName());
|
||||
JComponent panel = builder.create();
|
||||
|
||||
JComponent c = (JComponent) getContentPane();
|
||||
|
|
Loading…
Reference in New Issue