diff dwt/custom/CTabFolder.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 184ab53b7785
children 36f5cb12e1a2
line wrap: on
line diff
--- a/dwt/custom/CTabFolder.d	Sat Apr 26 10:01:48 2008 +0200
+++ b/dwt/custom/CTabFolder.d	Mon May 05 00:12:38 2008 +0200
@@ -411,7 +411,7 @@
      * NO_BACKGROUND style.  The NO_BACKGROUND style is not required on platforms
      * that use double buffering which is true in both of these cases.
      */
-    char[] platform = DWT.getPlatform();
+    String platform = DWT.getPlatform();
     if ("carbon"==platform || "gtk"==platform) return style; //$NON-NLS-1$ //$NON-NLS-2$
 
     //TEMPORARY CODE
@@ -879,7 +879,7 @@
         }
         count = items.length - showCount;
     }
-    char[] chevronString = count > 99 ? "99+" : to!(char[])(count); //$NON-NLS-1$
+    String chevronString = count > 99 ? "99+" : to!(String)(count); //$NON-NLS-1$
     switch (chevronImageState) {
         case NORMAL: {
             Color chevronBorder = single ? getSelectionForeground() : getForeground();
@@ -1296,7 +1296,7 @@
  * an '&' character in the given string. If there are no '&'
  * characters in the given string, return '\0'.
  */
-dchar _findMnemonic (char[] string) {
+dchar _findMnemonic (String string) {
     if (string is null) return '\0';
     int index = 0;
     int length_ = string.length;
@@ -1308,7 +1308,7 @@
     } while (index < length_);
     return '\0';
 }
-char[] stripMnemonic (char[] string) {
+String stripMnemonic (String string) {
     int index = 0;
     int length_ = string.length;
     do {
@@ -1641,7 +1641,7 @@
     final Accessible accessible = getAccessible();
     accessible.addAccessibleListener(new class() AccessibleAdapter {
         public void getName(AccessibleEvent e) {
-            char[] name = null;
+            String name = null;
             int childID = e.childID;
             if (childID >= 0 && childID < items.length) {
                 name = stripMnemonic(items[childID].getText());
@@ -1656,7 +1656,7 @@
         }
 
         public void getHelp(AccessibleEvent e) {
-            char[] help = null;
+            String help = null;
             int childID = e.childID;
             if (childID is ACC.CHILDID_SELF) {
                 help = getToolTipText();
@@ -1667,10 +1667,10 @@
         }
 
         public void getKeyboardShortcut(AccessibleEvent e) {
-            char[] shortcut = null;
+            String shortcut = null;
             int childID = e.childID;
             if (childID >= 0 && childID < items.length) {
-                char[] text = items[childID].getText();
+                String text = items[childID].getText();
                 if (text !is null) {
                     dchar mnemonic = _findMnemonic(text);
                     if (mnemonic !is '\0') {
@@ -1738,7 +1738,7 @@
         }
 
         public void getDefaultAction(AccessibleControlEvent e) {
-            char[] action = null;
+            String action = null;
             int childID = e.childID;
             if (childID >= 0 && childID < items.length) {
                 action = DWT.getMessage ("SWT_Switch"); //$NON-NLS-1$
@@ -3868,7 +3868,7 @@
             items[i].dispose();
         }
     }
-    static const char[] id = "CTabFolder_showList_Index"; //$NON-NLS-1$
+    static const String id = "CTabFolder_showList_Index"; //$NON-NLS-1$
     for (int i = 0; i < items.length; i++) {
         CTabItem tab = items[i];
         if (tab.showing) continue;
@@ -3912,8 +3912,8 @@
 }
 
 void _setToolTipText (int x, int y) {
-    char[] oldTip = getToolTipText();
-    char[] newTip = _getToolTip(x, y);
+    String oldTip = getToolTipText();
+    String newTip = _getToolTip(x, y);
     if (newTip is null || newTip!=oldTip) {
         setToolTipText(newTip);
     }
@@ -4045,7 +4045,7 @@
     notifyListeners(DWT.Resize, new Event());
     return true;
 }
-char[] _getToolTip(int x, int y) {
+String _getToolTip(int x, int y) {
     if (showMin && minRect.contains(x, y)) return minimized ? DWT.getMessage("SWT_Restore") : DWT.getMessage("SWT_Minimize"); //$NON-NLS-1$ //$NON-NLS-2$
     if (showMax && maxRect.contains(x, y)) return maximized ? DWT.getMessage("SWT_Restore") : DWT.getMessage("SWT_Maximize"); //$NON-NLS-1$ //$NON-NLS-2$
     if (showChevron && chevronRect.contains(x, y)) return DWT.getMessage("SWT_ShowList"); //$NON-NLS-1$