summaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:51 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:51 +0000
commitfa8e1a13226b311b46223640660234e20d81d8ac (patch)
treeca9cb5a5c6e70b061b91c98f71908ff38d5af3de /trunk
parent6d723300518fad8e735eda4eaea57feb4feeddd2 (diff)
downloadpdf-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')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java26
-rw-r--r--trunk/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties8
4 files changed, 16 insertions, 22 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$
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 247e9671..84086ae1 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
@@ -38,12 +38,14 @@ argument.invalid.proxyhost=Proxy host argument invalid\! Use\:
argument.invalid.proxyport=Proxy port argument invalid\! Use\:
bku_selection.card=CARD
bku_selection.mobile=MOBILE
-common.ALLExtension_Description=All files
+common.AllExtension_Description=All files
common.Cancel=Cancel
-common.GIFExtension_Description=GIF Files
-common.JPGExtension_Description=JPG Files
+common.GIFExtension_Description=GIF files
+common.ImageExtension_Description=All supported image files
+common.JPGExtension_Description=JPG files
common.Ok=OK
common.PDFExtension_Description=PDF documents
+common.PNGExtension_Description=PNG files
common.Save=Save
common.browse=Browse
common.file=File\: