]> git.sesse.net Git - vlc/commitdiff
qt4: add source name above PL view
authorJakob Leben <jleben@videolan.org>
Mon, 7 Sep 2009 00:13:58 +0000 (02:13 +0200)
committerJakob Leben <jleben@videolan.org>
Mon, 7 Sep 2009 00:13:58 +0000 (02:13 +0200)
modules/gui/qt4/components/playlist/panels.hpp
modules/gui/qt4/components/playlist/standardpanel.cpp

index d1c2d17c34c2698c042e3065a5519047fbda28fe..c30db2213cf02640e9e479952f22b800d9132478 100644 (file)
@@ -74,6 +74,7 @@ protected:
     PLModel *model;
     friend class PlaylistWidget;
 private:
+    QLabel *title;
     QTreeView *view;
     QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
     int currentRootId;
index 5445ebde2e45f29e5541f575dc8fbc6b883653c1..939a141eab8a62f92a8687240883c7934226e553 100644 (file)
@@ -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 */