* It includes functions allowing to declare, get or set configuration options.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: configuration.h,v 1.29 2003/08/03 23:11:21 gbazin Exp $
+ * $Id: configuration.h,v 1.30 2003/08/10 09:22:07 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
{ static module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value }; tmp.b_advanced = advc; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; } i_config++
#define add_string_from_list( name, psz_value, ppsz_list, p_callback, text, \
longtext, advc ) \
- { static module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, 0, 0, 0, 0, NULL, ppsz_list }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; } i_config++
+ { static module_config_t tmp = { CONFIG_ITEM_STRING, NULL, name, '\0', text, longtext, psz_value, 0, 0, 0, 0, 0, 0, NULL, NULL, ppsz_list }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; } i_config++
#define add_file( name, psz_value, p_callback, text, longtext, advc ) \
{ static module_config_t tmp = { CONFIG_ITEM_FILE, NULL, name, '\0', text, longtext, psz_value, 0, 0 }; p_config[ i_config ] = tmp; p_config[ i_config ].pf_callback = p_callback; p_config[i_config].b_advanced = advc; } i_config++
#define add_directory( name, psz_value, p_callback, text, longtext, advc ) \
* subtitles.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: subtitles.cpp,v 1.2 2003/05/20 23:17:59 gbazin Exp $
+ * $Id: subtitles.cpp,v 1.3 2003/08/10 09:22:07 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* Create a panel to put everything in */
wxPanel *panel = new wxPanel( this, -1 );
panel->SetAutoLayout( TRUE );
+ wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
+ wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
/* Create the subtitles file textctrl */
wxBoxSizer *file_sizer_sizer = new wxBoxSizer( wxHORIZONTAL );
file_sizer->Add( file_combo, 1, wxALL, 5 );
file_sizer->Add( browse_button, 0, wxALL, 5 );
file_sizer_sizer->Add( file_sizer, 1, wxEXPAND | wxALL, 5 );
+ panel_sizer->Add( file_sizer, 0, wxEXPAND | wxALL, 5 );
+
+ /* Subtitles encoding */
+ encoding_combo = NULL;
+ module_config_t *p_item =
+ config_FindConfig( VLC_OBJECT(p_intf), "subsdec-encoding" );
+ if( p_item )
+ {
+ wxBoxSizer *enc_sizer_sizer = new wxBoxSizer( wxHORIZONTAL );
+ wxStaticBox *enc_box = new wxStaticBox( panel, -1,
+ wxU(_("Subtitles encoding")) );
+ wxStaticBoxSizer *enc_sizer = new wxStaticBoxSizer( enc_box,
+ wxHORIZONTAL );
+ wxStaticText *label =
+ new wxStaticText(panel, -1, wxU(_("Text encoding")));
+ encoding_combo = new wxComboBox( panel, -1, wxU(p_item->psz_value),
+ wxDefaultPosition, wxDefaultSize,
+ 0, NULL, wxCB_READONLY | wxCB_SORT );
+
+ /* build a list of available options */
+ for( int i_index = 0; p_item->ppsz_list && p_item->ppsz_list[i_index];
+ i_index++ )
+ {
+ encoding_combo->Append( wxU(p_item->ppsz_list[i_index]) );
+ if( p_item->psz_value && !strcmp( p_item->psz_value,
+ p_item->ppsz_list[i_index] ) )
+ encoding_combo->SetSelection( i_index );
+ }
+
+ if( p_item->psz_value )
+ encoding_combo->SetValue( wxU(p_item->psz_value) );
+ encoding_combo->SetToolTip( wxU(p_item->psz_longtext) );
+
+ enc_sizer->Add( label, 0, wxALL, 5 );
+ enc_sizer->Add( encoding_combo, 0, wxALL, 5 );
+ enc_sizer_sizer->Add( enc_sizer, 1, wxEXPAND | wxALL, 5 );
+ panel_sizer->Add( enc_sizer, 0, wxEXPAND | wxALL, 5 );
+ }
/* Misc Subtitles options */
wxBoxSizer *misc_sizer_sizer = new wxBoxSizer( wxHORIZONTAL );
misc_sizer->Add( fps_spinctrl, 0, wxALL, 5 );
misc_sizer_sizer->Add( misc_sizer, 1, wxEXPAND | wxALL, 5 );
+ panel_sizer->Add( misc_sizer, 0, wxEXPAND | wxALL, 5 );
/* Separation */
wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
- wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
- panel_sizer->Add( file_sizer, 0, wxEXPAND | wxALL, 5 );
- panel_sizer->Add( misc_sizer, 0, wxEXPAND | wxALL, 5 );
+
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM |
wxALL, 5 );