# HG changeset patch # User Jacob Carlborg # Date 1244574340 -7200 # Node ID 36ae710173d974d7f0da0b92adf3ecc428966ded # Parent 8944c1d87c638a687aa77bf6b85923df5ae43dc0 Selection is now working for TrayItems diff -r 8944c1d87c63 -r 36ae710173d9 dwt/widgets/TrayItem.d --- a/dwt/widgets/TrayItem.d Sun Jun 07 15:21:18 2009 +0200 +++ b/dwt/widgets/TrayItem.d Tue Jun 09 21:05:40 2009 +0200 @@ -34,6 +34,7 @@ import dwt.dwthelper.utils; import dwt.internal.cocoa.NSView; +import Carbon = dwt.internal.c.Carbon; import objc = dwt.internal.objc.runtime; import dwt.widgets.Item; import dwt.widgets.ToolTip; @@ -67,7 +68,7 @@ NSStatusItem item; NSImageView view; - static final float BORDER = 8f; + static const float BORDER = 8f; /** * Constructs a new instance of this class given its parent @@ -363,7 +364,7 @@ if (image !is null && image.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); super.setImage (image); view.setImage(image !is null ? image.handle : null); - float /*double*/ width = image !is null && visible ? image.handle.size().width + BORDER : 0; + Carbon.CGFloat width = image !is null && visible ? image.handle.size().width + BORDER : 0; item.setLength(width); } @@ -430,7 +431,7 @@ if (isDisposed ()) return; } this.visible = visible; - float /*double*/ width = image !is null && visible ? image.handle.size().width + BORDER : 0; + Carbon.CGFloat width = image !is null && visible ? image.handle.size().width + BORDER : 0; item.setLength(width); if (!visible) sendEvent (DWT.Hide); } @@ -455,12 +456,12 @@ } } -void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { +void mouseUp(objc.id id, objc.SEL sel, objc.id theEvent) { highlight = false; (cast(NSView)view).setNeedsDisplay(true); } -void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { +void rightMouseDown(objc.id id, objc.SEL sel, objc.id theEvent) { showMenu(); }