summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java20
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java29
2 files changed, 18 insertions, 31 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
index 9134e490..af3911bf 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java
@@ -28,6 +28,7 @@ public class AboutComposite extends ConfigurationCompositeBase {
private Link lnkAbout;
private Link lnkDataProtection;
private Label lblDataProtection;
+ private Button btnUpdateCheck;
private Button btnOpenLogDirectory;
/**
* @param parent
@@ -51,6 +52,11 @@ public class AboutComposite extends ConfigurationCompositeBase {
SWTUtils.anchor(lnkDataProtection).top(lblDataProtection,10).left(0,5).right(100,-5).set();
SWTUtils.setFontHeight(lnkDataProtection, Constants.TEXT_SIZE_NORMAL);
+ this.btnUpdateCheck = new Button(this, SWT.CHECK);
+ SWTUtils.anchor(btnUpdateCheck).bottom(100,-5).left(0,5).set();
+ SWTUtils.setFontHeight(btnUpdateCheck, Constants.TEXT_SIZE_BUTTON);
+ SWTUtils.addSelectionListener(btnUpdateCheck, e -> { this.configurationContainer.updateCheck = btnUpdateCheck.getSelection(); });
+
this.btnOpenLogDirectory = new Button(this, SWT.NONE);
SWTUtils.anchor(btnOpenLogDirectory).bottom(100, -5).right(100, -5).set();
SWTUtils.setFontHeight(btnOpenLogDirectory, Constants.TEXT_SIZE_BUTTON);
@@ -129,17 +135,25 @@ public class AboutComposite extends ConfigurationCompositeBase {
SWTUtils.setLocalizedText(lnkAbout, "config.AboutText");
SWTUtils.setLocalizedText(lblDataProtection, "config.DataProtection");
SWTUtils.setLocalizedText(lnkDataProtection, "config.DataProtectionStatement");
+ SWTUtils.setLocalizedText(btnUpdateCheck, "advanced_config.UpdateCheck");
+ SWTUtils.setLocalizedToolTipText(btnUpdateCheck, "advanced_config.UpdateCheck_ToolTip");
SWTUtils.setLocalizedText(btnOpenLogDirectory, "config.ShowLogDirectory");
}
@Override
- public void initConfiguration(ConfigurationManager provider) {}
+ public void initConfiguration(ConfigurationManager provider) {
+ this.configurationContainer.updateCheck = provider.getUpdateCheck();
+ }
@Override
- public void loadConfiguration() {}
+ public void loadConfiguration() {
+ btnUpdateCheck.setSelection(this.configurationContainer.updateCheck);
+ }
@Override
- public void storeConfiguration(ConfigurationManager store) {}
+ public void storeConfiguration(ConfigurationManager store) {
+ store.setUpdateCheckPersistent(this.configurationContainer.updateCheck);
+ }
@Override
public void validateSettings(int resumeFrom) throws Exception {}
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 2d6efb6b..38933819 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
@@ -95,9 +95,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
private final Group grpLocaleAuswahl;
Combo cmbLocaleAuswahl;
- private Group grpUpdateCheck;
- Button btnUpdateCheck;
-
private Group grpProxy;
private Label lblProxyHost;
private Text txtProxyHost;
@@ -125,14 +122,9 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
STANDARD_LAYOUT.marginHeight = 10;
STANDARD_LAYOUT.marginWidth = 5;
- this.grpUpdateCheck = new Group(this, SWT.NONE);
- this.grpUpdateCheck.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpUpdateCheck).top(0, 5).left(0,5).right(100,-5).set();
- SWTUtils.setFontHeight(grpUpdateCheck, Constants.TEXT_SIZE_NORMAL);
-
this.grpLocaleAuswahl = new Group(this, SWT.NONE);
this.grpLocaleAuswahl.setLayout(STANDARD_LAYOUT);
- SWTUtils.anchor(grpLocaleAuswahl).top(grpUpdateCheck, 5).left(0,5).right(100,-5).set();
+ SWTUtils.anchor(grpLocaleAuswahl).top(0, 5).left(0,5).right(100,-5).set();
SWTUtils.setFontHeight(grpLocaleAuswahl, Constants.TEXT_SIZE_NORMAL);
this.grpSignatur = new Group(this, SWT.NONE);
@@ -275,11 +267,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
}
});
- this.btnUpdateCheck = new Button(this.grpUpdateCheck, SWT.CHECK);
- SWTUtils.anchor(btnUpdateCheck).right(100,-5).top(0).left(0,5).set();
- SWTUtils.setFontHeight(btnUpdateCheck, Constants.TEXT_SIZE_BUTTON);
- SWTUtils.addSelectionListener(btnUpdateCheck, e -> { performUpdateCheckSelection(btnUpdateCheck.getSelection()); });
-
this.lblProxyHost = new Label(this.grpProxy, SWT.NONE);
do { /* grid positioning */
GridData gd_lblProxyHost = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
@@ -467,11 +454,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
}
}
- void performUpdateCheckSelection(boolean checkUpdate) {
- this.configurationContainer.updateCheck = checkUpdate;
- this.btnUpdateCheck.setSelection(checkUpdate);
- }
-
void processProxyHostChanged() {
try {
this.proxyHostErrorMarker.setVisible(false);
@@ -546,8 +528,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
this.configurationContainer.interfaceLocale = provider.getInterfaceLocale();
- this.configurationContainer.updateCheck = provider.getUpdateCheck();
-
this.configurationContainer.proxyHost = provider.getProxyHostPersistent();
try {
this.configurationContainer.setProxyPort(provider.getProxyPortPersistent());
@@ -586,7 +566,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
performLocaleSelectionChanged(this.configurationContainer.interfaceLocale);
performPdfACompatSelection(this.configurationContainer.signaturePDFACompat);
performKeystoreEnabledSelection(this.configurationContainer.keystoreEnabled);
- performUpdateCheckSelection(this.configurationContainer.updateCheck);
performSetSignatureProfile(this.configurationContainer.getSignatureProfile());
int port = this.configurationContainer.getProxyPort();
@@ -634,8 +613,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
store.setSaveFilePostFixPersistent(this.configurationContainer.saveFilePostFix);
store.setInterfaceLocalePersistent(this.configurationContainer.interfaceLocale);
- store.setUpdateCheckPersistent(this.configurationContainer.updateCheck);
-
store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile());
String hostOld = store.getProxyHostPersistent();
@@ -745,10 +722,6 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase {
SWTUtils.setLocalizedText(grpLocaleAuswahl, "advanced_config.LocaleSelection_Title");
SWTUtils.setLocalizedToolTipText(cmbLocaleAuswahl, "advanced_config.LocaleSelection_ToolTip");
- SWTUtils.setLocalizedText(grpUpdateCheck, "advanced_config.UpdateCheck_Title");
- SWTUtils.setLocalizedText(btnUpdateCheck, "advanced_config.UpdateCheck");
- SWTUtils.setLocalizedToolTipText(btnUpdateCheck, "advanced_config.UpdateCheck_ToolTip");
-
SWTUtils.setLocalizedText(grpProxy, "advanced_config.Proxy_Title");
SWTUtils.setLocalizedText(lblProxyHost, "advanced_config.ProxyHost");
SWTUtils.setLocalizedToolTipText(txtProxyHost, "advanced_config.ProxyHost_ToolTip");