Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu2004-01-30 16:43:34 +0000
committerChristophe Cornu2004-01-30 16:43:34 +0000
commite5078da72913afe54cca6e75f5fd5a85d4bea53b (patch)
tree36cc396b1588499a63d3dc16ed8fa45eade6f283
parent49d71903bbec6f71ed11ec57e1d6aaee794dbd0c (diff)
downloadeclipse.platform.swt-e5078da72913afe54cca6e75f5fd5a85d4bea53b.tar.gz
eclipse.platform.swt-e5078da72913afe54cca6e75f5fd5a85d4bea53b.tar.xz
eclipse.platform.swt-e5078da72913afe54cca6e75f5fd5a85d4bea53b.zip
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Browser.java1
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java2
3 files changed, 6 insertions, 3 deletions
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 66351f78f8..1190c1fe87 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 @@ public interface LocationListener extends SWTEventListener {
* <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 @@ public void changing(LocationEvent event);
* <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 9a554238d4..0d14c217c4 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 @@ int Pt_CB_WEB_COMPLETE(int info) {
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 89766919b2..d9e8d22048 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 @@ public BrowserExample(Composite parent) {
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) {
}

Back to the top