From 3603b045cee533bbdc629d592c6cff56923eb857 Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Mon, 12 Oct 2015 04:26:18 +0200 Subject: Only enable keystore option if keystore file exists --- .../at/asit/pdfover/gui/workflow/states/BKUSelectionState.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src/main/java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java index 64816edc..af9e9d15 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java @@ -16,6 +16,8 @@ package at.asit.pdfover.gui.workflow.states; //Imports +import java.io.File; + import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -54,8 +56,11 @@ public class BKUSelectionState extends State { getStateMachine().getGUIProvider().createComposite(BKUSelectionComposite.class, SWT.RESIZE, this); } - this.selectionComposite.setKeystoreEnabled( - getStateMachine().getConfigProvider().getKeyStoreEnabled()); + if (getStateMachine().getConfigProvider().getKeyStoreEnabled()) { + File ks = new File(getStateMachine().getConfigProvider().getKeyStoreFile()); + this.selectionComposite.setKeystoreEnabled(ks.exists()); + } else + this.selectionComposite.setKeystoreEnabled(false); return this.selectionComposite; } -- cgit v1.2.3