diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at')
3 files changed, 11 insertions, 19 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java index 3ee71997..feb350bf 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java index abbed9e7..0ad7617a 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index c4e1f03a..50661b29 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/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$ |