From 2252e8d9e88ed23913a352b5ddf2480ce0cd9426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Stenac?= <zorglub@videolan.org> Date: Sun, 5 Feb 2006 11:05:21 +0000 Subject: [PATCH] Some WX VLM dialog improvements --- .../gui/wxwidgets/dialogs/vlm/vlm_panel.cpp | 22 ++++++++++++++----- .../gui/wxwidgets/dialogs/vlm/vlm_panel.hpp | 2 ++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp b/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp index e1fd9f0a42..bf73fe2908 100644 --- a/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp +++ b/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp @@ -63,7 +63,9 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) : wxNotebookSizer *notebook_sizer = new wxNotebookSizer( p_notebook ); #endif p_notebook->AddPage( BroadcastPanel( p_notebook ), wxU( _("Broadcasts") ) ); +#if 0 p_notebook->AddPage( VODPanel( p_notebook ), wxU( _("VOD") ) ); +#endif #if (!wxCHECK_VERSION(2,5,0)) panel_sizer->Add( notebook_sizer, 1, wxEXPAND | wxALL, 5 ); #else @@ -351,6 +353,7 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf, wxPanel( _p_parent, -1, wxDefaultPosition, wxDefaultSize ) { p_intf = _p_intf; + p_parent = _p_parent; p_vlm = _p_vlm; b_edit = _b_edit; b_broadcast = _b_broadcast; @@ -393,12 +396,6 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf, panel_sizer->Add( upper_sizer, 0, wxEXPAND | wxALL, 5 ); wxBoxSizer *lower_sizer = new wxBoxSizer( wxHORIZONTAL ); - lower_sizer->Add( new wxButton( this, Create_Event, - wxU( _( b_edit ? "Edit" : "Create" ) ) ), - 0 , wxEXPAND | wxALL , 5 ); - lower_sizer->Add( new wxButton( this, Clear_Event, wxU( _( "Clear" ) ) ), - 0 , wxEXPAND | wxALL , 5 ); - enabled_checkbox = new wxCheckBox( this, -1, wxU( _("Enabled" ) ) ); enabled_checkbox->SetValue( true ); lower_sizer->Add( enabled_checkbox, 1 , wxEXPAND | wxALL , 5 ); @@ -408,6 +405,17 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf, lower_sizer->Add( loop_checkbox, 1 , wxEXPAND | wxALL , 5 ); } + if( !b_edit ) + { + lower_sizer->Add( new wxButton( this, Clear_Event, + wxU( _( "Clear" ) ) ), + 0 , wxEXPAND | wxALL , 5 ); + } + lower_sizer->Add( new wxButton( this, Create_Event, + wxU( _( b_edit ? "OK" : "Create" ) ) ), + 0 , wxEXPAND | wxALL , 5 ); + + panel_sizer->Add( lower_sizer, 0 , wxEXPAND| wxALL, 5 ); panel_sizer->Layout(); SetSizerAndFit( panel_sizer ); @@ -464,6 +472,8 @@ void VLMAddStreamPanel::OnCreate( wxCommandEvent &event ) LocaleFree( psz_output); if( !b_edit ) OnClear( event ); + if( b_edit ) + p_parent->Hide(); } void VLMAddStreamPanel::OnClear( wxCommandEvent &event ) diff --git a/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp b/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp index bfb4e10fa2..41a2845acd 100644 --- a/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp +++ b/modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp @@ -70,6 +70,8 @@ namespace wxvlc intf_thread_t *p_intf; VLMWrapper *p_vlm; + wxWindow *p_parent; + vlc_bool_t b_edit, b_broadcast; OpenDialog *p_open_dialog; -- 2.25.4