Commit adce9d32 authored by Clément Stenac's avatar Clément Stenac

Beginning of an improved streaming wizard. Do not use at the moment

parent 7a43f27a
......@@ -6,6 +6,7 @@ SOURCES_wxwindows = \
open.cpp \
streamout.cpp \
streamwizard.cpp \
wizard.cpp \
messages.cpp \
playlist.cpp \
iteminfo.cpp \
......
......@@ -62,6 +62,8 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider::OnPreferences)
EVT_COMMAND(INTF_DIALOG_STREAMWIZARD, wxEVT_DIALOG,
DialogsProvider::OnStreamWizardDialog)
EVT_COMMAND(INTF_DIALOG_WIZARD, wxEVT_DIALOG,
DialogsProvider::OnWizardDialog)
EVT_COMMAND(INTF_DIALOG_FILEINFO, wxEVT_DIALOG,
DialogsProvider::OnFileInfo)
EVT_COMMAND(INTF_DIALOG_BOOKMARKS, wxEVT_DIALOG,
......@@ -88,6 +90,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
p_prefs_dialog = NULL;
p_file_generic_dialog = NULL;
p_streamwizard_dialog = NULL;
p_wizard_dialog = NULL;
p_bookmarks_dialog = NULL;
/* Give our interface a nice little icon */
......@@ -116,6 +119,7 @@ DialogsProvider::~DialogsProvider()
if( p_fileinfo_dialog ) delete p_fileinfo_dialog;
if( p_file_generic_dialog ) delete p_file_generic_dialog;
if( p_streamwizard_dialog ) delete p_streamwizard_dialog;
if( p_wizard_dialog ) delete p_wizard_dialog;
if( p_bookmarks_dialog ) delete p_bookmarks_dialog;
......@@ -203,6 +207,20 @@ 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 )
{
p_wizard_dialog->Run();
}
delete p_wizard_dialog;
p_wizard_dialog = NULL;
}
void DialogsProvider::OnBookmarks( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the open dialog */
......
......@@ -118,6 +118,7 @@ enum
EjectDisc_Event,
StreamWizard_Event,
Wizard_Event,
Playlist_Event,
Logs_Event,
......@@ -184,6 +185,7 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
EVT_MENU(OpenNet_Event, Interface::OnShowDialog)
EVT_MENU(OpenSat_Event, Interface::OnShowDialog)
EVT_MENU(StreamWizard_Event, Interface::OnShowDialog)
EVT_MENU(Wizard_Event, Interface::OnShowDialog)
EVT_MENU(StopStream_Event, Interface::OnStopStream)
EVT_MENU(PlayStream_Event, Interface::OnPlayStream)
EVT_MENU(PrevStream_Event, Interface::OnPrevStream)
......@@ -354,6 +356,8 @@ void Interface::CreateOurMenuBar()
file_menu->Append( StreamWizard_Event,
wxU(_("Streaming &Wizard...\tCtrl-W")),
wxU(_(HELP_STREAMWIZARD)) );
file_menu->Append( Wizard_Event, wxU(_("New Wizard...")),
wxU(_(HELP_STREAMWIZARD)) );
file_menu->AppendSeparator();
file_menu->Append( Exit_Event, wxU(_("E&xit\tCtrl-X")),
wxU(_(HELP_EXIT)) );
......@@ -874,6 +878,9 @@ void Interface::OnShowDialog( wxCommandEvent& event )
case StreamWizard_Event:
i_id = INTF_DIALOG_STREAMWIZARD;
break;
case Wizard_Event:
i_id = INTF_DIALOG_WIZARD;
break;
case Bookmarks_Event:
i_id = INTF_DIALOG_BOOKMARKS;
break;
......
......@@ -2,7 +2,7 @@
* stream.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
* $Id: streamwizard.cpp,v 1.7 2004/03/01 18:31:13 gbazin Exp $
* $Id$
*
* Authors: Clment Stenac <zorglub@videolan.org>
*
......@@ -171,6 +171,7 @@ void StreamDialog::OnOpen( wxCommandEvent& event )
if( p_open_dialog)
{
p_open_dialog->Show();
p_open_dialog->Enable();
mrl = p_open_dialog->mrl;
sout_button->Enable();
step2_label->Enable();
......
This diff is collapsed.
......@@ -41,6 +41,7 @@
#include <wx/gauge.h>
#include <wx/accel.h>
#include <wx/checkbox.h>
#include <wx/wizard.h>
#include "vlc_keys.h"
/* Hmmm, work-around for newest wxWin */
......@@ -150,6 +151,7 @@ class Playlist;
class Messages;
class FileInfo;
class StreamDialog;
class WizardDialog;
class ItemInfoDialog;
class NewGroup;
class ExportPlaylist;
......@@ -267,6 +269,8 @@ private:
wxMenu *p_navig_menu;
};
/*class BookmarksDialog;
*/
/* Dialogs Provider */
class DialogsProvider: public wxFrame
{
......@@ -285,6 +289,7 @@ private:
void OnFileInfo( wxCommandEvent& event );
void OnPreferences( wxCommandEvent& event );
void OnStreamWizardDialog( wxCommandEvent& event );
void OnWizardDialog( wxCommandEvent& event );
void OnBookmarks( wxCommandEvent& event );
void OnOpenFileGeneric( wxCommandEvent& event );
......@@ -312,6 +317,7 @@ public:
Messages *p_messages_dialog;
FileInfo *p_fileinfo_dialog;
StreamDialog *p_streamwizard_dialog;
WizardDialog *p_wizard_dialog;
wxFrame *p_prefs_dialog;
wxWindow *p_bookmarks_dialog;
wxFileDialog *p_file_generic_dialog;
......@@ -696,6 +702,30 @@ private:
SoutDialog *p_sout_dialog;
};
/* Wizard */
class WizardDialog : public wxWizard
{
public:
/* Constructor */
WizardDialog( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~WizardDialog();
void SetTranscode( char *vcodec, int vb, char *acodec,int ab);
void SetMrl( const char *mrl );
void SetStream( char *method, char *address );
void SetTranscodeOut( char *address );
void SetAction( int i_action );
int GetAction();
void SetMux( char *mux );
void Run();
int i_action;
private:
int vb,ab;
char *vcodec,*acodec,*method,*address,*mrl,*mux;
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
};
/* Preferences 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