diff -r ecf06a08d4d9 -r 2c5162224003 mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp --- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp Mon May 03 12:29:20 2010 +0300 +++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp Fri Apr 30 19:33:32 2010 -0500 @@ -21,6 +21,7 @@ #include "mpcollectionview.h" #include "mpcollectioncontainer.h" #include "mpcollectioncontainerallsongs.h" +#include "mpcollectioncontainerartists.h" #include "mpcollectioncontaineralbums.h" #include "mpcollectioncontainerplaylists.h" #include "mpcollectioncontainergenres.h" @@ -75,6 +76,16 @@ connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); 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; case ECollectionContextAlbums: if ( mCurrentContext != ECollectionContextAlbumSongs ) { deleteCurrentContainer(); @@ -103,6 +114,8 @@ } break; case ECollectionContextAlbumSongs: + case ECollectionContextArtistAlbums: + case ECollectionContextArtistSongs: case ECollectionContextPlaylistSongs: case ECollectionContextGenreSongs: // For this contexts, reuse the same container. @@ -123,6 +136,11 @@ case ECollectionContextAllSongs: delete static_cast(mCurrentContainer); break; + case ECollectionContextArtists: + case ECollectionContextArtistAlbums: + case ECollectionContextArtistSongs: + delete static_cast(mCurrentContainer); + break; case ECollectionContextAlbums: case ECollectionContextAlbumSongs: delete static_cast(mCurrentContainer);