Commit 255fcfad authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: small clean-up.

parent f756fd53
...@@ -77,7 +77,6 @@ enum ...@@ -77,7 +77,6 @@ enum
AdvancedOptions_Event AdvancedOptions_Event
}; };
//BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
BEGIN_EVENT_TABLE(OpenDialog, wxDialog) BEGIN_EVENT_TABLE(OpenDialog, wxDialog)
/* Button events */ /* Button events */
EVT_BUTTON(wxID_OK, OpenDialog::OnOk) EVT_BUTTON(wxID_OK, OpenDialog::OnOk)
...@@ -338,7 +337,6 @@ void AutoBuiltPanel::UpdateAdvancedMRL() ...@@ -338,7 +337,6 @@ void AutoBuiltPanel::UpdateAdvancedMRL()
*****************************************************************************/ *****************************************************************************/
OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
int i_access_method, int i_arg ): int i_access_method, int i_arg ):
// wxFrame( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition, wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE ) wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{ {
...@@ -347,7 +345,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, ...@@ -347,7 +345,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
int i_access_method, int i_arg, int _i_method ): int i_access_method, int i_arg, int _i_method ):
// wxFrame( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition, wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE ) wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{ {
...@@ -360,8 +357,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, ...@@ -360,8 +357,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
i_disc_type_selection = 0; i_disc_type_selection = 0;
i_open_arg = i_arg; i_open_arg = i_arg;
b_modal = VLC_TRUE;
sout_dialog = NULL; sout_dialog = NULL;
subsfile_dialog = NULL; subsfile_dialog = NULL;
b_disc_device_changed = false; b_disc_device_changed = false;
...@@ -521,25 +516,19 @@ OpenDialog::~OpenDialog() ...@@ -521,25 +516,19 @@ OpenDialog::~OpenDialog()
int OpenDialog::Show( int i_access_method, int i_arg ) int OpenDialog::Show( int i_access_method, int i_arg )
{ {
int i_ret;
notebook->SetSelection( i_access_method ); notebook->SetSelection( i_access_method );
// i_ret = wxFrame::Show(); int i_ret = wxDialog::Show();
i_ret = wxDialog::Show();
Raise(); Raise();
SetFocus(); SetFocus();
i_open_arg = i_arg; i_open_arg = i_arg;
b_modal = VLC_FALSE;
return i_ret; return i_ret;
} }
int OpenDialog::Show() int OpenDialog::Show()
{ {
int i_ret; int i_ret = wxDialog::Show();
// i_ret = wxFrame::Show();
i_ret = wxDialog::Show();
Raise(); Raise();
SetFocus(); SetFocus();
b_modal = VLC_FALSE;
return i_ret; return i_ret;
} }
...@@ -965,10 +954,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) ) ...@@ -965,10 +954,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
if( i_method == OPEN_STREAM ) if( i_method == OPEN_STREAM )
{ {
Hide(); Hide();
if( b_modal) if( IsModal() ) EndModal( wxID_OK );
{
EndModal( wxID_OK );
}
return; return;
} }
...@@ -1025,14 +1011,14 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) ) ...@@ -1025,14 +1011,14 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
Hide(); Hide();
if( b_modal) EndModal( wxID_OK ); if( IsModal() ) EndModal( wxID_OK );
} }
void OpenDialog::OnCancel( wxCommandEvent& WXUNUSED(event) ) void OpenDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
{ {
Hide(); Hide();
if( b_modal) EndModal( wxID_CANCEL ); if( IsModal() ) EndModal( wxID_CANCEL );
} }
void OpenDialog::OnPageChange( wxNotebookEvent& event ) void OpenDialog::OnPageChange( wxNotebookEvent& event )
......
...@@ -88,7 +88,7 @@ END_EVENT_TABLE() ...@@ -88,7 +88,7 @@ END_EVENT_TABLE()
* Wizard strings * Wizard strings
*****************************************************************************/ *****************************************************************************/
#define ERROR _("Error") #define ERROR_MSG _("Error")
#define ITEM_NAME _("Streaming/Transcoding Wizard") #define ITEM_NAME _("Streaming/Transcoding Wizard")
/* Hello page */ /* Hello page */
...@@ -759,7 +759,7 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event) ...@@ -759,7 +759,7 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event)
if( mrl_text->GetValue().IsSameAs( wxT(""), TRUE ) && if( mrl_text->GetValue().IsSameAs( wxT(""), TRUE ) &&
event.GetDirection() ) event.GetDirection() )
{ {
wxMessageBox( wxU( CHOOSE_STREAM ), wxU( ERROR ), wxMessageBox( wxU( CHOOSE_STREAM ), wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this ); wxICON_WARNING | wxOK, this );
event.Veto(); event.Veto();
} }
...@@ -1080,7 +1080,7 @@ void wizStreamingMethodPage::OnWizardPageChanging(wxWizardEvent& event) ...@@ -1080,7 +1080,7 @@ void wizStreamingMethodPage::OnWizardPageChanging(wxWizardEvent& event)
/* Check valid multicast address */ /* Check valid multicast address */
if( i_method == 1 && !ismult((char *) address_txtctrl->GetValue().c_str()) ) if( i_method == 1 && !ismult((char *) address_txtctrl->GetValue().c_str()) )
{ {
wxMessageBox( wxU( INVALID_MCAST_ADDRESS ) , wxU( ERROR ), wxMessageBox( wxU( INVALID_MCAST_ADDRESS ) , wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this ); wxICON_WARNING | wxOK, this );
event.Veto(); event.Veto();
...@@ -1444,7 +1444,6 @@ void WizardDialog::Run() ...@@ -1444,7 +1444,6 @@ void WizardDialog::Run()
sprintf( psz_opt, ":sout=#%sstandard{mux=%s,url=%s," sprintf( psz_opt, ":sout=#%sstandard{mux=%s,url=%s,"
"access=file}", "access=file}",
psz_transcode, mux, address ); psz_transcode, mux, address );
msg_Dbg( p_intf,"");
} }
else else
{ {
...@@ -1481,7 +1480,7 @@ void WizardDialog::Run() ...@@ -1481,7 +1480,7 @@ void WizardDialog::Run()
} }
else else
{ {
wxMessageBox( wxU( NO_PLAYLIST ), wxU( ERROR ), wxMessageBox( wxU( NO_PLAYLIST ), wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this ); wxICON_WARNING | wxOK, this );
} }
} }
......
...@@ -269,7 +269,6 @@ private: ...@@ -269,7 +269,6 @@ private:
/* Open Dialog */ /* Open Dialog */
WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel); WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
//class OpenDialog: public wxFrame
class OpenDialog: public wxDialog class OpenDialog: public wxDialog
{ {
public: public:
...@@ -335,8 +334,6 @@ private: ...@@ -335,8 +334,6 @@ private:
int i_method; /* Normal or for the stream dialog ? */ int i_method; /* Normal or for the stream dialog ? */
int i_open_arg; int i_open_arg;
vlc_bool_t b_modal;
wxComboBox *mrl_combo; wxComboBox *mrl_combo;
wxNotebook *notebook; wxNotebook *notebook;
......
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