53 { |
53 { |
54 HbMainWindow *const hbW = |
54 HbMainWindow *const hbW = |
55 HbInstance::instance()->allMainWindows().value(0); |
55 HbInstance::instance()->allMainWindows().value(0); |
56 |
56 |
57 if (hbW) { |
57 if (hbW) { |
|
58 mMenuView.view()->setNavigationAction(NULL); |
58 hbW->removeView(mMenuView.view()); |
59 hbW->removeView(mMenuView.view()); |
59 hbW->removeSoftKeyAction(Hb::SecondarySoftKey, |
|
60 mSecondarySoftkeyAction); |
|
61 } |
60 } |
62 } |
61 } |
63 |
62 |
64 // --------------------------------------------------------------------------- |
63 // --------------------------------------------------------------------------- |
65 // --------------------------------------------------------------------------- |
64 // --------------------------------------------------------------------------- |
153 { |
152 { |
154 HSTEST_FUNC_ENTRY("AppLibraryState::stateEntered"); |
153 HSTEST_FUNC_ENTRY("AppLibraryState::stateEntered"); |
155 HbMainWindow *hbW = HbInstance::instance()->allMainWindows().value(0); |
154 HbMainWindow *hbW = HbInstance::instance()->allMainWindows().value(0); |
156 if (!hbW->views().contains(mMenuView.view())) { |
155 if (!hbW->views().contains(mMenuView.view())) { |
157 hbW->addView(mMenuView.view()); |
156 hbW->addView(mMenuView.view()); |
158 } |
157 mMenuView.view()->setNavigationAction(mSecondarySoftkeyAction); |
159 hbW->addSoftKeyAction(Hb::SecondarySoftKey, mSecondarySoftkeyAction); |
158 } |
160 hbW->setCurrentView(mMenuView.view()); |
159 hbW->setCurrentView(mMenuView.view()); |
161 HSTEST_FUNC_EXIT("AppLibraryState::stateEntered"); |
160 HSTEST_FUNC_EXIT("AppLibraryState::stateEntered"); |
162 } |
161 } |
163 |
162 |
164 // --------------------------------------------------------------------------- |
163 // --------------------------------------------------------------------------- |
165 // --------------------------------------------------------------------------- |
164 // --------------------------------------------------------------------------- |
166 // |
165 // |
167 void HsAppLibraryState::stateExited() |
166 void HsAppLibraryState::stateExited() |
168 { |
167 { |
169 HSTEST_FUNC_ENTRY("AppLibraryState::stateExited"); |
168 HSTEST_FUNC_ENTRY("AppLibraryState::stateExited"); |
170 HbMainWindow *hbW = HbInstance::instance()->allMainWindows().value(0); |
|
171 |
|
172 //when exiting the pointer can be NULL |
|
173 if (hbW) { |
|
174 hbW->removeSoftKeyAction(Hb::SecondarySoftKey, |
|
175 mSecondarySoftkeyAction); |
|
176 } |
|
177 HSTEST_FUNC_EXIT("AppLibraryState::stateExited"); |
169 HSTEST_FUNC_EXIT("AppLibraryState::stateExited"); |
178 } |
170 } |
179 |
171 |
180 // --------------------------------------------------------------------------- |
172 // --------------------------------------------------------------------------- |
181 // --------------------------------------------------------------------------- |
173 // --------------------------------------------------------------------------- |