* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.40 2003/11/05 17:57:29 gbazin Exp $
+ * $Id: open.cpp,v 1.41 2003/11/09 20:13:46 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include "wxwindows.h"
+#include "preferences_widgets.h"
+
#ifndef wxRB_SINGLE
# define wxRB_SINGLE 0
#endif
notebook->AddPage( NetPanel( notebook ), wxU(_("Network")),
i_access_method == NET_ACCESS );
#ifndef WIN32
- notebook->AddPage( SatPanel( notebook ), wxU(_("Satellite")),
- i_access_method == SAT_ACCESS );
-
notebook->AddPage( V4LPanel( notebook ), wxU(_("Video For Linux")),
i_access_method == V4L_ACCESS );
#endif
+ module_t *p_module = config_FindModule( VLC_OBJECT(p_intf), "dshow" );
+ if( p_module )
+ {
+ notebook->AddPage( AutoBuildPanel( notebook, p_module ),
+ wxU( p_module->psz_longname ) );
+ }
+
/* Update Disc panel */
wxCommandEvent dummy_event;
OnDiscTypeChange( dummy_event );
}
#endif
-wxPanel *OpenDialog::SatPanel( wxWindow* parent )
+wxPanel *OpenDialog::AutoBuildPanel( wxWindow* parent,
+ const module_t *p_module )
{
wxPanel *panel = new wxPanel( parent, -1, wxDefaultPosition,
wxSize(200, 200) );
+
+ wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
+
+ module_config_t *p_item = p_module->p_config;
+
+ if( p_item ) do
+ {
+ if( p_item->i_type & CONFIG_HINT || p_item->b_advanced )
+ continue;
+
+ ConfigControl *control =
+ CreateConfigControl( VLC_OBJECT(p_intf), p_item, panel );
+
+ /* Don't add items that were not recognized */
+ if( control == NULL ) continue;
+
+ sizer->Add( control, 0, wxEXPAND | wxALL, 2 );
+ }
+ while( p_item->i_type != CONFIG_HINT_END && p_item++ );
+
+ panel->SetSizerAndFit( sizer );
return panel;
}
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.67 2003/11/05 17:57:29 gbazin Exp $
+ * $Id: wxwindows.h,v 1.68 2003/11/09 20:13:46 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
wxPanel *FilePanel( wxWindow* parent );
wxPanel *DiscPanel( wxWindow* parent );
wxPanel *NetPanel( wxWindow* parent );
- wxPanel *SatPanel( wxWindow* parent );
wxPanel *V4LPanel( wxWindow* parent );
+ wxPanel *AutoBuildPanel( wxWindow* parent, const module_t * );
void UpdateMRL( int i_access_method );