comparison gtk/dw.c @ 386:5326544ab2ec

Change dw_mle_query() under GTK 1.2 so that it returns the correct number of lines. Original code failed to return pointer to text as it used value of *bytes, and this was 1 greater than maximum number of bytes.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 05 May 2003 07:11:05 +0000
parents f040c24bcf26
children a7a561103eac
comparison
equal deleted inserted replaced
385:761e5fddffca 386:5326544ab2ec
3054 if(lines) 3054 if(lines)
3055 { 3055 {
3056 gchar *text; 3056 gchar *text;
3057 3057
3058 *lines = 0; 3058 *lines = 0;
3059 text = gtk_editable_get_chars(GTK_EDITABLE(&(GTK_TEXT(tmp)->editable)), 0, bytes ? *bytes : gtk_text_get_length(GTK_TEXT(tmp))); 3059 text = gtk_editable_get_chars(GTK_EDITABLE(&(GTK_TEXT(tmp)->editable)), 0, gtk_text_get_length(GTK_TEXT(tmp)));
3060 3060
3061 if(text) 3061 if(text)
3062 { 3062 {
3063 int z, len = strlen(text); 3063 int z, len = strlen(text);
3064 3064