From 14ebaf2a3db09aa95029e985f0146b8db013764e Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:18:22 +0000 Subject: Display error if unable to load SWT lib git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@245 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../src/main/java/at/asit/pdfover/gui/Main.java | 9 +++++++-- .../java/at/asit/pdfover/gui/controls/ErrorDialog.java | 2 +- .../resources/at/asit/pdfover/gui/messages.properties | 18 ++++++++++-------- .../at/asit/pdfover/gui/messages_de.properties | 16 +++++++++------- 4 files changed, 27 insertions(+), 18 deletions(-) (limited to 'pdf-over-gui/src/main') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java index 42a811be..c84f28cf 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java @@ -18,6 +18,8 @@ package at.asit.pdfover.gui; //Imports import java.io.File; +import javax.swing.JOptionPane; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,8 +45,11 @@ public class Main { try { SWTLoader.loadSWT(); } catch (InitializationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + log.error("Could not load SWT libraries", e); //$NON-NLS-1$ + JOptionPane.showMessageDialog(null, + Messages.getString("error.SWTLib"), //$NON-NLS-1$ + Messages.getString("error.TitleFatal"), //$NON-NLS-1$ + JOptionPane.ERROR_MESSAGE); } File configDir = new File(System.getProperty("user.home")+"/.pdfover"); //$NON-NLS-1$//$NON-NLS-2$ 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 7cefb857..7839ed16 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 @@ -72,7 +72,7 @@ public class ErrorDialog { this.box = new MessageBox(parent, boxstyle); this.box.setMessage(message); - this.box.setText(Messages.getString("error.title")); //$NON-NLS-1$ + this.box.setText(Messages.getString("error.Title")); //$NON-NLS-1$ } /** diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index 740a09d1..f6bf904c 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -20,8 +20,8 @@ advanced_config.Signature_Title=Si&gnature advanced_config.SigPHTransparency=Signature placeholder transparency advanced_config.SigPHTransparencyMax=Opaque advanced_config.SigPHTransparencyMin=Invisible -advanced_config.SigBlockLang=Signature block language -advanced_config.SigBlockLang_ToolTip=Select the language used in the signature block +advanced_config.SigBlockLang=Signature block language: +advanced_config.SigBlockLang_ToolTip=Select the language to be used in the signature block argument.error.output=is not a directory argument.help.bku=Select the CCE to use. Values are: LOCAL, MOBILE. Example: -b