From 5ba3fb314a8fb3a8237a612bcf8f1d2233d413f4 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:23:29 +0000 Subject: + fixed last TODOs git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@294 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/composites/ConfigurationComposite.java | 2 +- .../pdfover/gui/workflow/states/OutputState.java | 13 +- .../gui/workflow/states/PositioningState.java | 3 +- .../gui/workflow/states/PrepareSigningState.java | 2 - .../pdfover/gui/workflow/states/SigningState.java | 5 +- .../at/asit/pdfover/gui/messages_en.properties | 136 ++++++++++++++++++++- 6 files changed, 151 insertions(+), 10 deletions(-) mode change 120000 => 100644 pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties (limited to 'pdf-over-gui/src') 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 f9ff5b7f..63372f63 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 @@ -193,7 +193,7 @@ public class ConfigurationComposite extends StateComposite { this.simpleConfigComposite.setSigner(getSigner()); } if (this.advancedConfigComposite != null) { - // TODO: not needed + // not needed at the moment this.advancedConfigComposite.setSigner(getSigner()); } } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java index 64df41f6..34b52a21 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java @@ -23,8 +23,13 @@ import org.eclipse.swt.SWT; import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.composites.OutputComposite; +import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.controls.Dialog.BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; +import at.asit.pdfover.signator.SignatureException; +import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException; /** * Procduces the output of the signature process. (save file, open file) @@ -64,7 +69,13 @@ public class OutputState extends State { Status status = this.stateMachine.getStatus(); if (status.getSignResult() == null) { - // TODO + ErrorDialog error = new ErrorDialog(this.stateMachine.getGUIProvider().getMainShell(), + Messages.getString("error.Signatur"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$ + if(error.open() == SWT.RETRY) { + this.setNextState(new PrepareSigningState(this.stateMachine)); + } else { + this.setNextState(new BKUSelectionState(this.stateMachine)); + } return; } 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 0c6b2c8b..2d610f24 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 @@ -102,8 +102,7 @@ public class PositioningState extends State { PositioningComposite position = null; try { position = this.getPositioningComposite(); - } catch (IOException e) { - // FIXME + } catch (IOException e) { this.positionComposite = null; log.error("Failed to display PDF document", e); //$NON-NLS-1$ String message = e.getLocalizedMessage(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index 803590e7..c58417ac 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -167,8 +167,6 @@ public class PrepareSigningState extends State { if(error.open() == SWT.RETRY) { this.stateMachine.update(); } else { - // FIXME: exit? - //this.stateMachine.exit(); this.setNextState(new BKUSelectionState(this.stateMachine)); } return; diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java index 70a5a9d0..87201e2f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java @@ -100,10 +100,9 @@ public class SigningState extends State { message, BUTTONS.RETRY_CANCEL); this.threadException = null; if(error.open() == SWT.RETRY) { - this.setNextState(new BKUSelectionState(this.stateMachine)); + this.setNextState(new PrepareSigningState(this.stateMachine)); } else { - // FIXME: Exit? - this.stateMachine.exit(); + this.setNextState(new BKUSelectionState(this.stateMachine)); } return; } diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties deleted file mode 120000 index 31a92d3b..00000000 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties +++ /dev/null @@ -1 +0,0 @@ -messages.properties \ No newline at end of file diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties new file mode 100644 index 00000000..3f86ed1d --- /dev/null +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties @@ -0,0 +1,135 @@ +#Eclipse messages class +#Tue Oct 23 16:04:42 CEST 2012 +BKU.LOCAL=Local CCE +BKU.MOBILE=Mobile CCE +BKU.NONE=no default +BKUSelectionComposite.btnMobile.text=MOBILE +TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection +advanced_config.AutoPosition=Automatic positioning +advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature +advanced_config.BKUSelection_Title=CC&E Selection +advanced_config.BKUSelection_ToolTip=Select the default CCE to use during signature +advanced_config.LocaleSelection_Title=Interface &language selection +advanced_config.LocaleSelection_ToolTip=Select the interface language for PDF-Over +advanced_config.OutputFolder=Default output folder: +advanced_config.OutputFolder.Dialog=Select a folder +advanced_config.OutputFolder.Dialog_Title=Select Output folder +advanced_config.OutputFolder_Title=&Output location +advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory) +advanced_config.Signature_Title=Si&gnature +advanced_config.SigPHTransparency=Signature placeholder transparency +advanced_config.SigPHTransparencyMax=Opaque +advanced_config.SigPHTransparencyMin=Invisible +advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step +argument.error.output=is not a directory +argument.help.bku=Select the CCE to use. Values are: LOCAL, MOBILE. Example: -b