Commit e9050e58 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: make sure we re-use the streaming wizard so the user selection doesn't get lost each time it is opened.
parent b5380456
......@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vlc_interface.h,v 1.9 2004/01/25 18:17:08 zorglub Exp $
* $Id: vlc_interface.h,v 1.10 2004/03/01 18:31:12 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -135,7 +135,7 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
#define INTF_DIALOG_NET 4
#define INTF_DIALOG_SAT 5
#define INTF_DIALOG_STREAM 8
#define INTF_DIALOG_STREAMWIZARD 8
#define INTF_DIALOG_PLAYLIST 10
#define INTF_DIALOG_MESSAGES 11
......
......@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
* $Id: dialogs.cpp,v 1.15 2004/01/26 22:10:19 gbazin Exp $
* $Id: dialogs.cpp,v 1.16 2004/03/01 18:31:13 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -60,8 +60,8 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider::OnMessages)
EVT_COMMAND(INTF_DIALOG_PREFS, wxEVT_DIALOG,
DialogsProvider::OnPreferences)
EVT_COMMAND(INTF_DIALOG_STREAM, wxEVT_DIALOG,
DialogsProvider::OnStreamDialog)
EVT_COMMAND(INTF_DIALOG_STREAMWIZARD, wxEVT_DIALOG,
DialogsProvider::OnStreamWizardDialog)
EVT_COMMAND(INTF_DIALOG_FILEINFO, wxEVT_DIALOG,
DialogsProvider::OnFileInfo)
EVT_COMMAND(INTF_DIALOG_POPUPMENU, wxEVT_DIALOG,
......@@ -85,7 +85,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
p_fileinfo_dialog = NULL;
p_prefs_dialog = NULL;
p_file_generic_dialog = NULL;
p_stream_dialog = NULL;
p_streamwizard_dialog = NULL;
/* Give our interface a nice little icon */
p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
......@@ -107,7 +107,7 @@ DialogsProvider::~DialogsProvider()
if( p_messages_dialog ) delete p_messages_dialog;
if( p_fileinfo_dialog ) delete p_fileinfo_dialog;
if( p_file_generic_dialog ) delete p_file_generic_dialog;
if( p_stream_dialog ) delete p_stream_dialog;
if( p_streamwizard_dialog ) delete p_streamwizard_dialog;
if( p_intf->p_sys->p_icon ) delete p_intf->p_sys->p_icon;
......@@ -182,15 +182,15 @@ void DialogsProvider::OnPreferences( wxCommandEvent& WXUNUSED(event) )
}
}
void DialogsProvider::OnStreamDialog( wxCommandEvent& WXUNUSED(event) )
void DialogsProvider::OnStreamWizardDialog( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the stream window */
if( !p_stream_dialog )
p_stream_dialog = new StreamDialog( p_intf, this );
if( !p_streamwizard_dialog )
p_streamwizard_dialog = new StreamDialog( p_intf, this );
if( p_stream_dialog )
if( p_streamwizard_dialog )
{
p_stream_dialog->Show( !p_stream_dialog->IsShown() );
p_streamwizard_dialog->Show( !p_streamwizard_dialog->IsShown() );
}
}
......
......@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2004, 2003 VideoLAN
* $Id: interface.cpp,v 1.86 2004/01/25 18:18:50 gbazin Exp $
* $Id: interface.cpp,v 1.87 2004/03/01 18:31:13 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -120,7 +120,7 @@ enum
OpenOther_Event,
EjectDisc_Event,
Stream_Event,
StreamWizard_Event,
Playlist_Event,
Logs_Event,
......@@ -184,7 +184,7 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
EVT_MENU(OpenDisc_Event, Interface::OnShowDialog)
EVT_MENU(OpenNet_Event, Interface::OnShowDialog)
EVT_MENU(OpenSat_Event, Interface::OnShowDialog)
EVT_MENU(Stream_Event, Interface::OnStream)
EVT_MENU(StreamWizard_Event, Interface::OnShowDialog)
EVT_MENU(StopStream_Event, Interface::OnStopStream)
EVT_MENU(PlayStream_Event, Interface::OnPlayStream)
EVT_MENU(PrevStream_Event, Interface::OnPrevStream)
......@@ -325,7 +325,7 @@ void Interface::CreateOurMenuBar()
wxU(_(HELP_NET)) );
#endif
file_menu->AppendSeparator();
file_menu->Append( Stream_Event, wxU(_("Streaming Wizard...")),
file_menu->Append( StreamWizard_Event, wxU(_("Streaming Wizard...")),
wxU(_(HELP_STREAMWIZARD)) );
file_menu->AppendSeparator();
file_menu->Append( Exit_Event, wxU(_("E&xit")), wxU(_(HELP_EXIT)) );
......@@ -931,24 +931,18 @@ void Interface::OnShowDialog( wxCommandEvent& event )
case Prefs_Event:
i_id = INTF_DIALOG_PREFS;
break;
case StreamWizard_Event:
i_id = INTF_DIALOG_STREAMWIZARD;
break;
default:
i_id = INTF_DIALOG_FILE;
break;
}
p_intf->p_sys->pf_show_dialog( p_intf, i_id, 1, 0 );
}
}
void Interface::OnStream( wxCommandEvent& event )
{
StreamDialog *p_stream_dialog = new StreamDialog(p_intf,this);
p_stream_dialog->Show();
}
void Interface::OnExtra(wxCommandEvent& event)
{
if( b_extra == VLC_FALSE)
......
......@@ -2,7 +2,7 @@
* stream.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
* $Id: streamwizard.cpp,v 1.6 2004/01/29 17:51:08 zorglub Exp $
* $Id: streamwizard.cpp,v 1.7 2004/03/01 18:31:13 gbazin Exp $
*
* Authors: Clment Stenac <zorglub@videolan.org>
*
......@@ -36,13 +36,11 @@
#include <wx/statline.h>
#define STREAM_INTRO N_( "Stream with VLC in three steps." )
#define STREAM_STEP1 N_( "Step 1: Select what to stream." )
#define STREAM_STEP2 N_( "Step 2: Define streaming method." )
#define STREAM_STEP3 N_( "Step 3: Start streaming." )
/*****************************************************************************
* Event Table.
*****************************************************************************/
......@@ -110,7 +108,6 @@ StreamDialog::StreamDialog( intf_thread_t *_p_intf, wxWindow *p_parent ):
start_button = new wxButton( panel,
Start_Event, wxU(_("Start!")));
step2_label->Disable();
step3_label->Disable();
......@@ -167,8 +164,8 @@ void StreamDialog::OnOpen( wxCommandEvent& event )
{
if( !p_open_dialog )
{
p_open_dialog = new OpenDialog(
p_intf, this, FILE_ACCESS, 1 , OPEN_STREAM );
p_open_dialog =
new OpenDialog( p_intf, this, FILE_ACCESS, 1 , OPEN_STREAM );
}
if( p_open_dialog)
......@@ -233,11 +230,12 @@ void StreamDialog::OnStart( wxCommandEvent& event )
}
}
playlist_AddItem( p_playlist, p_item,
PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO), PLAYLIST_END );
playlist_AddItem( p_playlist, p_item,
PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO),
PLAYLIST_END );
msg_Dbg(p_intf,"playings %s",
(const char *)p_open_dialog->mrl[i].mb_str());
msg_Dbg( p_intf,"playings %s",
(const char *)p_open_dialog->mrl[i].mb_str() );
i += i_options;
}
......@@ -246,7 +244,6 @@ void StreamDialog::OnStart( wxCommandEvent& event )
Hide();
}
void StreamDialog::OnClose( wxCommandEvent& event )
{
Hide();
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id: wxwindows.h,v 1.94 2004/02/26 08:24:29 gbazin Exp $
* $Id: wxwindows.h,v 1.95 2004/03/01 18:31:13 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -208,7 +208,6 @@ private:
void OnOpenNet( wxCommandEvent& event );
void OnOpenSat( wxCommandEvent& event );
void OnOpenV4L( wxCommandEvent& event );
void OnStream( wxCommandEvent& event );
void OnExtra( wxCommandEvent& event );
void OnShowDialog( wxCommandEvent& event );
void OnPlayStream( wxCommandEvent& event );
......@@ -274,7 +273,7 @@ private:
void OnMessages( wxCommandEvent& event );
void OnFileInfo( wxCommandEvent& event );
void OnPreferences( wxCommandEvent& event );
void OnStreamDialog( wxCommandEvent& event );
void OnStreamWizardDialog( wxCommandEvent& event );
void OnOpenFileGeneric( wxCommandEvent& event );
void OnOpenFileSimple( wxCommandEvent& event );
......@@ -300,7 +299,7 @@ public:
Playlist *p_playlist_dialog;
Messages *p_messages_dialog;
FileInfo *p_fileinfo_dialog;
StreamDialog *p_stream_dialog;
StreamDialog *p_streamwizard_dialog;
wxFrame *p_prefs_dialog;
wxFileDialog *p_file_generic_dialog;
};
......
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