diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-10-05 11:39:07 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-10-05 11:39:07 +0200 |
commit | 4269338d2e11028a880c99eb906c93a397fd0c1f (patch) | |
tree | af3ab0f0988fe088e81fc946c38cf47fbaf47e07 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration | |
parent | d6f4b34eae2e977cdd0339fb17302976fdae0574 (diff) | |
download | pdf-over-4269338d2e11028a880c99eb906c93a397fd0c1f.tar.gz pdf-over-4269338d2e11028a880c99eb906c93a397fd0c1f.tar.bz2 pdf-over-4269338d2e11028a880c99eb906c93a397fd0c1f.zip |
FIDO2 support once again
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java | 59 |
1 files changed, 9 insertions, 50 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 35b73e7b..b4675e2a 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 @@ -47,6 +47,7 @@ public class AboutComposite extends ConfigurationCompositeBase { this.lnkAbout = new Link(this, SWT.WRAP); SWTUtils.anchor(lnkAbout).top(0,5).right(100,-5).left(0,5); SWTUtils.setFontHeight(lnkAbout, Constants.TEXT_SIZE_NORMAL); + SWTUtils.addSelectionListener(lnkAbout, (e) -> { SWTUtils.openURL(Messages.getString("config.LicenseURL")); }); this.lblDataProtection = new Label(this, SWT.WRAP); SWTUtils.anchor(lblDataProtection).top(lnkAbout, 15).left(0,5).right(100,-5); @@ -56,6 +57,7 @@ public class AboutComposite extends ConfigurationCompositeBase { this.lnkDataProtection = new Link(this, SWT.WRAP); SWTUtils.anchor(lnkDataProtection).top(lblDataProtection,10).left(0,5).right(100,-5); SWTUtils.setFontHeight(lnkDataProtection, Constants.TEXT_SIZE_NORMAL); + SWTUtils.addSelectionListener(lnkDataProtection, (e) -> { SWTUtils.openURL(Messages.getString("config.DataProtectionURL")); }); this.lnkUpdateCheckStatus = new Link(this, SWT.NONE); SWTUtils.anchor(lnkUpdateCheckStatus).bottom(100, -5).left(0,5); @@ -84,56 +86,13 @@ public class AboutComposite extends ConfigurationCompositeBase { SWTUtils.reanchor(lnkDataProtection).bottom(btnUpdateCheck,-5); - this.lnkAbout.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - try { - URI url = new URI(Messages.getString("config.LicenseURL")); - log.debug("Trying to open " + url.toString()); - if (Desktop.isDesktopSupported()) { - Desktop.getDesktop().browse(url); - } else { - log.info("AWT Desktop is not supported on this platform"); - Program.launch(url.toString()); - } - } catch (IOException ex) { - log.error("AboutComposite: ", ex); - } catch (URISyntaxException ex) { - log.error("AboutComposite: ", ex); - } - } - }); - - this.lnkDataProtection.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - try { - URI url = new URI(Messages.getString("config.DataProtectionURL")); - log.debug("Trying to open " + url.toString()); - if (Desktop.isDesktopSupported()) { - Desktop.getDesktop().browse(url); - } else { - log.info("AWT Desktop is not supported on this platform"); - Program.launch(url.toString()); - } - } catch (IOException ex) { - log.error("AboutComposite: ", ex); - } catch (URISyntaxException ex) { - log.error("AboutComposite: ", ex); - } - } - }); - - this.btnOpenLogDirectory.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - try - { - if (Desktop.isDesktopSupported()) - Desktop.getDesktop().open(new File(Constants.CONFIG_DIRECTORY + File.separator + "logs")); - } catch (Exception ex) { - log.warn("Failed to open log directory: ", ex); - } + SWTUtils.addSelectionListener(btnOpenLogDirectory, (e) -> { + try + { + if (Desktop.isDesktopSupported()) + Desktop.getDesktop().open(new File(Constants.CONFIG_DIRECTORY + File.separator + "logs")); + } catch (Exception ex) { + log.warn("Failed to open log directory: ", ex); } }); |