diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2016-09-22 17:28:56 +0200 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2016-09-22 17:28:56 +0200 |
commit | 1f614332bcd103229f15f51157a52824005fba96 (patch) | |
tree | 609a6a75d24533114e1312b6352d3a10a3a7b160 /pdf-over-gui | |
parent | 2565c41884ab83529707d6421a09bf110bdafba7 (diff) | |
download | mocca-1f614332bcd103229f15f51157a52824005fba96.tar.gz mocca-1f614332bcd103229f15f51157a52824005fba96.tar.bz2 mocca-1f614332bcd103229f15f51157a52824005fba96.zip |
Automatically update signature note when changing language if it's the default
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java | 2 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java index c0d06b7c..32ad1741 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java @@ -144,7 +144,7 @@ public class ATrustHandler extends MobileBKUHandler { status.setErrorMessage(null); if (responseData.contains("ExpiresInfo.aspx?sid=")) { //$NON-NLS-1$ - // Certification expiration interstitial - skip + // Certificate expiration interstitial - skip String notice = Messages.getString("mobileBKU.notice") + " " + //$NON-NLS-1$ //$NON-NLS-2$ StringEscapeUtils.unescapeHtml4(MobileBKUHelper.extractContentFromTagWithParam(responseData, "span", "id", "Label2")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ .replaceAll("\\<.*?\\>", ""); //$NON-NLS-1$ //$NON-NLS-2$ 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 d02d9258..a124c86d 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 @@ -427,7 +427,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { SUPPORTED_LOCALES[SimpleConfigurationComposite.this.cmbSignatureLang .getSelectionIndex()]; if (!currentLocale.equals(selectedLocale)) { - performSignatureLangSelectionChanged(selectedLocale); + performSignatureLangSelectionChanged(selectedLocale, currentLocale); } } }); @@ -682,10 +682,17 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { return 0; } - void performSignatureLangSelectionChanged(Locale selected) { + void performSignatureLangSelectionChanged(Locale selected, Locale previous) { log.debug("Selected Sign Locale: " + selected); //$NON-NLS-1$ this.configurationContainer.setSignatureLocale(selected); this.cmbSignatureLang.select(this.getLocaleElementIndex(selected)); + if (previous != null) { + String prev_default_note = Messages.getString("simple_config.Note_Default", previous); //$NON-NLS-1$ + if (this.txtSignatureNote.getText().equals(prev_default_note)) { + this.txtSignatureNote.setText(Messages.getString("simple_config.Note_Default", selected)); //$NON-NLS-1$); + processSignatureNoteChanged(); + } + } } /* @@ -792,7 +799,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.setVisibleImage(); - this.performSignatureLangSelectionChanged(this.configurationContainer.getSignatureLocale()); + this.performSignatureLangSelectionChanged(this.configurationContainer.getSignatureLocale(), null); } /* (non-Javadoc) |