ui/views/listview/src/glxlistview.cpp
changeset 55 fb37077c270f
parent 49 f291796e213d
--- a/ui/views/listview/src/glxlistview.cpp	Tue Jul 06 14:16:16 2010 +0300
+++ b/ui/views/listview/src/glxlistview.cpp	Wed Aug 18 09:48:53 2010 +0300
@@ -57,7 +57,6 @@
 void GlxListView::deActivate()
 {
     qDebug("GlxListView::deActivate()");
-    disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation)));
 }
 
 void GlxListView::setModel(QAbstractItemModel *model) 
@@ -76,13 +75,14 @@
     setToolBar(toolBar) ;
 }
 
-void GlxListView::initializeView(QAbstractItemModel *model)
+void GlxListView::initializeView( QAbstractItemModel *model, GlxView *preView )
 {
+    Q_UNUSED( preView )
     qDebug("GlxListView::initializeView()");
-    if (mListView == NULL) {
+    if ( mListView == NULL ) {
         createListView();
     }
-    setModel(model);
+    setModel( model );
 }
 
 QGraphicsItem * GlxListView::getAnimationItem( GlxEffect transtionEffect )
@@ -205,7 +205,19 @@
     if ( mModel ) {
         mModel->setData( index, index.row(), GlxFocusIndexRole );
     }
-    emit actionTriggered( EGlxCmdAlbumGridOpen );
+    
+    int curstate = NO_LIST_S; 
+    qDebug() << "GlxListView::itemSelected READING STATE ";
+    QVariant variant = mModel->data( mModel->index(0,0), GlxSubStateRole );    
+    if ( variant.isValid() &&  variant.canConvert<int> () ) {
+        curstate = variant.value<int>();
+    }
+    qDebug() << "GlxMenuManager::viewSubState = " << curstate ;
+    if(curstate == FETCHER_ALBUM_S ){
+        emit actionTriggered( EGlxCmdFetcherAlbumGridOpen );
+    }else {        
+        emit actionTriggered( EGlxCmdAlbumGridOpen );
+    }
 }