[vlc-devel] commit: qt4: add source name above PL view (Jakob Leben )

git version control git at videolan.org
Mon Sep 7 02:15:53 CEST 2009


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Mon Sep  7 02:13:58 2009 +0200| [cc17da890b1a837b8f2e81e042474b50f363cc3c] | committer: Jakob Leben 

qt4: add source name above PL view

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc17da890b1a837b8f2e81e042474b50f363cc3c
---

 modules/gui/qt4/components/playlist/panels.hpp     |    1 +
 .../gui/qt4/components/playlist/standardpanel.cpp  |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/panels.hpp b/modules/gui/qt4/components/playlist/panels.hpp
index d1c2d17..c30db22 100644
--- a/modules/gui/qt4/components/playlist/panels.hpp
+++ b/modules/gui/qt4/components/playlist/panels.hpp
@@ -74,6 +74,7 @@ protected:
     PLModel *model;
     friend class PlaylistWidget;
 private:
+    QLabel *title;
     QTreeView *view;
     QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
     int currentRootId;
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 5445ebd..939a141 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -170,7 +170,15 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
     filter->setBuddy( search );
     CONNECT( search, textChanged( const QString& ), this, search( const QString& ) );
 
+    /* Title label */
+    title = new QLabel;
+    QFont titleFont;
+    titleFont.setPointSize( titleFont.pointSize() + 6 );
+    titleFont.setFamily( "Verdana" );
+    title->setFont( titleFont );
+
     /* Finish the layout */
+    layout->addWidget( title );
     layout->addWidget( view );
     layout->addLayout( buttons );
 //    layout->addWidget( bar );
@@ -236,6 +244,13 @@ void StandardPLPanel::setCurrentRootId( playlist_item_t *p_item )
     }
     else
         addButton->setEnabled( false );
+
+    /* <jleben> do we need to lock here? */
+    playlist_Lock( THEPL );
+    char *psz_title = input_item_GetName( p_item->p_input );
+    title->setText( psz_title );
+    free( psz_title );
+    playlist_Unlock( THEPL );
 }
 
 /* PopupAdd Menu for the Add Menu */




More information about the vlc-devel mailing list