mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-08 12:18:07 -05:00
More async calls in SWT tray implementation
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@111 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4867c74956
commit
e82280ef02
@ -139,9 +139,14 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
final Menu popup = new Menu(shell, SWT.POP_UP);
|
final Menu popup = new Menu(shell, SWT.POP_UP);
|
||||||
trayItem.addListener(SWT.MenuDetect, new Listener() {
|
trayItem.addListener(SWT.MenuDetect, new Listener() {
|
||||||
public void handleEvent(Event event) {
|
public void handleEvent(Event event) {
|
||||||
|
display.asyncExec(
|
||||||
|
new Runnable() {
|
||||||
|
public void run() {
|
||||||
popup.setVisible(true);
|
popup.setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
final SettingsFrame settingsFrame = new SettingsFrame();
|
final SettingsFrame settingsFrame = new SettingsFrame();
|
||||||
if (awtImage != null) {
|
if (awtImage != null) {
|
||||||
@ -163,9 +168,14 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
|||||||
defaultItem.setText("Settings...");
|
defaultItem.setText("Settings...");
|
||||||
defaultItem.addListener(SWT.Selection, new Listener() {
|
defaultItem.addListener(SWT.Selection, new Listener() {
|
||||||
public void handleEvent(Event event) {
|
public void handleEvent(Event event) {
|
||||||
|
display.asyncExec(
|
||||||
|
new Runnable() {
|
||||||
|
public void run() {
|
||||||
settingsFrame.setVisible(true);
|
settingsFrame.setVisible(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
MenuItem logItem = new MenuItem(popup, SWT.PUSH);
|
MenuItem logItem = new MenuItem(popup, SWT.PUSH);
|
||||||
logItem.setText("Show logs...");
|
logItem.setText("Show logs...");
|
||||||
|
Loading…
Reference in New Issue
Block a user