* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: playlist.cpp,v 1.23 2003/10/29 17:32:54 zorglub Exp $
+ * $Id: playlist.cpp,v 1.24 2003/11/17 00:06:19 sigmunau Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
*
/* Listview events */
EVT_LIST_ITEM_ACTIVATED(ListView_Event, Playlist::OnActivateItem)
+ EVT_LIST_COL_CLICK(ListView_Event, Playlist::OnColSelect)
EVT_LIST_KEY_DOWN(ListView_Event, Playlist::OnKeyDown)
/* Button events */
return;
}
+void Playlist::OnColSelect( wxListEvent& event )
+{
+ playlist_t *p_playlist =
+ (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return;
+ }
+ switch( event.GetColumn() )
+ {
+ case 0:
+ playlist_SortTitle( p_playlist, 0 );
+ break;
+ case 1:
+ playlist_SortAuthor( p_playlist, 0 );
+ break;
+ case 2:
+ playlist_SortGroup( p_playlist, 0 );
+ break;
+ default:
+ break;
+ }
+ vlc_object_release( p_playlist );
+
+ Rebuild();
+
+ return;
+}
+
/**********************************************************************
* Search functions
**********************************************************************/
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.69 2003/11/10 00:14:05 gbazin Exp $
+ * $Id: wxwindows.h,v 1.70 2003/11/17 00:06:19 sigmunau Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
void OnSave( wxCommandEvent& event );
void OnSort( wxCommandEvent& event );
+ void OnColSelect( wxListEvent& event );
void OnUp( wxCommandEvent& event);
void OnDown( wxCommandEvent& event);