Use the same "changed" GTK callback for wxComboBox and wxTextCtrl

And reuse EnableTextChangedEvents() between these classes as well.

No real changes so far, this is just a refactoring to centralize the
code in a single place before modifying it.
This commit is contained in:
Vadim Zeitlin
2019-07-08 16:04:24 +02:00
parent c024944d78
commit 5c766c0b8b
6 changed files with 53 additions and 68 deletions

View File

@@ -184,7 +184,6 @@ private:
// overridden wxTextEntry virtual methods
virtual GtkEditable *GetEditable() const wxOVERRIDE;
virtual GtkEntry *GetEntry() const wxOVERRIDE;
virtual void EnableTextChangedEvents(bool enable) wxOVERRIDE;
// change the font for everything in this control
void ChangeFontGlobally();
@@ -198,7 +197,7 @@ private:
// returns either m_text or m_buffer depending on whether the control is
// single- or multi-line; convenient for the GTK+ functions which work with
// both
void *GetTextObject() const
void *GetTextObject() const wxOVERRIDE
{
return IsMultiLine() ? static_cast<void *>(m_buffer)
: static_cast<void *>(m_text);