Author: br...@google.com Date: Thu Feb 19 14:43:57 2009 New Revision: 4797
Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java releases/1.6/dev/core/src/com/google/gwt/dev/shell/PlatformSpecific.java releases/1.6/distro-source/core/src/index.html Log: General polish. 1) Modified BrowserDialog & DialogBase to fix a long-standing aesthetic problem on the "About" dialog (the "OK" button used to look lopsided due to extra spaces); in the process, I dumbed-down the DialogBase, which was overgeneralized to work with an "OK" button, "Cancel" button, neither, either, or both. Now it always has one button, "Close". 2) In "PlatformSpecific", reduced the log level of the update notification from "WARN" to "INFO. Finding out about a GWT upgrade is a happy event, and WARN log entries make people feel anxious. INFO is the default log level, so people will be just as likely to see it. jat did the design the review, in the sense that I said, "Hey, John. Do you care if I do this?" and he said, "No, I don't." So I did. 3) Updated index.html to point to 1.6 doc links. Also, for the first time, I switched "AJAX" to the mixed-case "Ajax" so that our index.html will look a whole lot cooler. Review by: jgw (desk review) Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java ============================================================================== --- releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/shell/BrowserDialog.java Thu Feb 19 14:43:57 2009 @@ -41,7 +41,7 @@ private final TreeLogger logger; public BrowserDialog(Shell parent, TreeLogger logger, String html) { - super(parent, 550, 520, true, false); + super(parent, 550, 520); this.logger = logger; this.html = html; this.url = null; Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java ============================================================================== --- releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/shell/DialogBase.java Thu Feb 19 14:43:57 2009 @@ -37,31 +37,17 @@ private class Buttons extends GridPanel { public Buttons(Composite parent) { - super(parent, SWT.NONE, hasCancel ? 2 : 1, true); + super(parent, SWT.NONE, 1, true, 12, 6); - if (hasOk) { - okButton = new Button(this, SWT.PUSH); - setGridData(okButton, 1, 1, FILL, FILL, false, false); - okButton.setText(" OK "); - okButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - clickOkButton(); - } - }); - } - - if (hasCancel) { - cancelButton = new Button(this, SWT.PUSH); - setGridData(cancelButton, 1, 1, FILL, FILL, false, false); - cancelButton.setText("Cancel"); - cancelButton.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - clickCancelButton(); - } - }); - } + okButton = new Button(this, SWT.PUSH); + setGridData(okButton, 1, 1, FILL, FILL, false, false); + okButton.setText("Close"); + okButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + clickOkButton(); + } + }); shell.setDefaultButton(okButton); } @@ -75,10 +61,8 @@ Control contents = createContents(this); setGridData(contents, 1, 1, FILL, FILL, true, true); - if (hasOk || hasCancel) { - Buttons buttons = new Buttons(this); - setGridData(buttons, 1, 1, RIGHT, BOTTOM, false, false); - } + Buttons buttons = new Buttons(this); + setGridData(buttons, 1, 1, RIGHT, BOTTOM, false, false); } } @@ -93,14 +77,8 @@ return msgBox.open() == SWT.YES; } - private Button cancelButton; - private boolean cancelled = true; - private boolean hasCancel; - - private boolean hasOk; - private int minHeight; private int minWidth; @@ -110,16 +88,9 @@ private Shell shell; public DialogBase(Shell parent, int minWidth, int minHeight) { - this(parent, minWidth, minHeight, true, true); - } - - public DialogBase(Shell parent, int minWidth, int minHeight, - boolean hasOkButton, boolean hasCancelButton) { super(parent, SWT.NONE); this.minWidth = minWidth; this.minHeight = minHeight; - hasOk = hasOkButton; - hasCancel = hasCancelButton; } public Shell getShell() { Modified: releases/1.6/dev/core/src/com/google/gwt/dev/shell/PlatformSpecific.java ============================================================================== --- releases/1.6/dev/core/src/com/google/gwt/dev/shell/PlatformSpecific.java (original) +++ releases/1.6/dev/core/src/com/google/gwt/dev/shell/PlatformSpecific.java Thu Feb 19 14:43:57 2009 @@ -180,7 +180,7 @@ public static void logUpdateAvailable(TreeLogger logger, UpdateResult result) { if (result != null) { final URL url = result.getURL(); - logger.log(TreeLogger.WARN, "A new version of GWT (" + logger.log(TreeLogger.INFO, "A new version of GWT (" + result.getNewVersion() + ") is available", null, new HelpInfo() { @Override public URL getURL() { Modified: releases/1.6/distro-source/core/src/index.html ============================================================================== --- releases/1.6/distro-source/core/src/index.html (original) +++ releases/1.6/distro-source/core/src/index.html Thu Feb 19 14:43:57 2009 @@ -37,10 +37,10 @@ </p> <h2>Resources</h2> - <p>AJAX is hard. But you're not alone!</p> + <p>Ajax is hard. But you're not alone!</p> <ul> <li> - <a href="http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)s(google-web-toolkit-doc-1-5)t(Whatsnewin15)">What's new in GWT 1.5?</a> (online) + <a href="http://code.google.com/docreader/?p(google-web-toolkit-doc-1-6)s(google-web-toolkit-doc-1-6)t(ReleaseNotes_1_6)">What's new in GWT 1.6?</a> (online) <div> <a href="release_notes.html">Point releases notes</a> are also available locally. </div> @@ -67,7 +67,7 @@ </div> </li> <li> - <a href="http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)s(google-web-toolkit-doc-1-5)t(FAQ_Intro)">Frequently Asked Questions</a> (online) + <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=FAQ">Frequently Asked Questions</a> (online) <div> Answers to the initial questions developers have about using GWT, including licensing, upgrades, and so on. </div> @@ -82,20 +82,20 @@ </div> </li> <li> - <a href="http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)s(google-web-toolkit-doc-1-5)t(DevGuideDeveloperGuide)">Developer Guide</a> (online) + <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideDeveloperGuide">Developer Guide</a> (online) <div> The Developer Guide explains the key concepts in GWT. </div> </li> <li> - <a href="http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)s(google-web-toolkit-doc-1-5)t(DevGuideWidgetGallery)"> + <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideWidgetGallery"> Widget Gallery</a> (online) <div> Browse some of the built-in GWT widgets and panels. </div> </li> <li> - <a href="http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)s(google-web-toolkit-doc-1-5)t(DevGuideCommandLineTools)">Command-line + <a href="http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideCommandLineTools">Command-line Tools</a> (online) <div> Scripts to help you get started with GWT projects. --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---