diff -r 608f67c22514 -r 896e9dbc5f19 qtinternetradio/ui/src/ircategoryview.cpp --- a/qtinternetradio/ui/src/ircategoryview.cpp Tue Jul 06 14:07:20 2010 +0300 +++ b/qtinternetradio/ui/src/ircategoryview.cpp Wed Aug 18 09:40:26 2010 +0300 @@ -15,9 +15,9 @@ * */ -#include #include #include +#include #include "irapplication.h" #include "irviewmanager.h" @@ -79,7 +79,6 @@ { iLoader.load(ABSTRACT_LIST_VIEW_BASE_LAYOUT_FILENAME, ABSTRACT_LIST_VIEW_BASE_WITH_TOOLBAR_SECTION); iLoadedSection = ABSTRACT_LIST_VIEW_BASE_WITH_TOOLBAR_SECTION; - initToolBar(); } } else @@ -359,6 +358,13 @@ iListView->reset(); iListView->setCurrentIndex(iModel->index(iLastSelectItem)); iListView->scrollTo(iModel->index(iLastSelectItem)); + qreal value = 0.0; + if (iListView->model()->rowCount() > 0) + { + value = iLastSelectItem / iListView->model()->rowCount(); + } + iListView->verticalScrollBar()->setValue(value); + getViewManager()->activateView(this); } @@ -453,6 +459,8 @@ //initialization from handleCommand() handleCommand(EIR_ViewCommand_TOBEACTIVATED, EIR_ViewCommandReason_Show); handleCommand(EIR_ViewCommand_ACTIVATED, EIR_ViewCommandReason_Show); + + emit applicationReady(); } } @@ -472,15 +480,3 @@ setInitCompleted(true); } } - -void IRCategoryView::initToolBar() -{ - //add HbActions to the toolbar, the HbActions have been created in IrAbstractListViewBase - HbToolBar *viewToolBar = toolBar(); - viewToolBar->clearActions(); - viewToolBar->addAction(iGenresAction); - viewToolBar->addAction(iCollectionsAction); - viewToolBar->addAction(iFavoritesAction); - viewToolBar->addAction(iSearchAction); - viewToolBar->setVisible(true); -}