Commit 7e39490e authored by Clément Stenac's avatar Clément Stenac

p( vlc.getInterfaces().getInterface( "wxwidgets" ).isBroken() ) = 1/2

aka : merge the big wx changes from branch
parent 0a7e6834
......@@ -158,6 +158,7 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
#define INTF_DIALOG_FILE_GENERIC 30
#define INTF_DIALOG_UPDATEVLC 90
#define INTF_DIALOG_VLM 91
#define INTF_DIALOG_EXIT 99
......
SOURCES_wxwidgets = \
wxwidgets.cpp \
wxwidgets.h \
interface.cpp \
extrapanel.cpp \
dialogs.cpp \
open.cpp \
streamout.cpp \
wizard.cpp \
streamdata.h \
streamdata.cpp \
messages.cpp \
playlist.cpp \
iteminfo.cpp \
interface.cpp \
extrapanel.cpp \
menus.cpp \
preferences.cpp \
preferences_widgets.cpp \
preferences_widgets.h \
timer.cpp \
fileinfo.cpp \
updatevlc.cpp \
subtitles.cpp \
bookmarks.cpp \
video.cpp \
slider_manager.cpp \
main_slider_manager.cpp \
dialogs.cpp \
dialogs/open.cpp \
dialogs/streamout.cpp \
dialogs/wizard.cpp \
dialogs/messages.cpp \
dialogs/playlist.cpp \
dialogs/iteminfo.cpp \
dialogs/preferences.cpp \
dialogs/preferences_widgets.cpp \
dialogs/preferences_widgets.h \
dialogs/fileinfo.cpp \
dialogs/updatevlc.cpp \
dialogs/subtitles.cpp \
dialogs/bookmarks.cpp \
dialogs/vlm/vlm_slider_manager.cpp \
dialogs/vlm/vlm_stream.cpp \
dialogs/vlm/vlm_wrapper.cpp \
dialogs/vlm/vlm_streampanel.cpp \
dialogs/vlm/vlm_panel.cpp \
$(NULL)
EXTRA_DIST += \
......@@ -53,4 +59,9 @@ EXTRA_DIST += \
bitmaps/type_playlist.xpm \
bitmaps/type_unknown.xpm \
bitmaps/type_vfile.xpm \
bitmaps/video.xpm
bitmaps/video.xpm \
vlm/vlm_slider_manager.hpp \
vlm/vlm_stream.hpp \
vlm/vlm_wrapper.hpp \
vlm/vlm_streampanel.hpp \
vlm/vlm_panel.hpp
/* XPM */
static char * trash_xpm[] = {
"16 16 88 1",
" c None",
". c #2C2C2C",
"+ c #6E6E6E",
"@ c #555555",
"# c #161616",
"$ c #626154",
"% c #6B6A5A",
"& c #A1A095",
"* c #9B9B98",
"= c #A4A49D",
"- c #A5A495",
"; c #5C5C50",
"> c #575649",
", c #616057",
"' c #D0CEBA",
") c #CCCBBD",
"! c #85847F",
"~ c #4C4C48",
"{ c #3D3C34",
"] c #7E7C6B",
"^ c #B2B09E",
"/ c #B2B097",
"( c #4D4C41",
"_ c #616059",
": c #E0E0DB",
"< c #EBEBE4",
"[ c #D8D7CD",
"} c #CCCBBC",
"| c #C0BEA8",
"1 c #B8B69D",
"2 c #C5C4AF",
"3 c #AAA996",
"4 c #414037",
"5 c #4D4D42",
"6 c #AAA99B",
"7 c #D6D5CE",
"8 c #EAE9E5",
"9 c #E2E1DE",
"0 c #D8D8CF",
"a c #BCBBAE",
"b c #9C9A89",
"c c #737262",
"d c #34332D",
"e c #000000",
"f c #41413C",
"g c #888882",
"h c #B3B2A8",
"i c #BCBCAE",
"j c #A3A18A",
"k c #8F8D7A",
"l c #606056",
"m c #353530",
"n c #676758",
"o c #59594F",
"p c #52524D",
"q c #3D3D38",
"r c #2A2A23",
"s c #2E2E26",
"t c #35352C",
"u c #3D3D32",
"v c #707060",
"w c #919184",
"x c #A0A098",
"y c #707066",
"z c #646458",
"A c #606051",
"B c #4D4D40",
"C c #4E4E40",
"D c #959587",
"E c #B9B9AC",
"F c #8E8E80",
"G c #787868",
"H c #7A7A67",
"I c #565648",
"J c #6E6E5D",
"K c #939385",
"L c #545445",
"M c #46463C",
"N c #868678",
"O c #B2B2A5",
"P c #8F8F82",
"Q c #787865",
"R c #515143",
"S c #39392F",
"T c #2F2F29",
"U c #30302A",
"V c #2C2C25",
"W c #272720",
" ",
" ",
" .+@# ",
" $%&*=-;> ",
" ,')!~{]^/( ",
" _:<[}|1234 ",
" 567890abcd ",
" efghijklme ",
" enopqrstue ",
" evwxyzABCe ",
" evDEFGHIIe ",
" eJKEFGHILe ",
" eMNOPGQRSe ",
" eTUVWe ",
" ",
" "};
......@@ -32,9 +32,20 @@
#include <vlc/vlc.h>
#include <vlc/aout.h>
#include <vlc/intf.h>
#include "charset.h"
#include "wxwidgets.h"
#include "dialogs/vlm/vlm_panel.hpp"
#include "dialogs/bookmarks.hpp"
#include "dialogs/wizard.hpp"
#include "dialogs/playlist.hpp"
#include "dialogs/open.hpp"
#include "dialogs/updatevlc.hpp"
#include "dialogs/fileinfo.hpp"
#include "dialogs/iteminfo.hpp"
#include "dialogs/preferences.hpp"
#include "dialogs/messages.hpp"
#include "interface.hpp"
/* include the icon graphic */
#include "../../../share/vlc32x32.xpm"
......@@ -52,6 +63,7 @@ private:
/* Event handlers (these functions should _not_ be virtual) */
void OnUpdateVLC( wxCommandEvent& event );
void OnVLM( wxCommandEvent& event );
void OnExit( wxCommandEvent& event );
void OnPlaylist( wxCommandEvent& event );
void OnMessages( wxCommandEvent& event );
......@@ -92,6 +104,7 @@ public:
wxFrame *p_bookmarks_dialog;
wxFileDialog *p_file_generic_dialog;
UpdateVLC *p_updatevlc_dialog;
VLMFrame *p_vlm_dialog;
};
DEFINE_LOCAL_EVENT_TYPE( wxEVT_DIALOG );
......@@ -131,6 +144,8 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider::OnExitThread)
EVT_COMMAND(INTF_DIALOG_UPDATEVLC, wxEVT_DIALOG,
DialogsProvider::OnUpdateVLC)
EVT_COMMAND(INTF_DIALOG_VLM, wxEVT_DIALOG,
DialogsProvider::OnVLM)
END_EVENT_TABLE()
wxWindow *CreateDialogsProvider( intf_thread_t *p_intf, wxWindow *p_parent )
......@@ -157,6 +172,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
p_bookmarks_dialog = NULL;
p_dir_dialog = NULL;
p_updatevlc_dialog = NULL;
p_vlm_dialog = NULL;
/* Give our interface a nice little icon */
p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
......@@ -191,7 +207,7 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
INIT( ID_PLAYLIST, p_playlist_dialog, new Playlist(p_intf,this), ShowPlaylist );
INIT( ID_MESSAGES, p_messages_dialog, new Messages(p_intf,this), Show );
INIT( ID_FILE_INFO, p_fileinfo_dialog, new FileInfo(p_intf,this), Show );
INIT( ID_BOOKMARKS, p_bookmarks_dialog, BookmarksDialog(p_intf,this), Show);
INIT( ID_BOOKMARKS, p_bookmarks_dialog, new BookmarksDialog(p_intf,this), Show);
#undef INIT
}
......@@ -215,7 +231,7 @@ DialogsProvider::~DialogsProvider()
#undef UPDATE
PopEventHandler(true);
PopEventHandler(true);
/* Clean up */
if( p_open_dialog ) delete p_open_dialog;
......@@ -228,6 +244,7 @@ DialogsProvider::~DialogsProvider()
if( p_wizard_dialog ) delete p_wizard_dialog;
if( p_bookmarks_dialog ) delete p_bookmarks_dialog;
if( p_updatevlc_dialog ) delete p_updatevlc_dialog;
if( p_vlm_dialog ) delete p_vlm_dialog;
if( p_intf->p_sys->p_icon ) delete p_intf->p_sys->p_icon;
......@@ -319,7 +336,7 @@ void DialogsProvider::OnBookmarks( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the open dialog */
if( !p_bookmarks_dialog )
p_bookmarks_dialog = BookmarksDialog( p_intf, this );
p_bookmarks_dialog = new BookmarksDialog( p_intf, this );
if( p_bookmarks_dialog )
{
......@@ -502,3 +519,15 @@ void DialogsProvider::OnUpdateVLC( wxCommandEvent& WXUNUSED(event) )
p_updatevlc_dialog->Show( !p_updatevlc_dialog->IsShown() );
}
}
void DialogsProvider::OnVLM( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the file info window */
if( !p_vlm_dialog )
p_vlm_dialog = new VLMFrame( p_intf, this );
if( p_vlm_dialog )
{
p_vlm_dialog->Show( !p_vlm_dialog->IsShown() );
}
}
......@@ -24,23 +24,16 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <errno.h> /* ENOMEM */
#include <string.h> /* strerror() */
#include <stdio.h>
#include "dialogs/bookmarks.hpp"
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "wxwidgets.h"
#include <wx/dialog.h>
#include "wizard.hpp"
/* Callback prototype */
static int PlaylistChanged( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void * );
/*****************************************************************************
* Class declaration.
* Event Table.
*****************************************************************************/
/* IDs for the controls and the menu commands */
......@@ -54,41 +47,6 @@ enum
ButtonEdit_Event
};
class BookmarksDialog: public wxFrame
{
public:
/* Constructor */
BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~BookmarksDialog();
bool Show( bool );
private:
void Update();
/* Event handlers (these functions should _not_ be virtual) */
void OnClose( wxCloseEvent& event );
void OnAdd( wxCommandEvent& event );
void OnDel( wxCommandEvent& event );
void OnClear( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
void OnUpdate( wxCommandEvent &event );
void OnEdit( wxCommandEvent& event );
void OnExtract( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxWindow *p_parent;
wxListView *list_ctrl;
};
/*****************************************************************************
* Event Table.
*****************************************************************************/
DEFINE_LOCAL_EVENT_TYPE( wxEVT_BOOKMARKS );
BEGIN_EVENT_TABLE(BookmarksDialog, wxFrame)
......@@ -105,30 +63,10 @@ BEGIN_EVENT_TABLE(BookmarksDialog, wxFrame)
EVT_COMMAND( -1, wxEVT_BOOKMARKS, BookmarksDialog::OnUpdate )
END_EVENT_TABLE()
/* Declaration of class BookmarkEditDialog */
class BookmarkEditDialog : public wxDialog
{
public:
/* Constructor */
BookmarkEditDialog( intf_thread_t *p_intf, wxWindow *p_parent,
seekpoint_t *p_seekpoint );
virtual ~BookmarkEditDialog();
seekpoint_t *p_seekpoint;
private:
wxTextCtrl *name_text, *time_text, *bytes_text;
void OnOK( wxCommandEvent& event);
void OnCancel( wxCommandEvent& event);
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
};
BEGIN_EVENT_TABLE( BookmarkEditDialog, wxDialog)
EVT_BUTTON( wxID_OK, BookmarkEditDialog::OnOK)
EVT_BUTTON( wxID_OK, BookmarkEditDialog::OnOK)
END_EVENT_TABLE()
/****************************************************************************
* BookmarkEditDialog
***************************************************************************/
......@@ -294,10 +232,10 @@ BookmarksDialog::~BookmarksDialog()
/*****************************************************************************
* Private methods.
*****************************************************************************/
wxFrame *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent )
{
return new class BookmarksDialog( p_intf, p_parent );
}
//wxFrame *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent )
//{
// return new class BookmarksDialog( p_intf, p_parent );
//}
void BookmarksDialog::Update()
{
......
/*****************************************************************************
* bookmarks.hpp: Headers for the bookmarks window
*****************************************************************************
* Copyright (C) 1999-2005 the VideoLAN team
* $Id: wxwidgets.h 12670 2005-09-25 11:16:31Z zorglub $
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _WXVLC_BOOKMARKS_H_
#define _WXVLC_BOOKMARKS_H_
#include "wxwidgets.hpp"
namespace wxvlc
{
class BookmarksDialog: public wxFrame
{
public:
/* Constructor */
BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~BookmarksDialog();
bool Show( bool );
private:
void Update();
/* Event handlers (these functions should _not_ be virtual) */
void OnClose( wxCloseEvent& event );
void OnAdd( wxCommandEvent& event );
void OnDel( wxCommandEvent& event );
void OnClear( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
void OnUpdate( wxCommandEvent &event );
void OnEdit( wxCommandEvent& event );
void OnExtract( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxWindow *p_parent;
wxListView *list_ctrl;
};
class BookmarkEditDialog : public wxDialog
{
public:
/* Constructor */
BookmarkEditDialog( intf_thread_t *p_intf, wxWindow *p_parent,
seekpoint_t *p_seekpoint );
virtual ~BookmarkEditDialog();
seekpoint_t *p_seekpoint;
private:
wxTextCtrl *name_text, *time_text, *bytes_text;
void OnOK( wxCommandEvent& event);
void OnCancel( wxCommandEvent& event);
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
};
};
#endif
......@@ -21,13 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "wxwidgets.h"
#include "dialogs/fileinfo.hpp"
/*****************************************************************************
* Event Table.
......
/*****************************************************************************
* fileinfo.hpp: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999-2005 the VideoLAN team
* $Id: wxwidgets.h 12502 2005-09-09 19:38:01Z gbazin $
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _WXVLC_FILEINFO_H_
#define _WXVLC_FILEINFO_H_
#include "wxwidgets.hpp"
#include <wx/treectrl.h>
namespace wxvlc
{
class FileInfo: public wxFrame
{
public:
/* Constructor */
FileInfo( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~FileInfo();
void UpdateFileInfo();
vlc_bool_t b_need_update;
private:
void OnButtonClose( wxCommandEvent& event );
void OnClose( wxCloseEvent& WXUNUSED(event) );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxTreeCtrl *fileinfo_tree;
wxTreeItemId fileinfo_root;
wxString fileinfo_root_label;
};
};
#endif
......@@ -21,23 +21,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <errno.h> /* ENOMEM */
#include <string.h> /* strerror() */
#include <stdio.h>
#include <vlc/vlc.h>
#include "dialogs/iteminfo.hpp"
#include <wx/combobox.h>
#include <wx/statline.h>
#include <vlc/intf.h>
#include "wxwidgets.h"
#ifndef wxRB_SINGLE
# define wxRB_SINGLE 0
#endif
......
/*****************************************************************************
* iteminfo.hpp: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999-2005 the VideoLAN team
* $Id: wxwidgets.h 12502 2005-09-09 19:38:01Z gbazin $
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef _WXVLC_ITEMINFO_H_
#define _WXVLC_ITEMINFO_H_
#include "wxwidgets.hpp"
#include <wx/treectrl.h>
namespace wxvlc
{
class ItemInfoDialog: public wxDialog
{
public:
/* Constructor */
ItemInfoDialog( intf_thread_t *p_intf, playlist_item_t *_p_item,
wxWindow *p_parent );
virtual ~ItemInfoDialog();
wxArrayString GetOptions();
private:
wxPanel *InfoPanel( wxWindow* parent );
wxPanel *GroupPanel( wxWindow* parent );
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
void OnCancel( wxCommandEvent& event );
void UpdateInfo();
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
playlist_item_t *p_item;
wxWindow *p_parent;
/* Controls for the iteminfo dialog box */
wxPanel *info_subpanel;
wxPanel *info_panel;
wxPanel *group_subpanel;
wxPanel *group_panel;
wxTextCtrl *uri_text;
wxTextCtrl *name_text;
wxTreeCtrl *info_tree;
wxTreeItemId info_root;
};
};
#endif
......@@ -21,18 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <errno.h> /* ENOMEM */
#include <string.h> /* strerror() */
#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "wxwidgets.h"
#include "dialogs/messages.hpp"
/*****************************************************************************
* Event Table.
......@@ -143,6 +132,7 @@ void Messages::UpdateLog()
int i_stop = *p_sub->pi_stop;
vlc_mutex_unlock( p_sub->p_lock );
if( p_sub->i_start != i_stop )
{
textctrl->SetInsertionPointEnd();
......
/*****************************************************************************