Commit 84b846bf authored by Clément Stenac's avatar Clément Stenac

* src/playlist/* && Makefile.am

   - splitted the enormous playlist.c file
   - implemented a better item group system: groups have a name
     and must be created before use by
      playlist_CreateGroup( p_playlist, "newgroupname")

* modules/misc/sap.c
   - Create our own playlist group ("SAP") and use it

* modules/access/slp.c
   - Create our own playlist group ("SLP") and use it

* modules/demux/util/id3tag.c
   - Trigger playlist update when we have parsed our tag

* modules/gui/wxwindows/interface.cpp
   - Fixed the about box by using vlc_wraptext
   - Added the simple open and the streaming wizard icons
           *** Icons need to be changed ! ***
   - Added the visualization to the extended gui

* modules/gui/wxwindows/preferences.cpp && include/vlc_help.h
   - Enlarged the window to fit the wrapped text
   - Added help for audio encoders

* modules/gui/wxwindows/stream.cpp  & open.cpp & include/vlc_interface.h
   - Created a "streaming wizard" window (3-step streaming)

* modules/gui/wxwindows/iteminfo.cpp:
   - Group change is now based on the name

* modules/gui/wxwindows/playlist.cpp
   - Added author and group columns to the listview
   - Redesigned the window
   - Added the Sort menu with several criteria (title, author, group)
   - Added up/down buttons to move an item in the playlist
   - Added the group menu to enable/disable a group in an understandable way


TODO:
-----

* playlist core :
   - Implement advanced sort capabilities  (multi-criteria)
   - File format to save the new features
   - export playlist (to M3U, eg)
   - more robust group creation (duplicates check, ...)

* wxWindows playlist:
   The idea of a treeview seems impossible, because of wxWindow's treeview,
   that don't allow multi-selection, and, as far as I know, multi-columns.
   - Provide a frontend to advanced sort (when it's done :-) )
   - Allow moving items by drag & drop (well, if possible, haven't checked yet)
   - Allow moving several items at once
   - Customizable listview (ability to remove/move columns)
   - Find a solution to the focus problem
     (when you change track, the selected one scrolls at the
      bottom of the visible screen)

* wxWindows interface:
   - New icons, our icons begin to get old and not so pretty
   - Find a solution for the volume bar (nobody understands what it is)
parent f0c46561
......@@ -296,6 +296,10 @@ SOURCES_libvlc_common = \
src/interface/interface.c \
src/interface/intf_eject.c \
src/playlist/playlist.c \
src/playlist/sort.c \
src/playlist/loadsave.c \
src/playlist/group.c \
src/playlist/item.c \
src/input/input.c \
src/input/stream.c \
src/input/demux.c \
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.84 2003/10/29 01:33:27 gbazin Exp $
* $Id: vlc_common.h,v 1.85 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -184,6 +184,7 @@ typedef struct msg_subscription_t msg_subscription_t;
/* Playlist */
typedef struct playlist_t playlist_t;
typedef struct playlist_item_t playlist_item_t;
typedef struct playlist_group_t playlist_group_t;
/* Modules */
typedef struct module_bank_t module_bank_t;
......
......@@ -2,7 +2,7 @@
* vlc_help.h: Help strings
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlc_help.h,v 1.3 2003/10/08 19:40:42 gbazin Exp $
* $Id: vlc_help.h,v 1.4 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Anil Daoud <anil@videolan.org>
......@@ -58,6 +58,9 @@
#define AOUT_TITLE N_("Audio output modules settings")
#define AOUT_HELP N_("These are general settings for audio output modules.")
#define AOUT_ENC_TITLE N_("Audio encoders settings")
#define AOUT_ENC_HELP N_("These are general settings for audio encoding modules.")
#define CHROMA_TITLE N_("Chroma modules settings")
#define CHROMA_HELP N_(" ")
......
......@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vlc_interface.h,v 1.7 2003/10/14 22:41:41 gbazin Exp $
* $Id: vlc_interface.h,v 1.8 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -135,6 +135,8 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
#define INTF_DIALOG_NET 4
#define INTF_DIALOG_SAT 5
#define INTF_DIALOG_STREAM 8
#define INTF_DIALOG_PLAYLIST 10
#define INTF_DIALOG_MESSAGES 11
#define INTF_DIALOG_FILEINFO 12
......
......@@ -2,7 +2,7 @@
* vlc_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_playlist.h,v 1.14 2003/10/06 16:23:30 zorglub Exp $
* $Id: vlc_playlist.h,v 1.15 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -59,6 +59,12 @@ struct playlist_item_t
char * psz_author; /**< Author */
};
struct playlist_group_t
{
char * psz_name; /**< name of the group */
int i_id; /**< Identifier for the group */
};
/**
* Playlist status
*/
......@@ -81,7 +87,10 @@ struct playlist_t
int i_enabled; /**< How many items are enabled ? */
playlist_item_t ** pp_items; /**< array of pointers to the
* playlist items */
int i_groups; /**< How many groups are in the playlist */
playlist_group_t ** pp_groups;/**< array of pointers to the playlist
* groups */
int i_max_id; /**< Maximal group id given */
input_thread_t * p_input; /**< the input thread ascosiated
* with the current item */
/*@}*/
......@@ -90,8 +99,8 @@ struct playlist_t
#define SORT_NORMAL 0
#define SORT_REVERSE 1
#define PLAYLIST_TYPE_MANUAL 0
#define PLAYLIST_TYPE_SAP 1
#define PLAYLIST_TYPE_MANUAL 1
#define PLAYLIST_TYPE_SAP 2
/*****************************************************************************
* Prototypes
......@@ -117,7 +126,15 @@ VLC_EXPORT( int, playlist_Disable, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_Enable, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_DisableGroup, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_EnableGroup, ( playlist_t *, int ) );
VLC_EXPORT( int, playlist_Sort, ( playlist_t *, int) );
VLC_EXPORT( playlist_group_t *, playlist_CreateGroup, (playlist_t *, char* ) );
VLC_EXPORT( int, playlist_DeleteGroup, (playlist_t *, int ) );
VLC_EXPORT( char *, playlist_FindGroup, (playlist_t *, int ) );
VLC_EXPORT( int, playlist_SortTitle, ( playlist_t *, int) );
VLC_EXPORT( int, playlist_SortAuthor, ( playlist_t *, int) );
VLC_EXPORT( int, playlist_SortGroup, ( playlist_t *, int) );
VLC_EXPORT( int, playlist_Move, ( playlist_t *, int, int ) );
VLC_EXPORT( int, playlist_LoadFile, ( playlist_t *, const char * ) );
VLC_EXPORT( int, playlist_SaveFile, ( playlist_t *, const char * ) );
......
......@@ -2,7 +2,7 @@
* slp.c: SLP access plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: slp.c,v 1.16 2003/09/14 16:41:48 zorglub Exp $
* $Id: slp.c,v 1.17 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Loc Minier <lool@videolan.org>
*
......@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
......@@ -44,6 +44,8 @@ static int Init ( vlc_object_t * );
static void End ( vlc_object_t * );
static int Demux ( input_thread_t * );
int i_group;
/*****************************************************************************
* Module descriptor
*****************************************************************************/
......@@ -112,10 +114,12 @@ static SLPBoolean AttrCallback( SLPHandle slph_slp,
/* or there was a problem with getting the data we requested */
if( (slpe_errcode != SLP_OK) )
{
/* msg_Err( (vlc_object_t*)NULL,
#if 0
msg_Err( (vlc_object_t*)NULL,
"AttrCallback got an error %i with attribute %s",
slpe_errcode,
psz_attrlist ); */
psz_attrlist );
#endif
return SLP_TRUE;
}
......@@ -145,7 +149,7 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
{
return SLP_TRUE;
}
msg_Dbg(p_input,"URL: %s",psz_srvurl);
/* or there was a problem with getting the data we requested */
......@@ -188,6 +192,9 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
p_playlist_item->b_autodeletion = VLC_FALSE;
p_playlist_item->i_options = 0;
p_playlist_item->ppsz_options = 0;
p_playlist_item->psz_author = NULL;
p_playlist_item->i_group = i_group;
p_playlist_item->b_enabled = VLC_TRUE;
/* search the description of the stream */
if( SLPOpen( config_GetPsz( p_input, "slp-lang" ),
......@@ -258,7 +265,7 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
{
return SLP_TRUE;
}
msg_Dbg(p_input,"Services: %s",psz_srvurl);
/* or there was a problem with getting the data we requested */
......@@ -289,14 +296,14 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
if(!psz_eos) break;
if(!strncasecmp(psz_eos+1,"service:",8)) break;
}
if(psz_eos)
if(psz_eos)
*psz_eos = '\0';
psz_service = strdup( psz_srvurl);
msg_Dbg(p_input,"Getting details for %s",psz_service);
slpe_result = SLPFindSrvs( slph_slp2,
psz_service,
config_GetPsz( p_input, "slp-scopelist" ),
......@@ -306,9 +313,10 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
if(psz_eos)
psz_srvurl = psz_eos;
// SLPClose( slph_slp2 );
#if 0
SLPClose( slph_slp2 );
#endif
if( slpe_result != SLP_OK )
{
msg_Err( p_input,
......@@ -330,10 +338,11 @@ static SLPBoolean SrvTypeCallback( SLPHandle slph_slp,
*****************************************************************************/
static int Open( vlc_object_t * p_this )
{
input_thread_t * p_input = (input_thread_t *)p_this;
SLPError slpe_result;
SLPHandle slph_slp;
playlist_t * p_playlist;
input_thread_t * p_input = (input_thread_t *)p_this;
SLPError slpe_result;
SLPHandle slph_slp;
playlist_t * p_playlist;
playlist_group_t * p_group;
/* remove the "slp:" entry of the playlist */
p_playlist = (playlist_t *) vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
......@@ -344,6 +353,8 @@ static int Open( vlc_object_t * p_this )
return VLC_FALSE;
}
p_group = playlist_CreateGroup( p_playlist , "SLP" );
i_group = p_group->i_id;
p_playlist->pp_items[p_playlist->i_index]->b_autodeletion = VLC_TRUE;
vlc_object_release( (vlc_object_t *)p_playlist );
......
......@@ -2,7 +2,7 @@
* id3tag.c: id3 tag parser/skipper based on libid3tag
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: id3tag.c,v 1.13 2003/10/25 00:49:14 sam Exp $
* $Id: id3tag.c,v 1.14 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -76,6 +76,7 @@ static void ParseID3Tag( input_thread_t *p_input, uint8_t *p_data, int i_size )
return;
}
val.b_bool = VLC_FALSE;
p_id3_tag = id3_tag_parse( p_data, i_size );
p_category = input_InfoCategory( p_input, "ID3" );
i = 0;
......@@ -93,42 +94,64 @@ static void ParseID3Tag( input_thread_t *p_input, uint8_t *p_data, int i_size )
i_genre = strtol( psz_temp, &psz_endptr, 10 );
if( psz_temp != psz_endptr && i_genre >= 0 && i_genre < NUM_GENRES )
{
input_AddInfo( p_category, (char *)p_frame->description, ppsz_genres[atoi(psz_temp)]);
input_AddInfo( p_category, (char *)p_frame->description,
ppsz_genres[atoi(psz_temp)]);
}
else
{
input_AddInfo( p_category, (char *)p_frame->description, psz_temp );
input_AddInfo( p_category, (char *)p_frame->description,
psz_temp );
}
}
else if ( !strcmp(p_frame->id, ID3_FRAME_TITLE ) )
{
p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT );
p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
FIND_PARENT );
if( p_playlist )
{
p_playlist->pp_items[p_playlist->i_index]->psz_name = strdup( psz_temp );
p_playlist->pp_items[p_playlist->i_index]->psz_name =
strdup( psz_temp );
val.b_bool = VLC_TRUE;
vlc_object_release( p_playlist );
}
input_AddInfo( p_category, (char *)p_frame->description, psz_temp );
input_AddInfo( p_category, (char *)p_frame->description,
psz_temp );
}
else if ( !strcmp(p_frame->id, ID3_FRAME_ARTIST ) )
{
p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT );
p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
FIND_PARENT );
if( p_playlist )
{
p_playlist->pp_items[p_playlist->i_index]->psz_author = strdup( psz_temp );
p_playlist->pp_items[p_playlist->i_index]->psz_author =
strdup( psz_temp );
val.b_bool = VLC_TRUE;
vlc_object_release( p_playlist );
}
input_AddInfo( p_category, (char *)p_frame->description, psz_temp );
input_AddInfo( p_category, (char *)p_frame->description,
psz_temp );
}
else
{
input_AddInfo( p_category, (char *)p_frame->description, psz_temp );
input_AddInfo( p_category, (char *)p_frame->description,
psz_temp );
}
free( psz_temp );
}
i++;
}
id3_tag_delete( p_id3_tag );
if(val.b_bool == VLC_TRUE )
{
p_playlist = vlc_object_find( p_input,
VLC_OBJECT_PLAYLIST, FIND_PARENT );
if( p_playlist )
{
val.b_bool = VLC_TRUE;
var_Set( p_playlist, "intf-change", val );
vlc_object_release( p_playlist );
}
}
val.b_bool = VLC_TRUE;
var_Change( p_input, "demuxed-id3", VLC_VAR_SETVALUE, &val, NULL );
}
......
......@@ -5,6 +5,7 @@ SOURCES_wxwindows = \
dialogs.cpp \
open.cpp \
streamout.cpp \
stream.cpp \
messages.cpp \
playlist.cpp \
iteminfo.cpp \
......
......@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dialogs.cpp,v 1.9 2003/10/15 12:24:14 gbazin Exp $
* $Id: dialogs.cpp,v 1.10 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -60,6 +60,8 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider::OnMessages)
EVT_COMMAND(INTF_DIALOG_PREFS, wxEVT_DIALOG,
DialogsProvider::OnPreferences)
EVT_COMMAND(INTF_DIALOG_STREAM, wxEVT_DIALOG,
DialogsProvider::OnStreamDialog)
EVT_COMMAND(INTF_DIALOG_FILEINFO, wxEVT_DIALOG,
DialogsProvider::OnFileInfo)
EVT_COMMAND(INTF_DIALOG_POPUPMENU, wxEVT_DIALOG,
......@@ -83,6 +85,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
p_fileinfo_dialog = NULL;
p_prefs_dialog = NULL;
p_file_generic_dialog = NULL;
p_stream_dialog = NULL;
/* Give our interface a nice little icon */
p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
......@@ -104,6 +107,8 @@ DialogsProvider::~DialogsProvider()
if( p_messages_dialog ) delete p_messages_dialog;
if( p_fileinfo_dialog ) delete p_fileinfo_dialog;
if( p_file_generic_dialog ) delete p_file_generic_dialog;
if( p_stream_dialog ) delete p_stream_dialog;
if( p_intf->p_sys->p_icon ) delete p_intf->p_sys->p_icon;
......@@ -177,6 +182,18 @@ void DialogsProvider::OnPreferences( wxCommandEvent& WXUNUSED(event) )
}
}
void DialogsProvider::OnStreamDialog( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the stream window */
if( !p_stream_dialog )
p_stream_dialog = new StreamDialog( p_intf, this );
if( p_stream_dialog )
{
p_stream_dialog->Show( !p_stream_dialog->IsShown() );
}
}
void DialogsProvider::OnOpenFileGeneric( wxCommandEvent& event )
{
intf_dialog_args_t *p_arg = (intf_dialog_args_t *)event.GetClientData();
......@@ -306,7 +323,8 @@ void DialogsProvider::Open( int i_access_method, int i_arg )
{
/* Show/hide the open dialog */
if( !p_open_dialog )
p_open_dialog = new OpenDialog( p_intf, this, i_access_method, i_arg );
p_open_dialog = new OpenDialog(p_intf, this, i_access_method, i_arg ,
OPEN_NORMAL );
if( p_open_dialog )
{
......
......@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.68 2003/10/29 01:33:27 gbazin Exp $
* $Id: interface.cpp,v 1.69 2003/10/29 17:32:54 zorglub Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -39,10 +39,13 @@
/* include the toolbar graphics */
#include "bitmaps/file.xpm"
#include "bitmaps/stream.xpm"
#include "bitmaps/disc.xpm"
#include "bitmaps/net.xpm"
#if 0
#include "bitmaps/sat.xpm"
#include "bitmaps/sat.xpm"
#endif
#include "bitmaps/play.xpm"
#include "bitmaps/pause.xpm"
......@@ -53,6 +56,8 @@
#include "bitmaps/fast.xpm"
#include "bitmaps/slow.xpm"
#include <wx/listctrl.h>
#define TOOLBAR_BMP_WIDTH 36
#define TOOLBAR_BMP_HEIGHT 36
......@@ -113,14 +118,19 @@ END_EVENT_TABLE()
enum
{
/* menu items */
MenuDummy_Event = wxID_HIGHEST + 1000,
Exit_Event = wxID_HIGHEST,
OpenFileSimple_Event,
OpenAdv_Event,
OpenFile_Event,
OpenDisc_Event,
OpenNet_Event,
OpenSat_Event,
OpenOther_Event,
EjectDisc_Event,
Stream_Event,
Playlist_Event,
Logs_Event,
FileInfo_Event,
......@@ -144,6 +154,8 @@ enum
Saturation_Event,
Ratio_Event,
Visual_Event,
/* it is important for the id corresponding to the "About" command to have
* this standard value as otherwise it won't be handled properly under Mac
* (where it is special and put into the "Apple" menu) */
......@@ -166,6 +178,7 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
EVT_CHECKBOX( Adjust_Event, Interface::OnEnableAdjust)
EVT_COMBOBOX( Ratio_Event, Interface::OnRatio)
EVT_CHECKBOX( Visual_Event, Interface::OnEnableVisual)
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
EVT_CONTEXT_MENU(Interface::OnContextMenu2)
......@@ -174,10 +187,12 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
/* Toolbar events */
EVT_MENU(OpenFileSimple_Event, Interface::OnShowDialog)
EVT_MENU(OpenAdv_Event, Interface::OnShowDialog)
EVT_MENU(OpenFile_Event, Interface::OnShowDialog)
EVT_MENU(OpenDisc_Event, Interface::OnShowDialog)
EVT_MENU(OpenNet_Event, Interface::OnShowDialog)
EVT_MENU(OpenSat_Event, Interface::OnShowDialog)
EVT_MENU(Stream_Event, Interface::OnStream)
EVT_MENU(StopStream_Event, Interface::OnStopStream)
EVT_MENU(PlayStream_Event, Interface::OnPlayStream)
EVT_MENU(PrevStream_Event, Interface::OnPrevStream)
......@@ -211,7 +226,6 @@ Interface::Interface( intf_thread_t *_p_intf ):
SetIcon( wxIcon( vlc_xpm ) );
/* Create a sizer for the main frame */
//frame_sizer= new wxFlexGridSizer( 1, 0, 0);
frame_sizer = new wxBoxSizer( wxVERTICAL );
SetSizer( frame_sizer );
......@@ -280,6 +294,8 @@ Interface::~Interface()
*****************************************************************************/
void Interface::CreateOurMenuBar()
{
#define HELP_SIMPLE N_("Quick file open")
#define HELP_ADV N_("Advanced open")
#define HELP_FILE N_("Open a file")
#define HELP_DISC N_("Open a DVD or (S)VCD")
#define HELP_NET N_("Open a network stream")
......@@ -287,6 +303,9 @@ void Interface::CreateOurMenuBar()
#define HELP_EJECT N_("Eject the DVD/CD")
#define HELP_EXIT N_("Exit this program")
#define HELP_STREAM N_("Streaming wizard")
#define HELP_OTHER N_("Open other types of inputs")
#define HELP_PLAYLIST N_("Open the playlist")
#define HELP_LOGS N_("Show the program logs")
#define HELP_FILEINFO N_("Show information about the file being played")
......@@ -299,22 +318,23 @@ void Interface::CreateOurMenuBar()
/* Create the "File" menu */
wxMenu *file_menu = new wxMenu;
file_menu->Append( OpenFileSimple_Event, wxU(_("Simple &Open ...")),
wxU(_(HELP_FILE)) );
wxU(_(HELP_SIMPLE)) );
file_menu->AppendSeparator();
file_menu->Append( OpenFile_Event, wxU(_("Open &File...")),
wxU(_(HELP_FILE)) );
wxT(_(HELP_FILE)));
file_menu->Append( OpenDisc_Event, wxU(_("Open &Disc...")),
wxU(_(HELP_DISC)) );
wxT(_(HELP_DISC)));
file_menu->Append( OpenNet_Event, wxU(_("Open &Network Stream...")),
wxU(_(HELP_NET)) );
wxT(_(HELP_NET)));
#if 0
file_menu->Append( OpenSat_Event, wxU(_("Open &Satellite Stream...")),
wxU(_(HELP_NET)) );
#endif
#if 0
file_menu->AppendSeparator();
file_menu->Append( EjectDisc_Event, wxU(_("&Eject Disc")),
wxU(_(HELP_EJECT)) );
#endif
file_menu->Append( Stream_Event, wxU(_("Streaming Wizard...")),
wxU(_(HELP_STREAM)) );
file_menu->AppendSeparator();
file_menu->Append( Exit_Event, wxU(_("E&xit")), wxU(_(HELP_EXIT)) );
......@@ -379,6 +399,7 @@ void Interface::CreateOurMenuBar()
void Interface::CreateOurToolBar()
{
#define HELP_STOP N_("Stop current playlist item")
#define HELP_PLAY N_("Play current playlist item")
#define HELP_PAUSE N_("Pause current playlist item")
#define HELP_PLO N_("Open playlist")
......@@ -395,6 +416,11 @@ void Interface::CreateOurToolBar()
toolbar->SetToolBitmapSize( wxSize(TOOLBAR_BMP_WIDTH,TOOLBAR_BMP_HEIGHT) );
toolbar->AddTool( OpenFileSimple_Event, wxU(_("Simple open")), wxBitmap( file_xpm ),
wxU(_(HELP_SIMPLE)) );
toolbar->AddSeparator();
toolbar->AddTool( OpenFile_Event, wxU(_("File")), wxBitmap( file_xpm ),
wxU(_(HELP_FILE)) );
toolbar->AddTool( OpenDisc_Event, wxU(_("Disc")), wxBitmap( disc_xpm ),
......@@ -406,6 +432,12 @@ void Interface::CreateOurToolBar()
wxU(_(HELP_SAT)) );
#endif
toolbar->AddSeparator();
toolbar->AddTool( Stream_Event, wxU(_("Stream")), wxBitmap( stream_xpm ),
wxU(_(HELP_STREAM)) );
toolbar->AddSeparator();
toolbar->AddTool( StopStream_Event, wxU(_("Stop")), wxBitmap( stop_xpm ),
wxU(_(HELP_STOP)) );
toolbar->AddTool( PlayStream_Event, wxU(_("Play")), wxBitmap( play_xpm ),
......@@ -489,7 +521,8 @@ void Interface::CreateOurExtraPanel()
wxBoxSizer *extra_sizer = new wxBoxSizer( wxHORIZONTAL );
/* Create static box to surround the adjust controls */
adjust_box = new wxStaticBox( extra_frame, -1, wxU(_("Image adjust")) );
wxStaticBox *adjust_box =
new wxStaticBox( extra_frame, -1, wxU(_("Image adjust")) );
/* Create the size for the frame */
wxStaticBoxSizer *adjust_sizer =
......@@ -549,13 +582,16 @@ void Interface::CreateOurExtraPanel()
extra_sizer->Add(adjust_sizer,1,wxBOTTOM,5);
/* Create static box to surround the other controls */
other_box = new wxStaticBox( extra_frame, -1, wxU(_("Video Options")) );
/* Create sizer to surround the other controls */
wxBoxSizer *other_sizer = new wxBoxSizer( wxVERTICAL );
wxStaticBox *video_box =
new wxStaticBox( extra_frame, -1, wxU(_("Video Options")) );
/* Create the sizer for the frame */
wxStaticBoxSizer *other_sizer =
new wxStaticBoxSizer( other_box, wxVERTICAL );
other_sizer->SetMinSize( -1, 50 );
wxStaticBoxSizer *video_sizer =
new wxStaticBoxSizer( video_box, wxVERTICAL );
video_sizer->SetMinSize( -1, 50 );
static const wxString ratio_array[] =
{
......@@ -576,7 +612,30 @@ void Interface::CreateOurExtraPanel()
ratio_sizer->Add( ratio_combo, 0, wxALL, 2 );
ratio_sizer->Layout();
other_sizer->Add(ratio_sizer,0,wxALL,0 );
video_sizer->Add( ratio_sizer , 0 , wxALL , 0 );
video_sizer->Layout();
wxBoxSizer *visual_sizer = new wxBoxSizer( wxHORIZONTAL );
wxCheckBox *visual_checkbox = new wxCheckBox( extra_frame, Visual_Event,
wxU(_("Visualisation")) );
visual_sizer->Add( visual_checkbox, 0, wxEXPAND, 0);
visual_sizer->Layout();
wxStaticBox *audio_box =
new wxStaticBox( extra_frame, -1, wxU(_("Audio Options")) );
/* Create the sizer for the frame */
wxStaticBoxSizer *audio_sizer =
new wxStaticBoxSizer( audio_box, wxVERTICAL );
audio_sizer->SetMinSize( -1, 50 );
audio_sizer->Add( visual_sizer, 0, wxALL, 0);
audio_sizer->Layout();
other_sizer->Add( video_sizer, 0, wxALL | wxEXPAND , 0);
other_sizer->Add( audio_sizer , 0 , wxALL | wxEXPAND , 0 );
other_sizer->Layout();
extra_sizer->Add(other_sizer,0,wxBOTTOM,5);
......@@ -588,6 +647,12 @@ void Interface::CreateOurExtraPanel()
extra_sizer->SetSizeHints(extra_frame);
/* Write down initial values */
if( strstr( config_GetPsz( p_intf, "audio-filter" ), "visual" ) )
{
visual_checkbox->SetValue(1);
}
psz_filters = config_GetPsz( p_intf, "filter" );
if(psz_filters == NULL) psz_filters=strdup("");
......@@ -820,7 +885,7 @@ void Interface::OnAbout( wxCommandEvent& WXUNUSED(event) )
msg.Printf( wxString(wxT("VLC media player " VERSION)) +
wxU(_(" (wxWindows interface)\n\n")) +
wxU(_("(C) 1996-2003 - the VideoLAN Team\n\n")) +
wxU( INTF_ABOUT_MSG ) + wxT("\n\n") +
wxU( vlc_wraptext(INTF_ABOUT_MSG,WRAPCOUNT,ISUTF8) ) + wxT("\n\n") +
wxU(_("The VideoLAN team <videolan@videolan.org>\n"
"http://www.videolan.org/\n\n")) );
......@@ -839,6 +904,8 @@ void Interface::OnShowDialog( wxCommandEvent& event )
case OpenFileSimple_Event:
i_id = INTF_DIALOG_FILE_SIMPLE;
break;
case OpenAdv_Event:
i_id = INTF_DIALOG_FILE;
case OpenFile_Event:
i_id = INTF_DIALOG_FILE;
break;
......@@ -873,6 +940,14 @@ void Interface::OnShowDialog( wxCommandEvent& event )
}
}
void Interface::OnStream( wxCommandEvent& event )
{
StreamDialog *p_stream_dialog = new StreamDialog(p_intf,this);
p_stream_dialog->Show();
}
void Interface::OnExtra(wxCommandEvent& event)
{
if( b_extra == VLC_FALSE)
......@@ -995,6 +1070,18 @@ void Interface::OnRatio( wxCommandEvent& event )
config_PutPsz( p_intf, "aspect-ratio", ratio_combo->GetValue().mb_str() );
}
void Interface::OnEnableVisual(wxCommandEvent& event)
{
if( event.IsChecked() )
{
config_PutPsz( p_intf, "audio-filter", "visual" );
}
else
{