Commit 119b66fb authored by Clément Stenac's avatar Clément Stenac

* modules/gui/wxwindows/playlist.cpp

  modules/gui/wxwindows/wxwindows.h:
	- give default to the search button when user enters text
	- case-insensitive search
parent 8f02c035
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc * playlist.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: playlist.cpp,v 1.17 2003/09/08 12:02:16 zorglub Exp $ * $Id: playlist.cpp,v 1.18 2003/09/08 12:48:53 zorglub Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* *
...@@ -179,7 +179,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -179,7 +179,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
wxTE_PROCESS_ENTER); wxTE_PROCESS_ENTER);
/* Create the search button */ /* Create the search button */
wxButton *search_button = search_button =
new wxButton( playlist_panel, Search_Event, wxU(_("Search")) ); new wxButton( playlist_panel, Search_Event, wxU(_("Search")) );
...@@ -463,7 +463,7 @@ void Playlist::OnRSort( wxCommandEvent& WXUNUSED(event) ) ...@@ -463,7 +463,7 @@ void Playlist::OnRSort( wxCommandEvent& WXUNUSED(event) )
void Playlist::OnSearchTextChange( wxCommandEvent& WXUNUSED(event) ) void Playlist::OnSearchTextChange( wxCommandEvent& WXUNUSED(event) )
{ {
/* Does nothing */ search_button->SetDefault();
} }
void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) ) void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
...@@ -490,7 +490,7 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) ) ...@@ -490,7 +490,7 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
wxListItem listitem; wxListItem listitem;
listitem.SetId( i_current ); listitem.SetId( i_current );
listview->GetItem( listitem ); listview->GetItem( listitem );
if( listitem.m_text.Contains( search_string ) ) if( listitem.m_text.Lower().Contains( search_string.Lower() ) )
{ {
i_item = i_current; i_item = i_current;
break; break;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.59 2003/09/08 12:02:16 zorglub Exp $ * $Id: wxwindows.h,v 1.60 2003/09/08 12:48:53 zorglub Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -673,7 +673,7 @@ private: ...@@ -673,7 +673,7 @@ private:
void Rebuild(); void Rebuild();
wxTextCtrl *search_text; wxTextCtrl *search_text;
wxButton *search_button;
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE();
intf_thread_t *p_intf; intf_thread_t *p_intf;
......
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