diff options
7 files changed, 14 insertions, 10 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index d95fd000..a9492f0e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -30,6 +30,13 @@ import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUs; */ public class Constants { + /** Application name */ + public static final String APP_NAME = "PDF-Over"; //$NON-NLS-1$ + + static { + // Has to be set before (implicitly) initializing Display + Display.setAppName(APP_NAME); + } /** Current display - used for Colors */ private static Display display = Display.getCurrent(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java index 03b0bfeb..78e22fbb 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java @@ -57,13 +57,13 @@ public class Main { File configDir = new File(Constants.CONFIG_DIRECTORY); if(!configDir.exists()) { configDir.mkdir(); - } - + } + File log4j = new File(configDir.getAbsolutePath() + File.separator + Constants.DEFAULT_LOG4J_FILENAME); if(log4j.exists()) { PropertyConfigurator.configureAndWatch(log4j.getAbsolutePath()); } - + StateMachineImpl stateMachine = new StateMachineImpl(args); log.debug("Starting stateMachine ..."); //$NON-NLS-1$ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index a243a717..e847fd0c 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java @@ -168,7 +168,6 @@ public class MainWindow { * Reload the localization */ public void reloadLocalization() { - getShell().setText(Messages.getString("main.title")); //$NON-NLS-1$ this.btn_config.setText(Messages.getString("main.configuration")); //$NON-NLS-1$ this.btn_config.setToolTipText(Messages.getString("main.configuration")); //$NON-NLS-1$ this.btn_open.setText(Messages.getString("common.open")); //$NON-NLS-1$ @@ -229,7 +228,8 @@ public class MainWindow { catch (SWTError e) { log.debug("Cannot get display", e); //$NON-NLS-1$ } - getShell().setText(Messages.getString("main.title")); //$NON-NLS-1$ + Display.setAppVersion(this.getClass().getPackage().getImplementationVersion()); + getShell().setText(Constants.APP_NAME); getShell().addShellListener(new ShellAdapter() { @Override diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index b4b519f1..0b2bbb05 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -181,7 +181,7 @@ public class ConfigurationComposite extends StateComposite { String version = getClass().getPackage().getImplementationVersion(); version = (version == null ? "" : " v" + version); //$NON-NLS-1$ //$NON-NLS-2$ - getShell().setText(Messages.getString("main.title") + version); //$NON-NLS-1$ + getShell().setText(Constants.APP_NAME + version); this.doLayout(); } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index 324e9a30..d4c391b5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java @@ -25,8 +25,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow; -import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; +import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.config.ConfigManipulator; import at.asit.pdfover.gui.workflow.config.ConfigOverlayManipulator; @@ -172,7 +172,6 @@ public class StateMachineImpl implements StateMachine, GUIProvider { this.display = Display.getDefault(); this.mainWindow = new MainWindow(this); - this.mainWindow.open(); this.shell = this.mainWindow.getShell(); diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index 208b97fc..0f2c5b2f 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -119,7 +119,6 @@ main.configuration=Configuration main.done=Finish main.position=Positioning main.signature=Signing -main.title=PDF-Over mobileBKU.number=Number: mobileBKU.password=Password: mobileBKU.show=<a>Show signature data</a> diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties index 73e63a8c..34840eb8 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties @@ -119,7 +119,6 @@ main.configuration=Konfiguration main.done=Fertig main.position=Positionierung main.signature=Signatur -main.title=PDF-Over mobileBKU.number=Nummer: mobileBKU.password=Passwort: mobileBKU.show=<a>Signaturdaten anzeigen</a> |