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:
parent
a3a28c50a1
commit
905f21104d
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user