Applied patch [ 810585 ] wxTextCtrl::GetTextLine returns empty String

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2003-12-11 07:12:27 +00:00
parent a3a28c50a1
commit 905f21104d
2 changed files with 24 additions and 2 deletions

View File

@ -673,10 +673,21 @@ wxString wxTextCtrl::GetLineText( long lineNo ) const
return buf;
}
else
#endif
{
return wxEmptyString;
}
#else
GtkTextBuffer *text_buffer;
text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(m_text));
GtkTextIter line;
gtk_text_buffer_get_iter_at_line(text_buffer,&line,lineNo);
GtkTextIter end;
gtk_text_buffer_get_end_iter(text_buffer,&end );
gchar *text = gtk_text_buffer_get_text(text_buffer,&line,&end,TRUE);
wxString result(text);
g_free(text);
return result.BeforeFirst(wxT('\n'));
#endif
}
else
{

View File

@ -673,10 +673,21 @@ wxString wxTextCtrl::GetLineText( long lineNo ) const
return buf;
}
else
#endif
{
return wxEmptyString;
}
#else
GtkTextBuffer *text_buffer;
text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(m_text));
GtkTextIter line;
gtk_text_buffer_get_iter_at_line(text_buffer,&line,lineNo);
GtkTextIter end;
gtk_text_buffer_get_end_iter(text_buffer,&end );
gchar *text = gtk_text_buffer_get_text(text_buffer,&line,&end,TRUE);
wxString result(text);
g_free(text);
return result.BeforeFirst(wxT('\n'));
#endif
}
else
{