From 6422e0c67c1c48f5e79ba4dbbf1839f0c40a8f94 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 13 Nov 2012 14:32:10 +0100 Subject: + fixed last TODOs --- .../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 trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties (limited to 'trunk/pdf-over-gui/src/main') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index f9ff5b7f..63372f63 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/trunk/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/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java index 64df41f6..34b52a21 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java +++ b/trunk/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/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 0c6b2c8b..2d610f24 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/trunk/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/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index 803590e7..c58417ac 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/trunk/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/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java index 70a5a9d0..87201e2f 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java +++ b/trunk/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/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties b/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties deleted file mode 120000 index 31a92d3b..00000000 --- a/trunk/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/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties b/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_en.properties new file mode 100644 index 00000000..3f86ed1d --- /dev/null +++ b/trunk/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