homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp
changeset 36 cdae8c6c3876
parent 35 f9ce957a272c
child 39 4e8ebe173323
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp	Fri Mar 19 09:27:44 2010 +0200
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp	Fri Apr 16 14:54:01 2010 +0300
@@ -55,9 +55,8 @@
         HbInstance::instance()->allMainWindows().value(0);
 
     if (hbW) {
+        mMenuView.view()->setNavigationAction(NULL);
         hbW->removeView(mMenuView.view());
-        hbW->removeSoftKeyAction(Hb::SecondarySoftKey,
-                                 mSecondarySoftkeyAction);
     }
 }
 
@@ -155,8 +154,8 @@
     HbMainWindow *hbW = HbInstance::instance()->allMainWindows().value(0);
     if (!hbW->views().contains(mMenuView.view())) {
         hbW->addView(mMenuView.view());
-    }
-    hbW->addSoftKeyAction(Hb::SecondarySoftKey, mSecondarySoftkeyAction);
+        mMenuView.view()->setNavigationAction(mSecondarySoftkeyAction);
+    }    
     hbW->setCurrentView(mMenuView.view());
     HSTEST_FUNC_EXIT("AppLibraryState::stateEntered");
 }
@@ -166,14 +165,7 @@
 //
 void HsAppLibraryState::stateExited()
 {
-    HSTEST_FUNC_ENTRY("AppLibraryState::stateExited");
-    HbMainWindow *hbW = HbInstance::instance()->allMainWindows().value(0);
-
-    //when exiting the pointer can be NULL
-    if (hbW) {
-        hbW->removeSoftKeyAction(Hb::SecondarySoftKey,
-                                 mSecondarySoftkeyAction);
-    }
+    HSTEST_FUNC_ENTRY("AppLibraryState::stateExited");   
     HSTEST_FUNC_EXIT("AppLibraryState::stateExited");
 }