# HG changeset patch # User dadubrow # Date 1284678040 18000 # Node ID fc05b93c8a51621879588e6f58e9d0b7338183a4 # Parent 42a3ddebe5837b28f44d29301c817b9b5f85182a Better modal dialog status display when no prompt diff -r 42a3ddebe583 -r fc05b93c8a51 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;