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

* use the new look also for capabilities and main helps.

parent 1c2c4af5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc_help.h: Help strings * vlc_help.h: Help strings
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlc_help.h,v 1.1 2003/09/22 14:40:10 zorglub Exp $ * $Id: vlc_help.h,v 1.2 2003/10/05 09:27:45 zorglub Exp $
* *
* Authors: Clément Stenac <zorglub@videolan.org> * Authors: Clément Stenac <zorglub@videolan.org>
* Anil Daoud <anil@videolan.org> * Anil Daoud <anil@videolan.org>
...@@ -29,77 +29,83 @@ ...@@ -29,77 +29,83 @@
* First, we need help strings for the General Settings and for the * First, we need help strings for the General Settings and for the
* Plugins screen * Plugins screen
*/ */
#define GENERAL_TITLE N_( "VLC Preferences" )
#define GENERAL_HELP N_( \ #define GENERAL_HELP N_( \
"VLC Preferences. \nConfigure some global options in General Settings" \ "Configure some global options in General Settings" \
"\n and configure each VLC plugin in the Plugins section.\n" \ "\n and configure each VLC plugin in the Plugins section.\n" \
"Click on 'Advanced Options' to see every options." ) "Click on 'Advanced Options' to see every options." )
#define PLUGIN_TITLE N_( "VLC Plugins Preferences" )
#define PLUGIN_HELP N_( \ #define PLUGIN_HELP N_( \
"In this tree, you can set options for every plugin used by VLC.\n" \ "In this tree, you can set options for every plugin used by VLC.\n" \
"Plugins are sorted by type.\nHave fun tuning VLC !" ) "Plugins are sorted by type.\nHave fun tuning VLC !" )
/* /*
* Then, help for each module capabilities. * Then, help for each module capabilities.
*/ */
#define ACCESS_TITLE N_( "Access modules settings" )
#define ACCESS_HELP N_( \ #define ACCESS_HELP N_( \
"Access modules settings\n" \
"Settings related to the various access methods used by VLC\n" \ "Settings related to the various access methods used by VLC\n" \
"Common settings you may want to alter are http proxy or\n" \ "Common settings you may want to alter are http proxy or\n" \
"caching settings" ) "caching settings" )
#define AUDIO_FILTER_HELP N_("Audio filters settings\n" \ #define AUDIO_FILTER_TITLE N_("Audio filters settings")
#define AUDIO_FILTER_HELP N_( \
"Audio filters can be set in the Audio section, and configured\n" \ "Audio filters can be set in the Audio section, and configured\n" \
"here.") "here.")
#define AOUT_HELP N_("Audio output modules settings") #define AOUT_TITLE N_("Audio output modules settings")
#define AOUT_HELP N_("These are general settings for audio output modules")
#define CHROMA_HELP N_("Chroma modules settings") #define CHROMA_TITLE N_("Chroma modules settings")
#define CHROMA_HELP N_(" ")
#define DECODER_TITLE N_("Decoder modules settings" )
#define DECODER_HELP N_( \ #define DECODER_HELP N_( \
"Decoder modules settings\n" \
"In the Subsdec section you may want to set your preferred subtitles\n" \ "In the Subsdec section you may want to set your preferred subtitles\n" \
"text encoding\n") "text encoding\n")
#define DEMUX_HELP N_( \ #define DEMUX_TITLE N_("Demuxers settings")
"Demuxer settings") #define DEMUX_HELP N_( " ")
#define INTERFACE_TITLE N_("Interface plugins settings")
#define INTERFACE_HELP N_( \ #define INTERFACE_HELP N_( \
"Interface plugins settings\n" \
"Interface plugins can be enabled in the Interface section and\n" \ "Interface plugins can be enabled in the Interface section and\n" \
"configured here.") "configured here.")
#define SOUT_TITLE N_("Stream output access modules settings")
#define SOUT_HELP N_( \ #define SOUT_HELP N_( \
"Stream output access modules settings\n" \
"In this section you can set the caching value for the UDP stream\n" \ "In this section you can set the caching value for the UDP stream\n" \
"output access module") "output access module")
#define SUBTITLE_DEMUX_TITLE N_("Subtitle demuxer settings")
#define SUBTITLE_DEMUX_HELP N_( \ #define SUBTITLE_DEMUX_HELP N_( \
"Subtitle demuxer settings\n" \
"In this section you can force the behaviour of the subtitle demuxer,\n" \ "In this section you can force the behaviour of the subtitle demuxer,\n" \
"for example by setting the subtitles type or file name.") "for example by setting the subtitles type or file name.")
#define TEXT_TITLE N_("Text renderer settings")
#define TEXT_HELP N_( \ #define TEXT_HELP N_( \
"Text renderer settings\n" \
"Use these settings to choose the font you want VLC to use for text\n" \ "Use these settings to choose the font you want VLC to use for text\n" \
"rendering (to display subtitles for example)") "rendering (to display subtitles for example)")
#define VOUT__TITLE N_("Video output modules settings")
#define VOUT_HELP N_( \ #define VOUT_HELP N_( \
"Video output modules settings\n" \
"Choose your preferred video output in the Video section, \n" \ "Choose your preferred video output in the Video section, \n" \
"and configure it here." ) "and configure it here." )
#define VIDEO_FILTER_TITLE N_("Video filters settings")
#define VIDEO_FILTER_HELP N_( \ #define VIDEO_FILTER_HELP N_( \
"Video filters settings\n" \ "Video filters can be enabled in the Video section and configured " \
"Video filters can be enabled in the Video section and configured" \ "here.\n" \
"here. Configure the \"adjust\" filter to modify \n" \ "Configure the \"adjust\" filter to modify contrast/hue/saturation \n" \
"contrast/hue/saturation settings.") " settings.")
/* /*
* A little help for modules with unknown capabilities * A little help for modules with unknown capabilities
*/ */
#define UNKNOWN_HELP N_("No help available") #define UNKNOWN_TITLE N_("No help available" )
#define UNKNOWN_HELP N_("No help is available for these modules")
#endif /* VLC_HELP_H */ #endif /* VLC_HELP_H */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* preferences.cpp : wxWindows plugin for vlc * preferences.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: preferences.cpp,v 1.32 2003/10/04 23:52:32 sigmunau Exp $ * $Id: preferences.cpp,v 1.33 2003/10/05 09:27:46 zorglub Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -342,37 +342,40 @@ void PrefsDialog::OnAdvanced( wxCommandEvent& event ) ...@@ -342,37 +342,40 @@ void PrefsDialog::OnAdvanced( wxCommandEvent& event )
/***************************************************************************** /*****************************************************************************
* GetCapabilityHelp: Display the help for one capability. * GetCapabilityHelp: Display the help for one capability.
*****************************************************************************/ *****************************************************************************/
static char * GetCapabilityHelp( char *psz_capability) static char * GetCapabilityHelp( char *psz_capability, int i_type)
{ {
if( psz_capability == NULL) if( psz_capability == NULL)
return NULL; return NULL;
if( !strcasecmp(psz_capability,"access") ) if( !strcasecmp(psz_capability,"access") )
return strdup(ACCESS_HELP); return i_type == 1 ? strdup(ACCESS_TITLE) : strdup(ACCESS_HELP);
if( !strcasecmp(psz_capability,"audio filter") ) if( !strcasecmp(psz_capability,"audio filter") )
return strdup(AUDIO_FILTER_HELP); return i_type == 1 ? strdup(AUDIO_FILTER_TITLE) :
strdup(AUDIO_FILTER_HELP);
if( !strcasecmp(psz_capability,"audio output") ) if( !strcasecmp(psz_capability,"audio output") )
return strdup(AOUT_HELP); return i_type == 1 ? strdup(AOUT_TITLE) : strdup(AOUT_HELP);
if( !strcasecmp(psz_capability,"chroma") ) if( !strcasecmp(psz_capability,"chroma") )
return strdup(CHROMA_HELP); return i_type == 1 ? strdup(CHROMA_TITLE) : strdup(CHROMA_HELP);
if( !strcasecmp(psz_capability,"decoder") ) if( !strcasecmp(psz_capability,"decoder") )
return strdup(DECODER_HELP); return i_type == 1 ? strdup(DECODER_TITLE) : strdup(DECODER_HELP);
if( !strcasecmp(psz_capability,"demux") ) if( !strcasecmp(psz_capability,"demux") )
return strdup(DEMUX_HELP); return i_type == 1 ? strdup(DEMUX_TITLE) : strdup(DEMUX_HELP);
if( !strcasecmp(psz_capability,"interface") ) if( !strcasecmp(psz_capability,"interface") )
return strdup(INTERFACE_HELP); return i_type == 1 ? strdup(INTERFACE_TITLE) : strdup(INTERFACE_HELP);
if( !strcasecmp(psz_capability,"sout access") ) if( !strcasecmp(psz_capability,"sout access") )
return strdup(SOUT_HELP); return i_type == 1 ? strdup(SOUT_TITLE) : strdup(SOUT_HELP);
if( !strcasecmp(psz_capability,"subtitle demux") ) if( !strcasecmp(psz_capability,"subtitle demux") )
return strdup(SUBTITLE_DEMUX_HELP); return i_type == 1 ? strdup(SUBTITLE_DEMUX_TITLE) :
strdup(SUBTITLE_DEMUX_HELP);
if( !strcasecmp(psz_capability,"text renderer") ) if( !strcasecmp(psz_capability,"text renderer") )
return strdup(TEXT_HELP); return i_type == 1 ? strdup(TEXT_TITLE) : strdup(TEXT_HELP);
if( !strcasecmp(psz_capability,"video output") ) if( !strcasecmp(psz_capability,"video output") )
return strdup(VOUT_HELP); return i_type == 1 ? strdup(VOUT__TITLE) : strdup(VOUT_HELP);
if( !strcasecmp(psz_capability,"video filter") ) if( !strcasecmp(psz_capability,"video filter") )
return strdup(VIDEO_FILTER_HELP); return i_type == 1 ? strdup(VIDEO_FILTER_TITLE) :
strdup(VIDEO_FILTER_HELP);
return strdup(UNKNOWN_HELP); return i_type == 1 ? strdup(UNKNOWN_TITLE) : strdup(UNKNOWN_HELP);
} }
/***************************************************************************** /*****************************************************************************
...@@ -411,6 +414,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf, ...@@ -411,6 +414,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
config_data->psz_section = NULL; config_data->psz_section = NULL;
config_data->i_object_id = GENERAL_ID; config_data->i_object_id = GENERAL_ID;
config_data->psz_help = strdup( GENERAL_HELP ); config_data->psz_help = strdup( GENERAL_HELP );
config_data->psz_section = strdup( GENERAL_TITLE );
general_item = AppendItem( root_item, wxU(_("General Settings")), general_item = AppendItem( root_item, wxU(_("General Settings")),
-1, -1, config_data ); -1, -1, config_data );
...@@ -464,6 +468,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf, ...@@ -464,6 +468,7 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
config_data->psz_section = NULL; config_data->psz_section = NULL;
config_data->i_object_id = PLUGIN_ID; config_data->i_object_id = PLUGIN_ID;
config_data->psz_help = strdup( PLUGIN_HELP ); config_data->psz_help = strdup( PLUGIN_HELP );
config_data->psz_section = strdup( PLUGIN_TITLE );
plugins_item = AppendItem( root_item, wxU(_("Plugins")), plugins_item = AppendItem( root_item, wxU(_("Plugins")),
-1,-1,config_data ); -1,-1,config_data );
...@@ -511,9 +516,10 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf, ...@@ -511,9 +516,10 @@ PrefsTreeCtrl::PrefsTreeCtrl( wxWindow *_p_parent, intf_thread_t *_p_intf,
{ {
/* We didn't find it, add it */ /* We didn't find it, add it */
ConfigTreeData *config_data = new ConfigTreeData; ConfigTreeData *config_data = new ConfigTreeData;
config_data->psz_section = NULL; config_data->psz_section =
config_data->psz_help = GetCapabilityHelp( p_module->psz_capability , 1 );
GetCapabilityHelp( p_module->psz_capability ); config_data->psz_help =
GetCapabilityHelp( p_module->psz_capability , 2 );
config_data->i_object_id = CAPABILITY_ID; config_data->i_object_id = CAPABILITY_ID;
capability_item = AppendItem( plugins_item, capability_item = AppendItem( plugins_item,
wxU(p_module->psz_capability), wxU(p_module->psz_capability),
...@@ -797,14 +803,33 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf, ...@@ -797,14 +803,33 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
if( i_object_id == PLUGIN_ID || i_object_id == GENERAL_ID || if( i_object_id == PLUGIN_ID || i_object_id == GENERAL_ID ||
i_object_id == CAPABILITY_ID ) i_object_id == CAPABILITY_ID )
{ {
/* Add a head title to the panel */
// msg_Dbg(p_intf,"%s : %s", psz_section, psz_help) ;
label = new wxStaticText( this, -1,wxU(_( psz_section )));
/* i_object_id == CAPABILITY_ID ?
GetCapabilityHelp( psz_section , 1 ):
psz_section ) ) );*/
wxFont heading_font = label->GetFont();
heading_font.SetPointSize( heading_font.GetPointSize() + 5 );
label->SetFont( heading_font );
sizer->Add( label, 0, wxEXPAND | wxLEFT, 10 );
sizer->Add( new wxStaticLine( this, 0 ), 0,
wxEXPAND | wxLEFT | wxRIGHT, 2 );
help = new wxStaticText( this, -1, wxU(_( psz_help ) ) );
sizer->Add( help ,0 ,wxEXPAND | wxALL, 5 );
#if 0
wxStaticBox *static_box = new wxStaticBox( this, -1, wxT("") ); wxStaticBox *static_box = new wxStaticBox( this, -1, wxT("") );
wxStaticBoxSizer *box_sizer = new wxStaticBoxSizer( static_box, wxStaticBoxSizer *box_sizer = new wxStaticBoxSizer( static_box,
wxVERTICAL ); wxVERTICAL );
label = new wxStaticText( this, -1, wxU(_( psz_help) ) ); label = new wxStaticText( this, -1, wxU(_( psz_help) ) );
box_sizer->Add( label, 1, wxEXPAND | wxLEFT | wxRIGHT, 5 ); box_sizer->Add( label, 1, wxEXPAND | wxLEFT | wxRIGHT, 5 );
sizer->Add( box_sizer, 0, wxEXPAND | wxALL , 5 ); sizer->Add( box_sizer, 0, wxEXPAND | wxALL , 5 );
#endif
config_sizer = NULL; config_window = NULL; config_sizer = NULL; config_window = NULL;
} }
else else
...@@ -880,7 +905,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf, ...@@ -880,7 +905,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
0, NULL, wxCB_READONLY | wxCB_SORT ); 0, NULL, wxCB_READONLY | wxCB_SORT );
/* build a list of available modules */ /* build a list of available modules */
p_list = vlc_list_find( p_intf, p_list = vlc_list_find( p_intf,
VLC_OBJECT_MODULE, FIND_ANYWHERE ); VLC_OBJECT_MODULE, FIND_ANYWHERE );
combo->Append( wxU(_("Default")), (void *)NULL ); combo->Append( wxU(_("Default")), (void *)NULL );
combo->SetSelection( 0 ); combo->SetSelection( 0 );
...@@ -1041,15 +1066,15 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf, ...@@ -1041,15 +1066,15 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
break; break;
} }
/* Don't add items that were not recognized */ /* Don't add items that were not recognized */
if( panel == NULL ) continue; if( panel == NULL ) continue;
panel_sizer->Layout(); panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer ); panel->SetSizerAndFit( panel_sizer );
/* Add the config data to our array so we can keep a trace of it */ /* Add the config data to our array so we can keep a trace of it */
config_array.Add( config_data ); config_array.Add( config_data );
config_sizer->Add( panel, 0, wxEXPAND | wxALL, 2 ); config_sizer->Add( panel, 0, wxEXPAND | wxALL, 2 );
} }
while( p_item->i_type != CONFIG_HINT_END && p_item++ ); while( p_item->i_type != CONFIG_HINT_END && p_item++ );
...@@ -1059,7 +1084,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf, ...@@ -1059,7 +1084,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
sizer->Add( config_window, 1, wxEXPAND | wxALL, 5 ); sizer->Add( config_window, 1, wxEXPAND | wxALL, 5 );
/* And at last put a useful help string if available */ /* And at last put a useful help string if available */
if( psz_help && psz_help[1] ) if( psz_help && psz_help[1] )
{ {
sizer->Add( new wxStaticLine( this, 0 ), 0, sizer->Add( new wxStaticLine( this, 0 ), 0,
wxEXPAND | wxLEFT | wxRIGHT, 2 ); wxEXPAND | wxLEFT | wxRIGHT, 2 );
......
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