equal
deleted
inserted
replaced
18 #include <HbMainWindow> |
18 #include <HbMainWindow> |
19 #include <HbView> |
19 #include <HbView> |
20 #include <HbInstance> |
20 #include <HbInstance> |
21 #include "hsmainwindow.h" |
21 #include "hsmainwindow.h" |
22 #include "hsmenuview.h" |
22 #include "hsmenuview.h" |
23 |
23 #include "hsmenumodewrapper.h" |
24 |
24 |
25 /*! |
25 /*! |
26 Constructor |
26 Constructor |
27 */ |
27 */ |
28 |
28 |
34 * it can be substitued in MT for application library. Unfortunately it seems to be the best |
34 * it can be substitued in MT for application library. Unfortunately it seems to be the best |
35 * way to cope with HbMainWindow problem in MT. |
35 * way to cope with HbMainWindow problem in MT. |
36 */ |
36 */ |
37 |
37 |
38 |
38 |
39 HsMainWindow::HsMainWindow() |
39 HsMainWindow::HsMainWindow(HsMenuModeWrapper* wrapper):mMenuMode(wrapper) |
40 { |
40 { |
41 } |
41 } |
42 |
42 |
43 /*! |
43 /*! |
44 Destructor |
44 Destructor |
54 void HsMainWindow::setCurrentView(HbView *view) |
54 void HsMainWindow::setCurrentView(HbView *view) |
55 { |
55 { |
56 HbMainWindow *const hbW( |
56 HbMainWindow *const hbW( |
57 HbInstance::instance()->allMainWindows().value(0)); |
57 HbInstance::instance()->allMainWindows().value(0)); |
58 |
58 |
|
59 if (mMenuMode && mMenuMode->getHsMenuMode() == Hs::AddHsMenuMode) { |
|
60 view->setTitle(hbTrId("txt_applib_title_select_item")); |
|
61 } else { |
|
62 view->setTitle(hbTrId("txt_applib_title_applications")); |
|
63 } |
|
64 |
59 if (!hbW->views().contains(view)) { |
65 if (!hbW->views().contains(view)) { |
60 hbW->addView(view); |
66 hbW->addView(view); |
61 } |
67 } |
|
68 |
62 bool animate = !hbW->isObscured(); |
69 bool animate = !hbW->isObscured(); |
63 hbW->setCurrentView(view, animate); |
70 hbW->setCurrentView(view, animate, Hb::ViewSwitchCachedFullScreen); |
64 } |
71 } |