1
0
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:
Christian Muehlhaeuser 2012-06-01 07:13:56 +02:00
parent 27e7186b98
commit 0d63fb97f7
2 changed files with 5 additions and 16 deletions

View File

@ -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()
{

View File

@ -52,7 +52,6 @@ protected:
void keyPressEvent( QKeyEvent* event );
private slots:
void onTrackCountChanged( unsigned int tracks );
void onMenuTriggered( int action );
void deleteItems();