mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-23 09:19:41 +01:00
* Set proper defautl empty-tooltips for PlaylistViews.
This commit is contained in:
parent
27e7186b98
commit
0d63fb97f7
@ -22,7 +22,6 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QPainter>
|
||||
|
||||
#include "widgets/OverlayWidget.h"
|
||||
#include "ViewManager.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "PlaylistUpdaterInterface.h"
|
||||
@ -75,7 +74,11 @@ PlaylistView::setPlaylistModel( PlaylistModel* model )
|
||||
}
|
||||
}
|
||||
|
||||
connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
||||
if ( model->isReadOnly() )
|
||||
setEmptyTip( tr( "This playlist is currently empty." ) );
|
||||
else
|
||||
setEmptyTip( tr( "This playlist is currently empty. Add some tracks to it and enjoy the music!" ) );
|
||||
|
||||
connect( m_model, SIGNAL( playlistDeleted() ), SLOT( onDeleted() ) );
|
||||
connect( m_model, SIGNAL( playlistChanged() ), SLOT( onChanged() ) );
|
||||
|
||||
@ -117,19 +120,6 @@ PlaylistView::updaters() const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::onTrackCountChanged( unsigned int tracks )
|
||||
{
|
||||
if ( tracks == 0 )
|
||||
{
|
||||
overlay()->setText( tr( "This playlist is currently empty. Add some tracks to it and enjoy the music!" ) );
|
||||
overlay()->show();
|
||||
}
|
||||
else
|
||||
overlay()->hide();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::onDeleted()
|
||||
{
|
||||
|
@ -52,7 +52,6 @@ protected:
|
||||
void keyPressEvent( QKeyEvent* event );
|
||||
|
||||
private slots:
|
||||
void onTrackCountChanged( unsigned int tracks );
|
||||
void onMenuTriggered( int action );
|
||||
void deleteItems();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user