Commit cc17da89 authored by Jakob Leben's avatar Jakob Leben

qt4: add source name above PL view

parent 2d235298
...@@ -74,6 +74,7 @@ protected: ...@@ -74,6 +74,7 @@ protected:
PLModel *model; PLModel *model;
friend class PlaylistWidget; friend class PlaylistWidget;
private: private:
QLabel *title;
QTreeView *view; QTreeView *view;
QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton; QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
int currentRootId; int currentRootId;
......
...@@ -170,7 +170,15 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -170,7 +170,15 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
filter->setBuddy( search ); filter->setBuddy( search );
CONNECT( search, textChanged( const QString& ), this, search( const QString& ) ); 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 */ /* Finish the layout */
layout->addWidget( title );
layout->addWidget( view ); layout->addWidget( view );
layout->addLayout( buttons ); layout->addLayout( buttons );
// layout->addWidget( bar ); // layout->addWidget( bar );
...@@ -236,6 +244,13 @@ void StandardPLPanel::setCurrentRootId( playlist_item_t *p_item ) ...@@ -236,6 +244,13 @@ void StandardPLPanel::setCurrentRootId( playlist_item_t *p_item )
} }
else else
addButton->setEnabled( false ); 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 */ /* PopupAdd Menu for the Add Menu */
......
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