* preferences.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: preferences.cpp,v 1.4 2003/03/30 11:43:38 gbazin Exp $
+ * $Id: preferences.cpp,v 1.5 2003/03/30 13:23:27 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
void ApplyChanges();
private:
- void OnFileBrowse( wxCommandEvent& WXUNUSED(event) );
- void OnDirectoryBrowse( wxCommandEvent& WXUNUSED(event) );
void OnAdvanced( wxCommandEvent& WXUNUSED(event) );
DECLARE_EVENT_TABLE()
EVT_TREE_SEL_CHANGED(PrefsTree_Ctrl, PrefsTreeCtrl::OnSelectTreeItem)
END_EVENT_TABLE()
-enum
-{
- FileBrowse_Event = wxID_HIGHEST,
- DirectoryBrowse_Event,
-
-};
-
BEGIN_EVENT_TABLE(PrefsPanel, wxPanel)
/* Button events */
EVT_BUTTON(Advanced_Event, PrefsPanel::OnAdvanced)
- EVT_BUTTON(FileBrowse_Event, PrefsPanel::OnFileBrowse)
- EVT_BUTTON(DirectoryBrowse_Event, PrefsPanel::OnDirectoryBrowse)
END_EVENT_TABLE()
{
p_module = (module_t *)p_list->p_values[i_index].p_object;
- /* Find the capabiltiy child item */
+ /* Exclude the main module */
+ if( !strcmp( p_module->psz_object_name, "main" ) )
+ continue;
+
+ /* Find the capability child item */
long cookie; size_t i_child_index;
wxTreeItemId capability_item = GetFirstChild( plugins_item, cookie);
for( i_child_index = 0;
}
/* Apply changes to the plugins */
- item = GetFirstChild( plugins_item, cookie);
+ item = GetFirstChild( plugins_item, cookie );
for( size_t i_child_index = 0;
- i_child_index < GetChildrenCount( plugins_item, TRUE );
+ i_child_index < GetChildrenCount( plugins_item, FALSE );
i_child_index++ )
{
wxTreeItemId item2 = GetFirstChild( item, cookie2 );
{
ConfigData *config_data = config_array.Item(i);
- msg_Err( p_intf, "ApplyChanges %s", config_data->option_name.c_str() );
switch( config_data->i_config_type )
{
case CONFIG_ITEM_MODULE:
break;
case CONFIG_ITEM_BOOL:
config_PutInt( p_intf, config_data->option_name.c_str(),
- config_data->control.checkbox->GetValue() );
+ config_data->control.checkbox->IsChecked() );
break;
case CONFIG_ITEM_INTEGER:
config_PutInt( p_intf, config_data->option_name.c_str(),
config_window->FitInside();
}
-void PrefsPanel::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
-{
- wxFileDialog dialog( this, _("Open file"), "", "", "*.*",
- wxOPEN );
-
- if( dialog.ShowModal() == wxID_OK )
- {
-#if 0
- file_combo->SetValue( dialog.GetPath() );
-#endif
- }
-}
-
-void PrefsPanel::OnDirectoryBrowse( wxCommandEvent& WXUNUSED(event) )
-{
- wxFileDialog dialog( this, _("Open file"), "", "", "*.*",
- wxOPEN );
-
- if( dialog.ShowModal() == wxID_OK )
- {
-#if 0
- file_combo->SetValue( dialog.GetPath() );
-#endif
- }
-}
-
/*****************************************************************************
* A small helper class which intercepts all events
*****************************************************************************/
* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.13 2003/03/29 17:10:31 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.14 2003/03/30 13:23:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- add_category_hint( N_("wxWindows"), NULL, VLC_TRUE );
set_description( (char *) _("wxWindows interface module") );
set_capability( "interface", 50 );
set_callbacks( Open, Close );
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.51 2003/02/20 01:52:47 sigmunau Exp $
+ * $Id: configuration.c,v 1.52 2003/03/30 13:23:27 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*****************************************************************************
* This function is used to get the value of variables which are internally
* represented by a string (CONFIG_ITEM_STRING, CONFIG_ITEM_FILE,
- * and CONFIG_ITEM_MODULE).
+ * CONFIG_ITEM_DIRECTORY, and CONFIG_ITEM_MODULE).
*
* Important note: remember to free() the returned char* because it's a
* duplicate of the actual value. It isn't safe to return a pointer to the
}
if( (p_config->i_type!=CONFIG_ITEM_STRING) &&
(p_config->i_type!=CONFIG_ITEM_FILE) &&
+ (p_config->i_type!=CONFIG_ITEM_DIRECTORY) &&
(p_config->i_type!=CONFIG_ITEM_MODULE) )
{
msg_Err( p_this, "option %s does not refer to a string", psz_name );
*****************************************************************************
* This function is used to set the value of variables which are internally
* represented by a string (CONFIG_ITEM_STRING, CONFIG_ITEM_FILE,
- * and CONFIG_ITEM_MODULE).
+ * CONFIG_ITEM_DIRECTORY, and CONFIG_ITEM_MODULE).
*****************************************************************************/
void __config_PutPsz( vlc_object_t *p_this,
const char *psz_name, const char *psz_value )
}
if( (p_config->i_type!=CONFIG_ITEM_STRING) &&
(p_config->i_type!=CONFIG_ITEM_FILE) &&
+ (p_config->i_type!=CONFIG_ITEM_DIRECTORY) &&
(p_config->i_type!=CONFIG_ITEM_MODULE) )
{
msg_Err( p_this, "option %s does not refer to a string", psz_name );
{
case CONFIG_ITEM_STRING:
case CONFIG_ITEM_FILE:
+ case CONFIG_ITEM_DIRECTORY:
case CONFIG_ITEM_MODULE:
config_PutPsz( p_this, psz_name, optarg );
break;
{
case CONFIG_ITEM_STRING:
case CONFIG_ITEM_FILE:
+ case CONFIG_ITEM_DIRECTORY:
case CONFIG_ITEM_MODULE:
config_PutPsz( p_this, pp_shortopts[i_cmd]->psz_name, optarg );
break;