[vlc-devel] [PATCH] Update bookmark list before showing dialog.

Jean-Baptiste Kempf jb at videolan.org
Fri Mar 20 16:11:18 CET 2015


On 19 Mar, Eugen Geist wrote :
> Fixes #2100.

Applied.

> 
> Override toggleVisible of BookmarkDialog to call update before using toggleVisible of QVLCFrame
> ---
>  modules/gui/qt4/dialogs/bookmarks.cpp | 11 +++++++++++
>  modules/gui/qt4/dialogs/bookmarks.hpp |  2 ++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/modules/gui/qt4/dialogs/bookmarks.cpp b/modules/gui/qt4/dialogs/bookmarks.cpp
> index 18558db..432f009 100644
> --- a/modules/gui/qt4/dialogs/bookmarks.cpp
> +++ b/modules/gui/qt4/dialogs/bookmarks.cpp
> @@ -278,3 +278,14 @@ void BookmarksDialog::activateItem( QModelIndex index )
>  
>      input_Control( p_input, INPUT_SET_BOOKMARK, index.row() );
>  }
> +
> +void BookmarksDialog::toggleVisible() 
> +{
> +    /* Update, to show existing bookmarks in case a new playlist
> +       was opened */
> +    if( !isVisible() )
> +    {
> +        update();
> +    }
> +    QVLCFrame::toggleVisible();
> +}
> diff --git a/modules/gui/qt4/dialogs/bookmarks.hpp b/modules/gui/qt4/dialogs/bookmarks.hpp
> index ad81bc2..17c7bde 100644
> --- a/modules/gui/qt4/dialogs/bookmarks.hpp
> +++ b/modules/gui/qt4/dialogs/bookmarks.hpp
> @@ -35,6 +35,8 @@ class QPushButton;
>  class BookmarksDialog : public QVLCFrame, public Singleton<BookmarksDialog>
>  {
>      Q_OBJECT
> +public:
> +    void toggleVisible();
>  private:
>      BookmarksDialog( intf_thread_t * );
>      virtual ~BookmarksDialog();
> -- 
> 1.9.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list