Changeset 15

Show
Ignore:
Timestamp:
01/18/08 16:49:04 (8 months ago)
Author:
Chris Miller
Message:

Fixed ComboBox? click issue.
Updated Tango support to Tango 0.99.4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/dfl/control.d

    r13 r15  
    45434543                    onMouseDown(mea); 
    45444544                     
    4545                     if(ctrlStyle & ControlStyles.SELECTABLE) 
    4546                        SetFocus(hwnd); 
     4545                    //if(ctrlStyle & ControlStyles.SELECTABLE) 
     4546                    // SetFocus(hwnd); // No, this goofs up stuff, including the ComboBox dropdown. 
    45474547                } 
    45484548                break; 
  • trunk/win32/dfl/internal/dlib.d

    r7 r15  
    2626{ 
    2727    version(DFL_TANGO0951beta1) 
     28    { 
    2829        version = DFL_TANGObefore099rc3; 
     30        version = DFL_TANGObefore0994; 
     31    } 
    2932    else version(DFL_TANGO097rc1) 
     33    { 
    3034        version = DFL_TANGObefore099rc3; 
     35        version = DFL_TANGObefore0994; 
     36    } 
    3137    else version(DFL_TANGO098rc2) 
     38    { 
    3239        version = DFL_TANGObefore099rc3; 
     40        version = DFL_TANGObefore0994; 
     41    } 
     42    else version(DFL_TANGObefore099rc3) 
     43    { 
     44        version = DFL_TANGObefore0994; 
     45    } 
     46    else version(DFL_TANGO0992) 
     47    { 
     48        version = DFL_TANGObefore0994; 
     49    } 
     50    else version(DFL_TANGO_0994) 
     51    { 
     52    } 
    3353     
    3454     
     
    7696    char[] getObjectString(Object o) 
    7797    { 
    78         return o.toUtf8(); 
     98        version(DFL_TANGObefore0994) 
     99        { 
     100            return o.toUtf8(); 
     101        } 
     102        else 
     103        { 
     104            return o.toString(); 
     105        } 
    79106    } 
    80107     
     
    121148    alias tango.stdc.stringz.fromUtf8z stringFromStringz; 
    122149     
    123     alias tango.stdc.stringz.toUtf8z stringToStringz; 
     150    version(DFL_TANGObefore0994) 
     151    { 
     152        alias tango.stdc.stringz.toUtf8z stringToStringz; 
     153    } 
     154    else 
     155    { 
     156        alias tango.stdc.stringz.toStringz stringToStringz; 
     157    } 
    124158     
    125159     
     
    143177        scope mypath = new FilePath(p2); 
    144178        mypath.join(p1); 
    145         return mypath.toUtf8(); 
     179        return getObjectString(mypath); 
    146180    } 
    147181     
     
    165199        dchar[1] result; 
    166200        uint x; 
    167         tango.text.convert.Utf.toUtf32(input[idx .. input.length], result, &x); 
     201        version(DFL_TANGObefore0994) 
     202        { 
     203            tango.text.convert.Utf.toUtf32(input[idx .. input.length], result, &x); 
     204        } 
     205        else 
     206        { 
     207            tango.text.convert.Utf.toString32(input[idx .. input.length], result, &x); 
     208        } 
    168209        idx += x; 
    169210        return result[0]; 
    170211    } 
    171212     
    172     alias tango.text.convert.Utf.toUtf8 utf16stringtoUtf8string; 
    173      
    174     alias tango.text.convert.Utf.toUtf16 utf8stringtoUtf16string; 
     213    version(DFL_TANGObefore0994) 
     214    { 
     215        alias tango.text.convert.Utf.toUtf8 utf16stringtoUtf8string; 
     216    } 
     217    else 
     218    { 
     219        alias tango.text.convert.Utf.toString utf16stringtoUtf8string; 
     220    } 
     221     
     222    version(DFL_TANGObefore0994) 
     223    { 
     224        alias tango.text.convert.Utf.toUtf16 utf8stringtoUtf16string; 
     225    } 
     226    else 
     227    { 
     228        alias tango.text.convert.Utf.toString16 utf8stringtoUtf16string; 
     229    } 
    175230     
    176231    wchar* utf8stringToUtf16stringz(char[] s) 
    177232    { 
    178233        wchar[] ws; 
    179         ws = tango.text.convert.Utf.toUtf16(s); 
     234        version(DFL_TANGObefore0994) 
     235        { 
     236            ws = tango.text.convert.Utf.toUtf16(s); 
     237        } 
     238        else 
     239        { 
     240            ws = tango.text.convert.Utf.toString16(s); 
     241        } 
    180242        ws ~= '\0'; 
    181243        return ws.ptr; 
    182244    } 
    183245     
    184     alias tango.text.convert.Utf.toUtf8 utf32stringtoUtf8string; 
    185      
    186     alias tango.text.convert.Utf.toUtf32 utf8stringtoUtf32string; 
     246    version(DFL_TANGObefore0994) 
     247    { 
     248        alias tango.text.convert.Utf.toUtf8 utf32stringtoUtf8string; 
     249    } 
     250    else 
     251    { 
     252        alias tango.text.convert.Utf.toString utf32stringtoUtf8string; 
     253    } 
     254     
     255    version(DFL_TANGObefore0994) 
     256    { 
     257        alias tango.text.convert.Utf.toUtf32 utf8stringtoUtf32string; 
     258    } 
     259    else 
     260    { 
     261        alias tango.text.convert.Utf.toString32 utf8stringtoUtf32string; 
     262    } 
    187263     
    188264     
     
    222298    alias tango.text.convert.Integer.toInt!(char) stringToInt; 
    223299     
    224     alias tango.text.convert.Integer.toUtf8 stringToInt; 
     300    version(DFL_TANGObefore0994) 
     301    { 
     302        alias tango.text.convert.Integer.toUtf8 stringToInt; 
     303    } 
     304    else 
     305    { 
     306        alias tango.text.convert.Integer.toString stringToInt; 
     307    } 
    225308     
    226309    char[] uintToHexString(uint num) 
     
    263346    class DObject 
    264347    { 
    265         //alias toUtf8 toString; // Doesn't let you override. 
    266         char[] toString() { return super.toUtf8(); } 
    267         override char[] toUtf8() { return toString(); } 
     348        version(DFL_TANGObefore0994) 
     349        { 
     350            //alias toUtf8 toString; // Doesn't let you override. 
     351            char[] toString() { return super.toUtf8(); } 
     352            override char[] toUtf8() { return toString(); } 
     353        } 
     354        else 
     355        { 
     356            // No need to override. 
     357        } 
    268358    } 
    269359}