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

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

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