summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java21
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties1
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties1
-rw-r--r--pdf-over-gui/src/main/resources/logback.xml4
4 files changed, 25 insertions, 2 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 7bd64ab4..a0a423c4 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
@@ -1,6 +1,7 @@
package at.asit.pdfover.gui.composites.configuration;
import java.awt.Desktop;
+import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -10,6 +11,7 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
@@ -27,6 +29,7 @@ public class AboutComposite extends ConfigurationCompositeBase {
private Link lnkAbout;
private Link lnkDataProtection;
private Label lblDataProtection;
+ private Button btnOpenLogDirectory;
/**
* @param parent
* @param style
@@ -49,6 +52,10 @@ public class AboutComposite extends ConfigurationCompositeBase {
StateComposite.anchor(lnkDataProtection).top(lblDataProtection,10).left(0,5).right(100,-5).set();
StateComposite.setFontHeight(lnkDataProtection, Constants.TEXT_SIZE_NORMAL);
+ this.btnOpenLogDirectory = new Button(this, SWT.NONE);
+ StateComposite.anchor(btnOpenLogDirectory).bottom(100, -5).right(100, -5).set();
+ StateComposite.setFontHeight(btnOpenLogDirectory, Constants.TEXT_SIZE_BUTTON);
+
this.lnkAbout.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -89,6 +96,19 @@ public class AboutComposite extends ConfigurationCompositeBase {
}
});
+ 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);
+ }
+ }
+ });
+
// Load localized strings
reloadResources();
}
@@ -110,6 +130,7 @@ public class AboutComposite extends ConfigurationCompositeBase {
this.lnkAbout.setText(Messages.getString("config.AboutText")); //$NON-NLS-1$
this.lblDataProtection.setText(Messages.getString("config.DataProtection"));
this.lnkDataProtection.setText(Messages.getString("config.DataProtectionStatement"));
+ this.btnOpenLogDirectory.setText(Messages.getString("config.ShowLogDirectory"));
}
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index 00433fce..8745c8fc 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -123,6 +123,7 @@ config.DataProtectionURL=https://www.a-trust.at/MediaProvider/2357/datenschutzer
config.Advanced=Ad&vanced
config.Keystore=&Keystore
config.Simple=Basi&c
+config.ShowLogDirectory=Show Log Directory
dataSourceSelection.DropLabel=Drag document here
dataSourceSelection.DropLabel2=or...
dataSourceSelection.browse=&Browse for PDF on your computer
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
index 96299f3e..00dd7958 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
@@ -114,6 +114,7 @@ config.DataProtectionURL=https://www.a-trust.at/MediaProvider/2357/datenschutzer
config.Advanced=Er&weitert
config.Keystore=&Keystore
config.Simple=&Einfach
+config.ShowLogDirectory=Logverzeichnis anzeigen
dataSourceSelection.DropLabel=Dokument hierher ziehen
dataSourceSelection.DropLabel2=oder...
dataSourceSelection.browse=&Durchsuchen um ein Dokument zu wählen
diff --git a/pdf-over-gui/src/main/resources/logback.xml b/pdf-over-gui/src/main/resources/logback.xml
index 9d916a92..a2b5155e 100644
--- a/pdf-over-gui/src/main/resources/logback.xml
+++ b/pdf-over-gui/src/main/resources/logback.xml
@@ -8,14 +8,14 @@
</encoder>
</appender>
<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${user.home}/.pdf-over/pdf-over.log</file>
+ <file>${user.home}/.pdf-over/logs/pdf-over.log</file>
<encoder>
<charset>UTF-8</charset>
<pattern>%-5p | %d | %t @ %c | %m%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<maxIndex>10</maxIndex>
- <FileNamePattern>${user.home}/.pdf-over/pdf-over.log.%i</FileNamePattern>
+ <FileNamePattern>${user.home}/.pdf-over/logs/pdf-over.log.%i</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100KB</MaxFileSize>