Commit dfa3b2c3 authored by Yoann Peronneau's avatar Yoann Peronneau

* wxwidgets/dialogs/vlm: add choose input & choose output

parent 4a473a3e
......@@ -291,6 +291,8 @@ enum
BEGIN_EVENT_TABLE( VLMAddStreamPanel, wxPanel)
EVT_BUTTON( Create_Event, VLMAddStreamPanel::OnCreate )
EVT_BUTTON( Clear_Event, VLMAddStreamPanel::OnClear )
EVT_BUTTON( ChooseInput_Event, VLMAddStreamPanel::OnChooseInput )
EVT_BUTTON( ChooseOutput_Event, VLMAddStreamPanel::OnChooseOutput )
END_EVENT_TABLE()
VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
......@@ -308,6 +310,8 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer *upper_sizer = new wxFlexGridSizer( 5,2 );
upper_sizer->AddGrowableCol( 1, 1 );
upper_sizer->AddGrowableCol( 3, 1 );
upper_sizer->Add( new wxStaticText( this, -1, wxU( _("Name") ) ) );
name_text = new wxTextCtrl( this, -1, wxU( _("") ), wxDefaultPosition,
......@@ -413,6 +417,27 @@ void VLMAddStreamPanel::OnClear( wxCommandEvent &event )
output_text->SetValue( wxU("") );
}
void VLMAddStreamPanel::OnChooseInput( wxCommandEvent &event )
{
if( p_open_dialog == NULL )
p_open_dialog = new OpenDialog( p_intf, this, -1, -1, OPEN_STREAM );
if( p_open_dialog && p_open_dialog->ShowModal() == wxID_OK )
{
input_text->SetValue( p_open_dialog->mrl[0] );
}
}
void VLMAddStreamPanel::OnChooseOutput( wxCommandEvent &event )
{
if( p_sout_dialog == NULL )
p_sout_dialog = new SoutDialog( p_intf, this );
if( p_sout_dialog && p_sout_dialog->ShowModal() == wxID_OK )
{
output_text->SetValue( (p_sout_dialog->GetOptions())[0] );
}
}
/****************************************************************************
* VLM Frame implementation
......
......@@ -25,6 +25,8 @@
#define _WXVLC_VLMPANEL_H_
#include "wxwidgets.hpp"
#include "dialogs/open.hpp"
#include "dialogs/streamout.hpp"
#include <wx/notebook.h>
#include <vector>
......@@ -55,6 +57,8 @@ namespace wxvlc
private:
void OnCreate( wxCommandEvent& );
void OnClear( wxCommandEvent& );
void OnChooseInput( wxCommandEvent& );
void OnChooseOutput( wxCommandEvent& );
wxTextCtrl *name_text;
wxTextCtrl *input_text;
......@@ -66,9 +70,12 @@ namespace wxvlc
intf_thread_t *p_intf;
VLMWrapper *p_vlm;
vlc_bool_t b_edit, b_broadcast;
OpenDialog *p_open_dialog;
SoutDialog *p_sout_dialog;
wxFileDialog *p_file_dialog;
DECLARE_EVENT_TABLE();
};
......
......@@ -472,7 +472,7 @@ void Interface::CreateOurMenuBar()
view_menu->Append( FileInfo_Event,
wxU(_("Stream and Media &info...\tCtrl-I")) );
view_menu->Append( VLM_Event,
wxU(_("VLM Control...\tCtrl-I")) );
wxU(_("VLM Control...\tCtrl-V")) );
/* Create the "Auto-generated" menus */
p_settings_menu = SettingsMenu( p_intf, this );
......
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