mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
show a different help message for stations
This commit is contained in:
@@ -24,7 +24,8 @@ using namespace Tomahawk;
|
||||
|
||||
|
||||
DynamicView::DynamicView( QWidget* parent )
|
||||
: PlaylistView( parent )
|
||||
: PlaylistView( parent )
|
||||
, m_onDemand( false )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -42,6 +43,11 @@ DynamicView::setModel( PlaylistModel* model)
|
||||
connect( model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
||||
}
|
||||
|
||||
void
|
||||
DynamicView::setOnDemand( bool onDemand )
|
||||
{
|
||||
m_onDemand = onDemand;
|
||||
}
|
||||
|
||||
void
|
||||
DynamicView::showMessageTimeout( const QString& title, const QString& body )
|
||||
@@ -58,7 +64,10 @@ DynamicView::onTrackCountChanged( unsigned int tracks )
|
||||
{
|
||||
if ( tracks == 0 )
|
||||
{
|
||||
overlay()->setText( tr( "Add some filters above, and press Generate to get started!" ) );
|
||||
if( m_onDemand )
|
||||
overlay()->setText( tr( "Add some filters above, and press Start to begin listening to this custom station!" ) );
|
||||
else
|
||||
overlay()->setText( tr( "Add some filters above, and press Generate to get started!" ) );
|
||||
overlay()->show();
|
||||
}
|
||||
else
|
||||
|
@@ -35,6 +35,7 @@ public:
|
||||
|
||||
virtual void setModel( PlaylistModel* model );
|
||||
|
||||
void setOnDemand( bool onDemand );
|
||||
public slots:
|
||||
void showMessageTimeout( const QString& title, const QString& body );
|
||||
|
||||
@@ -47,6 +48,8 @@ private:
|
||||
|
||||
QString m_title;
|
||||
QString m_body;
|
||||
|
||||
bool m_onDemand;
|
||||
};
|
||||
|
||||
};
|
||||
|
@@ -121,6 +121,7 @@ DynamicWidget::loadDynamicPlaylist( const Tomahawk::dynplaylist_ptr& playlist )
|
||||
m_controls->setControls( m_playlist->generator(), m_playlist->generator()->controls(), m_playlist->author()->isLocal() );
|
||||
|
||||
m_playlist = playlist;
|
||||
m_view->setOnDemand( m_playlist->mode() == OnDemand );
|
||||
m_model->loadPlaylist( m_playlist );
|
||||
|
||||
return;
|
||||
@@ -134,6 +135,7 @@ DynamicWidget::loadDynamicPlaylist( const Tomahawk::dynplaylist_ptr& playlist )
|
||||
}
|
||||
|
||||
m_playlist = playlist;
|
||||
m_view->setOnDemand( m_playlist->mode() == OnDemand );
|
||||
m_model->loadPlaylist( m_playlist );
|
||||
|
||||
if( !m_playlist.isNull() )
|
||||
|
Reference in New Issue
Block a user