--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java Fri Aug 13 15:37:14 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java Mon Aug 16 09:03:23 2010 -0500
@@ -22,6 +22,7 @@
class RoundedCornerComposite extends SharedBackgroundComposite {
+ private static final int ARC = 9;
private final Color background;
private final Color outline;
@@ -36,11 +37,11 @@
super.drawBackground(gc, x, y, width, height);
if (background != null) {
gc.setBackground(background);
- gc.fillRoundRectangle(0, 0, width, height, 6, 6);
+ gc.fillRoundRectangle(0, 0, width, height, ARC, ARC);
}
if (outline != null) {
gc.setForeground(outline);
- gc.drawRoundRectangle(0, 0, width - 1, height - 1, 6, 6);
+ gc.drawRoundRectangle(0, 0, width - 1, height - 1, ARC, ARC);
}
}
}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Fri Aug 13 15:37:14 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Mon Aug 16 09:03:23 2010 -0500
@@ -64,7 +64,7 @@
parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
createTitle(actionBar);
createActions(actionBar);
- RowLayoutFactory.swtDefaults().type(SWT.VERTICAL).margins(10, 10).extendedMargins(5, 5, 5, 10).fill(true).wrap(false).applyTo(this);
+ RowLayoutFactory.swtDefaults().type(SWT.VERTICAL).margins(5, 5).extendedMargins(7, 7, 7, 7).fill(true).wrap(false).applyTo(this);
}
private void createTitle(IActionBar actionBar) {
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Fri Aug 13 15:37:14 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Mon Aug 16 09:03:23 2010 -0500
@@ -167,8 +167,9 @@
public void run() {
URL url = getURL();
if (url != null) {
- browser.setUrl(url.toString());
- actionBar.setLoading(true);
+ if (!browser.setUrl(url.toString())) {
+ browser.redraw();
+ }
}
actionBar.hookBrowser();
actionBar.update();
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Fri Aug 13 15:37:14 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Mon Aug 16 09:03:23 2010 -0500
@@ -26,8 +26,13 @@
import java.util.Set;
import java.util.regex.Pattern;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
+import org.eclipse.swt.widgets.Display;
import com.nokia.carbide.discovery.ui.Activator;
import com.nokia.carbide.discovery.ui.Messages;
@@ -109,14 +114,24 @@
}
protected void readRSS() {
- URL url = getURL();
+ final URL url = getURL();
if (url != null) {
- try {
- rss = SimpleRSSReader.readRSS(url);
- displayRSS();
- } catch (Exception e) {
- Activator.logError(MessageFormat.format(Messages.AbstractRSSPortalPageLayer_RSSReadError, url), e);
- }
+ Job j = new Job("Getting RSS feed") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ rss = SimpleRSSReader.readRSS(url);
+ displayRSS();
+ } catch (Exception e) {
+ Activator.logError(MessageFormat.format(Messages.AbstractRSSPortalPageLayer_RSSReadError, url), e);
+ }
+ return Status.OK_STATUS;
+ }
+
+ };
+ j.setUser(true);
+ j.schedule();
}
}
@@ -152,7 +167,13 @@
buf.append("</ul>"); //$NON-NLS-1$
}
buf.append(HTML_BODY_FOOTER);
- browser.setText(buf.toString());
+ final String s = buf.toString();
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ browser.setText(s);
+ }
+ });
}
private String clean(String s) {