commit | e5078da72913afe54cca6e75f5fd5a85d4bea53b | [log] [tgz] |
---|---|---|
author | Christophe Cornu <ccornu> | Fri Jan 30 16:43:34 2004 +0000 |
committer | Christophe Cornu <ccornu> | Fri Jan 30 16:43:34 2004 +0000 |
tree | 36cc396b1588499a63d3dc16ed8fa45eade6f283 | |
parent | 49d71903bbec6f71ed11ec57e1d6aaee794dbd0c [diff] |
43091
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java index 66351f7..1190c1f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java
@@ -38,9 +38,9 @@ * <p>The following fields in the <code>LocationEvent</code> apply: * <ul> * <li>(in) location the location to be loaded - * <li>(in) doit can be set to <code>false</code> to prevent the location - * from being loaded * <li>(in) widget the <code>Browser</code> whose location is changing + * <li>(in/out) doit can be set to <code>false</code> to prevent the location + * from being loaded * </ul> * * @param event the <code>LocationEvent</code> that specifies the location @@ -57,6 +57,8 @@ * <p>The following fields in the <code>LocationEvent</code> apply: * <ul> * <li>(in) location the current location + * <li>(in) top <code>true</code> if the location opens in the top frame or + * <code>false</code> otherwise * <li>(in) widget the <code>Browser</code> whose location has changed * </ul> *
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Browser.java index 9a55423..0d14c21 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Browser.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Browser.java
@@ -509,6 +509,7 @@ event.display = display; event.widget = this; event.location = url; + event.top = true; for (int i = 0; i < locationListeners.length; i++) locationListeners[i].changed(event); ProgressEvent progress = new ProgressEvent(this);
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java index 8976691..d9e8d22 100644 --- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java +++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java
@@ -146,7 +146,7 @@ browser.addLocationListener(new LocationListener() { public void changed(LocationEvent event) { busy = true; - location.setText(event.location); + if (event.top) location.setText(event.location); } public void changing(LocationEvent event) { }