diff --git a/resources/Labels.txt b/resources/Labels.txt index f7577e57..54cc200b 100755 --- a/resources/Labels.txt +++ b/resources/Labels.txt @@ -49,6 +49,7 @@ state.searching=Searching... state.opening=Opening state.retrievingVersion=Retrieving the latest version... title.about=About +title.statistics=Last Scan Statistics title.options=Options title.options.scanning=Scanning title.options.display=Display @@ -63,6 +64,8 @@ title.favorite.edit=Edit favorites title.openers.edit=Edit Openers title.fetchers.select=Select Fetchers title.find=Find +text.error=Error +text.userError=Problem text.ip=IP text.threads=Threads: text.display.ALL=Display: All @@ -209,7 +212,7 @@ exception.UserErrorException.opener.unknownFetcher=The referenced fetcher cannot exception.UserErrorException.opener.nullFetcherValue=The replacement value of the fetcher is empty in the scanning results. Cannot execute the opener with parameter: exception.UserErrorException.opener.edit.noSelection=Please select the position where do you want to save your opener and or the Insert button to add a new one. exception.UserErrorException.commands.noSelection=No IP address selected -exception.UserErrorException.commands.noResults=No scanning results available yet, please perform a scan first +exception.UserErrorException.commands.noResults=No scanning results are available, please perform a scan first exception.UserErrorException.favorite.alreadyExists=A favorite with the same name already exists, please try a different one exception.UserErrorException.version.latestFailed=Failed to retrieve the latest version. Please visit the website manually. exception.OutOfMemoryError=Out Of Memory. The amount of available to the program heap memory has been exceeded.\nPlease increase the maximum heap size for this program. diff --git a/src/net/azib/ipscan/Main.java b/src/net/azib/ipscan/Main.java index 115f69d7..a0be917c 100755 --- a/src/net/azib/ipscan/Main.java +++ b/src/net/azib/ipscan/Main.java @@ -66,8 +66,8 @@ public class Main { // display a nice error message String localizedMessage = getLocalizedMessage(e); Shell parent = display.getActiveShell(); - MessageBox messageBox = new MessageBox(parent != null ? parent : mainWindow.getShell(), SWT.OK | SWT.ICON_ERROR); - messageBox.setText("Error"); + MessageBox messageBox = new MessageBox(parent != null ? parent : mainWindow.getShell(), SWT.OK | (e instanceof UserErrorException ? SWT.ICON_WARNING : SWT.ICON_ERROR)); + messageBox.setText(Labels.getLabel(e instanceof UserErrorException ? "text.userError" : "text.error")); messageBox.setMessage(localizedMessage); messageBox.open(); }