comparison dwtsnippets/tray/Snippet143.d @ 59:6fb20f548c46

Fix compile error
author Frank Benoit <benoit@tionex.de>
date Thu, 10 Apr 2008 09:32:17 +0200
parents 5681fc54f1c1
children
comparison
equal deleted inserted replaced
58:3b18f03b2f41 59:6fb20f548c46
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language 10 * Port to the D programming language
11 * Frank Benoit <benoit@tionex.de> 11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/ 12 *******************************************************************************/
13 module dwt.snippets.tray.Snippet143; 13 module dwt.snippets.tray.Snippet143;
14 14
15 /* 15 /*
16 * Tray example snippet: place an icon with a popup menu on the system tray 16 * Tray example snippet: place an icon with a popup menu on the system tray
17 * 17 *
18 * For a list of all DWT example snippets see 18 * For a list of all DWT example snippets see
19 * http://www.eclipse.org/swt/snippets/ 19 * http://www.eclipse.org/swt/snippets/
20 * 20 *
21 * @since 3.0 21 * @since 3.0
22 */ 22 */
23 import dwt.DWT; 23 import dwt.DWT;
24 import dwt.graphics.Image; 24 import dwt.graphics.Image;
25 import dwt.widgets.Shell; 25 import dwt.widgets.Shell;
39 public static void main(char[][] args) { 39 public static void main(char[][] args) {
40 Display display = new Display (); 40 Display display = new Display ();
41 Shell shell = new Shell (display); 41 Shell shell = new Shell (display);
42 Image image = new Image (display, 16, 16); 42 Image image = new Image (display, 16, 16);
43 final Tray tray = display.getSystemTray (); 43 final Tray tray = display.getSystemTray ();
44 if (tray == null) { 44 if (tray is null) {
45 Stdout.formatln ("The system tray is not available"); 45 Stdout.formatln ("The system tray is not available");
46 } else { 46 } else {
47 item = new TrayItem (tray, DWT.NONE); 47 item = new TrayItem (tray, DWT.NONE);
48 item.setToolTipText("DWT TrayItem"); 48 item.setToolTipText("DWT TrayItem");
49 item.addListener (DWT.Show, new class() Listener { 49 item.addListener (DWT.Show, new class() Listener {