diff options
author | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:36:51 +0000 |
---|---|---|
committer | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-10-31 16:36:51 +0000 |
commit | fa8e1a13226b311b46223640660234e20d81d8ac (patch) | |
tree | ca9cb5a5c6e70b061b91c98f71908ff38d5af3de /trunk/pdf-over-gui/src/main/java | |
parent | 6d723300518fad8e735eda4eaea57feb4feeddd2 (diff) | |
download | pdf-over-fa8e1a13226b311b46223640660234e20d81d8ac.tar.gz pdf-over-fa8e1a13226b311b46223640660234e20d81d8ac.tar.bz2 pdf-over-fa8e1a13226b311b46223640660234e20d81d8ac.zip |
Allow more emblem file types
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12734 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java')
3 files changed, 11 insertions, 19 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java index 3ee71997..feb350bf 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java @@ -70,7 +70,7 @@ public class DataSourceSelectComposite extends StateComposite { dialog.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ dialog.setFilterNames(new String[] { Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$ - Messages.getString("common.ALLExtension_Description") }); //$NON-NLS-1$ + Messages.getString("common.AllExtension_Description") }); //$NON-NLS-1$ String fileName = dialog.open(); File file = null; if (fileName != null) { 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 abbed9e7..0ad7617a 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 @@ -107,7 +107,7 @@ public class OutputComposite extends StateComposite { 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$ + Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$ String proposed = OutputComposite.this.getInputFile().getAbsolutePath(); diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index c4e1f03a..50661b29 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -88,10 +88,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { public void widgetSelected(SelectionEvent e) { FileDialog dialog = new FileDialog( SimpleConfigurationComposite.this.getShell(), SWT.OPEN); - dialog.setFilterExtensions(new String[] { "*.jpg", "*.gif" }); //$NON-NLS-1$ //$NON-NLS-2$ + dialog.setFilterExtensions(new String[] { "*.jpg;*.png;*.gif", "*.jpg", "*.png", "*.gif", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ dialog.setFilterNames(new String[] { + Messages.getString("common.ImageExtension_Description"), //$NON-NLS-1$ Messages.getString("common.JPGExtension_Description"), //$NON-NLS-1$ - Messages.getString("common.GIFExtension_Description") }); //$NON-NLS-1$ + Messages.getString("common.PNGExtension_Description"), //$NON-NLS-1$ + Messages.getString("common.GIFExtension_Description"), //$NON-NLS-1$ + Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$ String fileName = dialog.open(); File file = null; if (fileName != null) { @@ -192,8 +195,8 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } } - private void setEmblemFileInternal(final String filename) throws Exception { - this.setEmblemFileInternal(filename, false); + private void setEmblemFile(final String filename) throws Exception { + setEmblemFileInternal(filename, false); } private void setEmblemFileInternal(final String filename, boolean force) @@ -256,8 +259,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { void processEmblemChanged(String filename) { try { - // String filename = this.txtEmblemFile.getText(); - plainEmblemSetter(filename); + setEmblemFile(filename); } catch (Exception ex) { log.error("processEmblemChanged: ", ex); //$NON-NLS-1$ ErrorDialog dialog = new ErrorDialog(getShell(), SWT.NONE, @@ -266,16 +268,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } } - /** - * @param filename - * @throws Exception - */ - private void plainEmblemSetter(String filename) throws Exception { - //this.emblemFile = filename; - this.setEmblemFileInternal(filename); - // this.btnClearImage.setSelection(true); - } - void processNumberChanged() { try { this.txtMobileNumberErrorMarker.setVisible(false); @@ -871,7 +863,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { // this.txtEmblemFile.setText(emblemFile); this.emblemFile = emblemFile; try { - this.setEmblemFileInternal(emblemFile, true); + setEmblemFileInternal(emblemFile, true); this.btnClearImage.setSelection(true); } catch (Exception e1) { log.error("Failed to load emblem: ", e1); //$NON-NLS-1$ |