]> git.sesse.net Git - vlc/commitdiff
* wxwidgets/dialogs/vlm: add choose input & choose output
authorYoann Peronneau <yoann@videolan.org>
Fri, 25 Nov 2005 16:43:52 +0000 (16:43 +0000)
committerYoann Peronneau <yoann@videolan.org>
Fri, 25 Nov 2005 16:43:52 +0000 (16:43 +0000)
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp
modules/gui/wxwidgets/interface.cpp

index c955ce02c307d62724034b2dba09731165368978..1322c05a19c840b43dfb52004093880733c2870f 100644 (file)
@@ -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
index 90e68aed93349a2357e7ac67f649833c044456ec..e51ea42088bfc02e7b7b29021de44e9fd9de2999 100644 (file)
@@ -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();
     };
 
index 66786c0782720a520d8e6fb979fd2d94c95a5b12..805843b9e7e31860bdf558b94e7366b930a3dee0 100644 (file)
@@ -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 );