Show version in frame title when auto-update is not supported (e.g. MSI package)

This commit is contained in:
Reinhard Pointner 2017-02-11 01:05:41 +08:00
parent 699795e1d8
commit c0b0c1c8a6
3 changed files with 4 additions and 6 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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();