X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45df080916097999cee2a0e5cd9e2d41b0626f6f..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 36edaf5f50..79726b054c 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -347,8 +347,7 @@ bool wxTextCtrl::Create( wxWindow *parent, m_focusWidget = m_text; PostCreation(); - - SetFont( parent->GetFont() ); + InheritAttributes(); wxSize size_best( DoGetBestSize() ); wxSize new_size( size ); @@ -674,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(wxGTK_CONV_BACK(text)); + g_free(text); + return result.BeforeFirst(wxT('\n')); +#endif } else {