aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Hiller2013-03-12 20:53:20 (EDT)
committerGrant Gayed2013-03-13 10:02:26 (EDT)
commit6cd79c2e1a97d680bd49e305df0526331b321ef8 (patch)
treec11044149ba0c0f6e9088500c6a8eb0cb57a59e9
parent5fd8d67aa375be6561c551ec29265e8089731368 (diff)
downloadeclipse.platform.swt-6cd79c2e1a97d680bd49e305df0526331b321ef8.zip
eclipse.platform.swt-6cd79c2e1a97d680bd49e305df0526331b321ef8.tar.gz
eclipse.platform.swt-6cd79c2e1a97d680bd49e305df0526331b321ef8.tar.bz2
adding status event
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java11
2 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
index db2e1b2..1cebc40 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEF.java
@@ -384,6 +384,16 @@ public void onTitleChange(String title) {
titleListeners[i].changed (event);
}
}
+
+public void onStatusMessage(String status) {
+ StatusTextEvent event = new StatusTextEvent(browser);
+ event.display = browser.getDisplay ();
+ event.widget = browser;
+ event.text = status;
+ for (int i = 0; i < statusTextListeners.length; i++) {
+ statusTextListeners[i].changed (event);
+ }
+}
public void refresh() {
if (cefBrowser == null) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java
index ec6000c..aaa2480 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT CEF/win32/org/eclipse/swt/browser/CEFDisplayHandler.java
@@ -92,7 +92,16 @@ long /*int*/ on_tooltip(long /*int*/ browser, long /*int*/ text) {
}
long /*int*/ on_status_message(long /*int*/ browser, long /*int*/ value) {
- if (Device.DEBUG) System.out.println("on_status_message (TODO)");
+ if (Device.DEBUG) System.out.println("on_status_message (impl)");
+
+ final String statusString = CEF.ExtractCEFString(value);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ host.onStatusMessage(statusString);
+ }
+ });
+
return 0;
}