Show
Ignore:
Timestamp:
05/04/08 18:42:55 (4 years ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted char[] to String

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/widgets/DirectoryDialog.d

    r126 r238  
    1212 *******************************************************************************/ 
    1313module dwt.widgets.DirectoryDialog; 
     14 
     15import dwt.dwthelper.utils; 
    1416 
    1517 
     
    4143 */ 
    4244public class DirectoryDialog : Dialog { 
    43     char[] message = "", filterPath = ""; 
    44     static const char[] SEPARATOR = tango.io.FileConst.FileConst.PathSeparatorString;; 
     45    String message = "", filterPath = ""; 
     46    static const String SEPARATOR = tango.io.FileConst.FileConst.PathSeparatorString;; 
    4547 
    4648/** 
     
    9698 * @see #setFilterPath 
    9799 */ 
    98 public char[] getFilterPath () { 
     100public String getFilterPath () { 
    99101    return filterPath; 
    100102} 
     
    106108 * @return the message 
    107109 */ 
    108 public char[] getMessage () { 
     110public String getMessage () { 
    109111    return message; 
    110112} 
     
    121123 * </ul> 
    122124 */ 
    123 public char[] open () { 
     125public String open () { 
    124126    bool useChooserDialog = OS.GTK_VERSION >= OS.buildVERSION (2, 4, 10); 
    125127    if (useChooserDialog) { 
     
    129131    } 
    130132} 
    131 char[] openChooserDialog () { 
     133String openChooserDialog () { 
    132134    char* titleBytes = tango.stdc.stringz.toStringz(title); 
    133135    auto shellHandle = parent.topHandle (); 
     
    144146    } 
    145147    if (filterPath !is null && filterPath.length > 0) { 
    146         char[] p; 
     148        String p; 
    147149        /* filename must be a full path */ 
    148150        if ( filterPath[ 0 .. SEPARATOR.length ] != SEPARATOR ) { 
     
    167169        OS.gtk_file_chooser_set_extra_widget (handle, box); 
    168170    } 
    169     char[] answer = null; 
     171    String answer = null; 
    170172    Display display = parent !is null ? parent.getDisplay (): Display.getCurrent (); 
    171173    display.addIdleProc (); 
     
    188190    return answer; 
    189191} 
    190 char[] openClassicDialog () { 
     192String openClassicDialog () { 
    191193    char* titleBytes = tango.stdc.stringz.toStringz(title); 
    192194    auto handle = OS.gtk_file_selection_new (titleBytes); 
     
    200202        } 
    201203    } 
    202     char[] answer = null; 
     204    String answer = null; 
    203205    if (filterPath !is null) { 
    204         char[] path = filterPath; 
     206        String path = filterPath; 
    205207        if (path.length > 0 && path[ $-1 .. $ ] != SEPARATOR ) { 
    206208            path ~= SEPARATOR; 
     
    232234        char* utf8Ptr = OS.g_filename_to_utf8 (fileNamePtr, -1, null, &items_written, null); 
    233235        if (utf8Ptr !is null) { 
    234             char[] osAnswer = utf8Ptr[ 0 .. items_written ]; 
     236            String osAnswer = utf8Ptr[ 0 .. items_written ]; 
    235237            if (osAnswer.length !is 0) { 
    236238                /* remove trailing separator, unless root directory */ 
     
    260262 * @param string the filter path 
    261263 */ 
    262 public void setFilterPath (char[] string) { 
     264public void setFilterPath (String string) { 
    263265    filterPath = string.dup; 
    264266} 
     
    274276 * </ul> 
    275277 */ 
    276 public void setMessage (char[] string) { 
     278public void setMessage (String string) { 
    277279    if (string is null) error (DWT.ERROR_NULL_ARGUMENT); 
    278280    message = string.dup;