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:
@@ -25,6 +25,7 @@ using namespace Tomahawk;
|
|||||||
|
|
||||||
DynamicView::DynamicView( QWidget* parent )
|
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 ) ) );
|
connect( model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DynamicView::setOnDemand( bool onDemand )
|
||||||
|
{
|
||||||
|
m_onDemand = onDemand;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DynamicView::showMessageTimeout( const QString& title, const QString& body )
|
DynamicView::showMessageTimeout( const QString& title, const QString& body )
|
||||||
@@ -58,6 +64,9 @@ DynamicView::onTrackCountChanged( unsigned int tracks )
|
|||||||
{
|
{
|
||||||
if ( tracks == 0 )
|
if ( tracks == 0 )
|
||||||
{
|
{
|
||||||
|
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()->setText( tr( "Add some filters above, and press Generate to get started!" ) );
|
||||||
overlay()->show();
|
overlay()->show();
|
||||||
}
|
}
|
||||||
|
@@ -35,6 +35,7 @@ public:
|
|||||||
|
|
||||||
virtual void setModel( PlaylistModel* model );
|
virtual void setModel( PlaylistModel* model );
|
||||||
|
|
||||||
|
void setOnDemand( bool onDemand );
|
||||||
public slots:
|
public slots:
|
||||||
void showMessageTimeout( const QString& title, const QString& body );
|
void showMessageTimeout( const QString& title, const QString& body );
|
||||||
|
|
||||||
@@ -47,6 +48,8 @@ private:
|
|||||||
|
|
||||||
QString m_title;
|
QString m_title;
|
||||||
QString m_body;
|
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_controls->setControls( m_playlist->generator(), m_playlist->generator()->controls(), m_playlist->author()->isLocal() );
|
||||||
|
|
||||||
m_playlist = playlist;
|
m_playlist = playlist;
|
||||||
|
m_view->setOnDemand( m_playlist->mode() == OnDemand );
|
||||||
m_model->loadPlaylist( m_playlist );
|
m_model->loadPlaylist( m_playlist );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -134,6 +135,7 @@ DynamicWidget::loadDynamicPlaylist( const Tomahawk::dynplaylist_ptr& playlist )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_playlist = playlist;
|
m_playlist = playlist;
|
||||||
|
m_view->setOnDemand( m_playlist->mode() == OnDemand );
|
||||||
m_model->loadPlaylist( m_playlist );
|
m_model->loadPlaylist( m_playlist );
|
||||||
|
|
||||||
if( !m_playlist.isNull() )
|
if( !m_playlist.isNull() )
|
||||||
|
Reference in New Issue
Block a user