]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textctrl.cpp
restored wxPluginLibrary::ms_classes handling code that was removed by mistake
[wxWidgets.git] / src / gtk / textctrl.cpp
index 3d03f75d3b75a296255c96d4ed1f19c2aed25e7d..79726b054c080070364ea74d91b3b28401793a45 100644 (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(wxGTK_CONV_BACK(text));
+        g_free(text);
+        return result.BeforeFirst(wxT('\n'));
+#endif
     }
     else
     {