Remove wxEVT_TEXT_URL generation from wxSearchCtrl

This event doesn't make any sense for this control, was never generated
by the native macOS version and couldn't be generated under MSW neither
as it's only supported by the multiline control and not the single-line
version used here, so having this code in wxSearchCtrl just made no
sense at all.
This commit is contained in:
Vadim Zeitlin
2018-01-30 01:45:28 +01:00
parent ea08b8539a
commit 784a397348

View File

@@ -104,21 +104,6 @@ protected:
} }
} }
void OnTextUrl(wxTextUrlEvent& eventText)
{
// copy constructor is disabled for some reason?
//wxTextUrlEvent event(eventText);
wxTextUrlEvent event(
m_search->GetId(),
eventText.GetMouseEvent(),
eventText.GetURLStart(),
eventText.GetURLEnd()
);
event.SetEventObject(m_search);
m_search->GetEventHandler()->ProcessEvent(event);
}
#ifdef __WXMSW__ #ifdef __WXMSW__
// We increase the text control height to be the same as for the controls // We increase the text control height to be the same as for the controls
// with border as this is what we actually need here because even though // with border as this is what we actually need here because even though
@@ -162,7 +147,6 @@ private:
wxBEGIN_EVENT_TABLE(wxSearchTextCtrl, wxTextCtrl) wxBEGIN_EVENT_TABLE(wxSearchTextCtrl, wxTextCtrl)
EVT_TEXT(wxID_ANY, wxSearchTextCtrl::OnText) EVT_TEXT(wxID_ANY, wxSearchTextCtrl::OnText)
EVT_TEXT_ENTER(wxID_ANY, wxSearchTextCtrl::OnTextEnter) EVT_TEXT_ENTER(wxID_ANY, wxSearchTextCtrl::OnTextEnter)
EVT_TEXT_URL(wxID_ANY, wxSearchTextCtrl::OnTextUrl)
EVT_TEXT_MAXLEN(wxID_ANY, wxSearchTextCtrl::OnText) EVT_TEXT_MAXLEN(wxID_ANY, wxSearchTextCtrl::OnText)
wxEND_EVENT_TABLE() wxEND_EVENT_TABLE()