From f28f118f6824c0a9c7b4816dfdb95339d874141d Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 17 Nov 2022 12:18:43 +0100 Subject: eliminate interdepdency between config tabs --- .../AdvancedConfigurationComposite.java | 22 ---------------------- .../SimpleConfigurationComposite.java | 3 --- .../pdfover/gui/workflow/states/OpenState.java | 3 ++- 3 files changed, 2 insertions(+), 26 deletions(-) (limited to 'pdf-over-gui') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java index 6d1a85d2..df1a809b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java @@ -527,7 +527,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { } this.configurationContainer.proxyUser = provider.getProxyUserPersistent(); this.configurationContainer.proxyPass = provider.getProxyPassPersistent(); - this.configurationContainer.setSignatureProfile(provider.getSignatureProfile()); } /* @@ -552,7 +551,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { performLocaleSelectionChanged(this.configurationContainer.interfaceLocale); performPdfACompatSelection(this.configurationContainer.signaturePDFACompat); performKeystoreEnabledSelection(this.configurationContainer.keystoreEnabled); - performSetSignatureProfile(this.configurationContainer.getSignatureProfile()); int port = this.configurationContainer.getProxyPort(); if (port > 0) { @@ -566,24 +564,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { } - /** - * @param profile - * - */ - public void performSetSignatureProfile(Profile profile) { - switch (profile) { - case INVISIBLE: - this.performPositionSelection(true); - this.btnAutomatischePositionierung.setEnabled(false); - this.btnEnablePlaceholderUsage.setEnabled(false); - this.performEnableUsePlaceholder(false); - break; - default: - this.btnAutomatischePositionierung.setEnabled(true); - this.btnEnablePlaceholderUsage.setEnabled(true); - } - } - @Override public void storeConfiguration(ConfigurationManager store) { store.setAutoPositionSignaturePersistent(this.configurationContainer.autoPositionSignature); @@ -599,8 +579,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { store.setSaveFilePostFixPersistent(this.configurationContainer.saveFilePostFix); store.setInterfaceLocalePersistent(this.configurationContainer.interfaceLocale); - store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile()); - String hostOld = store.getProxyHostPersistent(); String hostNew = this.configurationContainer.proxyHost; if (hostOld != null && !hostOld.isEmpty() && (hostNew == null || hostNew.isEmpty())) { diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java index a1d43f07..2947c387 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java @@ -556,9 +556,6 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { this.configurationContainer.setSignatureProfile(newProfile); this.cmbSignatureProfiles.select(newProfile.ordinal()); - if (newProfile.equals(Profile.AMTSSIGNATURBLOCK) || newProfile.equals(Profile.INVISIBLE)){ - this.configurationContainer.autoPositionSignature = true; - } if (txtSignatureNote.getText().equals(getDefaultSignatureBlockNoteTextFor(oldProfile, null))) txtSignatureNote.setText(getDefaultSignatureBlockNoteTextFor(newProfile, null)); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java index 4d881496..12b16da7 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java @@ -40,6 +40,7 @@ import at.asit.pdfover.gui.PlaceholderSelectionGui; import at.asit.pdfover.gui.composites.DataSourceSelectComposite; import at.asit.pdfover.gui.utils.SWTUtils; import at.asit.pdfover.commons.Messages; +import at.asit.pdfover.commons.Profile; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.gui.workflow.config.ConfigurationManager; @@ -88,7 +89,7 @@ public class OpenState extends State { && !(status.getPreviousState() instanceof OpenState)) { status.bku = config.getDefaultBKU(); status.document = null; - status.signaturePosition = config.getAutoPositionSignature() ? (new SignaturePosition()) : null; + status.signaturePosition = ((config.getSignatureProfile() == Profile.INVISIBLE) || config.getAutoPositionSignature()) ? (new SignaturePosition()) : null; /* ensure that files get closed */ status.getPreviousState().cleanUp(); -- cgit v1.2.3