1
0
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:
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 ); model->loadPlaylist( playlist );
view->setPlayableModel( model ); view->setPlayableModel( model );
pv->setPlaylistModel( model );
playlist->resolve(); playlist->resolve();
return view; return view;
@@ -403,6 +405,8 @@ ViewManager::showRecentPlaysPage()
pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) ); pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) );
raModel->setSource( source_ptr() ); raModel->setSource( source_ptr() );
pv->setGuid( "recentlyplayed" );
m_recentPlaysWidget = pv; m_recentPlaysWidget = pv;
} }
@@ -734,7 +738,9 @@ void
ViewManager::setShuffled( bool enabled ) ViewManager::setShuffled( bool enabled )
{ {
if ( currentPlaylistInterface() ) if ( currentPlaylistInterface() )
{
currentPlaylistInterface()->setShuffled( enabled ); currentPlaylistInterface()->setShuffled( enabled );
}
} }

View File

@@ -82,13 +82,18 @@ LovedTracksItem::activate()
pv->setEmptyTip( tr( "Sorry, we could not find any loved tracks!" ) ); pv->setEmptyTip( tr( "Sorry, we could not find any loved tracks!" ) );
if ( !par ) if ( !par )
{
raModel->setDescription( tr( "The most loved tracks from all your friends" ) ); raModel->setDescription( tr( "The most loved tracks from all your friends" ) );
pv->setGuid( QString( "lovedtracks" ) );
}
else else
{ {
if ( par->source()->isLocal() ) if ( par->source()->isLocal() )
raModel->setDescription( tr( "All of your loved tracks" ) ); raModel->setDescription( tr( "All of your loved tracks" ) );
else else
raModel->setDescription( tr( "All of %1's loved tracks" ).arg( par->source()->friendlyName() ) ); 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 ); pv->setPlayableModel( raModel );

View File

@@ -529,6 +529,8 @@ SourceItem::latestAdditionsClicked()
pv->setEmptyTip( tr( "Sorry, we could not find any recent additions!" ) ); pv->setEmptyTip( tr( "Sorry, we could not find any recent additions!" ) );
raModel->setSource( m_source ); raModel->setSource( m_source );
pv->setGuid( QString( "latestadditions/%1" ).arg( m_source->userName() ) );
m_latestAdditionsPage = pv; m_latestAdditionsPage = pv;
} }
@@ -568,6 +570,8 @@ SourceItem::recentPlaysClicked()
pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) ); pv->setEmptyTip( tr( "Sorry, we could not find any recent plays!" ) );
raModel->setSource( m_source ); raModel->setSource( m_source );
pv->setGuid( QString( "recentplays/%1" ).arg( m_source->userName() ) );
m_recentPlaysPage = pv; m_recentPlaysPage = pv;
} }