1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 23:26:40 +02:00

Add a new source item for temporary pages.

This fixes TWK-182. Also, ensure that what is selected on the left is always
in sync with what is on the right. In addition, expand the parent nodes when selecting
an item automatically in the tree.
This commit is contained in:
Leo Franchi
2011-05-29 16:56:25 -04:00
parent f2952f783e
commit 07cb94b1bc
17 changed files with 125 additions and 27 deletions

View File

@@ -599,24 +599,12 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
setHistoryPosition( m_pageHistory.count() - 1 );
}
if ( !playlistForInterface( currentPlaylistInterface() ).isNull() )
emit playlistActivated( playlistForInterface( currentPlaylistInterface() ) );
else if ( dynamicPlaylistForInterface( currentPlaylistInterface() ) )
emit dynamicPlaylistActivated( dynamicPlaylistForInterface( currentPlaylistInterface() ) );
else if ( collectionForInterface( currentPlaylistInterface() ) )
emit collectionActivated( collectionForInterface( currentPlaylistInterface() ) );
else if ( isSuperCollectionVisible() )
emit superCollectionActivated();
else if( isNewPlaylistPageVisible() )
emit newPlaylistActivated();
/* TODO refactor. now we have rows in the sourcetreeview that are connected to pages, e.g. Stations, Recently Updated, etc
else if ( !currentPlaylistInterface() )
emit tempPageActivated();*/
qDebug() << "View page shown:" << page->title();
emit viewPageActivated( page );
if( page->isTemporaryPage() )
emit tempPageActivated( page );
if ( !AudioEngine::instance()->playlist() )
AudioEngine::instance()->setPlaylist( currentPlaylistInterface() );