* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: menus.cpp,v 1.8 2003/05/13 23:41:17 gbazin Exp $
+ * $Id: menus.cpp,v 1.9 2003/05/15 15:59:35 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "navigation";
pi_objects[i++] = p_object->i_object_id;
+ ppsz_varnames[i] = "program";
+ pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "video-es";
pi_objects[i++] = p_object->i_object_id;
wxMenu *NavigMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
{
vlc_object_t *p_object;
- char *ppsz_varnames[4];
- int pi_objects[4];
+ char *ppsz_varnames[6];
+ int pi_objects[6];
int i = 0;
/* Initializations */
ppsz_varnames[i] = "navigation";
pi_objects[i++] = p_object->i_object_id;
vlc_object_release( p_object );
+ ppsz_varnames[i] = "program";
+ pi_objects[i++] = p_object->i_object_id;
}
/* Build menu */
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.21 2003/05/13 22:33:33 gbazin Exp $
+ * $Id: open.cpp,v 1.22 2003/05/15 15:59:35 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
p_intf = _p_intf;
p_parent = _p_parent;
SetIcon( *p_intf->p_sys->p_icon );
+ file_dialog = NULL;
+ sout_dialog = NULL;
+ subsfile_dialog = NULL;
+ demuxdump_dialog = NULL;
/* Create a panel to put everything in */
wxPanel *panel = new wxPanel( this, -1 );
OpenDialog::~OpenDialog()
{
+ /* Clean up */
+ if( file_dialog ) delete file_dialog;
+ if( sout_dialog ) delete sout_dialog;
+ if( subsfile_dialog ) delete subsfile_dialog;
+ if( demuxdump_dialog ) delete demuxdump_dialog;
}
/*****************************************************************************
void OpenDialog::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
{
- wxFileDialog dialog( this, wxU(_("Open file")),
- wxT(""), wxT(""), wxT("*.*"), wxOPEN );
+ if( file_dialog == NULL )
+ file_dialog = new wxFileDialog( this, wxU(_("Open file")),
+ wxT(""), wxT(""), wxT("*.*"), wxOPEN );
- if( dialog.ShowModal() == wxID_OK )
+ if( file_dialog && file_dialog->ShowModal() == wxID_OK )
{
- file_combo->SetValue( dialog.GetPath() );
+ file_combo->SetValue( file_dialog->GetPath() );
UpdateMRL( FILE_ACCESS );
}
}
void OpenDialog::OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the open dialog */
- SubsFileDialog dialog( p_intf, p_parent );
+ if( subsfile_dialog == NULL )
+ subsfile_dialog = new SubsFileDialog( p_intf, p_parent );
- if( dialog.ShowModal() == wxID_OK )
+ if( subsfile_dialog && subsfile_dialog->ShowModal() == wxID_OK )
{
config_PutPsz( p_intf, "sub-file",
- (const char *)dialog.file_combo->GetValue().mb_str() );
+ (const char *)subsfile_dialog->file_combo->GetValue().mb_str() );
config_PutInt( p_intf, "sub-delay",
- dialog.delay_spinctrl->GetValue() );
+ subsfile_dialog->delay_spinctrl->GetValue() );
config_PutFloat( p_intf, "sub-fps",
- dialog.fps_spinctrl->GetValue() );
+ subsfile_dialog->fps_spinctrl->GetValue() );
}
}
void OpenDialog::OnSoutSettings( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the open dialog */
- SoutDialog dialog( p_intf, p_parent );
+ if( sout_dialog == NULL )
+ sout_dialog = new SoutDialog( p_intf, p_parent );
- if( dialog.ShowModal() == wxID_OK )
+ if( sout_dialog && sout_dialog->ShowModal() == wxID_OK )
{
- config_PutPsz( p_intf, "sout", (const char *)dialog.mrl.mb_str() );
+ config_PutPsz( p_intf, "sout",
+ (const char *)sout_dialog->mrl.mb_str() );
}
}
void OpenDialog::OnDemuxDumpBrowse( wxCommandEvent& WXUNUSED(event) )
{
- wxFileDialog dialog( this, wxU(_("Save file")),
- wxT(""), wxT(""), wxT("*.*"), wxSAVE );
+ if( demuxdump_dialog == NULL )
+ demuxdump_dialog = new wxFileDialog( this, wxU(_("Save file")),
+ wxT(""), wxT(""), wxT("*.*"), wxSAVE );
- if( dialog.ShowModal() == wxID_OK )
+ if( demuxdump_dialog && demuxdump_dialog->ShowModal() == wxID_OK )
{
- demuxdump_textctrl->SetValue( dialog.GetPath() );
+ demuxdump_textctrl->SetValue( demuxdump_dialog->GetPath() );
wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
OnDemuxDumpChange( event );
}
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.10 2003/05/15 01:33:53 gbazin Exp $
+ * $Id: streamout.cpp,v 1.11 2003/05/15 15:59:35 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
SetSizerAndFit( main_sizer );
/* Update all the values */
- ParseMRL();
+ //ParseMRL();
}
SoutDialog::~SoutDialog()
wxStaticBox *panel_box = new wxStaticBox( panel, -1,
wxU(_("Output Methods")) );
wxStaticBoxSizer *panel_sizer = new wxStaticBoxSizer( panel_box,
- wxHORIZONTAL );
+ wxVERTICAL );
static const wxString access_output_array[] =
{
/* Stuff everything into the main panel */
- for( i=0; i < ACCESS_OUT_NUM; i++ )
+ for( i=1; i < ACCESS_OUT_NUM; i++ )
{
sizer->Add( access_checkboxes[i], 0,
- wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );
sizer->Add( access_subpanels[i], 1, wxEXPAND | wxALIGN_CENTER_VERTICAL
- | wxALIGN_LEFT );
+ | wxALIGN_LEFT | wxALL, 5 );
}
- panel_sizer->Add( sizer, 1, wxEXPAND, 0 );
+ panel_sizer->Add( access_checkboxes[0], 0,
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ panel_sizer->Add( sizer, 1, wxEXPAND | wxTOP, 3 );
panel->SetSizerAndFit( panel_sizer );
new wxRadioButton( panel, EncapsulationRadio1_Event + i,
encapsulation_array[i] );
panel_sizer->Add( encapsulation_radios[i], 0,
- wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 8 );
}
panel->SetSizerAndFit( panel_sizer );
/* Update encapsulation panel */
- encapsulation_radios[0]->Enable();
+ encapsulation_radios[TS_ENCAPSULATION]->SetValue(true);
i_encapsulation_type = TS_ENCAPSULATION;
return panel;
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.26 2003/05/15 01:33:53 gbazin Exp $
+ * $Id: wxwindows.h,v 1.27 2003/05/15 15:59:35 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
};
/* Open Dialog */
+class SoutDialog;
+class SubsFileDialog;
class OpenDialog: public wxDialog
{
public:
/* Controls for the file panel */
wxComboBox *file_combo;
+ wxFileDialog *file_dialog;
/* Controls for the disc panel */
wxRadioBox *disc_type;
/* Controls for the subtitles file */
wxButton *subsfile_button;
wxCheckBox *subsfile_checkbox;
+ SubsFileDialog *subsfile_dialog;
/* Controls for the stream output */
wxButton *sout_button;
wxCheckBox *sout_checkbox;
+ SoutDialog *sout_dialog;
/* Controls for the demux dump */
wxTextCtrl *demuxdump_textctrl;
wxButton *demuxdump_button;
wxCheckBox *demuxdump_checkbox;
+ wxFileDialog *demuxdump_dialog;
};
enum