Better modal dialog status display when no prompt
authordadubrow
Thu, 16 Sep 2010 18:00:40 -0500
changeset 2036 fc05b93c8a51
parent 2035 42a3ddebe583
child 2037 011393e24a37
child 2040 53f8b3193295
Better modal dialog status display when no prompt
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/StatusDisplay.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/StatusDisplay.java	Thu Sep 16 17:29:37 2010 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/StatusDisplay.java	Thu Sep 16 18:00:40 2010 -0500
@@ -151,7 +151,7 @@
 			});
 		}
 		else {
-			int style = SWT.YES | SWT.NO;
+			int style = prompt != null ? SWT.YES | SWT.NO : 0;
 			switch (status.getSeverity()) {
 			case IStatus.INFO:
 				style |= SWT.ICON_INFORMATION;
@@ -170,8 +170,10 @@
 			messageBox.setText(getTitleString(status));
 			StringBuilder sb = new StringBuilder();
 			sb.append(status.getMessage());
-			sb.append("\n");
-			sb.append(prompt);
+			if (prompt != null) {
+				sb.append("\n");
+				sb.append(prompt);
+			}
 			messageBox.setMessage(sb.toString());
 			int open = messageBox.open();
 			closed = true;