Mercurial > projects > dwt-mac
diff dwt/widgets/ToolItem.d @ 123:63a09873578e
Fixed compile errors
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 15 Jan 2009 23:08:54 +0100 |
parents | 844f65808a36 |
children |
line wrap: on
line diff
--- a/dwt/widgets/ToolItem.d Wed Dec 31 21:01:13 2008 +0100 +++ b/dwt/widgets/ToolItem.d Thu Jan 15 23:08:54 2009 +0100 @@ -80,13 +80,13 @@ String toolTipText; Control control; bool selection; - + static const int DEFAULT_WIDTH = 24; static const int DEFAULT_HEIGHT = 22; static const int DEFAULT_SEPARATOR_WIDTH = 6; static const int INSET = 3; static const int ARROW_WIDTH = 5; - + /** * Constructs a new instance of this class given its parent * (which must be a <code>ToolBar</code>) and a style value @@ -171,13 +171,13 @@ objc.id accessibilityAttributeValue(objc.id id, objc.SEL sel, objc.id arg0) { NSString nsAttributeName = new NSString(arg0); - + if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) { NSString roleText = ((style & DWT.PUSH) !is 0) ? OS.NSAccessibilityButtonRole - : ((style & DWT.RADIO) !is 0) ? OS.NSAccessibilityRadioButtonRole - : ((style & DWT.CHECK) !is 0) ? OS.NSAccessibilityCheckBoxRole - : ((style & DWT.DROP_DOWN) !is 0) ? OS.NSAccessibilityMenuButtonRole - : null; // SEPARATOR + : ((style & DWT.RADIO) !is 0) ? OS.NSAccessibilityRadioButtonRole + : ((style & DWT.CHECK) !is 0) ? OS.NSAccessibilityCheckBoxRole + : ((style & DWT.DROP_DOWN) !is 0) ? OS.NSAccessibilityMenuButtonRole + : null; // SEPARATOR if (roleText !is null) { if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) { return roleText.id; @@ -203,7 +203,7 @@ NSNumber value = NSNumber.numberWithInt(getEnabled() ? 1 : 0); return value.id; } - + return super.accessibilityAttributeValue(id, sel, arg0); } @@ -324,7 +324,7 @@ char [] chars = new char [text.length ()]; text.getChars (0, chars.length, chars, 0); int length = fixMnemonic (chars); - + NSMutableParagraphStyle pStyle = cast(NSMutableParagraphStyle)(new NSMutableParagraphStyle()).alloc().init(); pStyle.autorelease(); pStyle.setAlignment(OS.NSCenterTextAlignment);