summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:07:52 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:07:52 +0000
commit7372131084d65042e22ee99b0a3527a8ff71b1f0 (patch)
tree4f74b6d2a25550762606ce77f10f4b63d69e8ac4 /pdf-over-gui/src/main/java/at/asit/pdfover
parent2b57f9240540a2d26913f2f96c38918fe9004e79 (diff)
downloadmocca-7372131084d65042e22ee99b0a3527a8ff71b1f0.tar.gz
mocca-7372131084d65042e22ee99b0a3527a8ff71b1f0.tar.bz2
mocca-7372131084d65042e22ee99b0a3527a8ff71b1f0.zip
Allow more emblem file types
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@148 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java26
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$