diff options
author | Andreas Abraham <andreas.abraham@egiz.gv.at> | 2021-09-13 14:57:00 +0200 |
---|---|---|
committer | Andreas Abraham <andreas.abraham@egiz.gv.at> | 2021-09-13 14:57:00 +0200 |
commit | dd6f9d619008b4e3bcd5b163a25d3cf91836bf03 (patch) | |
tree | 91930db3e5fe5eb445ee95f4499ebed0da2cd1f1 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites | |
parent | f2fc62bd1d2dd0dc9660375890c28af5cbb5b00a (diff) | |
download | pdf-over-dd6f9d619008b4e3bcd5b163a25d3cf91836bf03.tar.gz pdf-over-dd6f9d619008b4e3bcd5b163a25d3cf91836bf03.tar.bz2 pdf-over-dd6f9d619008b4e3bcd5b163a25d3cf91836bf03.zip |
fixed issue 43
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index 2ec6d80c..abed9e93 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -753,9 +753,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { void alignSignatureNoteTextToProfile(Profile profile){ if (detectChanges(profile) == false){ - this.txtSignatureNote.setText(getSignatureBlockNoteTextAccordingToProfile(profile)); + this.txtSignatureNote.setText(getSignatureBlockNoteTextAccordingToProfile(profile, SimpleConfigurationComposite.this.configurationContainer.getSignatureLocale())); this.configurationContainer.setSignatureNote( - Messages.getString(getSignatureBlockNoteTextAccordingToProfile(profile)) + Messages.getString(getSignatureBlockNoteTextAccordingToProfile(profile, SimpleConfigurationComposite.this.configurationContainer.getSignatureLocale())) ); } @@ -765,29 +765,19 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { String note = this.txtSignatureNote.getText(); note = note.replace("!",""); - if (note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.AMTSSIGNATURBLOCK)) || - note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.SIGNATURBLOCK_SMALL)) || - note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.INVISIBLE)) || - note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.BASE_LOGO))){ + if (note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.AMTSSIGNATURBLOCK, SimpleConfigurationComposite.this.configurationContainer.getSignatureLocale())) || + note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.SIGNATURBLOCK_SMALL, SimpleConfigurationComposite.this.configurationContainer.getSignatureLocale())) || + note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.INVISIBLE, SimpleConfigurationComposite.this.configurationContainer.getSignatureLocale())) || + note.equals(getSignatureBlockNoteTextAccordingToProfile(Profile.BASE_LOGO, SimpleConfigurationComposite.this.configurationContainer.getSignatureLocale()))){ return false; } return true; } - //TODO FIX ME - String getSignatureBlockNoteTextAccordingToProfile(Profile profile, Locale locale){ - if (profile.equals(Profile.SIGNATURBLOCK_SMALL)){ - return Messages.getString("simple_config.Note_Default_Standard", locale); - } else if (profile.equals(Profile.AMTSSIGNATURBLOCK)){ - return Messages.getString("simple_config.Note_Default_OfficialSignature", locale); - } else { - return ""; - } - } - String getSignatureBlockNoteTextAccordingToProfile(Profile profile){ - return getSignatureBlockNoteTextAccordingToProfile(profile, this.configurationContainer.getSignatureLocale()); + String getSignatureBlockNoteTextAccordingToProfile(Profile profile, Locale signatureLocale){ + return Profile.getSignatureBlockNoteTextAccordingToProfile(profile, this.configurationContainer.getSignatureLocale()); } void setSignatureProfileSetting(){ |