--- a/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp Fri May 14 15:49:53 2010 +0300
+++ b/mpviewplugins/mpcollectionviewplugin/src/mpcollectioncontainerfactory.cpp Thu May 27 12:49:57 2010 +0300
@@ -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<MpCollectionContainerArtists *>(mCurrentContainer);
break;
case ECollectionContextAlbums:
- case ECollectionContextAlbumSongs:
+ case ECollectionContextAlbumsTBone:
delete static_cast<MpCollectionContainerAlbums *>(mCurrentContainer);
break;
case ECollectionContextPlaylists:
case ECollectionContextPlaylistSongs:
delete static_cast<MpCollectionContainerPlaylists *>(mCurrentContainer);
break;
- case ECollectionContextGenres:
- case ECollectionContextGenreSongs:
- delete static_cast<MpCollectionContainerGenres *>(mCurrentContainer);
- break;
}
TX_EXIT
}