mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Set guids for LovedTracks, RecentPlays and RecentAdditions.
This commit is contained in:
@@ -142,6 +142,8 @@ ViewManager::createPageForPlaylist( const playlist_ptr& playlist )
|
||||
|
||||
model->loadPlaylist( playlist );
|
||||
view->setPlayableModel( model );
|
||||
pv->setPlaylistModel( model );
|
||||
|
||||
playlist->resolve();
|
||||
|
||||
return view;
|
||||
@@ -403,6 +405,8 @@ ViewManager::showRecentPlaysPage()
|
||||
pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) );
|
||||
raModel->setSource( source_ptr() );
|
||||
|
||||
pv->setGuid( "recentlyplayed" );
|
||||
|
||||
m_recentPlaysWidget = pv;
|
||||
}
|
||||
|
||||
@@ -734,7 +738,9 @@ void
|
||||
ViewManager::setShuffled( bool enabled )
|
||||
{
|
||||
if ( currentPlaylistInterface() )
|
||||
{
|
||||
currentPlaylistInterface()->setShuffled( enabled );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -82,13 +82,18 @@ LovedTracksItem::activate()
|
||||
|
||||
pv->setEmptyTip( tr( "Sorry, we could not find any loved tracks!" ) );
|
||||
if ( !par )
|
||||
{
|
||||
raModel->setDescription( tr( "The most loved tracks from all your friends" ) );
|
||||
pv->setGuid( QString( "lovedtracks" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( par->source()->isLocal() )
|
||||
raModel->setDescription( tr( "All of your loved tracks" ) );
|
||||
else
|
||||
raModel->setDescription( tr( "All of %1's loved tracks" ).arg( par->source()->friendlyName() ) );
|
||||
|
||||
pv->setGuid( QString( "lovedtracks/%1" ).arg( par->source()->userName() ) );
|
||||
}
|
||||
|
||||
pv->setPlayableModel( raModel );
|
||||
|
@@ -529,6 +529,8 @@ SourceItem::latestAdditionsClicked()
|
||||
pv->setEmptyTip( tr( "Sorry, we could not find any recent additions!" ) );
|
||||
raModel->setSource( m_source );
|
||||
|
||||
pv->setGuid( QString( "latestadditions/%1" ).arg( m_source->userName() ) );
|
||||
|
||||
m_latestAdditionsPage = pv;
|
||||
}
|
||||
|
||||
@@ -568,6 +570,8 @@ SourceItem::recentPlaysClicked()
|
||||
pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) );
|
||||
raModel->setSource( m_source );
|
||||
|
||||
pv->setGuid( QString( "recentplays/%1" ).arg( m_source->userName() ) );
|
||||
|
||||
m_recentPlaysPage = pv;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user