Commit 6f484ce9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Add handler for enter in search textbox should close #87

parent 62ac96d4
...@@ -163,7 +163,8 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame) ...@@ -163,7 +163,8 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
EVT_BUTTON( Search_Event, Playlist::OnSearch) EVT_BUTTON( Search_Event, Playlist::OnSearch)
EVT_BUTTON( Save_Event, Playlist::OnSave) EVT_BUTTON( Save_Event, Playlist::OnSave)
EVT_TEXT(SearchText_Event, Playlist::OnSearchTextChange) /*EVT_TEXT( SearchText_Event, Playlist::OnSearchTextChange )*/
EVT_TEXT_ENTER( SearchText_Event, Playlist::OnSearch )
/* Custom events */ /* Custom events */
EVT_COMMAND(-1, wxEVT_PLAYLIST, Playlist::OnPlaylistEvent) EVT_COMMAND(-1, wxEVT_PLAYLIST, Playlist::OnPlaylistEvent)
...@@ -986,10 +987,10 @@ void Playlist::OnSort( wxCommandEvent& event ) ...@@ -986,10 +987,10 @@ void Playlist::OnSort( wxCommandEvent& event )
/********************************************************************** /**********************************************************************
* Search functions (user) * Search functions (user)
**********************************************************************/ **********************************************************************/
void Playlist::OnSearchTextChange( wxCommandEvent& WXUNUSED(event) ) /*void Playlist::OnSearchTextChange( wxCommandEvent& WXUNUSED(event) )
{ {
search_button->SetDefault(); search_button->SetDefault();
} }*/
void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) ) void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
{ {
......
...@@ -885,7 +885,7 @@ private: ...@@ -885,7 +885,7 @@ private:
/* Search (user) */ /* Search (user) */
void OnSearch( wxCommandEvent& event ); void OnSearch( wxCommandEvent& event );
void OnSearchTextChange( wxCommandEvent& event ); /*void OnSearchTextChange( wxCommandEvent& event );*/
wxTextCtrl *search_text; wxTextCtrl *search_text;
wxButton *search_button; wxButton *search_button;
wxTreeItemId search_current; wxTreeItemId search_current;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment