diff -r 2c5162224003 -r fdb31ab341af mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp --- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp Fri Apr 30 19:33:32 2010 -0500 +++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp Fri May 14 18:54:37 2010 -0500 @@ -24,7 +24,6 @@ #include "mpcollectioncontainerartists.h" #include "mpcollectioncontaineralbums.h" #include "mpcollectioncontainerplaylists.h" -#include "mpcollectioncontainergenres.h" #include "mptrace.h" /*! @@ -77,22 +76,28 @@ connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); break; case ECollectionContextArtists: - if ( ( mCurrentContext != ECollectionContextArtistAlbums ) && ( mCurrentContext != ECollectionContextAlbumSongs) ) - { - deleteCurrentContainer(); - mCurrentContainer = new MpCollectionContainerArtists(mDocumentLoader); - mCurrentContainer->initialize(); - connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); - connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); - } - break; + if ( ( mCurrentContext != ECollectionContextArtistAlbums ) + && ( mCurrentContext != ECollectionContextArtistAlbumsTBone) + && ( mCurrentContext != ECollectionContextArtistAllSongs) ) + { + deleteCurrentContainer(); + mCurrentContainer = new MpCollectionContainerArtists(mDocumentLoader); + mCurrentContainer->initialize(); + connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); + connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); + connect( mCurrentContainer, SIGNAL(findAlbumSongs(int)), mView, SLOT(findAlbumSongs(int)) ); + connect( mCurrentContainer, SIGNAL(playAlbumSongs(int, int)), mView, SLOT(playAlbumSongs(int, int)) ); + } + break; case ECollectionContextAlbums: - if ( mCurrentContext != ECollectionContextAlbumSongs ) { + if ( mCurrentContext != ECollectionContextAlbumsTBone ) { deleteCurrentContainer(); mCurrentContainer = new MpCollectionContainerAlbums(mDocumentLoader); mCurrentContainer->initialize(); connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); + connect( mCurrentContainer, SIGNAL(findAlbumSongs(int)), mView, SLOT(findAlbumSongs(int)) ); + connect( mCurrentContainer, SIGNAL(playAlbumSongs(int, int)), mView, SLOT(playAlbumSongs(int, int)) ); } break; case ECollectionContextPlaylists: @@ -104,20 +109,11 @@ connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); } break; - case ECollectionContextGenres: - if ( mCurrentContext != ECollectionContextGenreSongs ) { - deleteCurrentContainer(); - mCurrentContainer = new MpCollectionContainerGenres(mDocumentLoader); - mCurrentContainer->initialize(); - connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); - //connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); - } - break; - case ECollectionContextAlbumSongs: case ECollectionContextArtistAlbums: - case ECollectionContextArtistSongs: + case ECollectionContextArtistAlbumsTBone: + case ECollectionContextArtistAllSongs: + case ECollectionContextAlbumsTBone: case ECollectionContextPlaylistSongs: - case ECollectionContextGenreSongs: // For this contexts, reuse the same container. break; } @@ -138,21 +134,18 @@ break; case ECollectionContextArtists: case ECollectionContextArtistAlbums: - case ECollectionContextArtistSongs: + case ECollectionContextArtistAlbumsTBone: + case ECollectionContextArtistAllSongs: delete static_cast(mCurrentContainer); break; case ECollectionContextAlbums: - case ECollectionContextAlbumSongs: + case ECollectionContextAlbumsTBone: delete static_cast(mCurrentContainer); break; case ECollectionContextPlaylists: case ECollectionContextPlaylistSongs: delete static_cast(mCurrentContainer); break; - case ECollectionContextGenres: - case ECollectionContextGenreSongs: - delete static_cast(mCurrentContainer); - break; } TX_EXIT }