diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
2 files changed, 30 insertions, 0 deletions
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) { |