Commit f57c3296 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac.in: bail out with an error message if the x11 skins are enabled and we couldn't find imlib2.
* modules/gui/wxwindows/*: fixed bug in sout dialog box.
* modules/gui/skins/*: factorised the wxwindows dialogs code in dialogs.cpp. wxWindows is also initialised earlier on to allow opening a skins file with a wxWin dialog box. (Note: I badly broke the GTK2 skins).
parent 7c26f655
...@@ -2440,8 +2440,13 @@ if test "x${enable_skins}" != "xno"; then ...@@ -2440,8 +2440,13 @@ if test "x${enable_skins}" != "xno"; then
CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins ${GTK2_CFLAGS} -DGTK2_SKINS" CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins ${GTK2_CFLAGS} -DGTK2_SKINS"
LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}" LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}"
else else
IMLIB2_PATH="${PATH}" IMLIB2_PATH="${PATH}"
AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH}) AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
if test "x${IMLIB2_CONFIG_SKINS}" = "xno"; then
AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-skins.])
fi
PLUGINS="${PLUGINS} skins" PLUGINS="${PLUGINS} skins"
CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS" CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS"
LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`" LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`"
...@@ -2473,8 +2478,13 @@ if test "x${enable_basic_skins}" = "xyes"; then ...@@ -2473,8 +2478,13 @@ if test "x${enable_basic_skins}" = "xyes"; then
CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins ${GTK2_CFLAGS} -DGTK2_SKINS" CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins ${GTK2_CFLAGS} -DGTK2_SKINS"
LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ ${GTK2_LIBS}" LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ ${GTK2_LIBS}"
else else
IMLIB2_PATH="${PATH}" IMLIB2_PATH="${PATH}"
AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH}) AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH})
if test "x${IMLIB2_CONFIG_SKINS}" = "xno"; then
AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-basic-skins.])
fi
CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS" CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS"
LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`" LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ -L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`"
fi fi
......
SOURCES_skins = \ COMMON_skins = \
modules/gui/skins/os_api.h \ modules/gui/skins/os_api.h \
modules/gui/skins/os_bitmap.h \ modules/gui/skins/os_bitmap.h \
modules/gui/skins/os_event.h \ modules/gui/skins/os_event.h \
...@@ -39,6 +39,8 @@ SOURCES_skins = \ ...@@ -39,6 +39,8 @@ SOURCES_skins = \
modules/gui/skins/src/bezier.h \ modules/gui/skins/src/bezier.h \
modules/gui/skins/src/bitmap.cpp \ modules/gui/skins/src/bitmap.cpp \
modules/gui/skins/src/bitmap.h \ modules/gui/skins/src/bitmap.h \
modules/gui/skins/src/dialogs.cpp \
modules/gui/skins/src/dialogs.h \
modules/gui/skins/src/event.cpp \ modules/gui/skins/src/event.cpp \
modules/gui/skins/src/event.h \ modules/gui/skins/src/event.h \
modules/gui/skins/src/font.cpp \ modules/gui/skins/src/font.cpp \
...@@ -105,8 +107,10 @@ SOURCES_skins = \ ...@@ -105,8 +107,10 @@ SOURCES_skins = \
modules/gui/skins/x11/x11_theme.cpp \ modules/gui/skins/x11/x11_theme.cpp \
modules/gui/skins/x11/x11_theme.h \ modules/gui/skins/x11/x11_theme.h \
modules/gui/skins/x11/x11_window.cpp \ modules/gui/skins/x11/x11_window.cpp \
modules/gui/skins/x11/x11_window.h \ modules/gui/skins/x11/x11_window.h
\
SOURCES_skins = \
$(COMMON_skins) \
modules/gui/wxwindows/wxwindows.h \ modules/gui/wxwindows/wxwindows.h \
modules/gui/wxwindows/fileinfo.cpp \ modules/gui/wxwindows/fileinfo.cpp \
modules/gui/wxwindows/messages.cpp \ modules/gui/wxwindows/messages.cpp \
...@@ -117,113 +121,7 @@ SOURCES_skins = \ ...@@ -117,113 +121,7 @@ SOURCES_skins = \
$(NULL) $(NULL)
SOURCES_basic_skins = \ SOURCES_basic_skins = \
modules/gui/skins/os_api.h \ $(COMMON_skins) \
modules/gui/skins/os_bitmap.h \
modules/gui/skins/os_event.h \
modules/gui/skins/os_font.h \
modules/gui/skins/os_graphics.h \
modules/gui/skins/os_theme.h \
modules/gui/skins/os_window.h \
\
modules/gui/skins/controls/controls.h \
modules/gui/skins/controls/button.cpp \
modules/gui/skins/controls/button.h \
modules/gui/skins/controls/checkbox.cpp \
modules/gui/skins/controls/checkbox.h \
modules/gui/skins/controls/generic.cpp \
modules/gui/skins/controls/generic.h \
modules/gui/skins/controls/image.cpp \
modules/gui/skins/controls/image.h \
modules/gui/skins/controls/playlist.cpp \
modules/gui/skins/controls/playlist.h \
modules/gui/skins/controls/rectangle.cpp \
modules/gui/skins/controls/rectangle.h \
modules/gui/skins/controls/slider.cpp \
modules/gui/skins/controls/slider.h \
modules/gui/skins/controls/text.cpp \
modules/gui/skins/controls/text.h \
\
modules/gui/skins/parser/flex.c \
modules/gui/skins/parser/skin.h \
modules/gui/skins/parser/skin.c \
modules/gui/skins/parser/wrappers.h \
modules/gui/skins/parser/wrappers.cpp \
\
modules/gui/skins/src/anchor.cpp \
modules/gui/skins/src/anchor.h \
modules/gui/skins/src/banks.cpp \
modules/gui/skins/src/banks.h \
modules/gui/skins/src/bezier.cpp \
modules/gui/skins/src/bezier.h \
modules/gui/skins/src/bitmap.cpp \
modules/gui/skins/src/bitmap.h \
modules/gui/skins/src/event.cpp \
modules/gui/skins/src/event.h \
modules/gui/skins/src/font.cpp \
modules/gui/skins/src/font.h \
modules/gui/skins/src/graphics.cpp \
modules/gui/skins/src/graphics.h \
modules/gui/skins/src/skin_main.cpp \
modules/gui/skins/src/skin_common.h \
modules/gui/skins/src/theme.cpp \
modules/gui/skins/src/theme.h \
modules/gui/skins/src/themeloader.cpp \
modules/gui/skins/src/themeloader.h \
modules/gui/skins/src/vlcproc.cpp \
modules/gui/skins/src/vlcproc.h \
modules/gui/skins/src/window.cpp \
modules/gui/skins/src/window.h \
\
modules/gui/skins/win32/win32_api.cpp \
modules/gui/skins/win32/win32_bitmap.cpp \
modules/gui/skins/win32/win32_bitmap.h \
modules/gui/skins/win32/win32_dragdrop.cpp \
modules/gui/skins/win32/win32_dragdrop.h \
modules/gui/skins/win32/win32_event.cpp \
modules/gui/skins/win32/win32_event.h \
modules/gui/skins/win32/win32_font.cpp \
modules/gui/skins/win32/win32_font.h \
modules/gui/skins/win32/win32_graphics.cpp \
modules/gui/skins/win32/win32_graphics.h \
modules/gui/skins/win32/win32_run.cpp \
modules/gui/skins/win32/win32_theme.cpp \
modules/gui/skins/win32/win32_theme.h \
modules/gui/skins/win32/win32_window.cpp \
modules/gui/skins/win32/win32_window.h \
\
modules/gui/skins/gtk2/gtk2_api.cpp \
modules/gui/skins/gtk2/gtk2_bitmap.cpp \
modules/gui/skins/gtk2/gtk2_bitmap.h \
modules/gui/skins/gtk2/gtk2_dragdrop.cpp \
modules/gui/skins/gtk2/gtk2_dragdrop.h \
modules/gui/skins/gtk2/gtk2_event.cpp \
modules/gui/skins/gtk2/gtk2_event.h \
modules/gui/skins/gtk2/gtk2_font.cpp \
modules/gui/skins/gtk2/gtk2_font.h \
modules/gui/skins/gtk2/gtk2_graphics.cpp \
modules/gui/skins/gtk2/gtk2_graphics.h \
modules/gui/skins/gtk2/gtk2_run.cpp \
modules/gui/skins/gtk2/gtk2_theme.cpp \
modules/gui/skins/gtk2/gtk2_theme.h \
modules/gui/skins/gtk2/gtk2_window.cpp \
modules/gui/skins/gtk2/gtk2_window.h \
\
modules/gui/skins/x11/x11_api.cpp \
modules/gui/skins/x11/x11_bitmap.cpp \
modules/gui/skins/x11/x11_bitmap.h \
modules/gui/skins/x11/x11_dragdrop.cpp \
modules/gui/skins/x11/x11_dragdrop.h \
modules/gui/skins/x11/x11_event.cpp \
modules/gui/skins/x11/x11_event.h \
modules/gui/skins/x11/x11_font.cpp \
modules/gui/skins/x11/x11_font.h \
modules/gui/skins/x11/x11_graphics.cpp \
modules/gui/skins/x11/x11_graphics.h \
modules/gui/skins/x11/x11_run.cpp \
modules/gui/skins/x11/x11_theme.cpp \
modules/gui/skins/x11/x11_theme.h \
modules/gui/skins/x11/x11_window.cpp \
modules/gui/skins/x11/x11_window.h \
$(NULL) $(NULL)
EXTRA_DIST += \ EXTRA_DIST += \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2_run.cpp: * gtk2_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.24 2003/05/12 17:33:19 gbazin Exp $ * $Id: gtk2_run.cpp,v 1.25 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -29,11 +29,6 @@ ...@@ -29,11 +29,6 @@
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
//--- WWWINDOWS -------------------------------------------------------------
#ifndef BASIC_SKINS
#include <wx/wx.h>
#endif
//--- VLC ------------------------------------------------------------------- //--- VLC -------------------------------------------------------------------
#include <vlc/intf.h> #include <vlc/intf.h>
...@@ -49,12 +44,6 @@ ...@@ -49,12 +44,6 @@
#include "../src/skin_common.h" #include "../src/skin_common.h"
#include "../src/vlcproc.h" #include "../src/vlcproc.h"
#ifndef BASIC_SKINS
#include "../../wxwindows/wxwindows.h"
#include "share/vlc32x32.xpm" // include the icon graphic
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class CallBackObjects class CallBackObjects
{ {
...@@ -69,27 +58,6 @@ class CallBackObjects ...@@ -69,27 +58,6 @@ class CallBackObjects
bool IsVLCEvent( unsigned int msg ); bool IsVLCEvent( unsigned int msg );
int SkinManage( intf_thread_t *p_intf ); int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
// Local classes declarations.
//---------------------------------------------------------------------------
#ifndef BASIC_SKINS
class Instance: public wxApp
{
public:
Instance();
Instance( intf_thread_t *_p_intf, CallBackObjects *callback );
bool OnInit();
OpenDialog *open;
private:
intf_thread_t *p_intf;
CallBackObjects *callbackobj;
};
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// GTK2 interface // GTK2 interface
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -156,9 +124,6 @@ void GTK2Proc( GdkEvent *event, gpointer data ) ...@@ -156,9 +124,6 @@ void GTK2Proc( GdkEvent *event, gpointer data )
{ {
if( !proc->EventProc( evt ) ) if( !proc->EventProc( evt ) )
{ {
#ifndef BASIC_SKINS
wxExit();
#endif
return; // Exit VLC ! return; // Exit VLC !
} }
} }
...@@ -218,43 +183,6 @@ gboolean RefreshTimer( gpointer data ) ...@@ -218,43 +183,6 @@ gboolean RefreshTimer( gpointer data )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Implementation of Instance class
//---------------------------------------------------------------------------
#ifndef BASIC_SKINS
Instance::Instance( )
{
}
Instance::Instance( intf_thread_t *_p_intf, CallBackObjects *callback )
{
// Initialization
p_intf = _p_intf;
callbackobj = callback;
}
IMPLEMENT_APP_NO_MAIN(Instance)
bool Instance::OnInit()
{
// Set event callback. Yes, it's a big hack ;)
gdk_event_handler_set( GTK2Proc, (gpointer)callbackobj, NULL );
p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
p_intf->p_sys->OpenDlg = new OpenDialog( p_intf, NULL, FILE_ACCESS );
p_intf->p_sys->MessagesDlg = new Messages( p_intf, NULL );
p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
// Add timer
g_timeout_add( 200, (GSourceFunc)RefreshTimer, (gpointer)p_intf );
return TRUE;
}
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// GTK2 interface // GTK2 interface
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin_common.h: Private Skin interface description * skin_common.h: Private Skin interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_common.h,v 1.12 2003/06/01 22:11:24 asmax Exp $ * $Id: skin_common.h,v 1.13 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -30,19 +30,9 @@ ...@@ -30,19 +30,9 @@
#define SLIDER_RANGE 1048576 // 1024*1024 #define SLIDER_RANGE 1048576 // 1024*1024
#define DEFAULT_SKIN_FILE "skins/default.vlt" #define DEFAULT_SKIN_FILE "skins/default.vlt"
class Theme; class Theme;
class OpenDialog; class Dialogs;
class Messages;
class SoutDialog;
class PrefsDialog;
class FileInfo;
#ifndef BASIC_SKINS
class wxIcon; class wxIcon;
#endif
#ifdef WIN32
class ExitTimer;
#endif
#ifdef X11_SKINS #ifdef X11_SKINS
#include <X11/Xlib.h> #include <X11/Xlib.h>
...@@ -74,15 +64,11 @@ struct intf_sys_t ...@@ -74,15 +64,11 @@ struct intf_sys_t
int i_index; // Set which file is being played int i_index; // Set which file is being played
int i_size; // Size of playlist; int i_size; // Size of playlist;
// Interface dialogs
Dialogs *p_dialogs;
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
wxIcon *p_icon; wxIcon *p_icon;
// Dialogs
OpenDialog *OpenDlg;
Messages *MessagesDlg;
SoutDialog *SoutDlg;
PrefsDialog *PrefsDlg;
FileInfo *InfoDlg;
#endif #endif
#ifdef X11_SKINS #ifdef X11_SKINS
...@@ -92,11 +78,6 @@ struct intf_sys_t ...@@ -92,11 +78,6 @@ struct intf_sys_t
#endif #endif
#ifdef WIN32 #ifdef WIN32
#ifndef BASIC_SKINS
bool b_wx_die;
ExitTimer *p_kludgy_timer;
#endif
// We dynamically load msimg32.dll to get a pointer to TransparentBlt() // We dynamically load msimg32.dll to get a pointer to TransparentBlt()
HINSTANCE h_msimg32_dll; HINSTANCE h_msimg32_dll;
BOOL (WINAPI *TransparentBlt)( HDC,int,int,int,int,HDC,int, BOOL (WINAPI *TransparentBlt)( HDC,int,int,int,int,HDC,int,
...@@ -109,5 +90,3 @@ struct intf_sys_t ...@@ -109,5 +90,3 @@ struct intf_sys_t
}; };
#endif #endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC * skin-main.cpp: skins plugin for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.30 2003/06/01 22:11:24 asmax Exp $ * $Id: skin_main.cpp,v 1.31 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#include "themeloader.h" #include "themeloader.h"
#include "vlcproc.h" #include "vlcproc.h"
#include "skin_common.h" #include "skin_common.h"
#include "dialogs.h"
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
#include "../../wxwindows/wxwindows.h" #include "../../wxwindows/wxwindows.h"
#endif #endif
...@@ -209,6 +211,13 @@ static void Run( intf_thread_t *p_intf ) ...@@ -209,6 +211,13 @@ static void Run( intf_thread_t *p_intf )
int a = OSAPI_GetTime(); int a = OSAPI_GetTime();
#ifndef BASIC_SKINS
// Initialize the dialog boxes
p_intf->p_sys->p_dialogs = new Dialogs( p_intf );
if( !p_intf->p_sys->p_dialogs ||
!p_intf->p_sys->p_dialogs->OpenDlg ) return;
#endif
// Load a theme // Load a theme
char *skin_last = config_GetPsz( p_intf, "skin_last" ); char *skin_last = config_GetPsz( p_intf, "skin_last" );
ThemeLoader *Loader = new ThemeLoader( p_intf ); ThemeLoader *Loader = new ThemeLoader( p_intf );
...@@ -235,17 +244,16 @@ static void Run( intf_thread_t *p_intf ) ...@@ -235,17 +244,16 @@ static void Run( intf_thread_t *p_intf )
#endif #endif
{ {
// Last chance: the user can select a new theme file // Last chance: the user can select a new theme file
// FIXME: wxWindows isn't initialized yet !!!
#if 0
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
wxFileDialog dialog( NULL, _("Open a skin file"), "", "", wxFileDialog dialog( NULL,
"Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|" wxU(_("Open a skin file")), wxT(""), wxT(""),
"All files|*.*", wxOPEN ); wxT("Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|"
"All files|*.*"), wxOPEN );
if( dialog.ShowModal() == wxID_OK ) if( dialog.ShowModal() == wxID_OK )
{ {
// try to load selected file // try to load selected file
if( ! Loader->Load( dialog.GetPath().c_str() ) ) if( ! Loader->Load( (string)dialog.GetPath().mb_str() ) )
{ {
// He, he, what the hell is he doing ? // He, he, what the hell is he doing ?
delete Loader; delete Loader;
...@@ -253,7 +261,6 @@ static void Run( intf_thread_t *p_intf ) ...@@ -253,7 +261,6 @@ static void Run( intf_thread_t *p_intf )
} }
} }
else else
#endif
#endif #endif
{ {
delete Loader; delete Loader;
...@@ -274,6 +281,11 @@ static void Run( intf_thread_t *p_intf ) ...@@ -274,6 +281,11 @@ static void Run( intf_thread_t *p_intf )
OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (int)true ); OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (int)true );
OSRun( p_intf ); OSRun( p_intf );
#ifndef BASIC_SKINS
// clean up the dialog boxes
delete p_intf->p_sys->p_dialogs;
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -324,12 +336,12 @@ int SkinManage( intf_thread_t *p_intf ) ...@@ -324,12 +336,12 @@ int SkinManage( intf_thread_t *p_intf )
OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (long)false ); OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (long)false );
#ifndef BASIC_SKINS #ifndef BASIC_SKINS //FIXME
// Update the log window // Update the log window
p_intf->p_sys->MessagesDlg->UpdateLog(); p_intf->p_sys->p_dialogs->MessagesDlg->UpdateLog();
// Update the file info window // Update the file info window
p_intf->p_sys->InfoDlg->UpdateFileInfo(); p_intf->p_sys->p_dialogs->FileInfoDlg->UpdateFileInfo();
#endif #endif
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.28 2003/06/01 16:39:49 asmax Exp $ * $Id: vlcproc.cpp,v 1.29 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "window.h" #include "window.h"
#include "vlcproc.h" #include "vlcproc.h"
#include "skin_common.h" #include "skin_common.h"
#include "dialogs.h"
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
#include "../../wxwindows/wxwindows.h" #include "../../wxwindows/wxwindows.h"
...@@ -103,9 +104,8 @@ bool VlcProc::EventProc( Event *evt ) ...@@ -103,9 +104,8 @@ bool VlcProc::EventProc( Event *evt )
case VLC_OPEN: case VLC_OPEN:
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
wxMutexGuiEnter(); p_intf->p_sys->p_dialogs->ShowOpen( TRUE );
OpenFile( true ); InterfaceRefresh();
wxMutexGuiLeave();
#endif #endif
return true; return true;
...@@ -139,35 +139,25 @@ bool VlcProc::EventProc( Event *evt ) ...@@ -139,35 +139,25 @@ bool VlcProc::EventProc( Event *evt )
case VLC_PLAYLIST_ADD_FILE: case VLC_PLAYLIST_ADD_FILE:
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
wxMutexGuiEnter(); p_intf->p_sys->p_dialogs->ShowOpen( FALSE );
OpenFile( false ); InterfaceRefresh();
wxMutexGuiLeave();
#endif #endif
return true; return true;
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
case VLC_LOG_SHOW: case VLC_LOG_SHOW:
wxMutexGuiEnter(); p_intf->p_sys->p_dialogs->ShowMessages();
p_intf->p_sys->MessagesDlg->Show(
!p_intf->p_sys->MessagesDlg->IsShown() );
wxMutexGuiLeave();
return true; return true;
case VLC_LOG_CLEAR: case VLC_LOG_CLEAR:
return true; return true;
case VLC_PREFS_SHOW: case VLC_PREFS_SHOW:
wxMutexGuiEnter(); p_intf->p_sys->p_dialogs->ShowPrefs();
p_intf->p_sys->PrefsDlg->Show(
!p_intf->p_sys->PrefsDlg->IsShown() );
wxMutexGuiLeave();
return true; return true;
case VLC_INFO_SHOW: case VLC_INFO_SHOW:
wxMutexGuiEnter(); p_intf->p_sys->p_dialogs->ShowFileInfo();
p_intf->p_sys->InfoDlg->Show(
!p_intf->p_sys->InfoDlg->IsShown() );
wxMutexGuiLeave();
return true; return true;
#endif #endif
...@@ -405,50 +395,6 @@ void VlcProc::LoadSkin() ...@@ -405,50 +395,6 @@ void VlcProc::LoadSkin()
#endif #endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void VlcProc::OpenFile( bool play )
{
#ifndef BASIC_SKINS
if( p_intf->p_sys->OpenDlg->ShowModal() != wxID_OK )
{
return;
}
// Check if playlist is available
playlist_t *p_playlist = p_intf->p_sys->p_playlist;
if( p_playlist == NULL )
{
return;
}
if( play )
{
// Append and play
for( size_t i = 0; i < p_intf->p_sys->OpenDlg->mrl.GetCount(); i++ )
{
playlist_Add( p_playlist,
(const char *)p_intf->p_sys->OpenDlg->mrl[i].mb_str(),
PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO), PLAYLIST_END );
}
p_intf->p_sys->p_theme->EvtBank->Get( "play" )->SendEvent();
}
else
{
// Append only
for( size_t i = 0; i < p_intf->p_sys->OpenDlg->mrl.GetCount(); i++ )
{
playlist_Add( p_playlist,
(const char *)p_intf->p_sys->OpenDlg->mrl[i].mb_str(),
PLAYLIST_APPEND, PLAYLIST_END );
}
}
// Refresh interface !
p_intf->p_sys->p_theme->EvtBank->Get( "playlist_refresh" )
->PostSynchroMessage();
InterfaceRefresh();
#endif
}
//---------------------------------------------------------------------------
void VlcProc::DropFile( unsigned int param ) void VlcProc::DropFile( unsigned int param )
{ {
// Get pointer to file // Get pointer to file
...@@ -628,4 +574,3 @@ void VlcProc::AddNetworkUDP( int port ) ...@@ -628,4 +574,3 @@ void VlcProc::AddNetworkUDP( int port )
InterfaceRefresh(); InterfaceRefresh();
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.h: VlcProc class * vlcproc.h: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.h,v 1.5 2003/05/05 16:29:57 gbazin Exp $ * $Id: vlcproc.h,v 1.6 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -42,7 +42,6 @@ class VlcProc ...@@ -42,7 +42,6 @@ class VlcProc
// Vlc methods // Vlc methods
void LoadSkin(); void LoadSkin();
void OpenFile( bool play );
void DropFile( unsigned int param ); void DropFile( unsigned int param );
void PauseStream(); void PauseStream();
void PlayStream(); void PlayStream();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_run.cpp: * win32_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_run.cpp,v 1.17 2003/05/26 02:09:27 gbazin Exp $ * $Id: win32_run.cpp,v 1.18 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -30,16 +30,6 @@ ...@@ -30,16 +30,6 @@
#include <vlc/intf.h> #include <vlc/intf.h>
//--- GENERAL --------------------------------------------------------------- //--- GENERAL ---------------------------------------------------------------
#ifndef BASIC_SKINS
#ifdef WIN32 /* mingw32 hack */
# undef Yield
# undef CreateDialog
#endif
/* Let vlc take care of the i18n stuff */
#define WXINTL_NO_GETTEXT_MACRO
#include <wx/wx.h>
#endif
#include <windows.h> #include <windows.h>
//--- SKIN ------------------------------------------------------------------ //--- SKIN ------------------------------------------------------------------
...@@ -54,154 +44,12 @@ ...@@ -54,154 +44,12 @@
#include "../src/skin_common.h" #include "../src/skin_common.h"
#include "../src/vlcproc.h" #include "../src/vlcproc.h"
#ifndef BASIC_SKINS
#include "../../wxwindows/wxwindows.h"
#include "share/vlc32x32.xpm" // include the graphic icon
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Specific method // Specific method
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg ); bool IsVLCEvent( unsigned int msg );
int SkinManage( intf_thread_t *p_intf ); int SkinManage( intf_thread_t *p_intf );
#ifndef BASIC_SKINS
//---------------------------------------------------------------------------
// Local classes declarations.
//---------------------------------------------------------------------------
class Instance: public wxApp
{
public:
Instance();
Instance( intf_thread_t *_p_intf );
bool OnInit();
int OnExit();
OpenDialog *open;
private:
intf_thread_t *p_intf;
};
class ExitTimer: public wxTimer
{
public:
ExitTimer( intf_thread_t *_p_intf );
void Notify();
private:
intf_thread_t *p_intf;
};
//---------------------------------------------------------------------------
// Implementation of Instance class
//---------------------------------------------------------------------------
Instance::Instance( )
{
}
Instance::Instance( intf_thread_t *_p_intf )
{
// Initialization
p_intf = _p_intf;
}
IMPLEMENT_APP_NO_MAIN(Instance)
bool Instance::OnInit()
{
p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
// Create all the dialog boxes
p_intf->p_sys->OpenDlg = new OpenDialog( p_intf, NULL, FILE_ACCESS );
p_intf->p_sys->MessagesDlg = new Messages( p_intf, NULL );
p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
// Start a timer checking if we must exit the main loop
p_intf->p_sys->b_wx_die = 0;
p_intf->p_sys->p_kludgy_timer = new ExitTimer( p_intf );
p_intf->p_sys->p_kludgy_timer->Start( 100 );
// OK, initialization is over, now the other thread can go on working...
vlc_thread_ready( p_intf );
return TRUE;
}
int Instance::OnExit()
{
// Delete evertything
delete p_intf->p_sys->p_kludgy_timer;
delete p_intf->p_sys->InfoDlg;
delete p_intf->p_sys->PrefsDlg;
delete p_intf->p_sys->SoutDlg;
delete p_intf->p_sys->MessagesDlg;
delete p_intf->p_sys->OpenDlg;
delete p_intf->p_sys->p_icon;
return 0;
}
//---------------------------------------------------------------------------
// Implementation of ExitTimer class
// This timer is only there to call wxApp::ExitMainLoop() from the wxWindows
// thread (otherwise we never exit from the wxEntry call).
//---------------------------------------------------------------------------
ExitTimer::ExitTimer( intf_thread_t *_p_intf ) : wxTimer()
{
p_intf = _p_intf;
}
void ExitTimer::Notify()
{
if( p_intf->p_sys->b_wx_die )
wxTheApp->ExitMainLoop();
}
//---------------------------------------------------------------------------
#if !defined(__BUILTIN__) && defined( WIN32 )
HINSTANCE hInstance = 0;
extern "C" BOOL WINAPI
DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
{
hInstance = (HINSTANCE)hModule;
return TRUE;
}
#endif
//---------------------------------------------------------------------------
// Thread callback
// We create all wxWindows dialogs in a separate thread because we don't want
// any interaction with our own message loop
//---------------------------------------------------------------------------
void SkinsDialogsThread( intf_thread_t *p_intf )
{
/* Hack to pass the p_intf pointer to the new wxWindow Instance object */
wxTheApp = new Instance( p_intf );
#if defined( WIN32 )
#if !defined(__BUILTIN__)
wxEntry( hInstance/*GetModuleHandle(NULL)*/, NULL, NULL, SW_SHOW, TRUE );
#else
wxEntry( GetModuleHandle( NULL ), NULL, NULL, SW_SHOW, TRUE );
#endif
#else
wxEntry( 1, p_args );
#endif
return;
}
#endif // WX_SKINS
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Refresh Timer Callback // Refresh Timer Callback
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -214,7 +62,6 @@ void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime ) ...@@ -214,7 +62,6 @@ void CALLBACK RefreshTimer( HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Win32 interface // Win32 interface
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -226,17 +73,6 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -226,17 +73,6 @@ void OSRun( intf_thread_t *p_intf )
Event *ProcessEvent; Event *ProcessEvent;
int KeyModifier = 0; int KeyModifier = 0;
#ifndef BASIC_SKINS
// Create a new thread for wxWindows
if( vlc_thread_create( p_intf, "Skins Dialogs Thread", SkinsDialogsThread,
0, VLC_TRUE ) )
{
msg_Err( p_intf, "cannot create SkinsDialogsThread" );
// Don't even enter the main loop
return;
}
#endif
// Create refresh timer // Create refresh timer
SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200, SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200,
(TIMERPROC)RefreshTimer ); (TIMERPROC)RefreshTimer );
...@@ -349,11 +185,6 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -349,11 +185,6 @@ void OSRun( intf_thread_t *p_intf )
// Check if vlc is closing // Check if vlc is closing
Proc->IsClosing(); Proc->IsClosing();
} }
#ifndef BASIC_SKINS
// Tell wxWindows it's time to exit
p_intf->p_sys->b_wx_die = 1;
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg ) bool IsVLCEvent( unsigned int msg )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* x11_run.cpp: * x11_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: x11_run.cpp,v 1.13 2003/06/01 22:11:24 asmax Exp $ * $Id: x11_run.cpp,v 1.14 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -27,13 +27,6 @@ ...@@ -27,13 +27,6 @@
//--- X11 ------------------------------------------------------------------- //--- X11 -------------------------------------------------------------------
#include <X11/Xlib.h> #include <X11/Xlib.h>
//--- WXWINDOWS -------------------------------------------------------------
#ifndef BASIC_SKINS
/* Let vlc take care of the i18n stuff */
#define WXINTL_NO_GETTEXT_MACRO
#include <wx/wx.h>
#endif
//--- VLC ------------------------------------------------------------------- //--- VLC -------------------------------------------------------------------
#include <vlc/intf.h> #include <vlc/intf.h>
...@@ -49,101 +42,12 @@ ...@@ -49,101 +42,12 @@
#include "../src/skin_common.h" #include "../src/skin_common.h"
#include "../src/vlcproc.h" #include "../src/vlcproc.h"
#ifndef BASIC_SKINS
#include "../../wxwindows/wxwindows.h"
#endif
// include the icon graphic
#include "share/vlc32x32.xpm"
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Specific method // Specific method
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg ); bool IsVLCEvent( unsigned int msg );
int SkinManage( intf_thread_t *p_intf ); int SkinManage( intf_thread_t *p_intf );
#ifndef BASIC_SKINS
//---------------------------------------------------------------------------
// Local classes declarations.
//---------------------------------------------------------------------------
class Instance: public wxApp
{
public:
Instance();
Instance( intf_thread_t *_p_intf );
bool OnInit();
int OnExit();
OpenDialog *open;
private:
intf_thread_t *p_intf;
};
//---------------------------------------------------------------------------
// Implementation of Instance class
//---------------------------------------------------------------------------
Instance::Instance( )
{
}
Instance::Instance( intf_thread_t *_p_intf )
{
// Initialization
p_intf = _p_intf;
}
IMPLEMENT_APP_NO_MAIN(Instance)
bool Instance::OnInit()
{
p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
// Create all the dialog boxes
p_intf->p_sys->OpenDlg = new OpenDialog( p_intf, NULL, FILE_ACCESS );
p_intf->p_sys->MessagesDlg = new Messages( p_intf, NULL );
p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
// OK, initialization is over, now the other thread can go on working...
vlc_thread_ready( p_intf );
return TRUE;
}
int Instance::OnExit()
{
// Delete evertything
delete p_intf->p_sys->InfoDlg;
delete p_intf->p_sys->PrefsDlg;
delete p_intf->p_sys->SoutDlg;
delete p_intf->p_sys->MessagesDlg;
delete p_intf->p_sys->OpenDlg;
delete p_intf->p_sys->p_icon;
return 0;
}
//---------------------------------------------------------------------------
// Thread callback
// We create all wxWindows dialogs in a separate thread because we don't want
// any interaction with our own message loop
//---------------------------------------------------------------------------
void SkinsDialogsThread( intf_thread_t *p_intf )
{
/* Hack to pass the p_intf pointer to the new wxWindow Instance object */
wxTheApp = new Instance( p_intf );
static char *p_args[] = { "" };
wxEntry( 1, p_args );
return;
}
#endif // WX_SKINS
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// X11 event processing // X11 event processing
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -203,9 +107,6 @@ int ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event ) ...@@ -203,9 +107,6 @@ int ProcessEvent( intf_thread_t *p_intf, VlcProc *proc, XEvent *event )
{ {
if( !proc->EventProc( evt ) ) if( !proc->EventProc( evt ) )
{ {
#ifndef BASIC_SKINS
wxExit();
#endif
return 1; // Exit VLC ! return 1; // Exit VLC !
} }
} }
...@@ -259,17 +160,6 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -259,17 +160,6 @@ void OSRun( intf_thread_t *p_intf )
Display *display = ((OSTheme *)p_intf->p_sys->p_theme)->GetDisplay(); Display *display = ((OSTheme *)p_intf->p_sys->p_theme)->GetDisplay();
#ifndef BASIC_SKINS
// Create a new thread for wxWindows
if( vlc_thread_create( p_intf, "Skins Dialogs Thread", SkinsDialogsThread,
0, VLC_TRUE ) )
{
msg_Err( p_intf, "cannot create SkinsDialogsThread" );
// Don't even enter the main loop
return;
}
#endif
// Main event loop // Main event loop
int close = 0; int close = 0;
int count = 0; int count = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* streamout.cpp : wxWindows plugin for vlc * streamout.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: streamout.cpp,v 1.15 2003/05/22 22:24:34 gbazin Exp $ * $Id: streamout.cpp,v 1.16 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -94,8 +94,8 @@ enum ...@@ -94,8 +94,8 @@ enum
AccessType1_Event, AccessType2_Event, AccessType3_Event, AccessType1_Event, AccessType2_Event, AccessType3_Event,
AccessType4_Event, AccessType5_Event, AccessType4_Event, AccessType5_Event,
NetPort_Event, NetPort1_Event, NetPort2_Event, NetPort3_Event,
NetAddr_Event, NetAddr1_Event, NetAddr2_Event, NetAddr3_Event,
EncapsulationRadio1_Event, EncapsulationRadio2_Event, EncapsulationRadio1_Event, EncapsulationRadio2_Event,
EncapsulationRadio3_Event, EncapsulationRadio4_Event, EncapsulationRadio3_Event, EncapsulationRadio4_Event,
...@@ -118,9 +118,13 @@ BEGIN_EVENT_TABLE(SoutDialog, wxDialog) ...@@ -118,9 +118,13 @@ BEGIN_EVENT_TABLE(SoutDialog, wxDialog)
EVT_CHECKBOX(AccessType5_Event, SoutDialog::OnAccessTypeChange) EVT_CHECKBOX(AccessType5_Event, SoutDialog::OnAccessTypeChange)
EVT_TEXT(FileName_Event, SoutDialog::OnFileChange) EVT_TEXT(FileName_Event, SoutDialog::OnFileChange)
EVT_BUTTON(FileBrowse_Event, SoutDialog::OnFileBrowse) EVT_BUTTON(FileBrowse_Event, SoutDialog::OnFileBrowse)
EVT_TEXT(NetPort_Event, SoutDialog::OnNetChange)
EVT_SPINCTRL(NetPort_Event, SoutDialog::OnNetChange) EVT_TEXT(NetPort1_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetAddr_Event, SoutDialog::OnNetChange) EVT_TEXT(NetAddr1_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetPort2_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetAddr2_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetPort3_Event, SoutDialog::OnNetChange)
EVT_TEXT(NetAddr3_Event, SoutDialog::OnNetChange)
/* Events generated by the encapsulation panel */ /* Events generated by the encapsulation panel */
EVT_RADIOBUTTON(EncapsulationRadio1_Event, EVT_RADIOBUTTON(EncapsulationRadio1_Event,
...@@ -286,8 +290,9 @@ void SoutDialog::UpdateMRL() ...@@ -286,8 +290,9 @@ void SoutDialog::UpdateMRL()
if( !dup_opts.IsEmpty() ) dup_opts += wxT(","); if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=http,mux="); dup_opts += wxT("dst=std{access=http,mux=");
dup_opts += encapsulation + wxT(",url="); dup_opts += encapsulation + wxT(",url=");
dup_opts += net_addr->GetLineText(0); dup_opts += net_addrs[HTTP_ACCESS_OUT]->GetLineText(0);
dup_opts += wxString::Format( wxT(":%d"), net_port->GetValue() ); dup_opts += wxString::Format( wxT(":%d"),
net_ports[HTTP_ACCESS_OUT]->GetValue() );
dup_opts += wxT("}"); dup_opts += wxT("}");
} }
if( access_checkboxes[UDP_ACCESS_OUT]->IsChecked() ) if( access_checkboxes[UDP_ACCESS_OUT]->IsChecked() )
...@@ -295,8 +300,9 @@ void SoutDialog::UpdateMRL() ...@@ -295,8 +300,9 @@ void SoutDialog::UpdateMRL()
if( !dup_opts.IsEmpty() ) dup_opts += wxT(","); if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=udp,mux="); dup_opts += wxT("dst=std{access=udp,mux=");
dup_opts += encapsulation + wxT(",url="); dup_opts += encapsulation + wxT(",url=");
dup_opts += net_addr->GetLineText(0); dup_opts += net_addrs[UDP_ACCESS_OUT]->GetLineText(0);
dup_opts += wxString::Format( wxT(":%d"), net_port->GetValue() ); dup_opts += wxString::Format( wxT(":%d"),
net_ports[UDP_ACCESS_OUT]->GetValue() );
dup_opts += wxT("}"); dup_opts += wxT("}");
} }
if( access_checkboxes[RTP_ACCESS_OUT]->IsChecked() ) if( access_checkboxes[RTP_ACCESS_OUT]->IsChecked() )
...@@ -304,8 +310,9 @@ void SoutDialog::UpdateMRL() ...@@ -304,8 +310,9 @@ void SoutDialog::UpdateMRL()
if( !dup_opts.IsEmpty() ) dup_opts += wxT(","); if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=rtp,mux="); dup_opts += wxT("dst=std{access=rtp,mux=");
dup_opts += encapsulation + wxT(",url="); dup_opts += encapsulation + wxT(",url=");
dup_opts += net_addr->GetLineText(0); dup_opts += net_addrs[RTP_ACCESS_OUT]->GetLineText(0);
dup_opts += wxString::Format( wxT(":%d"), net_port->GetValue() ); dup_opts += wxString::Format( wxT(":%d"),
net_ports[RTP_ACCESS_OUT]->GetValue() );
dup_opts += wxT("}"); dup_opts += wxT("}");
} }
...@@ -374,21 +381,23 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent ) ...@@ -374,21 +381,23 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent )
access_subpanels[1]->SetSizerAndFit( subpanel_sizer ); access_subpanels[1]->SetSizerAndFit( subpanel_sizer );
/* Net rows */ /* Net rows */
for( i=2; i < ACCESS_OUT_NUM; i++ ) for( i = HTTP_ACCESS_OUT; i < ACCESS_OUT_NUM; i++ )
{ {
subpanel_sizer = new wxFlexGridSizer( 4, 1, 20 ); subpanel_sizer = new wxFlexGridSizer( 4, 1, 20 );
label = new wxStaticText( access_subpanels[i], -1, wxU(_("Address")) ); label = new wxStaticText( access_subpanels[i], -1, wxU(_("Address")) );
net_addr = new wxTextCtrl( access_subpanels[i], NetAddr_Event, wxT(""), net_addrs[i] = new wxTextCtrl( access_subpanels[i],
wxDefaultPosition, wxSize( 200, -1 ), NetAddr1_Event + i - HTTP_ACCESS_OUT,
wxTE_PROCESS_ENTER); wxT(""), wxDefaultPosition,
wxSize( 200, -1 ), wxTE_PROCESS_ENTER);
subpanel_sizer->Add( label, 0, subpanel_sizer->Add( label, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL ); wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( net_addr, 1, wxEXPAND | subpanel_sizer->Add( net_addrs[i], 1, wxEXPAND |
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL ); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
int val = config_GetInt( p_intf, "server-port" ); int val = config_GetInt( p_intf, "server-port" );
label = new wxStaticText( access_subpanels[i], -1, wxU(_("Port")) ); label = new wxStaticText( access_subpanels[i], -1, wxU(_("Port")) );
net_port = new wxSpinCtrl( access_subpanels[i], NetPort_Event, net_ports[i] = new wxSpinCtrl( access_subpanels[i],
NetPort1_Event + i - HTTP_ACCESS_OUT,
wxString::Format(wxT("%d"), val), wxString::Format(wxT("%d"), val),
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS, wxSP_ARROW_KEYS,
...@@ -396,7 +405,7 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent ) ...@@ -396,7 +405,7 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent )
subpanel_sizer->Add( label, 0, subpanel_sizer->Add( label, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL ); wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( net_port, 0, subpanel_sizer->Add( net_ports[i], 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL ); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
access_subpanels[i]->SetSizerAndFit( subpanel_sizer ); access_subpanels[i]->SetSizerAndFit( subpanel_sizer );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.33 2003/05/27 11:35:34 gbazin Exp $ * $Id: wxwindows.h,v 1.34 2003/06/03 22:18:58 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -355,8 +355,8 @@ private: ...@@ -355,8 +355,8 @@ private:
int i_access_type; int i_access_type;
wxComboBox *file_combo; wxComboBox *file_combo;
wxSpinCtrl *net_port; wxSpinCtrl *net_ports[5];
wxTextCtrl *net_addr; wxTextCtrl *net_addrs[5];
/* Controls for the encapsulation */ /* Controls for the encapsulation */
wxRadioButton *encapsulation_radios[5]; wxRadioButton *encapsulation_radios[5];
......
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