Changeset 31

Show
Ignore:
Timestamp:
12/15/06 11:23:06 (2 years ago)
Author:
lindquist
Message:

Fixed problems with GTK version returning null instead of "".
Fixed missing toStringz in GTK version.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/minwin/button.d

    r30 r31  
    300300            char* str = gtk_button_get_label(cast(GtkButton*)peer); 
    301301            if (str is null) 
    302                 return null
     302                return ""
    303303            else 
    304304                return str[0..strlen(str)].dup; 
  • trunk/minwin/combo.d

    r30 r31  
    148148            } 
    149149            if (str is null) 
    150                 return null
     150                return ""
    151151            else 
    152152                return str[0..strlen(str)].dup; 
  • trunk/minwin/group.d

    r30 r31  
    192192            char* str = gtk_frame_get_label(cast(GtkFrame*)peer); 
    193193            if (str is null) 
    194                 return null
     194                return ""
    195195            else 
    196196                return str[0..strlen(str)].dup; 
  • trunk/minwin/listbox.d

    r30 r31  
    127127            } 
    128128            if (str is null) 
    129                 return null
     129                return ""
    130130            else 
    131131                return str[0..strlen(str)].dup; 
  • trunk/minwin/text.d

    r30 r31  
    123123            str = gtk_entry_get_text(cast(GtkEntry*)peer); 
    124124            if (str is null) 
    125     return null
     125                return ""
    126126            else 
    127     return str[0..strlen(str)].dup; 
     127                return str[0..strlen(str)].dup; 
    128128        } 
    129129 
     
    159159            assert(false); // TODO 
    160160            if (str is null) 
    161                 return null
     161                return ""
    162162            else 
    163163                return str[0..strlen(str)].dup; 
  • trunk/minwin/window.d

    r30 r31  
    450450 
    451451        void title(char[] str) { 
    452             gtk_window_set_title(peer,str); 
     452            gtk_window_set_title(peer,toStringz(str)); 
    453453        } 
    454454 
    455455        char[] title() { 
    456456            char* cstr = gtk_window_get_title(peer); 
     457            if (cstr is null) 
     458                return ""; 
    457459            return cstr[0..strlen(cstr)].dup; 
    458460        }