Revision: 201015
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 12:24:41 +0300
changeset 2 66c26770985f
parent 0 c464cd7e2753
child 3 0de9fa4800b7
Revision: 201015 Kit: 201018
ftuapplication/ftuapplication.pro
ftuapplication/inc/ftufirsttimeuse.h
ftuapplication/src/ftufirsttimeuse.cpp
fturuntimeservices/fturuntimeservices.pro
rom/ftu.iby
runtimeproviders/ftudefaultruntimeprovider/ftudefaultruntimeprovider.pro
runtimeproviders/ftudefaultruntimeprovider/inc/ftudefaultruntime.h
runtimeproviders/ftudefaultruntimeprovider/src/ftudefaultruntime.cpp
stateproviders/ftustateprovider/ftustateprovider.pro
stateproviders/ftustateprovider/inc/ftustatecenrephandler.h
stateproviders/ftustateprovider/inc/ftuwizardactivatedstate.h
stateproviders/ftustateprovider/inc/ftuwizardmenustate.h
stateproviders/ftustateprovider/src/ftustatecenrephandler.cpp
stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp
stateproviders/ftustateprovider/src/ftuwizardloaderstate.cpp
stateproviders/ftustateprovider/src/ftuwizardmenustate.cpp
wizardproviders/ftuwizardprovider/conf/ftuwizardprovider.confml
wizardproviders/ftuwizardprovider/ftuwizardprovider.pro
--- a/ftuapplication/ftuapplication.pro	Mon Apr 19 14:01:47 2010 +0300
+++ b/ftuapplication/ftuapplication.pro	Mon May 03 12:24:41 2010 +0300
@@ -61,6 +61,14 @@
                          ../translations/ftuexamplewizards_en_US.qm ../translations/ftuexamplewizards_en_GB.qm
     addFiles.path = translations   
     DEPLOYMENT += icon addFiles
+
+    LIBS += -lxqsettingsmanager 
+    RSS_RULES += "hidden = KAppIsHidden;"
+
+
+     #Add default symbian libs required by the application (redundant/duplicate entries to be removed)
+     LIBS += -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon
+     LIBS += -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx
 }
 
 win32 {
--- a/ftuapplication/inc/ftufirsttimeuse.h	Mon Apr 19 14:01:47 2010 +0300
+++ b/ftuapplication/inc/ftufirsttimeuse.h	Mon May 03 12:24:41 2010 +0300
@@ -26,7 +26,7 @@
 FTU_TEST_CLASS(FtuFirstTimeUseTest)
 
 class QStateMachine;
-
+class XQSettingsManager;
 
 /**
  * @ingroup group_ftuapplication
@@ -120,7 +120,9 @@
     /**
      * Runtime.
      */
-    QStateMachine* mRuntime;
+    QStateMachine*     mRuntime;
+    
+    XQSettingsManager* mSettingsManager;
 
     FTU_TEST_FRIEND_CLASS(FtuFirstTimeUseTest)
 
--- a/ftuapplication/src/ftufirsttimeuse.cpp	Mon Apr 19 14:01:47 2010 +0300
+++ b/ftuapplication/src/ftufirsttimeuse.cpp	Mon May 03 12:24:41 2010 +0300
@@ -26,6 +26,8 @@
 #include <QDir>
 #include <QApplication>
 
+#include "xqsettingskey.h"
+#include "xqpublishandsubscribeutils.h"
 
 QTM_USE_NAMESPACE
 
@@ -35,6 +37,12 @@
 // FtuFirstTimeUse::FtuFirstTimeUse
 // ---------------------------------------------------------------------------
 //
+
+
+#include <xqpublishandsubscribeutils.h>
+#include <xqpublishandsubscribesecuritypolicy.h>
+#include <QList>
+
 FtuFirstTimeUse::FtuFirstTimeUse(QObject* aParent) : 
     QObject(aParent),
     mRuntime(NULL)
@@ -66,6 +74,14 @@
     }
     
     FTUTEST_FUNC_EXIT("FTU::FtuFirstTimeUse::FtuFirstTimeUse");
+     
+    const quint32 KDefaultKey = 0x00000001;
+    const qint32 KFtuUidProperty = {0x20026F95}; //SID of FirstTimeUseApplication
+
+    mSettingsManager = new XQSettingsManager(this);
+    XQPublishAndSubscribeUtils utils(*mSettingsManager);
+    XQPublishAndSubscribeSettingsKey pAndSKey(KFtuUidProperty, KDefaultKey);
+    bool err = utils.defineProperty(pAndSKey, XQSettingsManager::TypeInt);
 }
 
 // ---------------------------------------------------------------------------
@@ -109,7 +125,11 @@
 {
     FTUTEST_FUNC_ENTRY("FTU::FtuFirstTimeUse::stop");
     
-    mRuntime->stop();
+    
+    if (mRuntime && mRuntime->isRunning()) {
+            QMetaObject::invokeMethod(mRuntime, "event_exit");
+        }
+
     
     FTUTEST_FUNC_EXIT("FTU::FtuFirstTimeUse::stop");
 }
--- a/fturuntimeservices/fturuntimeservices.pro	Mon Apr 19 14:01:47 2010 +0300
+++ b/fturuntimeservices/fturuntimeservices.pro	Mon May 03 12:24:41 2010 +0300
@@ -53,6 +53,11 @@
 BLD_INF_RULES.prj_exports += "./inc/fturuntimeservices_global.h |../inc/" \                             
                              "./inc/ftucontentservice.h |../inc/"
 INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+
+#Add default symbian libs required by the application (redundant/duplicate entries to be removed)
+LIBS += -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon
+LIBS += -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx
+
 }
 
 win32 {
--- a/rom/ftu.iby	Mon Apr 19 14:01:47 2010 +0300
+++ b/rom/ftu.iby	Mon May 03 12:24:41 2010 +0300
@@ -42,7 +42,5 @@
 // ---- ftustateprovider ------------------------------------------------------
 
 file=ABI_DIR/BUILD_DIR/ftustateprovider.dll                 SHARED_LIB_DIR/ftustateprovider.dll
-//data=/epoc32/data/z/fturesources/plugins/stateproviders/ftustateprovider.qtplugin                   fturesources/plugins/stateproviders/ftustateprovider.qtplugin
-//data=/epoc32/data/z/fturesources/plugins/stateproviders/ftustateprovider.manifest                   fturesources/plugins/stateproviders/ftustateprovider.manifest
 
 #endif //__FTU_IBY__
--- a/runtimeproviders/ftudefaultruntimeprovider/ftudefaultruntimeprovider.pro	Mon Apr 19 14:01:47 2010 +0300
+++ b/runtimeproviders/ftudefaultruntimeprovider/ftudefaultruntimeprovider.pro	Mon May 03 12:24:41 2010 +0300
@@ -65,6 +65,11 @@
     INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
 
     include(ftudefaultruntimeprovider_installs_symbian.pri)
+
+     #Add default symbian libs required by the application (redundant/duplicate entries to be removed)
+     LIBS += -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon
+     LIBS += -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx
+
 }
 
 win32 {
--- a/runtimeproviders/ftudefaultruntimeprovider/inc/ftudefaultruntime.h	Mon Apr 19 14:01:47 2010 +0300
+++ b/runtimeproviders/ftudefaultruntimeprovider/inc/ftudefaultruntime.h	Mon May 03 12:24:41 2010 +0300
@@ -90,7 +90,7 @@
     /**
      * Emission of this signal initiates a transition to the final state.     
      */
-    void stopStateMachine();
+    void event_exit() ;
     
 private:
 
--- a/runtimeproviders/ftudefaultruntimeprovider/src/ftudefaultruntime.cpp	Mon Apr 19 14:01:47 2010 +0300
+++ b/runtimeproviders/ftudefaultruntimeprovider/src/ftudefaultruntime.cpp	Mon May 03 12:24:41 2010 +0300
@@ -80,7 +80,6 @@
 //
 void FtuDefaultRuntime::handleStateMachineStopped()
 {
-    emit stopped();
 }
 
 // ---------------------------------------------------------------------------
@@ -117,10 +116,12 @@
     // parallel state activates all children states
     QState* parallel = new QState(QState::ParallelStates);
     this->addState(parallel);
-    parallel->addTransition(this, SIGNAL(stopStateMachine()), finalState);
+    parallel->addTransition(this, SIGNAL(event_exit()), finalState);
     
     // root GUI state
     QState* guiRootState = new QState(parallel);
+    guiRootState->addTransition(this, SIGNAL(event_exit()), finalState);
+
     
     // root FTU state
     QState* ftuRootState = new QState(guiRootState);
--- a/stateproviders/ftustateprovider/ftustateprovider.pro	Mon Apr 19 14:01:47 2010 +0300
+++ b/stateproviders/ftustateprovider/ftustateprovider.pro	Mon May 03 12:24:41 2010 +0300
@@ -40,6 +40,7 @@
 LIBS += -lftuwizardmodel
 LIBS += -lftuwizardprovider
 LIBS += -lfturuntimeservices
+LIBS += -lxqsettingsmanager
 
 CONFIG += debug_and_release
 
@@ -70,7 +71,14 @@
     #include(ftustateprovider_installs_symbian.pri)
     
     BLD_INF_RULES.prj_exports += "./inc/ftustateprovider_global.h |../../inc/" \                             
-                             "./inc/ftustateprovider.h |../../inc/"
+                             "./inc/ftustateprovider.h |../../inc/" \
+                             "conf/ftustateprovider.confml            APP_LAYER_CONFML(ftustateprovider.confml)" \
+                             "conf/Ftustateprovider_20026f99.crml     APP_LAYER_CRML(Ftustateprovider_20026f99.crml)" 
+
+
+     #Add default symbian libs required by the application (redundant/duplicate entries to be removed)
+     LIBS += -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon
+     LIBS += -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx
 }
 
 win32:include(ftustateprovider_installs_win32.pri)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stateproviders/ftustateprovider/inc/ftustatecenrephandler.h	Mon May 03 12:24:41 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Declaration of the wizard menu state.
+*
+*/
+
+
+#ifndef FTU_STATES_CENREPHANDLER_H
+#define FTU_STATES_CENREPHANDLER_H
+
+#include <QObject>
+#include "ftutest_global.h"
+
+class XQSettingsManager;
+
+/**
+* Ftu State provider
+*/
+const qint32 KCrUidFtuStateProvider = {0x20026f99};
+
+//index 0 is unused in cenrep, 1 for datetime of last completed plugin
+const int KBaseIndex = 2;
+
+/** @ingroup group_ftustateprovider
+ * @brief The state where wizard menu is shown
+ *
+ * @see StateMachine
+ *
+ * @lib ?library
+ * @since S60 ?S60_version
+ */
+class FtuStateCenrepHandler : public QObject
+{
+    Q_OBJECT
+
+public:
+
+    /**
+     * Constructor.
+     * @since S60 ?S60_version.     
+     * @param aParent Owner.
+     */
+    FtuStateCenrepHandler(QObject *aParent = 0);
+
+    /**
+     * Destructor.
+     * @since S60 ?S60_version.
+     */
+	virtual ~FtuStateCenrepHandler();
+	
+
+    /**
+     * Gets info of plugin at an index 1 if complete, 0 if incomplete.
+     * @since S60 ?S60_version.
+     */
+    int getPluginInfo(int index);
+	
+	/**
+     * Updates plugin info in cenrep.
+     * @since S60 ?S60_version.
+     */
+    int updatePluginInfo(int indexPluginCompleted);
+    
+    /**
+     * Returns Total number of plugins registered.
+     * @since S60 ?S60_version.
+     */
+    int registeredPluginCount();
+
+private:
+
+    XQSettingsManager* mSettingsManager;
+    int mTotalNumberOfPlugins;
+};
+
+#endif //FTU_STATES_CENREPHANDLER_H
--- a/stateproviders/ftustateprovider/inc/ftuwizardactivatedstate.h	Mon Apr 19 14:01:47 2010 +0300
+++ b/stateproviders/ftustateprovider/inc/ftuwizardactivatedstate.h	Mon May 03 12:24:41 2010 +0300
@@ -36,7 +36,7 @@
 class QGraphicsLinearLayout;
 class FtuContentService;
 class FtuWizard;
-
+class HbMenu;
  
 /** @ingroup group_ftustateprovider
  * @brief The state handles wizard activation and interaction.
@@ -153,6 +153,14 @@
      * @sice S60 ?S60_version.
      */
     void activateWizard(const QModelIndex index);
+    
+    /**
+     * Called when the wizards wants to show/udpate the view options menu.
+     * @since S60 ?S60_version.
+     * @param caller the Wizard which wants to update/set the options menu
+     * @param optionsmenu pointer to the HbMenu instance describing the menu to be show
+     */   
+    void updateMainMenu(FtuWizard *, HbMenu * );
 
 signals:
         
--- a/stateproviders/ftustateprovider/inc/ftuwizardmenustate.h	Mon Apr 19 14:01:47 2010 +0300
+++ b/stateproviders/ftustateprovider/inc/ftuwizardmenustate.h	Mon May 03 12:24:41 2010 +0300
@@ -35,6 +35,8 @@
 class QDate;
 class FtuWizard;
 class HbAction;
+class FtuStateCenrepHandler;
+class HbMenu;
 
 /** @ingroup group_ftustateprovider
  * @brief The state where wizard menu is shown
@@ -121,11 +123,6 @@
      */    
     void updateProgress(FtuWizard *caller, bool show, int progress);
     
-    /**
-     * Called when application has to exit
-     */  
-    void exitApp();
-    
 signals:
 
     /**
@@ -145,6 +142,9 @@
     QStandardItemModel*                     mModel;
     HbAction*                               mExitAction;
 
+    FtuStateCenrepHandler*                  mCenrepHandler;
+    QList<bool>                             mCompletedWizardList;
+
     FTU_TEST_FRIEND_CLASS(FtuStateProviderTest)
 };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stateproviders/ftustateprovider/src/ftustatecenrephandler.cpp	Mon May 03 12:24:41 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of the state cenrep handler.
+*
+*/
+
+#include "ftustatecenrephandler.h"
+
+#include <xqsettingsmanager.h>
+#include <QDateTime>
+
+
+/**
+* Ftu Wizard plugin configuration
+*/
+const qint32 KCrUidFtuWizardProvider = {0x20026F9B};
+
+/**
+* Describes number of ftu wizard plug-ins listed in the configuration
+* Type: int
+*/
+const quint32 KFtuNumberOfWizardPlugins = {0x00000001};
+
+/**
+* Wizard is considered complete if its cenrep has 1. If value is 0, it is incomplete
+* Type: int
+*/ 
+const int KWizardComplete = 1;
+
+FtuStateCenrepHandler::FtuStateCenrepHandler(QObject *aParent)
+                    :QObject(aParent)
+                    , mTotalNumberOfPlugins(0)
+{
+	mSettingsManager = new XQSettingsManager();
+
+	// Get total number of plugins registered from Wizard provider
+	XQSettingsKey numberOfPluginsKey(XQSettingsKey::TargetCentralRepository,
+                                     KCrUidFtuWizardProvider,
+                                     KFtuNumberOfWizardPlugins);
+    bool ok = false;
+    mTotalNumberOfPlugins = mSettingsManager->readItemValue(
+                                        numberOfPluginsKey).toInt(&ok);
+	if (!ok)
+        mTotalNumberOfPlugins = 0;
+}
+
+/**
+ * Destructor.
+ * @since S60 ?S60_version.
+ */
+FtuStateCenrepHandler::~FtuStateCenrepHandler()
+{
+	delete mSettingsManager;
+}
+	
+
+/**
+ * Gets info of plugin at an index 1 if complete, 0 if incomplete.
+ * @since S60 ?S60_version.
+ */
+int FtuStateCenrepHandler::getPluginInfo(int index)
+{
+	bool ok = false;
+	XQSettingsKey reader(XQSettingsKey::TargetCentralRepository, KCrUidFtuStateProvider, index + KBaseIndex);
+	int pluginInfo = mSettingsManager->readItemValue(reader).toInt(&ok);  
+	if(!ok){
+		return -1;
+	}
+	else{
+		return pluginInfo;
+	}
+}
+	
+/**
+ * Updates plugin info in cenrep.
+ * @since S60 ?S60_version.
+ */
+ int FtuStateCenrepHandler::updatePluginInfo(int indexPluginCompleted)
+ {
+	 bool ok = false;
+    //FTU HS widget is listening to wizard completion
+    XQSettingsKey  wizardInfoWriter(XQSettingsKey::TargetCentralRepository, KCrUidFtuStateProvider, indexPluginCompleted + KBaseIndex);
+    ok = mSettingsManager->writeItemValue(wizardInfoWriter, KWizardComplete);
+    if(!ok)
+		return -1;
+ 	return 0;
+ }
+
+int FtuStateCenrepHandler::registeredPluginCount()
+{
+    return mTotalNumberOfPlugins;
+}
+
--- a/stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp	Mon Apr 19 14:01:47 2010 +0300
+++ b/stateproviders/ftustateprovider/src/ftuwizardactivatedstate.cpp	Mon May 03 12:24:41 2010 +0300
@@ -34,6 +34,7 @@
 #include <QDebug>
 #include <QGraphicsWidget>
 #include <QDir>
+#include <hbmenu.h>
 
 const int gridRowCount = 1;
 
@@ -144,7 +145,7 @@
 void FtuWizardActivatedState::onExit(QEvent *event)
 {
     QState::onExit(event);
-    
+    mMainWindow->currentView()->takeMenu();
     disconnect(mBackAction, SIGNAL(triggered()),
                this, SLOT(handleBackEvent()));
     
@@ -160,6 +161,10 @@
 
     disconnect(mActiveWizard, SIGNAL(infoTextUpdated(FtuWizard *, QString )),
             this, SLOT(updateInfoText(FtuWizard *, QString)));
+    
+    //disconnect from the existing existing wizard's updateMainMenu signal
+    disconnect(mActiveWizard,SIGNAL(updateMainMenu(FtuWizard *, HbMenu * )),
+            this,SLOT(updateMainMenu(FtuWizard *, HbMenu * )));
 }
 
 // ---------------------------------------------------------------------------
@@ -181,7 +186,11 @@
 
     disconnect(mActiveWizard, SIGNAL(infoTextUpdated(FtuWizard *, QString )),
             this, SLOT(updateInfoText(FtuWizard *, QString)));
-
+    
+    //disconnect from the existing existing wizard's updateMainMenu signal
+    disconnect(mActiveWizard,SIGNAL(updateMainMenu(FtuWizard *, HbMenu * )),
+            this,SLOT(updateMainMenu(FtuWizard *, HbMenu * )));
+    
     // then connect new ones to active wizard
     connect(mActiveWizard, SIGNAL(viewChanged(FtuWizard *, QGraphicsWidget* )),
             this, SLOT(changeWizardView(FtuWizard*, QGraphicsWidget*)));
@@ -194,6 +203,10 @@
     
     connect(mActiveWizard, SIGNAL(infoTextUpdated(FtuWizard *, QString )),
             this, SLOT(updateInfoText(FtuWizard *, QString)));
+    
+    // connect to the updateMainMenu wizard signal
+    connect(mActiveWizard,SIGNAL(updateMainMenu(FtuWizard *, HbMenu * )),
+            this,SLOT(updateMainMenu(FtuWizard *, HbMenu * )));
 }
 
 // ---------------------------------------------------------------------------
@@ -218,6 +231,22 @@
     }    
 }
 
+
+// ---------------------------------------------------------------------------
+// FtuWizardActivatedState::updateMainMenu
+// ---------------------------------------------------------------------------
+//
+void FtuWizardActivatedState::updateMainMenu(FtuWizard * caller, HbMenu * menu)
+{
+    //check if only current wizard has emmited this signal
+    if(caller==mActiveWizard)
+        {
+            mMainWindow->currentView()->takeMenu();
+            if(menu)
+                mMainWindow->currentView()->setMenu(menu);
+        }
+}
+
 // ---------------------------------------------------------------------------
 // FtuWizardActivatedState::changeWizardView
 // ---------------------------------------------------------------------------
@@ -365,6 +394,7 @@
         // check if other wizard than current is activated
         if (mActiveWizard != content()->wizard(wizardIndex))
         {
+            mMainWindow->currentView()->takeMenu();
             // first deactivate current active wizard
 		    if(mActiveWizard)
 		    {
--- a/stateproviders/ftustateprovider/src/ftuwizardloaderstate.cpp	Mon Apr 19 14:01:47 2010 +0300
+++ b/stateproviders/ftustateprovider/src/ftuwizardloaderstate.cpp	Mon May 03 12:24:41 2010 +0300
@@ -22,7 +22,7 @@
 #include <ftuwizardfactory.h>
 #include <ftuwizard.h>
 #include "ftutest_global.h"
-
+#include "ftustatecenrephandler.h"
 #include <QDebug>
 
 // ---------------------------------------------------------------------------
@@ -89,7 +89,7 @@
                 
                 connect(wizard, SIGNAL(wizardInitialized(FtuWizard*, bool)),
                         this, SLOT(addWizard(FtuWizard*, bool)));
-                wizard->initializeWizard();
+                wizard->initializeWizard(KCrUidFtuStateProvider, KBaseIndex + i);
         	}
         }	
     }
--- a/stateproviders/ftustateprovider/src/ftuwizardmenustate.cpp	Mon Apr 19 14:01:47 2010 +0300
+++ b/stateproviders/ftustateprovider/src/ftuwizardmenustate.cpp	Mon May 03 12:24:41 2010 +0300
@@ -26,12 +26,14 @@
 #include <hbicon.h>
 #include <hbinstance.h>
 #include <hblistview.h>
-
 #include <hbdocumentloader.h>
 
 #include <QStandardItemModel>
 #include <QDate>
-#include <hbaction.h>
+
+#include <xqsettingsmanager.h>
+
+#include "ftustatecenrephandler.h"
 
 const int progressCompelete = 100;
 const char* emptyLine = " ";
@@ -44,7 +46,6 @@
 const char *TOC_LIST_VIEW = "tocListView";
 
 
-
 // ---------------------------------------------------------------------------
 // FtuWizardMenuState::FtuWizardMenuState
 // ---------------------------------------------------------------------------
@@ -56,10 +57,13 @@
     mInfoText(NULL),
     mListView(NULL),
 	mDocumentLoader(NULL),
-    mModel(NULL)   
+    mModel(NULL)
 {
     mMainWindow = hbInstance->allMainWindows().at(0);
     mModel = new QStandardItemModel(this);
+    
+    //TODO Read number of wizards supported and init the following list
+    //mCompletedWizardList << false << false << false << false << false <<false;
 
 	mDocumentLoader = new HbDocumentLoader();
 	bool ok = false;
@@ -73,9 +77,12 @@
 	mMainWindow->addView(mTocView);
     // Set as initial view.
     mMainWindow->setCurrentView(mTocView);
-    mExitAction = new HbAction(Hb::QuitNaviAction, this);
-    mTocView->setNavigationAction(mExitAction);
-    QObject::connect( mExitAction, SIGNAL(triggered()), this, SLOT(exitApp()));
+    mCenrepHandler = new FtuStateCenrepHandler(NULL);
+    int registeredPlugins = mCenrepHandler->registeredPluginCount();
+    for(int counter = 0; counter < registeredPlugins; counter ++){
+        mCompletedWizardList << mCenrepHandler->getPluginInfo(counter);
+    }
+        
 }
 
 // ---------------------------------------------------------------------------
@@ -89,6 +96,7 @@
 		delete mModel;
 	}
 	delete mDocumentLoader;
+	delete mCenrepHandler;
 }
 
 // ---------------------------------------------------------------------------
@@ -124,6 +132,8 @@
 //
 void FtuWizardMenuState::onExit(QEvent *event)
 {
+    //remove the options menu so that plugin can perform the cleanup
+    mMainWindow->currentView()->takeMenu();
     QState::onExit(event);
 }
 
@@ -229,8 +239,12 @@
 //
 void FtuWizardMenuState::activateWizard(const QModelIndex index)
 {
+    //remove the main menu 
+    mMainWindow->currentView()->takeMenu();
     // Set the active wizard index
     content()->setActiveWizard(index.row());
+    FtuWizard * wizard=content()->wizard(index.row());
+    
     // signal to activated state
     emit wizardSelected();
 }
@@ -272,12 +286,16 @@
         {         
             QDate date = wizards[index]->wizardCompletedDate();
             data << updatedAsString(date);            
+
+            XQSettingsManager settingsManager;
+            
+            if(false == mCompletedWizardList[index])
+            {
+            mCompletedWizardList[index] = true; 
+            mCenrepHandler->updatePluginInfo(index);
+            }
+
         }
         mModel->item(index)->setData(QVariant(data), Qt::DisplayRole);
     }
 }
-
-void FtuWizardMenuState::exitApp()
-    {
-    qApp->exit();
-    }
--- a/wizardproviders/ftuwizardprovider/conf/ftuwizardprovider.confml	Mon Apr 19 14:01:47 2010 +0300
+++ b/wizardproviders/ftuwizardprovider/conf/ftuwizardprovider.confml	Mon May 03 12:24:41 2010 +0300
@@ -53,12 +53,12 @@
   </feature>
   <data>
     <KCrUidFtuWizardProvider>
-      <KFtuNumberOfWizardPlugins>5</KFtuNumberOfWizardPlugins>
-      <KFtuWizardPluginPlaceholder1>ftudatetimelocationwizard.manifest</KFtuWizardPluginPlaceholder1>
-      <KFtuWizardPluginPlaceholder2>ftuemailwizard.manifest</KFtuWizardPluginPlaceholder2>
-      <KFtuWizardPluginPlaceholder3>ftusocialmediawizard.manifest</KFtuWizardPluginPlaceholder3>
-      <KFtuWizardPluginPlaceholder4>ftudatetimewizard.manifest</KFtuWizardPluginPlaceholder4>
-      <KFtuWizardPluginPlaceholder5>dataimportftuwizard.manifest</KFtuWizardPluginPlaceholder5>
+      <KFtuNumberOfWizardPlugins>2</KFtuNumberOfWizardPlugins>
+      <KFtuWizardPluginPlaceholder1>ftudatetimewizard.manifest</KFtuWizardPluginPlaceholder1>
+      <KFtuWizardPluginPlaceholder2>dataimportftuwizard.manifest</KFtuWizardPluginPlaceholder2>
+      <KFtuWizardPluginPlaceholder3></KFtuWizardPluginPlaceholder3>
+      <KFtuWizardPluginPlaceholder4></KFtuWizardPluginPlaceholder4>
+      <KFtuWizardPluginPlaceholder5></KFtuWizardPluginPlaceholder5>
       <KFtuWizardPluginPlaceholder6></KFtuWizardPluginPlaceholder6>
       <KFtuWizardPluginPlaceholder7></KFtuWizardPluginPlaceholder7>
       <KFtuWizardPluginPlaceholder8></KFtuWizardPluginPlaceholder8>
--- a/wizardproviders/ftuwizardprovider/ftuwizardprovider.pro	Mon Apr 19 14:01:47 2010 +0300
+++ b/wizardproviders/ftuwizardprovider/ftuwizardprovider.pro	Mon May 03 12:24:41 2010 +0300
@@ -54,6 +54,11 @@
 	BLD_INF_RULES.prj_exports += \
 		"conf/ftuwizardprovider.confml	APP_LAYER_CONFML(ftuwizardprovider.confml)" \
 		"conf/ftuwizardprovider_20026F9B.crml     APP_LAYER_CRML(ftuwizardprovider_20026F9B.crml)" 
+
+
+     #Add default symbian libs required by the application (redundant/duplicate entries to be removed)
+     LIBS += -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon
+     LIBS += -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx
 }
 
 include(ftuwizardprovider.pri)