From b0e050e497cff4a73abcecd293c080fb01b7deeb Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Tue, 6 Apr 2004 10:58:41 +0000 Subject: [PATCH] * modules/gui/wxwindows/*: some code cleanup for the bookmarks dialog. * AUTHORS: updated my entry. --- AUTHORS | 7 +++--- modules/gui/wxwindows/bookmarks.cpp | 39 ++++++++++++++++++++++++++++- modules/gui/wxwindows/dialogs.cpp | 4 +-- modules/gui/wxwindows/interface.cpp | 4 +-- modules/gui/wxwindows/wxwindows.h | 35 +++----------------------- 5 files changed, 49 insertions(+), 40 deletions(-) diff --git a/AUTHORS b/AUTHORS index c9576c800c..b7af110810 100644 --- a/AUTHORS +++ b/AUTHORS @@ -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 diff --git a/modules/gui/wxwindows/bookmarks.cpp b/modules/gui/wxwindows/bookmarks.cpp index 71570bf98f..3fc0310a8d 100644 --- a/modules/gui/wxwindows/bookmarks.cpp +++ b/modules/gui/wxwindows/bookmarks.cpp @@ -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 ); diff --git a/modules/gui/wxwindows/dialogs.cpp b/modules/gui/wxwindows/dialogs.cpp index e8f77ca7f3..673e984f89 100644 --- a/modules/gui/wxwindows/dialogs.cpp +++ b/modules/gui/wxwindows/dialogs.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2000-2004 VideoLAN * $Id$ * - * Authors: Gildas Bazin + * Authors: Gildas Bazin * * 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 ) { diff --git a/modules/gui/wxwindows/interface.cpp b/modules/gui/wxwindows/interface.cpp index 9528b2c94c..a0e4cc41c6 100644 --- a/modules/gui/wxwindows/interface.cpp +++ b/modules/gui/wxwindows/interface.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2000-2004, 2003 VideoLAN * $Id$ * - * Authors: Gildas Bazin + * Authors: Gildas Bazin * * 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)) ); diff --git a/modules/gui/wxwindows/wxwindows.h b/modules/gui/wxwindows/wxwindows.h index cec5b90e2a..4f862ba308 100644 --- a/modules/gui/wxwindows/wxwindows.h +++ b/modules/gui/wxwindows/wxwindows.h @@ -4,7 +4,7 @@ * Copyright (C) 1999-2004 VideoLAN * $Id$ * - * Authors: Gildas Bazin + * Authors: Gildas Bazin * * 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; -- 2.39.2