Mercurial > projects > dwt-addons
diff dwtx/jface/action/ActionContributionItem.d @ 167:862b05e0334a
Add a wrapper for Thread
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 09 Sep 2008 15:59:16 +0200 |
parents | 7ffeace6c47f |
children | c3583c6ec027 |
line wrap: on
line diff
--- a/dwtx/jface/action/ActionContributionItem.d Mon Sep 08 01:01:30 2008 +0200 +++ b/dwtx/jface/action/ActionContributionItem.d Tue Sep 09 15:59:16 2008 +0200 @@ -51,7 +51,7 @@ import dwt.dwthelper.utils; import dwt.dwthelper.Runnable; -import tango.core.Thread; +import dwtx.dwtxhelper.JThread; import tango.io.Stdout; /** @@ -187,18 +187,12 @@ if (isVisible() && widget !is null) { Display display = widget.getDisplay(); - if (display.getThread() is Thread.getThis()) { + if (display.getThread() is JThread.currentThread().nativeThread()) { update(e.getProperty()); } else { - display.asyncExec(new class(e) Runnable { - PropertyChangeEvent e_; - this(PropertyChangeEvent e__){ - e_=e__; - } - public void run() { - update(e_.getProperty()); - } - }); + display.asyncExec(dgRunnable( (PropertyChangeEvent e_) { + update(e_.getProperty()); + }, e)); } }