summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:17:22 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:17:22 +0000
commitf057a36be9a0eec61c4da3a401df9be067458a84 (patch)
tree7dfc31e5395d884620127092211ca7e210deb32e /pdf-over-gui
parent85c0d6dc8e2b2ca9ef377b0a2416ae99f33055e0 (diff)
downloadpdf-over-f057a36be9a0eec61c4da3a401df9be067458a84.tar.gz
pdf-over-f057a36be9a0eec61c4da3a401df9be067458a84.tar.bz2
pdf-over-f057a36be9a0eec61c4da3a401df9be067458a84.zip
+ error message if manual positioning fails ...
+ fixed mac start script + fixed signature block size with auto positioning git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@239 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java1
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java13
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java17
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties1
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties1
-rw-r--r--pdf-over-gui/src/main/resources/scripts/pdfover_mac.sh4
6 files changed, 34 insertions, 3 deletions
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 8d633517..a35ee59e 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
@@ -184,7 +184,6 @@ public class MainWindow {
this.btn_sign.setText(Messages.getString("main.signature")); //$NON-NLS-1$
this.btn_sign.setToolTipText(Messages.getString("main.signature")); //$NON-NLS-1$
-
this.btn_end.setText(Messages.getString("main.done")); //$NON-NLS-1$
this.btn_end.setToolTipText(Messages.getString("main.done")); //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index d877cdcf..02a476be 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
@@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.MainWindow.Buttons;
import at.asit.pdfover.gui.MainWindowBehavior;
+import at.asit.pdfover.gui.Messages;
import at.asit.pdfover.gui.composites.PositioningComposite;
import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS;
@@ -108,6 +109,18 @@ public class PositioningState extends State {
this.setNextState(new OpenState(this.stateMachine));
}
return;
+ } catch(Exception ex) {
+ log.error("Failed to create composite (seems like a mac ...)", ex); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(
+ this.stateMachine.getGUIProvider().getMainShell(),
+ Messages.getString("error.PositioningNotPossible"), ERROR_BUTTONS.OK); //$NON-NLS-1$
+ dialog.open();
+
+ status.setSignaturePosition(new SignaturePosition());
+
+ this.setNextState(new BKUSelectionState(this.stateMachine));
+
+ return;
}
this.stateMachine.getGUIProvider().display(position);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
index 29a17ad9..b305700c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java
@@ -204,6 +204,23 @@ public class PrepareConfigurationState extends State {
"Failed to create local configuration directory!", //$NON-NLS-1$
e);
}
+
+ // initialize from config file
+ this.initializeFromConfigurationFile(this.stateMachine
+ .getConfigProvider().getConfigurationFile());
+
+ this.stateMachine.getConfigManipulator().setSignatureNote(Messages.getString("simple_config.Note_Default")); //$NON-NLS-1$
+
+ try {
+ this.stateMachine.getConfigManipulator().saveCurrentConfiguration();
+ } catch (IOException e) {
+ log.error(
+ "Failed to set local configuration signature note!", e); //$NON-NLS-1$
+ throw new InitializationException(
+ "Failed to set local configuration signature note!", //$NON-NLS-1$
+ e);
+ }
+
allOK = true;
} finally {
if (!allOK) {
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 ed8c666f..a0510ec9 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
@@ -81,6 +81,7 @@ error.Unexpected=Unexpected Error
error.title=Error
error.MayNotBeAPDF=This may not be a PDF File
error.InvalidLocale=Locale not valid
+error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning.
exception.InvalidEmblemFile=%s is an invalid signature logo file!
exception.InvalidPort=%s is invalid: has to be a number between %d and %d
exception.PasswordTooLong=Given password is too long!
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 af4cc6c6..df95a8fb 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
@@ -81,6 +81,7 @@ error.Unexpected=Unerwarteter Fehler
error.title=Fehler
error.MayNotBeAPDF=Dies ist möglicherweise keine PDF Datei
error.InvalidLocale=Ungültige Sprache
+error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verfügbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
exception.InvalidEmblemFile=%s ist eine ungültige Bildmarken-Datei!
exception.InvalidPort=%s ist ungültig: muss eine Nummer zwischen %d und %d sein.
exception.PasswordTooLong=Eingegebenes Passwort ist zu lange!
diff --git a/pdf-over-gui/src/main/resources/scripts/pdfover_mac.sh b/pdf-over-gui/src/main/resources/scripts/pdfover_mac.sh
index a3f0e8da..c7be27d4 100644
--- a/pdf-over-gui/src/main/resources/scripts/pdfover_mac.sh
+++ b/pdf-over-gui/src/main/resources/scripts/pdfover_mac.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-BASEDIR=`dirname $0`
-(cd $BASEDIR/.. && exec java -XstartOnFirstThread -cp "lib/*" at.asit.pdfover.gui.Main "$@")
+BASEDIR=$(cd "$(dirname "$0")"; pwd)
+(cd $BASEDIR/PDFOver/Contents && exec java -XstartOnFirstThread -cp "lib/*" at.asit.pdfover.gui.Main "$@")