Commit a8855655 authored by Clément Stenac's avatar Clément Stenac

* modules/gui/wxwindows/preferences.cpp:

	- Created the "General Settings" section
	- Added help strings in the two main sections,
		in the libvlc categories,
		and in the module capabilities

* modules/gui/wxwindows/playlist.cpp & wxwindows.h
	-Implemented random, loop and repeat using variables
	-The eye candy of the dialog box is not very good
	 but I have no idea how to improve it.
	-Focus on the currently playing item

* src/libvlc.h:
	- Added help strings for the libvlc categories
	- Changed a few "advanced" flag

* include/vlc_help.h:
	- Help strings for the two main sections
	- Help string for the module capabilities (both by Anil)

* po/*: updated potfiles with the new strings
parent 03f4adcd
/*****************************************************************************
* vlc_help.h: Help strings
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlc_help.h,v 1.1 2003/09/22 14:40:10 zorglub Exp $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Anil Daoud <anil@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _VLC_HELP_H
#define _VLC_HELP_H 1
/*
* First, we need help strings for the General Settings and for the
* Plugins screen
*/
#define GENERAL_HELP N_( \
"VLC Preferences. \nConfigure some global options in General Settings" \
"\n and configure each VLC plugin in the Plugins section.\n" \
"Click on 'Advanced Options' to see every options." )
#define PLUGIN_HELP N_( \
"In this tree, you can set options for every plugin used by VLC.\n" \
"Plugins are sorted by type.\nHave fun tuning VLC !" )
/*
* Then, help for each module capabilities.
*/
#define ACCESS_HELP N_( \
"Access modules settings\n" \
"Settings related to the various access methods used by VLC\n" \
"Common settings you may want to alter are http proxy or\n" \
"caching settings" )
#define AUDIO_FILTER_HELP N_("Audio filters settings\n" \
"Audio filters can be set in the Audio section, and configured\n" \
"here.")
#define AOUT_HELP N_("Audio output modules settings")
#define CHROMA_HELP N_("Chroma modules settings")
#define DECODER_HELP N_( \
"Decoder modules settings\n" \
"In the Subsdec section you may want to set your preferred subtitles\n" \
"text encoding\n")
#define DEMUX_HELP N_( \
"Demuxer settings")
#define INTERFACE_HELP N_( \
"Interface plugins settings\n" \
"Interface plugins can be enabled in the Interface section and\n" \
"configured here.")
#define SOUT_HELP N_( \
"Stream output access modules settings\n" \
"In this section you can set the caching value for the UDP stream\n" \
"output access module")
#define SUBTITLE_DEMUX_HELP N_( \
"Subtitle demuxer settings\n" \
"In this section you can force the behaviour of the subtitle demuxer,\n" \
"for example by setting the subtitles type or file name.")
#define TEXT_HELP N_( \
"Text renderer settings\n" \
"Use these settings to choose the font you want VLC to use for text\n" \
"rendering (to display subtitles for example)")
#define VOUT_HELP N_( \
"Video output modules settings\n" \
"Choose your preferred video output in the Video section, \n" \
"and configure it here." )
#define VIDEO_FILTER_HELP N_( \
"Video filters settings\n" \
"Video filters can be enabled in the Video section and configured" \
"here. Configure the \"adjust\" filter to modify \n" \
"contrast/hue/saturation settings.")
/*
* A little help for modules with unknown capabilities
*/
#define UNKNOWN_HELP N_("No help available")
#endif /* VLC_HELP_H */
......@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: playlist.cpp,v 1.20 2003/09/21 18:07:51 gbazin Exp $
* $Id: playlist.cpp,v 1.21 2003/09/22 14:40:10 zorglub Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
......@@ -59,6 +59,7 @@ enum
DeleteSelection_Event,
Random_Event,
Loop_Event,
Repeat_Event,
SelectAll_Event,
SearchText_Event,
......@@ -81,6 +82,7 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
EVT_MENU(DeleteSelection_Event, Playlist::OnDeleteSelection)
EVT_MENU(SelectAll_Event, Playlist::OnSelectAll)
EVT_CHECKBOX(Random_Event, Playlist::OnRandom)
EVT_CHECKBOX(Repeat_Event, Playlist::OnRepeat)
EVT_CHECKBOX(Loop_Event, Playlist::OnLoop)
/* Listview events */
......@@ -107,11 +109,19 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
{
/* Initializations */
p_intf = _p_intf;
vlc_value_t val;
i_update_counter = 0;
b_need_update = VLC_FALSE;
vlc_mutex_init( p_intf, &lock );
SetIcon( *p_intf->p_sys->p_icon );
var_Create( p_intf, "random", VLC_VAR_BOOL );
var_Change( p_intf, "random", VLC_VAR_INHERITVALUE, & val, NULL );
var_Create( p_intf, "loop", VLC_VAR_BOOL );
var_Create( p_intf, "loop", VLC_VAR_BOOL );
var_Change( p_intf, "repeat", VLC_VAR_INHERITVALUE, & val, NULL );
var_Change( p_intf, "repeat", VLC_VAR_INHERITVALUE, & val, NULL );
/* Create our "Manage" menu */
wxMenu *manage_menu = new wxMenu;
manage_menu->Append( AddFile_Event, wxU(_("&Simple Add...")) );
......@@ -147,29 +157,45 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
* themselves to the size of a listview, and with a wxDefaultSize the
* playlist window is ridiculously small */
listview = new wxListView( playlist_panel, ListView_Event,
wxDefaultPosition, wxSize( 355, 300 ),
wxDefaultPosition, wxSize( 305, 300 ),
wxLC_REPORT | wxSUNKEN_BORDER );
listview->InsertColumn( 0, wxU(_("Url")) );
listview->InsertColumn( 1, wxU(_("Duration")) );
listview->SetColumnWidth( 0, 250 );
listview->SetColumnWidth( 1, 100 );
#if 0
listview->InsertColumn( 1, wxU(_("Duration")) );
#endif
listview->SetColumnWidth( 0, 300 );
#if 0
listview->SetColumnWidth( 1, 100 );
#endif
/* Create the Random checkbox */
wxCheckBox *random_checkbox =
new wxCheckBox( playlist_panel, Random_Event, wxU(_("Random")) );
int b_random = config_GetInt( p_intf, "random") ;
random_checkbox->SetValue( b_random );
var_Get( p_intf, "random", &val);
vlc_bool_t b_random = val.b_bool;
random_checkbox->SetValue( b_random == VLC_FALSE ? 0 : 1);
/* Create the Loop Checkbox */
wxCheckBox *loop_checkbox =
new wxCheckBox( playlist_panel, Loop_Event, wxU(_("Loop")) );
int b_loop = config_GetInt( p_intf, "loop") ;
var_Get( p_intf, "loop", &val );
int b_loop = val.b_bool ;
loop_checkbox->SetValue( b_loop );
/* Create the Repeat one checkbox */
wxCheckBox *repeat_checkbox =
new wxCheckBox( playlist_panel, Repeat_Event, wxU(_("Repeat one")) );
var_Get( p_intf, "repeat", &val );
int b_repeat = val.b_bool ;
repeat_checkbox->SetValue( b_repeat );
/* Create the Search Textbox */
search_text =
new wxTextCtrl( playlist_panel, SearchText_Event, wxT(""),
wxDefaultPosition, wxSize( 100, -1),
wxDefaultPosition, wxSize( 140, -1),
wxTE_PROCESS_ENTER);
/* Create the search button */
......@@ -178,20 +204,34 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
/* Place everything in sizers */
wxBoxSizer *search_sizer = new wxBoxSizer( wxHORIZONTAL );
search_sizer->Add( search_text, 0, wxEXPAND|wxALL, 5);
search_sizer->Add( search_button, 0, wxEXPAND|wxALL, 5);
search_sizer->Add( random_checkbox, 0,
wxEXPAND|wxALIGN_RIGHT|wxALL, 5);
search_sizer->Add( loop_checkbox, 0,
wxEXPAND|wxALIGN_RIGHT|wxALL, 5);
wxBoxSizer *button_sizer = new wxBoxSizer( wxVERTICAL );
button_sizer->Add( random_checkbox, 0,
wxEXPAND|wxALIGN_RIGHT, 5);
button_sizer->Add( loop_checkbox, 0,
wxEXPAND|wxALIGN_RIGHT, 5);
button_sizer->Add( repeat_checkbox, 0,
wxEXPAND|wxALIGN_RIGHT, 5);
button_sizer->Layout();
wxBoxSizer *search_sizer = new wxBoxSizer( wxVERTICAL );
search_sizer->Add( search_text, 0, wxALL|wxALIGN_CENTER, 5);
search_sizer->Add( search_button, 0, wxALL|wxALIGN_CENTER, 5);
search_sizer->Layout();
wxBoxSizer *bottom_sizer = new wxBoxSizer( wxHORIZONTAL );
bottom_sizer->Add( search_sizer , 0, wxALL|wxALIGN_CENTER, 5 );
bottom_sizer->Add( button_sizer , 0, wxALL|wxALIGN_CENTER, 5 );
bottom_sizer->Layout();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( listview, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( search_sizer, 0 , wxALIGN_CENTRE);
panel_sizer->Add( bottom_sizer, 0 , wxALIGN_CENTRE);
panel_sizer->Layout();
playlist_panel->SetSizerAndFit( panel_sizer );
......@@ -254,7 +294,10 @@ void Playlist::Rebuild()
wxString filename = wxU(p_playlist->pp_items[i]->psz_name);
listview->InsertItem( i, filename );
/* FIXME: we should try to find the actual duration... */
listview->SetItem( i, 1, wxU(_("no info")) );
/* While we don't use it, hide it, it's ugly */
#if 0
listview->SetItem( i, 1, wxU(_("no info")) );
#endif
}
vlc_mutex_unlock( &p_playlist->object_lock );
......@@ -264,6 +307,9 @@ void Playlist::Rebuild()
listitem.SetTextColour( *wxRED );
listview->SetItem( listitem );
// listview->Select( p_playlist->i_index, TRUE );
listview->Focus( p_playlist->i_index );
vlc_object_release( p_playlist );
}
......@@ -518,14 +564,49 @@ void Playlist::OnDeleteSelection( wxCommandEvent& WXUNUSED(event) )
void Playlist::OnRandom( wxCommandEvent& event )
{
config_PutInt( p_intf , "random" ,
event.IsChecked() ? VLC_TRUE : VLC_FALSE );
vlc_value_t val;
val.b_bool = event.IsChecked();
// ? VLC_TRUE : VLC_FALSE ;
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
var_Set( p_playlist , "random", val);
vlc_object_release( p_playlist );
}
void Playlist::OnLoop ( wxCommandEvent& event )
{
config_PutInt( p_intf, "loop",
event.IsChecked() ? VLC_TRUE : VLC_FALSE );
vlc_value_t val;
val.b_bool = event.IsChecked();
// ? VLC_TRUE : VLC_FALSE ;
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
var_Set( p_playlist , "loop", val);
vlc_object_release( p_playlist );
}
void Playlist::OnRepeat ( wxCommandEvent& event )
{
vlc_value_t val;
val.b_bool = event.IsChecked();
// ? VLC_TRUE : VLC_FALSE ;
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
var_Set( p_playlist , "repeat", val);
vlc_object_release( p_playlist );
}
void Playlist::OnSelectAll( wxCommandEvent& WXUNUSED(event) )
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.61 2003/09/21 17:52:43 gbazin Exp $
* $Id: wxwindows.h,v 1.62 2003/09/22 14:40:10 zorglub Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -668,6 +668,7 @@ private:
void OnDeleteSelection( wxCommandEvent& event );
void OnSelectAll( wxCommandEvent& event );
void OnRandom( wxCommandEvent& event );
void OnRepeat( wxCommandEvent& event );
void OnLoop ( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
void OnKeyDown( wxListEvent& event );
......
......@@ -39,6 +39,7 @@ include/vlc_common.h
include/vlc_config.h
include/vlc_cpu.h
include/vlc_error.h
include/vlc_help.h
include/vlc_interface.h
include/vlc_keys.h
include/vlc_messages.h
......@@ -72,6 +73,7 @@ src/input/input_ext-plugins.c
src/input/input_info.c
src/input/input_programs.c
src/input/stream.c
src/input/subtitles.c
src/interface/interface.c
src/interface/intf_eject.c
src/libvlc.c
......@@ -317,6 +319,7 @@ modules/codec/theora.c
modules/codec/vorbis.c
modules/codec/xvid.c
modules/control/corba/corba.c
modules/control/gestold.c
modules/control/gestures.c
modules/control/http.c
modules/control/joystick.c
......@@ -603,6 +606,7 @@ modules/misc/dummy/input.c
modules/misc/dummy/interface.c
modules/misc/dummy/renderer.c
modules/misc/dummy/vout.c
modules/misc/equalizer.c
modules/misc/freetype.c
modules/misc/gtk_main.c
modules/misc/httpd.c
......@@ -684,6 +688,9 @@ modules/video_output/x11/xcommon.h
modules/video_output/x11/xvideo.c
modules/visualization/goom.c
modules/visualization/scope/scope.c
modules/visualization/scope/scopebeuareu.c
modules/visualization/scope/scopenoaudio.c
modules/visualization/scope/scopeold.c
modules/visualization/visual/effects.c
modules/visualization/visual/fft.c
modules/visualization/visual/fft.h
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: playlist.c,v 1.54 2003/09/20 19:37:54 hartman Exp $
* $Id: playlist.c,v 1.55 2003/09/22 14:40:12 zorglub Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -380,7 +380,7 @@ int playlist_Sort( playlist_t * p_playlist , int i_type )
vlc_mutex_lock( &p_playlist->object_lock );
for( i_position = 0; i_position < p_playlist->i_size -1 ; i_position ++ )
for( i_position = 0; i_position <= p_playlist->i_size -1 ; i_position ++ )
{
i_small = i_position;
for( i = i_position + 1 ; i< p_playlist->i_size ; i++)
......@@ -401,12 +401,6 @@ int playlist_Sort( playlist_t * p_playlist , int i_type )
p_playlist->pp_items[i_small] = p_temp;
}
}
for( i=0; i < p_playlist->i_size; i++ )
{
msg_Dbg( p_playlist, "%s", p_playlist->pp_items[i]->psz_name );
}
vlc_mutex_unlock( &p_playlist->object_lock );
return 0;
......
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