Mercurial > projects > dwt2
diff org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/CCombo.d @ 51:c01d033c633a
[swt lin]
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 27 Mar 2009 19:58:06 +0100 |
parents | ddbfe84d86df |
children | 536e43f63c81 |
line wrap: on
line diff
--- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/CCombo.d Fri Mar 27 15:30:20 2009 +0100 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/CCombo.d Fri Mar 27 19:58:06 2009 +0100 @@ -581,19 +581,14 @@ * an '&' character in the given string. If there are no '&' * characters in the given string, return '\0'. */ -dchar _findMnemonic (String string) { - if (string is null) return '\0'; +dchar _findMnemonic (String str) { + if (str is null) return '\0'; int index = 0; - int length = string.length; + int length = str.length; do { - while (index < length && string[index] !is '&') index++; + while (index < length && str[index] !is '&') index++; if (++index >= length) return '\0'; - if (string[index] !is '&') { - dchar[1] d; uint ate; - auto d2 = tango.text.convert.Utf.toString32( string[ index .. Math.min( index +4, string.length )], d, &ate ); - auto d3 = tango.text.Unicode.toLower( d2, d2 ); - return d3[0]; - } + if (str[index] !is '&') return Character.toLowerCase (str.dcharAt (index)); index++; } while (index < length); return '\0'; @@ -924,7 +919,7 @@ if (text !is null) { dchar mnemonic = _findMnemonic (text); if (mnemonic !is '\0') { - shortcut = tango.text.convert.Format.Format( "Alt+{}", mnemonic ); //$NON-NLS-1$ + shortcut = Format( "Alt+{}", mnemonic ); //$NON-NLS-1$ } } }