Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java

Issue 9666045: Copy details action for the About Box. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java (revision 5474)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/dialogs/AboutDartDialog.java (working copy)
@@ -24,6 +24,7 @@
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Geometry;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
@@ -40,6 +41,8 @@
private static final ImageDescriptor ABOUT_IMG_DESC = ImageDescriptor.createFromURL(Platform.getBundle(
DartUI.ID_PLUGIN).getEntry(DialogsMessages.AboutDartDialog_about_image));
+ private static final String NEW_LINE = System.getProperty("line.separator");
+
public AboutDartDialog(Shell shell) {
super(shell, SWT.CLOSE | SWT.TITLE);
@@ -72,16 +75,19 @@
productNameLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
productNameLabel.setText(DialogsMessages.AboutDartDialog_product_label);
- Label versionLabel = newLabel(SWT.NONE);
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(versionLabel);
- versionLabel.setText(DialogsMessages.AboutDartDialog_version_string_prefix + getVersion()
- + ", " + "Build " + DartToolsPlugin.getBuildId());
+ StyledText buildDetailsText = new StyledText(this, SWT.NONE);
+ buildDetailsText.setLineSpacing(7);
+ buildDetailsText.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ buildDetailsText.setEditable(false);
+ GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(buildDetailsText);
- // Dart SDK + Dartium versions
- Label sdkLabel = newLabel(SWT.NONE);
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(sdkLabel);
StringBuilder builder = new StringBuilder();
+ builder.append(DialogsMessages.AboutDartDialog_version_string_prefix + getVersion() + ", "
+ + "Build " + DartToolsPlugin.getBuildId());
+
+ builder.append(NEW_LINE);
+
if (DartSdk.isInstalled()) {
builder.append("Dart SDK version " + DartSdk.getInstance().getSdkVersion());
@@ -97,8 +103,10 @@
builder.append("Dart SDK is not installed");
}
- sdkLabel.setText(builder.toString());
+ buildDetailsText.setText(builder.toString());
+ buildDetailsText.getCaret().setSize(0, 0); //nuke the caret
+
// spacer
newLabel(SWT.NONE);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698