diff options
author | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:36:46 +0000 |
---|---|---|
committer | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:36:46 +0000 |
commit | aaa1f16d4a933668391dd36e83c217b203de1b16 (patch) | |
tree | b229e9659a2771d1a4aba18e1fc6fab58d27129f /trunk/pdf-over-gui/src/main | |
parent | 0bab53aff11942d42e9972eb611de90ff9016343 (diff) | |
download | pdf-over-aaa1f16d4a933668391dd36e83c217b203de1b16.tar.gz pdf-over-aaa1f16d4a933668391dd36e83c217b203de1b16.tar.bz2 pdf-over-aaa1f16d4a933668391dd36e83c217b203de1b16.zip |
Enable output dialog to display all files
Also make signed suffix a constant
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12722 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main')
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java | 11 | ||||
-rw-r--r-- | trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java index 566ee560..abbed9e7 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java @@ -54,6 +54,8 @@ public class OutputComposite extends StateComposite { **/ static final Logger log = LoggerFactory.getLogger(OutputComposite.class); + private final static String SIGNED_SUFFIX = "_signed"; //$NON-NLS-1$ + private File inputFile; File outputFile = null; @@ -102,9 +104,10 @@ public class OutputComposite extends StateComposite { void saveFile() throws IOException { FileDialog save = new FileDialog(OutputComposite.this.getShell(), SWT.SAVE | SWT.NATIVE); - save.setFilterExtensions(new String[] { "*.pdf" }); //$NON-NLS-1$ - save.setFilterNames(new String[] { Messages - .getString("common.PDFExtension_Description") }); //$NON-NLS-1$ + save.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ + save.setFilterNames(new String[] { + Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$ + Messages.getString("common.ALLExtension_Description")}); //$NON-NLS-1$ String proposed = OutputComposite.this.getInputFile().getAbsolutePath(); @@ -124,7 +127,7 @@ public class OutputComposite extends StateComposite { name = FilenameUtils.removeExtension(name); - proposed = path + name + "_signed." + extension; //$NON-NLS-1$ + proposed = path + name + SIGNED_SUFFIX + "." + extension; //$NON-NLS-1$ if (this.getOutputDir() != null && !this.getOutputDir().equals("")) //$NON-NLS-1$ { diff --git a/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index cfe3df19..a789bddb 100644 --- a/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -37,8 +37,8 @@ bku_selection.card=CARD bku_selection.mobile=MOBILE common.ALLExtension_Description=All files common.Cancel=Cancel -common.GIFExtension_Description=Gif Dateien -common.JPGExtension_Description=JPG Dateien +common.GIFExtension_Description=GIF Files +common.JPGExtension_Description=JPG Files common.Ok=OK common.PDFExtension_Description=PDF documents common.Save=Save |