diff options
Diffstat (limited to 'pdf-over-gui/src/main/java')
3 files changed, 11 insertions, 9 deletions
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 492e9f9f..8c9e21c1 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 @@ -265,7 +265,7 @@ public class OutputComposite extends StateComposite { targetFile = new File(inputFolder, target); if (targetFile.exists()) { - Dialog dialog = new Dialog(this.getShell(), + Dialog dialog = new Dialog(this.getShell(), Messages.getString("common.warning"), //$NON-NLS-1$ String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //$NON-NLS-1$ BUTTONS.OK_CANCEL, ICON.QUESTION); if (dialog.open() == SWT.CANCEL) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java index e6f62637..c86b0e31 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/Dialog.java @@ -20,8 +20,6 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; -import at.asit.pdfover.gui.utils.Messages; - /** * A Message dialog */ @@ -61,15 +59,16 @@ public class Dialog { /** * @param parent The parent shell - * @param message The error message + * @param title The dialog title + * @param message The dialog message * @param button The BUTTONS to be shown * @param icon The ICON to be displayed */ - public Dialog(Shell parent, String message, BUTTONS button, ICON icon) { - this.initialize(parent, message, button, icon); + public Dialog(Shell parent, String title, String message, BUTTONS button, ICON icon) { + this.initialize(parent, title, message, button, icon); } - private void initialize(Shell parent, String message, BUTTONS button, ICON icon) { + private void initialize(Shell parent, String title, String message, BUTTONS button, ICON icon) { int boxstyle = 0; switch (icon) { case ERROR: @@ -106,7 +105,7 @@ public class Dialog { this.box = new MessageBox(parent, boxstyle); this.box.setMessage(message); - this.box.setText(Messages.getString("error.Title")); //$NON-NLS-1$ + this.box.setText(title); } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java index 6ae8af0e..91100355 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java @@ -18,6 +18,8 @@ package at.asit.pdfover.gui.controls; // Imports import org.eclipse.swt.widgets.Shell; +import at.asit.pdfover.gui.utils.Messages; + /** * An error dialog */ @@ -28,6 +30,7 @@ public class ErrorDialog extends Dialog { * @param button The buttons to be shown */ public ErrorDialog(Shell parent, String message, BUTTONS button) { - super(parent, message, button, ICON.ERROR); + super(parent, Messages.getString("error.Title"), //$NON-NLS-1$ + message, button, ICON.ERROR); } } |