Mercurial > dwindows
comparison gtk/dw.c @ 998:f019c5e8511f
Fixed GTK reporting wrong character and line counts. 1000 revisions!!!
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 07 May 2011 20:17:06 +0000 |
parents | 98d73c9e81fc |
children | 08b7e8d7cbb3 |
comparison
equal
deleted
inserted
replaced
997:dfa2204e231f | 998:f019c5e8511f |
---|---|
4836 if(tmp && GTK_IS_TEXT_VIEW(tmp)) | 4836 if(tmp && GTK_IS_TEXT_VIEW(tmp)) |
4837 { | 4837 { |
4838 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(tmp)); | 4838 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(tmp)); |
4839 | 4839 |
4840 if(bytes) | 4840 if(bytes) |
4841 *bytes = gtk_text_buffer_get_char_count(buffer) + 1; | 4841 *bytes = gtk_text_buffer_get_char_count(buffer); |
4842 if(lines) | 4842 if(lines) |
4843 *lines = gtk_text_buffer_get_line_count(buffer) + 1; | 4843 *lines = gtk_text_buffer_get_line_count(buffer); |
4844 } | 4844 } |
4845 } | 4845 } |
4846 #else | 4846 #else |
4847 if(GTK_IS_BOX(handle)) | 4847 if(GTK_IS_BOX(handle)) |
4848 { | 4848 { |