X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2c357747dd5a64b3302befcb7463586f624223b..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index cd1e766045..10a90eaad7 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1341,26 +1341,6 @@ bool wxTextCtrl::Enable( bool enable ) return true; } -// wxGTK-specific: called recursively by Enable, -// to give widgets an opportunity to correct their colours after they -// have been changed by Enable -void wxTextCtrl::OnEnabled(bool WXUNUSED(enable)) -{ - // If we have a custom background colour, we use this colour in both - // disabled and enabled mode, or we end up with a different colour under the - // text. - wxColour oldColour = GetBackgroundColour(); - if (oldColour.IsOk()) - { - // Need to set twice or it'll optimize the useful stuff out - if (oldColour == * wxWHITE) - SetBackgroundColour(*wxBLACK); - else - SetBackgroundColour(*wxWHITE); - SetBackgroundColour(oldColour); - } -} - void wxTextCtrl::MarkDirty() { m_modified = true; @@ -1638,7 +1618,7 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event ) { if ( HasFlag(wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject(this); event.SetString(GetValue()); if ( HandleWindowEvent(event) )