diff options
author | Tobias Kellner <imcybot@gmail.com> | 2015-10-12 04:26:18 +0200 |
---|---|---|
committer | Tobias Kellner <imcybot@gmail.com> | 2015-10-12 04:26:18 +0200 |
commit | 3603b045cee533bbdc629d592c6cff56923eb857 (patch) | |
tree | 57d27a493a89dee212c4972e80fa25199861b212 /pdf-over-gui/src/main/java/at/asit | |
parent | 2c61afd4baa2f542247d3360f921628d5d8e97a5 (diff) | |
download | pdf-over-3603b045cee533bbdc629d592c6cff56923eb857.tar.gz pdf-over-3603b045cee533bbdc629d592c6cff56923eb857.tar.bz2 pdf-over-3603b045cee533bbdc629d592c6cff56923eb857.zip |
Only enable keystore option if keystore file exists
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/BKUSelectionState.java | 9 |
1 files changed, 7 insertions, 2 deletions
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; } |