Get rid of overridden wxTextCtrl::DoSetValue() in wxGTK

This method seems completely unnecessary, the base
wxTextEntry::DoSetValue(), which delegates to Remove() and WriteText(),
seems to work just as well and avoids code duplication between this
method and wxTextCtrl::WriteText().

Notice that gtk_text_buffer_set_text() is just a trivial wrapper around
gtk_text_buffer_delete() and gtk_text_buffer_insert() anyhow, so there
is no efficiency loss in not using it neither.
This commit is contained in:
Vadim Zeitlin
2017-08-24 17:25:16 +02:00
parent 1a55f4cfa2
commit 1c946a469a
2 changed files with 12 additions and 90 deletions

View File

@@ -158,7 +158,6 @@ protected:
// override this and return true.
virtual bool UseGTKStyleBase() const wxOVERRIDE { return true; }
virtual void DoSetValue(const wxString &value, int flags = 0) wxOVERRIDE;
virtual wxString DoGetValue() const wxOVERRIDE;
// Override this to use either GtkEntry or GtkTextView IME depending on the