1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 09:19:41 +01:00

* Set guids for LovedTracks, RecentPlays and RecentAdditions.

This commit is contained in:
Christian Muehlhaeuser 2012-11-09 06:41:55 +01:00
parent 57f1692c22
commit 8fc3f7a4e3
3 changed files with 16 additions and 1 deletions

View File

@ -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;
}
@ -599,7 +603,7 @@ ViewManager::saveCurrentPlaylistSettings()
if ( !pl.isNull() )
{
s->setShuffleState( pl->guid(), currentPlaylistInterface()->shuffled() );
s->setShuffleState( pl->guid(), currentPlaylistInterface()->shuffled() );
s->setRepeatMode( pl->guid(), currentPlaylistInterface()->repeatMode() );
}
else
@ -734,7 +738,9 @@ void
ViewManager::setShuffled( bool enabled )
{
if ( currentPlaylistInterface() )
{
currentPlaylistInterface()->setShuffled( enabled );
}
}

View File

@ -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 );

View File

@ -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;
}