Commit b0e050e4 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: some code cleanup for the bookmarks dialog.

* AUTHORS: updated my entry.
parent 81d2d57e
......@@ -55,12 +55,13 @@ D: SDL audio and video output
S: France
N: Gildas Bazin
E: gbazin@netcourrier.com
E: gbazin@videolan.org
C: gbazin
D: Core improvements, decoders API
D: Win32 port, win32 VCD/CDDA input and win32 ipv6 code
D: DirectX audio/video output, win32 WaveOut audio output
D: DirectShow input plugin, decoders API
D: a52 (liba52), vorbis (libvorbis) and theora (libtheora) decoders
D: DirectShow input
D: a52, dts, vorbis, speex, flac and theora decoders/packetizers
D: mpeg1/2 video decoder (libmpeg2), bandlimited resampling
D: Ogg and Raw DV demultiplexers
D: Configuration file infrastructure
......
......@@ -38,6 +38,38 @@
static int PlaylistChanged( vlc_object_t *, const char *,
vlc_value_t, vlc_value_t, void * );
/*****************************************************************************
* Class declaration.
*****************************************************************************/
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( wxCommandEvent& event );
void OnAdd( wxCommandEvent& event );
void OnDel( wxCommandEvent& event );
void OnClear( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
void OnUpdate( wxCommandEvent &event );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxWindow *p_parent;
wxListView *list_ctrl;
};
/*****************************************************************************
* Event Table.
*****************************************************************************/
......@@ -144,6 +176,10 @@ BookmarksDialog::~BookmarksDialog()
/*****************************************************************************
* Private methods.
*****************************************************************************/
wxWindow *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent )
{
return new BookmarksDialog::BookmarksDialog( p_intf, p_parent );
}
void BookmarksDialog::Update()
{
......@@ -265,7 +301,8 @@ void BookmarksDialog::OnUpdate( wxCommandEvent &event )
static int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t oval, vlc_value_t nval, void *param )
{
BookmarksDialog *p_dialog = (BookmarksDialog *)param;
BookmarksDialog::BookmarksDialog *p_dialog =
(BookmarksDialog::BookmarksDialog *)param;
wxCommandEvent bookmarks_event( wxEVT_BOOKMARKS, 0 );
p_dialog->AddPendingEvent( bookmarks_event );
......
......@@ -4,7 +4,7 @@
* Copyright (C) 2000-2004 VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* 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
......@@ -207,7 +207,7 @@ void DialogsProvider::OnBookmarks( wxCommandEvent& WXUNUSED(event) )
{
/* Show/hide the open dialog */
if( !p_bookmarks_dialog )
p_bookmarks_dialog = new BookmarksDialog( p_intf, this );
p_bookmarks_dialog = BookmarksDialog( p_intf, this );
if( p_bookmarks_dialog )
{
......
......@@ -4,7 +4,7 @@
* Copyright (C) 2000-2004, 2003 VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* 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
......@@ -792,7 +792,7 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
p_settings_menu->AppendCheckItem( Extended_Event,
wxU(_("&Extended GUI") ), wxU(_(HELP_EXTENDED)) );
p_settings_menu->AppendCheckItem( Bookmarks_Event,
wxU(_("&Bookmarks") ), wxU(_(HELP_BOOKMARKS)) );
wxU(_("&Bookmarks...") ), wxU(_(HELP_BOOKMARKS)) );
p_settings_menu->Append( Prefs_Event, wxU(_("&Preferences...")),
wxU(_(HELP_PREFS)) );
......
......@@ -4,7 +4,7 @@
* Copyright (C) 1999-2004 VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* 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
......@@ -137,6 +137,7 @@ struct intf_sys_t
*****************************************************************************/
wxArrayString SeparateEntries( wxString );
wxWindow *VideoWindow( intf_thread_t *p_intf, wxWindow *p_parent );
wxWindow *BookmarksDialog( intf_thread_t *p_intf, wxWindow *p_parent );
namespace wxvlc
{
......@@ -149,7 +150,6 @@ class Playlist;
class Messages;
class FileInfo;
class StreamDialog;
class BookmarksDialog;
class ItemInfoDialog;
class NewGroup;
class ExportPlaylist;
......@@ -318,7 +318,7 @@ public:
FileInfo *p_fileinfo_dialog;
StreamDialog *p_streamwizard_dialog;
wxFrame *p_prefs_dialog;
BookmarksDialog *p_bookmarks_dialog;
wxWindow *p_bookmarks_dialog;
wxFileDialog *p_file_generic_dialog;
};
......@@ -1001,35 +1001,6 @@ private:
int i_item_id;
};
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( wxCommandEvent& event );
void OnAdd( wxCommandEvent& event );
void OnDel( wxCommandEvent& event );
void OnClear( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
void OnUpdate( wxCommandEvent &event );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxWindow *p_parent;
wxListView *list_ctrl;
};
} // end of wxvlc namespace
using namespace wxvlc;
......
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