Commit 46d0ff68 authored by Clément Stenac's avatar Clément Stenac

* Made the open dialog a wxDialog to be able to call it from the wizard....

* Made the open dialog a wxDialog to be able to call it from the wizard. Please test on win32 and interaction with win32-skins2
parent a9288be1
......@@ -269,7 +269,6 @@ void DialogsProvider::OnStreamWizardDialog( wxCommandEvent& WXUNUSED(event) )
void DialogsProvider::OnWizardDialog( wxCommandEvent& WXUNUSED(event) )
{
fprintf(stderr,"AHAH %p\n",p_intf);
p_wizard_dialog = new WizardDialog( p_intf, this );
if( p_wizard_dialog )
......
......@@ -77,7 +77,8 @@ enum
AdvancedOptions_Event
};
BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
//BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
BEGIN_EVENT_TABLE(OpenDialog, wxDialog)
/* Button events */
EVT_BUTTON(wxID_OK, OpenDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, OpenDialog::OnCancel)
......@@ -337,7 +338,8 @@ 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,
// wxFrame( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
OpenDialog( _p_intf, _p_parent, i_access_method, i_arg, OPEN_NORMAL );
......@@ -345,7 +347,8 @@ 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,
// wxFrame( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
/* Initializations */
......@@ -357,6 +360,8 @@ 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;
......@@ -518,19 +523,23 @@ int OpenDialog::Show( int i_access_method, int i_arg )
{
int i_ret;
notebook->SetSelection( i_access_method );
i_ret = wxFrame::Show();
// i_ret = wxFrame::Show();
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 = wxFrame::Show();
i_ret = wxDialog::Show();
Raise();
SetFocus();
b_modal = VLC_FALSE;
return i_ret;
}
......@@ -956,6 +965,10 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
if( i_method == OPEN_STREAM )
{
Hide();
if( b_modal)
{
EndModal( wxID_OK );
}
return;
}
......@@ -1011,11 +1024,15 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
vlc_object_release( p_playlist );
Hide();
if( b_modal) EndModal( wxID_OK );
}
void OpenDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
{
Hide();
if( b_modal) EndModal( wxID_CANCEL );
}
void OpenDialog::OnPageChange( wxNotebookEvent& event )
......
This diff is collapsed.
......@@ -269,7 +269,8 @@ private:
/* Open Dialog */
WX_DEFINE_ARRAY(AutoBuiltPanel *, ArrayOfAutoBuiltPanel);
class OpenDialog: public wxFrame
//class OpenDialog: public wxFrame
class OpenDialog: public wxDialog
{
public:
/* Constructor */
......@@ -334,6 +335,8 @@ 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