Revision: 201031
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 18 Aug 2010 09:40:07 +0300
changeset 77 4b195f3bea29
parent 61 2b1b11a301d2
child 85 35368b604b28
Revision: 201031 Kit: 201033
homescreen.pro
homescreen_plat/homescreen_plat.pro
homescreen_plat/homescreenclient_api/homescreenclient_api.metaxml
homescreen_plat/homescreenclient_api/homescreenclient_api.pri
homescreen_plat/homescreenclient_api/hsmenuclient.h
homescreenapp/common.pri
homescreenapp/examples/batterywidgetplugin/resource/batterywidgetplugin.xml
homescreenapp/examples/batterywidgetplugin/sis/batterywidgetplugin.bat
homescreenapp/examples/minibrowserwidgetplugin/inc/minibrowserwidget.h
homescreenapp/examples/minibrowserwidgetplugin/inc/minibrowserwidgetplugin.h
homescreenapp/examples/minibrowserwidgetplugin/minibrowserwidgetplugin.pro
homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetplugin.manifest
homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetplugin.svg
homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetplugin.xml
homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetpluginpreview.png
homescreenapp/examples/minibrowserwidgetplugin/sis/minibrowserwidgetplugin.bat
homescreenapp/examples/minibrowserwidgetplugin/sis/minibrowserwidgetplugin.pkg
homescreenapp/examples/minibrowserwidgetplugin/sis/minibrowserwidgetplugin_winscw.pkg
homescreenapp/examples/minibrowserwidgetplugin/src/minibrowserwidget.cpp
homescreenapp/examples/minibrowserwidgetplugin/src/minibrowserwidgetplugin.cpp
homescreenapp/homescreenapp.pro
homescreenapp/hsapplication/conf/base/confml/CI_homescreendb.confml
homescreenapp/hsapplication/conf/base/confml/homescreendb.confml
homescreenapp/hsapplication/conf/base/implml/homescreendb.implml
homescreenapp/hsapplication/hsapplication.pri
homescreenapp/hsapplication/hsapplication.pro
homescreenapp/hsapplication/hsapplication_exports_to_rom.pri
homescreenapp/hsapplication/inc/hshomescreen.h
homescreenapp/hsapplication/inc/hsrecoverymanager.h
homescreenapp/hsapplication/inc/hsstatemachine.h
homescreenapp/hsapplication/installs_symbian.pri
homescreenapp/hsapplication/installs_win.pri
homescreenapp/hsapplication/resource/bg_1.png
homescreenapp/hsapplication/resource/bg_2.png
homescreenapp/hsapplication/resource/bg_3.png
homescreenapp/hsapplication/resource/page/1_landscape.png
homescreenapp/hsapplication/resource/page/1_portrait.png
homescreenapp/hsapplication/resource/page/2_landscape.png
homescreenapp/hsapplication/resource/page/2_portrait.png
homescreenapp/hsapplication/resource/page/3_landscape.png
homescreenapp/hsapplication/resource/page/3_portrait.png
homescreenapp/hsapplication/resource/page/default_landscape.png
homescreenapp/hsapplication/resource/page/default_portrait.png
homescreenapp/hsapplication/resource/resource_emulator/homescreen.db
homescreenapp/hsapplication/resource/resource_win/homescreen.db
homescreenapp/hsapplication/resource/scene/default_landscape.png
homescreenapp/hsapplication/resource/scene/default_portrait.png
homescreenapp/hsapplication/resource/wallpapers/page/1_landscape.png
homescreenapp/hsapplication/resource/wallpapers/page/1_portrait.png
homescreenapp/hsapplication/resource/wallpapers/page/2_landscape.png
homescreenapp/hsapplication/resource/wallpapers/page/2_portrait.png
homescreenapp/hsapplication/resource/wallpapers/page/3_landscape.png
homescreenapp/hsapplication/resource/wallpapers/page/3_portrait.png
homescreenapp/hsapplication/resource/wallpapers/page/default_landscape.png
homescreenapp/hsapplication/resource/wallpapers/page/default_portrait.png
homescreenapp/hsapplication/resource/wallpapers/page/originals/car.png
homescreenapp/hsapplication/resource/wallpapers/page/originals/shapes.png
homescreenapp/hsapplication/resource/wallpapers/page/originals/shoes.png
homescreenapp/hsapplication/resource/wallpapers/scene/default_landscape.png
homescreenapp/hsapplication/resource/wallpapers/scene/default_portrait.png
homescreenapp/hsapplication/resource/wallpapers/scene/originals/kites.png
homescreenapp/hsapplication/src/hshomescreen.cpp
homescreenapp/hsapplication/src/hsrecoverymanager.cpp
homescreenapp/hsapplication/src/hsstatemachine.cpp
homescreenapp/hsapplication/src/main.cpp
homescreenapp/hsapplicationlauncher/group/hsapplicationlauncher.mmp
homescreenapp/hsapplicationlauncher/hsapplicationlauncher.pro
homescreenapp/hsapplicationlauncher/inc/hsapplicationlauncher.h
homescreenapp/hsapplicationlauncher/inc/hsprocessmonitor.h
homescreenapp/hsapplicationlauncher/inc/hsshutdownmonitor.h
homescreenapp/hsapplicationlauncher/src/hsapplicationlauncher.cpp
homescreenapp/hsapplicationlauncher/src/hsprocessmonitor.cpp
homescreenapp/hsapplicationlauncher/src/hsshutdownmonitor.cpp
homescreenapp/hsdomainmodel/hsdomainmodel.pri
homescreenapp/hsdomainmodel/hsdomainmodel.pro
homescreenapp/hsdomainmodel/hsdomainmodel.qrc
homescreenapp/hsdomainmodel/inc/hsconfiguration.h
homescreenapp/hsdomainmodel/inc/hsdocumentloader.h
homescreenapp/hsdomainmodel/inc/hsdomainmodel_global.h
homescreenapp/hsdomainmodel/inc/hsdomainmodeldatastructures.h
homescreenapp/hsdomainmodel/inc/hsgui.h
homescreenapp/hsdomainmodel/inc/hshostedwidgetfactory.h
homescreenapp/hsdomainmodel/inc/hsidlewidget.h
homescreenapp/hsdomainmodel/inc/hspage.h
homescreenapp/hsdomainmodel/inc/hspagenewwidgetlayout.h
homescreenapp/hsdomainmodel/inc/hspagevisual.h
homescreenapp/hsdomainmodel/inc/hsscene.h
homescreenapp/hsdomainmodel/inc/hswidgethost.h
homescreenapp/hsdomainmodel/inc/hswidgethostvisual.h
homescreenapp/hsdomainmodel/inc/hswidgettoucharea.h
homescreenapp/hsdomainmodel/resource/controllayer.docml
homescreenapp/hsdomainmodel/src/hsconfiguration.cpp
homescreenapp/hsdomainmodel/src/hsdocumentloader.cpp
homescreenapp/hsdomainmodel/src/hsgui.cpp
homescreenapp/hsdomainmodel/src/hshostedwidgetfactory.cpp
homescreenapp/hsdomainmodel/src/hsidlewidget.cpp
homescreenapp/hsdomainmodel/src/hspage.cpp
homescreenapp/hsdomainmodel/src/hspagenewwidgetlayout.cpp
homescreenapp/hsdomainmodel/src/hspagevisual.cpp
homescreenapp/hsdomainmodel/src/hsscene.cpp
homescreenapp/hsdomainmodel/src/hswallpaper.cpp
homescreenapp/hsdomainmodel/src/hswidgetcomponentregistry.cpp
homescreenapp/hsdomainmodel/src/hswidgethost.cpp
homescreenapp/hsdomainmodel/src/hswidgethostvisual.cpp
homescreenapp/hsdomainmodel/src/hswidgettoucharea.cpp
homescreenapp/hsmenuclientplugin/hsmenuclientplugin.pro
homescreenapp/hsmenuclientplugin/inc/hsmenuclient.h
homescreenapp/hsutils/inc/hsmenudialogfactory.h
homescreenapp/hsutils/inc/hsmenuevent.h
homescreenapp/hsutils/inc/hsmenueventfactory.h
homescreenapp/hsutils/inc/hsmessageboxwrapper.h
homescreenapp/hsutils/inc/hspropertyanimationwrapper.h
homescreenapp/hsutils/inc/hsutils_global.h
homescreenapp/hsutils/inc/hswidgetpositioningonwidgetadd.h
homescreenapp/hsutils/inc/hswidgetpositioningonwidgetmove.h
homescreenapp/hsutils/src/hsmenudialogfactory.cpp
homescreenapp/hsutils/src/hsmenuevent.cpp
homescreenapp/hsutils/src/hsmenueventfactory.cpp
homescreenapp/hsutils/src/hsmessageboxwrapper.cpp
homescreenapp/hsutils/src/hspageindicator.cpp
homescreenapp/hsutils/src/hspageindicatoritem.cpp
homescreenapp/hsutils/src/hspropertyanimationwrapper.cpp
homescreenapp/hsutils/src/hssnapline.cpp
homescreenapp/hsutils/src/hswidgetpositioningonwidgetadd.cpp
homescreenapp/hsutils/src/hswidgetpositioningonwidgetmove.cpp
homescreenapp/inc/hsapp_defs.h
homescreenapp/inc/hsapp_defs.inl
homescreenapp/rom/homescreenapp_core.iby
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pri
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pro
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntime.h
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntimeplugin.h
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/resource/hsdefaultruntimeplugin.xml
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntime.cpp
homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntimeplugin.cpp
homescreenapp/runtimeplugins/runtimeplugins.pro
homescreenapp/serviceproviders/hsmenuserviceprovider/hsmenuserviceprovider.pro
homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsiconsidleloader.h
homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuentryremovedhandler.h
homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuitemmodel.h
homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h
homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice_global.h
homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsiconsidleloader.cpp
homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuentryremovedhandler.cpp
homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuitemmodel.cpp
homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp
homescreenapp/sis/homescreenapp.pkg
homescreenapp/sis/homescreenapp_ut_hs.pkg
homescreenapp/stateplugins/hsapplibrarystateplugin/conf/CI_hsapplibrary.confml
homescreenapp/stateplugins/hsapplibrarystateplugin/conf/hsapplibrary.confml
homescreenapp/stateplugins/hsapplibrarystateplugin/conf/hsapplibrary.implml
homescreenapp/stateplugins/hsapplibrarystateplugin/conf/hsapplibrary_20022F97.crml
homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrary.qm
homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrary.ts
homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.pro
homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.qrc
homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin_exports_to_rom.pri
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsaddmodeproxymodel.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibrarystate.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibstateutils.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsbaseviewstate.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsinstalledappsstate.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hslistviewitem.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmainwindow.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuview.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuviewbuilder.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsoperatorhandler.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsoperatorhandler_p.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hssearchview.h
homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hssearchviewbuilder.h
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/addcontentlabeledview.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/applibrary.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/common_objects.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/emptylabeledview.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/hslistviewitem.widgetml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/labeledlistview.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/listview.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/resource/searchview.docml
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsaddmodeproxymodel.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallappsstate.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallcollectionsstate.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibstateutils.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsbaseviewstate.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsinstalledappsstate.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hslistviewitem.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmainwindow.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuview.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuviewbuilder.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsoperatorhandler.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsoperatorhandler_p.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hssearchview.cpp
homescreenapp/stateplugins/hsapplibrarystateplugin/src/hssearchviewbuilder.cpp
homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.pro
homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.qrc
homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsdocumentloader.h
homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h
homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlewidget.h
homescreenapp/stateplugins/hshomescreenstateplugin/resource/controllayer.docml
homescreenapp/stateplugins/hshomescreenstateplugin/src/hsbackuprestorestate.cpp
homescreenapp/stateplugins/hshomescreenstateplugin/src/hsdocumentloader.cpp
homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlestate.cpp
homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlewidget.cpp
homescreenapp/stateplugins/hshomescreenstateplugin/src/hsloadscenestate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.pro
homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.qrc
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsappschecklist.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsarrangestate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionnamedialog.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionslistdialog.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsdeletecollectionitemstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsdeletecollectionstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsinstallationlogstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsmenustates_global.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hspreviewhswidgetstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsuninstallitemstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappdetailsstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappsettingsstate.h
homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsappchecklist.docml
homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsarrangedialog.docml
homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hscollectionslistdialog.docml
homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsdetailsdialog.docml
homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsinstallationlogdialog.docml
homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hswidgetpreviewdialog.docml
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddtohomescreenstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsappschecklist.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsarrangestate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionslistdialog.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsinstallationlogstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hspreviewhswidgetstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsuninstallitemstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappdetailsstate.cpp
homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappsettingsstate.cpp
homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.pro
homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockwidget.h
homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsdigitalclockwidget.h
homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.css
homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.widgetml
homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsdigitalclockwidget.css
homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsdigitalclockwidget.widgetml
homescreenapp/widgetplugins/hsclockwidgetplugin/resource/qtg_graf_hswidget_preview_clock.svg
homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp
homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsdigitalclockwidget.cpp
homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidget.h
homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.css
homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.widgetml
homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp
screensaver/bwins/screensavermodelu.def
screensaver/common.pri
screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h
screensaver/devicedialogplugins/snsrdevicedialogplugin/snsrdevicedialogplugin.pro
screensaver/devicedialogplugins/snsrdevicedialogplugin/src/snsrdevicedialog.cpp
screensaver/devicedialogplugins/snsrdevicedialogplugin/src/snsrdevicedialogplugin.cpp
screensaver/eabi/screensavermodelu.def
screensaver/screensavermodel/inc/screensaver.h
screensaver/screensavermodel/src/screensaver.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsranalogclockcontainer.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockcontainer.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockscreensaver.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrblankcontainer.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrdigitalclockcontainer.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsroledanalogclockcontainer.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsroleddigitalclockcontainer.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveranalog.docml
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaverdigital.docml
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveroledanalog.docml
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveroleddigital.docml
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsranalogclockwidget.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsroledclockwidget.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsroledtimelabel.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsranalogclockwidget.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsroledclockwidget.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsroledtimelabel.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatormodel.h
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/resource/snsrindicatorwidget.widgetml
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/src/snsrindicatormodel.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsranalogclockcontainer.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrbigclockcontainer.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrbigclockscreensaver.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrblankcontainer.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdigitalclockcontainer.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdocumentloader.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsroledanalogclockcontainer.cpp
screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsroleddigitalclockcontainer.cpp
--- a/homescreen.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreen.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -16,7 +16,9 @@
 
 TEMPLATE = subdirs
 
-SUBDIRS  =  homescreenapp
+SUBDIRS  += homescreenapp \
+			homescreen_plat
+			
 symbian:SUBDIRS += screensaver
 
 CONFIG += ordered
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreen_plat/homescreen_plat.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2010 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:
+#
+
+TEMPLATE = subdirs
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
+
+include(homescreenclient_api/homescreenclient_api.pri)
+
+for(filename,PLATFORM_HEADERS){
+    BLD_INF_RULES.prj_exports *= "$$filename APP_LAYER_PLATFORM_EXPORT_PATH($$basename(filename))"
+  }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreen_plat/homescreenclient_api/homescreenclient_api.metaxml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="8e80718e406ef05ada051bc688cb2d5f" dataversion="2.0">
+  <name>homescreenclient_api</name>
+  <description>Home screen API to create widgets, change wallpaper</description>
+  <type>c++</type>
+  <collection>homescreenapp</collection>
+  <libs/>
+  <release category="platform" sinceversion=""/>
+  <attributes>
+    <htmldocprovided>no</htmldocprovided>
+    <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreen_plat/homescreenclient_api/homescreenclient_api.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2010 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:
+#
+
+PLATFORM_HEADERS += \
+                      homescreenclient_api/hsmenuclient.h
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreen_plat/homescreenclient_api/hsmenuclient.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2010 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: hsmenuclient.h
+ *
+ */
+
+#ifndef HSMENUCLIENT_H
+#define HSMENUCLIENT_H
+
+#include <QObject>
+#include <QVariant>
+#include <qservicemanager.h>
+
+QTM_USE_NAMESPACE
+
+//mandatory keys
+const QString hsItemName("item:name");
+// or for localized name
+const QString hsItemLocName("item:locname");
+
+const QString hsitemLaunchUri("item:launchuri");
+const QString hsitemPublisherId("item:publisherId");
+
+//not mandatory
+const QString hsItemWidgetUri("widget:uri");
+const QString hsItemDescription("item:description");
+// or for localized name
+const QString hsItemLocDescription("item:locdescription");
+
+//for icon - not mandatory
+const QString hsIconFileName("icon:filename");//to display specific icon from file
+const QString hsIconName("icon:name");// HbIcon
+const QString hsIconApplicationId("icon:applicationid"); // icon from associated application
+
+
+class HsMenuClientPrivate;
+
+class HsMenuClient : public QObject
+{
+    Q_OBJECT
+
+public:
+    HsMenuClient(QObject *parent = 0);
+    ~HsMenuClient();
+public slots:
+   bool add(const QVariantMap &entryPreference = QVariantMap());
+   bool remove(const QVariantMap &queryPreference = QVariantMap()) const;
+   
+   QList<QVariantMap > getList(const QVariantMap &queryPreference = QVariantMap());
+  
+private:
+   Q_DISABLE_COPY(HsMenuClient)
+    /**
+     * Pointer to a private implementation.
+     */
+   HsMenuClientPrivate * const m_d;
+};
+
+
+
+#endif // HSMENUCLIENT_H
--- a/homescreenapp/common.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/common.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -1,4 +1,4 @@
-#
+
 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
@@ -33,7 +33,7 @@
     SUBDIRPART = release
 }
 
-win32: OUTPUT_DIR = $$PWD/../../bin/$$SUBDIRPART
+!symbian: OUTPUT_DIR = $$PWD/../../bin/$$SUBDIRPART
 symbian: OUTPUT_DIR = $$PWD/bin
 
 SOURCE_DIR = $$PWD/inc
@@ -45,6 +45,7 @@
     MOC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/moc
     RCC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/rcc
     UI_DIR = $$OUTPUT_DIR/tmp/$$TARGET/ui
+    CONFIG -= app_bundle
 } else { # test part is NOT DONE
     QT *= testlib
     CONFIG += console
@@ -68,19 +69,16 @@
     INCLUDEPATH += $$MOC_DIR
     TARGET.CAPABILITY = ALL -TCB
     TARGET.EPOCALLOWDLLDATA=1
-}
-
-win32 {
+} else {
     # add platfrom API for windows
     INCLUDEPATH += \                
-                $$PWD/../../homescreensrv/homescreensrv_plat/contentstorage_api \
-                $$PWD/../../homescreensrv/homescreensrv_plat/hswidgetmodel_api \               
+                $$PWD/../../homescreensrv/homescreensrv_plat/contentstorage_api \                
                 $$PWD/../../homescreensrv/homescreensrv_plat/homescreen_information_api/inc
 }
 
 plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR
 
-win32: plugin { # copy manifiers
+!symbian: plugin { # copy manifiers
     manifest.path = $$DESTDIR
     manifest.files = ./resource/*.manifest ./resource/*.xml
     manifest.CONFIG += no_build
@@ -99,10 +97,6 @@
 
     qtplugins.path = $$PLUGIN_SUBDIR
     qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
-
-    message(Remove "contains(MOBILITY, serviceframework)" after the QtSF refactorig is done!)
-        
-    !contains(MOBILITY, serviceframework):qtplugins.sources += resource/$${TARGET}.manifest
     
     hs_public_plugin {
       contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:/private/20022F35/$${TARGET}.xml"
@@ -120,8 +114,7 @@
         for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)"
     }
     export ( BLD_INF_RULES.prj_exports)
-}
-win32 {
+} else {
     name = $$replace(1, [/\\\\\.\*], _)
     eval ($${name}.path = $${OUTPUT_DIR}/$${2})
     eval ($${name}.files = $$1)
@@ -138,10 +131,11 @@
 }
 }
 
-!exists($${EPOCROOT}epoc32/include/platform/mw/XQSettingsManager) {
-	DEFINES += NO_QT_EXTENSIONS
+symbian {
+    DEFINES += QT_EXTENSIONS
 }
 
+
 # support for NFT
 nft:DEFINES += NFT
 
--- a/homescreenapp/examples/batterywidgetplugin/resource/batterywidgetplugin.xml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/examples/batterywidgetplugin/resource/batterywidgetplugin.xml	Wed Aug 18 09:40:07 2010 +0300
@@ -8,7 +8,5 @@
         <version>1.0</version>
         <description>Example of home screen widget</description>
         <capabilities></capabilities>
-        <customproperty key="iconuri">batterywidgetplugin.png</customproperty>
-        <customproperty key="title">Battery</customproperty>
     </interface>
 </service>
--- a/homescreenapp/examples/batterywidgetplugin/sis/batterywidgetplugin.bat	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/examples/batterywidgetplugin/sis/batterywidgetplugin.bat	Wed Aug 18 09:40:07 2010 +0300
@@ -19,7 +19,7 @@
 if exist batterywidgetplugin.sisx del batterywidgetplugin.sisx
 
 makesis batterywidgetplugin.pkg
-signsis batterywidgetplugin.sis batterywidgetplugin.sisx ../../../../sis/rd.cer ../../../../sis/rd-key.pem
+signsis batterywidgetplugin.sis batterywidgetplugin.sisx ../../../sis/rd.cer ../../../sis/rd-key.pem
 
 if exist batterywidgetplugin.sisx (
 echo batterywidgetplugin.sisx creation SUCCEEDED
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/inc/minibrowserwidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2010 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:  Example of home screen widget
+*
+*/
+
+#ifndef MINIBROWSERWIDGET_H
+#define MINIBROWSERWIDGET_H
+
+#include <HbWidget>
+class HbLineEdit;
+class QGraphicsWebView;
+class HbIconItem;
+class HbPushButton;
+
+class MiniBrowserWidget : public HbWidget
+{
+    Q_OBJECT
+// Start of snippet 1
+    Q_PROPERTY(bool isOnline READ isOnline WRITE setOnline)
+// End of snippet 1
+// Start of snippet 2
+    Q_PROPERTY(QString url READ url WRITE setUrl)
+// End of snippet 2
+    
+public:
+    MiniBrowserWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
+    ~MiniBrowserWidget();
+    
+public:
+    bool isOnline();
+    void setOnline(bool online);
+    QString url() const;
+    void setUrl(const QString& url);
+    
+public slots:
+    void onInitialize();
+    void onShow();
+    void onHide();
+
+public slots:
+    void pressGoButton();
+    void pressStopButton();
+    void loadFinished(bool ok);
+    void loadProgress(int progress);
+    void loadStarted();
+
+// Start of snippet 3
+signals:
+    void setPreferences(const QStringList &names);
+// End of snippet 3
+
+private:
+    Q_DISABLE_COPY(MiniBrowserWidget)
+    
+    HbPushButton *mGoButton;
+    HbPushButton *mStopButton;
+    HbLineEdit *mEditor;
+    QGraphicsWebView *mWeb;
+    HbIconItem *mSpinnerAnimationWidget;
+    bool mOnline;    
+    QString mUrl;
+    
+};
+
+#endif // MINIBROWSERWIDGET_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/inc/minibrowserwidgetplugin.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2010 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:  Example of home screen widget
+*
+*/
+
+#ifndef MINIBROWSERWIDGETPLUGIN_H
+#define MINIBROWSERWIDGETPLUGIN_H
+
+#include <QObject>
+#include <qserviceplugininterface.h>
+
+QTM_USE_NAMESPACE
+// Start of snippet 1
+class MiniBrowserWidgetPlugin : public QObject, public QServicePluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(QtMobility::QServicePluginInterface)
+
+public:
+    QObject *createInstance(const QServiceInterfaceDescriptor &descriptor,
+                            QServiceContext *context,
+                            QAbstractSecuritySession *session);
+};
+// End of snippet 1
+
+#endif // HELLOWORLDWIDGETPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/minibrowserwidgetplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2010 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: Example of home screen widget
+#
+
+TEMPLATE = lib
+CONFIG += plugin mobility hb
+MOBILITY = serviceframework
+
+QT      += webkit
+
+HEADERS += ./inc/*.h
+SOURCES += ./src/*.cpp
+
+INCLUDEPATH += ./inc               
+
+symbian: {
+
+    DESTDIR = /private/20022F35/import/widgetregistry/20022F6F
+    INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+
+    TARGET.UID3 = 0x20022F6F
+    TARGET.EPOCALLOWDLLDATA=1
+    TARGET.CAPABILITY = ALL -TCB
+    
+    plugins.path = $${DESTDIR}
+    plugins.sources = $${TARGET}.dll 
+    
+    widgetResources.path = $${DESTDIR}
+    widgetResources.sources += resource/$${TARGET}.xml    
+    widgetResources.sources += resource/$${TARGET}.manifest
+    widgetResources.sources += resource/$${TARGET}preview.png
+    widgetResources.sources += resource/$${TARGET}.svg
+        
+    DEPLOYMENT += plugins \
+                  widgetResources
+}
+
+win32: {
+
+    CONFIG(debug, debug|release) {
+      SUBDIRPART = debug
+    } else {
+      SUBDIRPART = release
+    }    
+    
+    PLUGIN_SUBDIR = /private/20022F35/import/widgetregistry/20022F6F
+    
+    DESTDIR = $$PWD/../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR}
+
+    manifest.path = $${DESTDIR}
+    manifest.files = ./resource/*.manifest ./resource/*.xml ./resource/*.png ./resource/*.svg
+    
+    INSTALLS += manifest    
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetplugin.manifest	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<hswidgetmanifest>
+    <uri>minibrowserwidgetplugin</uri>
+    <title>Mini browser</title>
+    <description>Home screen example widget</description>
+    <icon>minibrowserwidgetplugin.svg</icon>
+    <previewimage>minibrowserwidgetpluginpreview.png</previewimage>
+    <hidden>false</hidden>
+    <servicexml>minibrowserwidgetplugin.xml</servicexml>
+</hswidgetmanifest>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetplugin.svg	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,1566 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" [
+	<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
+	<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
+	<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
+	<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
+	<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
+	<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
+	<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
+	<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
+]>
+<svg version="1.1" baseProfile="tiny" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="88px" height="88px"
+	 viewBox="0 0 88 88" xml:space="preserve">
+<switch>
+	<foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
+		<i:pgfRef  xlink:href="#adobe_illustrator_pgf">
+		</i:pgfRef>
+	</foreignObject>
+	<g i:extraneous="self">
+		<rect x="0.25" y="0.25" fill="none" width="87.5" height="87.5"/>
+		<g>
+			
+				<image width="75" height="75" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAATRJREFUeNrs3EsOgzAMRVGCuiPv
+fwneU0VHqKpUJ9j5+b5ZJx0cnpMgAeWYI3LMGb3/KCDZ0QpQdrDzIOYUWmUPzQILLLDAAouABdba
+h1IBa3OcSCxhDEFywUqD9BQrHVQLVkqkFqzUUDVY6aGsWEAZsYAyYgHFjbR/s2iVEQsoxtC/WbSK
+Zvk3i1bRLP9m0ar/4ZEjKxRjWAF15ZUdoHaBZ71iNwQLLLDmjoBFs8ACCyySHkvBollgLYulMNAs
+sEbthHcsRpFmgTVkBL+xGEWa5VeG0/sPaRat+iTDY5Ia3SzGsaJZuzTM9aLvvGZp72at2i4dMYYr
+goWtt7u9bxi6MbW8ySoZoVqxZgPrdsx5+va9ZIHywBqFNuTQ7P3FENkRKQorAm6aW6+eX5OUlWB+
+5S3AAP7hH3db+S5HAAAAAElFTkSuQmCC" transform="matrix(1 0 0 1 8 8)">
+			</image>
+			
+				<image width="58" height="41" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAApCAYAAABk+TodAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALdJREFUeNrs2UsOgCAMBFCmJ+/R
+jRsSDYkRqPYzPYD02SEBRVsvbfa1vAacwrb3gWC46f4QGPeqZyQBPhqQEDn0IDHy4kJyZMdKAWSP
+bgmotCJFKKGEEkoooUYnozIT5cmI0IDXNClyTWN0U8X2DlVONPg0zyrzuVOSQktEdzio0r8komJ1
+Jbpp9muG34a6E+oVq7sn6hGrFtH1BlarPeoFPL0e/m7gq+fDW0NWLw+OJmGaikOAAQAEaxk/SH/M
+kwAAAABJRU5ErkJggg==" transform="matrix(1 0 0 1 10 40)">
+			</image>
+			
+				<image width="58" height="58" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAYAAADhu0ooAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAehJREFUeNrsm98rBFEUx+dM8y94
+kmVta/1MiU2S+BtEQpIHSnnx5h8gL1JEJGlDIn8DSdImRdau3daw5c+wY69tM2Z3tpmduTNzz51v
+zTzt1v30OWfunToDAsVE1xTFzO/jKwC01gJugjkJDV6CowkNXga0ExhYgbQKDCwBWoEFFiFrgQVW
+Ic0CA+uQRmEBA6QRWBELZE2lyzKknlVRQBY9SYC1ZLVmRcx9ibp09aSJPNhEbVQrT+TBJnqjXIGW
+qpUfozz0J1dGoW/1mwujksBH5QqSks/7oMhK1zeKDNQ36veob9TjPYr/wPC8XgeS4D91kR3qya1z
++Qt1/b5s1BdKtxDMD6TEZgMUt5ciKR+lS9K+JKMs39etoMookYrQanI7BGVGSVoXM6ispnbC8HcE
+VAeR1dRuBCr2aCmRhSQKq297bdVBSVrmE0zDpvc7oPztpVIY3lfTB11QdXvRJjz3xJzVzGG3+akU
+8ifyZsPSZejAoJfQ7CMTZrNHPWAJ9Bd25sHTsNlYr/URuVKap+OehH0/jhpiMDUKGpy69wysfNJP
+Z4z1H/DknavA8ukA3cFkdZombh2H/TgbdHbUXJ3G8RvqwJ/nQ+59PFApgbFrW6FzF8O2rY/aBzWB
+0SvT0LnLEWrr+RFgANIeQHR191JCAAAAAElFTkSuQmCC" transform="matrix(1 0 0 1 10 21)">
+			</image>
+			
+				<image width="58" height="57" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA5CAYAAABnLziGAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVhJREFUeNrkmkkOxCAMBDHiR/7/
+E/pPc5pDRqOwGW9wyyWhaC+NFSp+Fv88Q/Ll5BSySENTAEgRYAoEuQVcS8zFt4BOw0YN3elQJqMN
+Qxi0C9scqCEZHZAE5YgJXZNB8i4oB1KSV0FPAkILtjoIVWjITMqQUD5Q9KouR1QtqwWcytWapU/2
+VnMCiQ0bKdpHNfITJ7/VjKqs+sE2YxXVc5Qzwp3IUdeQX2fkTc0jA7Me6MgkQM2Y78CPKPoG6xny
+sU/ra5qaFczudZcmDFeAlptAEa13/psw8AKoyj1SWlEkz9NHe0kNS1oWzNowkKJysAStioXHckzz
+2l4sYcW/7dkwqP5+w04gtgtkFAuIzKErejhVuyh4NvUIGL5YDV1EDVmJa5pHVSFVjJA5R0OHbDZQ
+3KDoUDq17ICjXveEBzYpaDXSZk/eXqTVRWTQUWhEV3QE2jzUPwIMAN7BQw1ftQrxAAAAAElFTkSu
+QmCC" transform="matrix(1 0 0 1 10 22)">
+			</image>
+			
+				<image width="58" height="57" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA5CAYAAABnLziGAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAodJREFUeNrkWEtKA0EQnWrmEn52
+5ga6EMGViIgLf8SFiHgCEUXREyiI4EZEEQn+Fop4BhFFRG+gJiZoTmFGezEyzLc/1dOVsaBIyGSq
+3quurqpucBBl46XD45+bvU1QfdcXFRtpApgEVYHGvY9NGrAJygLMsoFFGEwQlAEnY0uHMJgiKApO
+1aYsWZYHSYz3de0xGyCxVorjEsXG8iQpaks2LUXsMiorqesz6z0Xy2FwFajt58Sqq+uIk06yEZeW
+mMSS0h7yTFkTPVXUj5Xo5hHcsG9GqdeZFOYUVMJBdilG38Q4yWwAMnUUS7MBNqus6r5WsetSIWha
+3CKTQydKhWTaNMYwxj3qFTez6nKjVIjo3lIID9+6N322j3WuTKSDRvMiidX6SI+AmP2dUR3Isf2T
+u0qx1kc5WX8/Uh8KUle0ncFLp+5/IMvaZVZFLUacrPdbfsK6/hwtSvw3X00Ai8Oho5Gqu9XXhFYL
+nLCuPXX+EeLfk55hSRwGVeWcEtN19VEe/Hb/F1r6q/hPw5UKbOWhC8XZzsCndACwfPv+WdYfMPbH
+8r08aCzfnhe4M8qSpTuc6O4Oyq+srm/fpytaGGxJODiLt91KxIWIei06/VAVC/kV1cGyN9QASaIO
+IaIGD977ww3AaNx5DhIcs9INw8FIHfj+0FEMEcWhdZVyOFoH2ysqgoM/174zOhr7AL5PVBR7r8Yp
+x6d1C0itCsdhqIzXQKu9xB2hrPdTSQyuatpQazOnUzXAJ/pNIHUDGM7LVTCyolRS92KmCoZT1/6K
+ypDMdY9ezr5bjY6y8/JZj1ACX829kTgRaIOYPkknfD1fEKJBmayUIqRvFl6LfTk+cVzyuFLB8yPA
+AFDHuVDEzUzkAAAAAElFTkSuQmCC" transform="matrix(1 0 0 1 10 22)">
+			</image>
+			
+				<image width="29" height="15" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAPCAYAAAAYjcSfAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAE1JREFUeNrUkzEOACAMAqmf5U39
+rXFzcVCTqzJ0vVAgJKU4eZwmVlkBVRk0Zts0FAXHKmwaugP3N0Vqt0Mnoaadmn6v6Uz9QpGO1QUY
+AHWdBoFn9+uOAAAAAElFTkSuQmCC" transform="matrix(1 0 0 1 38 37)">
+			</image>
+			
+				<image width="56" height="43" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAArCAYAAAAtxEsrAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOhJREFUeNrc2UEOwyAMBMAs4i39
+/3v6GapKTaWiiBRkY+/6lEMOjNag4OBwrNbaY+Z9AE/rNSAStAOLTCgPLDLDLKBgwa1CwQRbQYIR
+N4MEK+5fKNhxd0go4EbIooKbalFmXJ9iOcSqDweyrflJsijipFu0D6sopyed4BkalNN7HzRVFXY+
+V1WYFHB4m1D6LLuqqgqjA65O1qoqLD3QavBbVWHpgB7/JVIAvWDhQG9YCHAXajswArYFGAlzBWaA
+uQAzwb5rsrjRZ4SZJJgZtgxkQC0B2WA/e3C0D1lhtwmywy5LcT76EmAAdRZnpsQcRz8AAAAASUVO
+RK5CYII=" transform="matrix(1 0 0 1 10 21)">
+			</image>
+			<g>
+				
+					<image width="19" height="7" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAHCAYAAADqF3ZBAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACxJREFUeNpiZGBgaGCgEmCE0lQx
+kImBioARiU2p6xqo6jKaeZNcr8L1AAQYACc2AwuT3AwCAAAAAElFTkSuQmCC" transform="matrix(1 0 0 1 63 36)">
+				</image>
+			</g>
+			
+				<image width="44" height="40" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAoCAYAAACFFRgXAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANVJREFUeNrsl8sKgzAQRTMl+gPF
+PhDFx///lLpq+wMmhdSILkqtfVEyA/cuohvlcLgzIqkp1l6dYpwo0uSv42EMb9g5caxJG2MHWBG8
+Y6jvrRzaIdo5UbweWCkY/iewpIFDJWAYhrElUAkY/jgbpWAYHZZuGEMHwxg6GMaWCJQ03ZL2R9dd
+xGim+aZtz6yhsyyhO+A5TcMLPM8TWjT8CH5yr1+2owD/dMvhujxWgNeJi2JPzICfP1SWYWC/MlxV
+BxJTibo+UugOv/2l4wD709CFyk2AAQCXFWkw2gJhPgAAAABJRU5ErkJggg==" transform="matrix(1 0 0 1 38 10)">
+			</image>
+			
+				<image width="37" height="39" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAnCAYAAACIVoEIAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAG9JREFUeNrs2MENwCAMQ1Gn6kbZ
+fwTv1Eu5Fk7Fan8k7k+2EApSzvR9dChwKiwpxSYFChQoUKBAgQIFChQoUKA+jfK5urX+OSnP/hL6
+bcyYWgA5ob7e3WFNQN6NigA93T4n1NcpoIGKAsW+fZcAAwDWawmu22GKXgAAAABJRU5ErkJggg==" transform="matrix(1 0 0 1 45 11)">
+			</image>
+			
+				<image width="42" height="30" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAeCAYAAABaKIzgAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEtJREFUeNrs2MEJwDAQA0ErxaYo
+N3vBkIdLuIPZCgY9lfVXVe9q3DMBecqNTLJbLzohUFBQUFBQUFBQUFBQUFDQwdDO78jIRT8BBgC8
+VwueoiHqZwAAAABJRU5ErkJggg==" transform="matrix(1 0 0 1 38 10)">
+			</image>
+			
+				<image width="7" height="4" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAECAYAAABCxiV9AAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5JREFUeNpiYIAAYwYsgBGXBEwS
+r05kgKzoLECAAQA0iQGdP+VRswAAAABJRU5ErkJggg==" transform="matrix(1 0 0 1 39 38)">
+			</image>
+			
+				<image width="2" height="11" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAALCAYAAABVuVzsAAAACXBIWXMAAAsSAAALEgHS3X78AAAA
+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB9JREFUeNpiYACC////pzGBCBCH
+iQEKKGQwwEwGCDAAcREKPHaGqlwAAAAASUVORK5CYII=" transform="matrix(1 0 0 1 44 39)">
+			</image>
+			<rect x="40.804" y="18.635" fill="none" width="37.431" height="14.661"/>
+			<text transform="matrix(1 0 0 1 40.8037 30.208)" font-family="'NokiaSans-Regular'" font-size="14.9724">Hello!</text>
+		</g>
+	</g>
+</switch>
+<i:pgf  id="adobe_illustrator_pgf">
+	<![CDATA[
+	eJzsvWmTHMeVIPgdZvgPtR/aTPrARISHxyVrG7M8ezVLiTKJmlFvzxitBBRJTAMFDI7WcH/9vtuf
+e3hkZaFK3ZS6ygmi4Bnp4cfzdx//8H/97g9fbV+9+/PNV92muXr+7B/+Yf/h5vrTuw+/uqLuq1+/
+efP546cP2PWL3//yqoXH8Kntr6fv5Mn/dvPh4+t3t7+iz/jTE37/F9/efHh3e3N79f9cv/54vWmv
+/scvjn/69qtvX998evfim89vPv+PX/7y6he/xOe/ff3pzQ1844+3n/C3V1+FX9pUYOjD9Sf4dHgx
+vQhN21y1za+aeLX9DT6ye/f59tXr2x927/7Pr66+6gb604aIf/Dz//v1728+3vXQ4d3Lz29vbj/9
+7sO7lzcfP+7fvXn34eOvrvY/Xd9e/eb6B/jk+uqfb968efeXq92b65f/6r9zenf7CZ797bt/fX39
+h+vbj1/9/uaHz2+uP/hnfntz8+rm1Zknt7/uvzu9fnMD+/b2+tPVTLu4/XUbvtt9fv3m1W8/v/3z
+DexobAbq776jKf7xI8wNpom/U//43a/fQtcfbj59gtXCu+gwfv9PO78w6KX2i3+B97+mo4Ut/p+/
+1JE/vHv/9vrDv37k56YJ/pOPvr15+/4NHAVtY4z2n34MC9Ad7jdNuPoqxHYTp6a/ij2ARjv3V12Y
+oUe+kLb95t9e3/wFt+b2RnZj++HTH17/f7C6Nsam4f/LR7///Obmwx9vX+Nm8n7MvB+/effq5g18
+Iw1xenP9w0ddcJv+L098e/3hh5tPACDv3nz+RCA82Vtgz7++/ukG4aCVl3zz/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9rRWRHom6+EO9pm2GoKWErKPCq1wIk0zA8ImCoap
+lNAdVDvs+ZKGc2BmITM0jylzDI8tCztAZy/mOMuaOCFHXOIBBdgEF8vhSZd44iV+RR7BDjvod3v/
+qxVcTAajf40C7AV+eLuNTdNTAyr2lCZYAEhMAgZeoceIqi4kJksvaphFSoGG1TXMD12KmA8BHbep
+hX82Y7nyoP/60f/ov522J+/aEZ7uEdvGRDfQisZDGKr9LjkmIUOOVzwQ6akM5dFgOAZWGPdGXUB2
+LIdv+gMsPm6PPsexz/7gf/qx/mAS+z+WIxR03yJFyXkEmZ24PwfI48mIJHg+Jgn73d55nceArkjn
+iQyZArxEH4OIu0SApAv8IkMkHPwrKloZi4pf8hl0SPuOBlGSDwt5+iFPtwGcH6Jng3yINYwP4Qf9
+En74fcrpX3Lmh7Sv+MO1s+zv/yf28apNGsyiNmUrK6ftt97lqP3xhedqvI3b/+nF2v0+Js72hvAq
+9jbqjYGYe7Hx++B/sAQ/Mj5YWame1Bb++X8B1IaZMw==
+	]]>
+</i:pgf>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetplugin.xml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service>
+    <name>minibrowserwidgetplugin</name>
+    <filepath>minibrowserwidgetplugin</filepath>
+    <description>Example widget</description>
+    <interface>
+        <name>com.nokia.symbian.IHomeScreenWidget</name>
+        <version>1.0</version>
+        <description>Example of home screen widget</description>
+    </interface>
+</service>
Binary file homescreenapp/examples/minibrowserwidgetplugin/resource/minibrowserwidgetpluginpreview.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/sis/minibrowserwidgetplugin.bat	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,30 @@
+@rem
+@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+@echo off
+
+if exist minibrowserwidgetplugin.sisx del minibrowserwidgetplugin.sisx
+
+makesis minibrowserwidgetplugin.pkg
+signsis minibrowserwidgetplugin.sis minibrowserwidgetplugin.sisx ../../../sis/rd.cer ../../../sis/rd-key.pem
+
+if exist minibrowserwidgetplugin.sisx (
+echo minibrowserwidgetplugin.sisx creation SUCCEEDED
+del minibrowserwidgetplugin.sis
+)
+
+if not exist minibrowserwidgetplugin.sisx (
+echo minibrowserwidgetplugin.sisx creation FAILED
+)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/sis/minibrowserwidgetplugin.pkg	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,45 @@
+;
+; Copyright (c) 2010 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:
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"minibrowserwidgetplugin"},(0x20022F6F),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+
+"../resource/minibrowserwidgetplugin.manifest"                                                      - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.manifest",FM,"application/hs-widget-uninstall+xml",RR,RW
+ 
+"/epoc32/release/armv5/urel/minibrowserwidgetplugin.dll"                                            - "!:/sys/bin/minibrowserwidgetplugin.dll"
+"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.qtplugin"   - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.qtplugin"
+"../resource/minibrowserwidgetplugin.manifest"                                                      - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.manifest"
+"../resource/minibrowserwidgetplugin.xml"                                                           - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.xml"
+"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.svg"        - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.svg"
+"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetpluginpreview.png" - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetpluginpreview.png"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/sis/minibrowserwidgetplugin_winscw.pkg	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,44 @@
+;
+; Copyright (c) 2010 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:
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"minibrowserwidgetplugin"},(0x20022F6F),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+
+"../resource/minibrowserwidgetplugin.manifest"                                                      - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.manifest",FM,"application/hs-widget-uninstall+xml",RR,RW
+ 
+"/epoc32/release/winscw/udeb/minibrowserwidgetplugin.dll"                                           - "!:/sys/bin/minibrowserwidgetplugin.dll"
+"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.qtplugin"   - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.qtplugin"
+"../resource/minibrowserwidgetplugin.manifest"                                                      - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.manifest"
+"../resource/minibrowserwidgetplugin.xml"                                                           - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.xml"
+"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.svg"        - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetplugin.svg"
+"/epoc32/data/z/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetpluginpreview.png" - "!:/private/20022F35/import/widgetregistry/20022F6F/minibrowserwidgetpluginpreview.png"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/src/minibrowserwidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,221 @@
+/*
+* Copyright (c) 2010 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:  Example of home screen widget
+*
+*/
+
+#include <QDebug>
+#include <QGraphicsLinearLayout>
+#include <QGraphicsWebView>
+#include <HbPushButton>
+#include <HbLineEdit>
+#include <HbFrameDrawer>
+#include <HbFrameItem>
+#include <HbDeviceProfile>
+#include "minibrowserwidget.h"
+
+/*!
+    \ingroup group_minibrowser_widget
+    \class MiniBrowserWidget
+    \brief Example implementation for home screen widget.
+
+    MiniBrowserWidget derived from the HbWidget and implements 
+    needed functions for the home screen widget. 
+    As name suggests MiniBrowserWidget is a small web browser widget in
+    the home screen. 
+    
+    Mini browser widget demonstrates the following home screen widget features:
+    <ol>
+    <li> home screen online/offline state, see \ref sssection_isonline </li>
+    <li> preferences, see \ref sssection_setpreferences </li>
+    </ol>
+    It also shows use of HbPushButton and HbLineEdit widgets. 
+    @image html hs_minibrowser.png
+    
+    
+*/
+
+/*!
+    Constructs a widget which is a child of \a parent, with widget flags set to \a flags.
+    Widget creates two buttons ('go' and 'stop'), text field to write url and browser view.
+    Note that this is just an simple example so this creates child widgets directly to the layout.
+    For more complicated widget layouting, see Orbit documentation and especially WidgetML section of it.
+*/
+MiniBrowserWidget::MiniBrowserWidget(QGraphicsItem* parent, Qt::WindowFlags flags)
+    : HbWidget(parent, flags)
+{
+    QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
+    setLayout(layout);
+    
+    QGraphicsLinearLayout *buttonLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    mGoButton = new HbPushButton("Go");
+    connect(mGoButton, SIGNAL(pressed()), SLOT(pressGoButton()));
+    buttonLayout->addItem(mGoButton);
+    mStopButton = new HbPushButton("Stop");
+    connect(mStopButton, SIGNAL(pressed()), SLOT(pressStopButton()));
+    buttonLayout->addItem(mStopButton);
+    mStopButton->setEnabled(false);
+    mEditor = new HbLineEdit();
+    buttonLayout->addItem(mEditor);
+    
+    layout->addItem(buttonLayout);
+
+    mWeb = new QGraphicsWebView();
+    layout->addItem(mWeb);
+    
+    connect(mWeb, SIGNAL(loadStarted()), SLOT(loadStarted()));
+    connect(mWeb, SIGNAL(loadProgress(int)), SLOT(loadProgress(int)));
+    connect(mWeb, SIGNAL(loadFinished(bool)), SLOT(loadFinished(bool)));
+
+    // maximum size of the home screen widget is (48,39) units. Convert units to pixels and 
+    // resize minibrowser as maximum size
+    HbFrameDrawer *drawer = new HbFrameDrawer(
+        QLatin1String("qtg_fr_hsshortcut_normal"), HbFrameDrawer::NinePieces);
+    setBackgroundItem(new HbFrameItem(drawer));
+    
+    HbDeviceProfile profile;
+    qreal factor = profile.unitValue();
+    setPreferredSize(48*factor, 39*factor);
+    resize(preferredSize());
+    
+    mUrl = QString("http://www.nokia.com");
+}
+
+/*!
+    Destructor
+*/
+MiniBrowserWidget::~MiniBrowserWidget()
+{
+}
+
+/*!
+    Returns widget's online state
+*/
+// Start of snippet 1
+bool MiniBrowserWidget::isOnline()
+{ 
+    return mOnline;
+}
+
+/*!
+    Sets online state of the widget as \a online
+*/
+void MiniBrowserWidget::setOnline(bool online)
+{ 
+    mOnline = online;
+}
+// End of snippet 1
+
+/*!
+    Returns url of the widget currently showing.
+*/
+// Start of snippet 2
+QString MiniBrowserWidget::url() const
+{
+    return mUrl;
+}
+
+/*!
+    Sets url of the widget as \a url
+*/
+void MiniBrowserWidget::setUrl(const QString& url)
+{
+    mUrl = url;
+}
+// End of snippet 2
+
+/*!
+    Called when widget is initialized and all to properties are set
+*/
+void MiniBrowserWidget::onInitialize()
+{
+    mGoButton->setEnabled(mOnline);
+    mEditor->setText(mUrl);
+}
+
+/*!
+    Called when widget is shown in the home screen
+*/
+// Start of snippet 3
+void MiniBrowserWidget::onShow()
+{
+    if (mOnline) {
+        mWeb->load(QUrl(mUrl));
+        mStopButton->setEnabled(true);
+        }
+}
+// End of snippet 3
+
+/*!
+    Called when widget is hidden from the home screen.
+    Widget can decide what is appropriate action when 
+    widget is not visible on the screen. At least it
+    should not update itself as often as when on the 
+    screen to save battery etc.
+*/
+// Start of snippet 4
+void MiniBrowserWidget::onHide()
+{
+    mWeb->stop();
+}
+// End of snippet 4
+
+/*!
+    Slot connected to 'go' button
+*/
+// Start of snippet 5
+void MiniBrowserWidget::pressGoButton()
+{
+    setUrl(mEditor->text());
+    if (mOnline) {
+        mWeb->load(QUrl(mUrl));
+        mStopButton->setEnabled(true);
+        }
+    QStringList list;
+    list.append("url");
+    emit setPreferences(list);
+}
+// End of snippet 5
+
+/*!
+    Slot connected to 'stop' button
+*/
+void MiniBrowserWidget::pressStopButton()
+{
+    mWeb->stop();
+    //mStopButton->setEnabled(false);
+}
+
+/*!
+    Slot connected to webview's loadProgress signal
+    TODO: check if this is needed.
+*/
+void MiniBrowserWidget::loadProgress(int progress)
+{
+    Q_UNUSED(progress)
+    qDebug() << progress;
+}
+
+/*!
+    Slot connected to webview's loadFinished signal
+*/
+void MiniBrowserWidget::loadFinished(bool ok)
+{
+    Q_UNUSED(ok)
+    mStopButton->setEnabled(false);
+}
+void MiniBrowserWidget::loadStarted()
+{
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/examples/minibrowserwidgetplugin/src/minibrowserwidgetplugin.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 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:  Example of home screen widget
+*
+*/
+
+#include <qserviceinterfacedescriptor.h>
+#include <qabstractsecuritysession.h>
+#include <qservicecontext.h>
+
+#include "minibrowserwidgetplugin.h"
+#include "minibrowserwidget.h"
+
+/*!
+    \ingroup group_minibrowser_widget
+    \class MiniBrowserWidgetPlugin
+    \brief Example implementation for home screen widget plugin.
+*/    
+    
+/*!
+    Initialize plugin for minibrowser widget. Contains necessary information about 
+    the minibrowser widget that it can be loaded through QT Service Framework.
+*/
+QObject *MiniBrowserWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
+                                             QServiceContext *context,
+                                             QAbstractSecuritySession *session)
+{
+    Q_UNUSED(context);
+    Q_UNUSED(session);
+
+    if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) {
+        return new MiniBrowserWidget();
+    } else {
+        return 0;
+    }
+}
+
+Q_EXPORT_PLUGIN2(minibrowserwidgetplugin, MiniBrowserWidgetPlugin)
--- a/homescreenapp/homescreenapp.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/homescreenapp.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -18,7 +18,6 @@
 
 SUBDIRS  += hsutils \
             hsdomainmodel \
-            runtimeplugins \
             serviceproviders \
             stateplugins \
             widgetplugins \
@@ -27,10 +26,11 @@
 
 symbian: {
 SUBDIRS  += hshomescreenclientplugin \
-            hswidgetuninstaller
+            hswidgetuninstaller \
+            hsapplicationlauncher
 }
 
-SUBDIRS  += ./../tsrc
+exists(./../tsrc/tsrc.pro): SUBDIRS  += ./../tsrc
 
 CONFIG += ordered
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplication/conf/base/confml/CI_homescreendb.confml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<confml:configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:confml="http://www.s60.com/xml/confml/2" xsi:schemaLocation="http://www.s60.com/xml/confml/2 http://www.s60.com/xml/confml/1#//confml2" name="HomeScreen database settings">
+  <confml:feature ref="HomeScreenDbSettings" name="HomeScreen database settings">
+    <confml:setting ref="Pages" mapKey="id" mapValue="id" name="Pages" type="sequence">
+      <confml:setting ref="id" name="ID" type="int"/>
+      <confml:setting ref="indexPosition" name="Index Position" type="int"/>
+    </confml:setting>
+    <confml:setting ref="Widgets" mapKey="id" mapValue="id" name="Widgets" type="sequence">
+      <confml:setting ref="id" name="ID" type="int"/>
+      <confml:setting ref="uri" name="URI" type="string"/>
+      <confml:setting ref="pageId" name="Page ID" type="selection">
+        <confml:option map="HomeScreenDbSettings/Pages"/>
+      </confml:setting>
+    </confml:setting>
+    <confml:setting ref="WidgetPresentations" name="Widget presentations" type="sequence">
+      <confml:setting ref="key" name="Key" type="string"/>
+      <confml:setting ref="x" name="X position" type="real"/>
+      <confml:setting ref="y" name="Y position" type="real"/>
+      <confml:setting ref="zValue" name="Z value" type="real"/>
+      <confml:setting ref="widgetId" name="Widget ID" type="selection">
+        <confml:option map="HomeScreenDbSettings/Widgets"/>
+      </confml:setting>
+    </confml:setting>
+    <confml:setting ref="WidgetPreferences" name="Widget preferences" type="sequence">
+      <confml:setting ref="key" name="Key" type="string"/>
+      <confml:setting ref="value" name="Value" type="string"/>
+      <confml:setting ref="widgetId" name="Widget ID" type="selection">
+        <confml:option map="HomeScreenDbSettings/Widgets"/>
+      </confml:setting>
+    </confml:setting>
+    <confml:setting ref="Configuration" name="Configuration" type="sequence">
+      <confml:setting ref="key" name="Key" type="string"/>
+      <confml:setting ref="value" name="Value" type="string"/>
+    </confml:setting>
+  </confml:feature>
+  <confml:data>
+    <confml:HomeScreenDbSettings>
+      <confml:Widgets><confml:id>1</confml:id><confml:uri>hsclockwidgetplugin</confml:uri><confml:pageId  map="HomeScreenDbSettings/Pages[@key='1']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>2</confml:id><confml:uri>dialerwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='1']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>3</confml:id><confml:uri>ftuhswidget</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='1']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>4</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>5</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>6</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>7</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>8</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>9</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>10</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>11</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='3']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>12</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='3']"></confml:pageId></confml:Widgets>
+      <confml:Widgets><confml:id>13</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='3']"></confml:pageId></confml:Widgets>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>landscape</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>136</confml:x><confml:y>276</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='2']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>landscape</confml:key><confml:x>136</confml:x><confml:y>176</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='2']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>400</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='3']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>landscape</confml:key><confml:x>300</confml:x><confml:y>150</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='3']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='4']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>100</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='5']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>185</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='6']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>270</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='7']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>185</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='8']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>100</confml:x><confml:y>185</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='9']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>185</confml:x><confml:y>185</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='10']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='11']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>100</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='12']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>185</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='13']"></confml:widgetId></confml:WidgetPresentations>
+      <confml:WidgetPreferences><confml:key>clockType</confml:key><confml:value>Analog</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x20022EF9</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='4']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x10005901</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='5']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x20029F80</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='6']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x2001FE79</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='7']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x10207C62</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='8']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x10005951</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='9']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x20025FD9</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='10']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x102828D6</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='11']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x101FB751</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='12']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x100059EE</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='13']"></confml:widgetId></confml:WidgetPreferences>
+      <confml:Pages><confml:id>1</confml:id><confml:indexPosition>0</confml:indexPosition></confml:Pages>
+      <confml:Pages><confml:id>2</confml:id><confml:indexPosition>1</confml:indexPosition></confml:Pages>
+      <confml:Pages><confml:id>3</confml:id><confml:indexPosition>2</confml:indexPosition></confml:Pages>
+      <confml:Configuration><confml:key>bounceEffect</confml:key><confml:value>20</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetTapAndHoldTimeout</confml:key><confml:value>500</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>sceneTapAndHoldTimeout</confml:key><confml:value>500</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangeAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangeZoneAnimationDuration</confml:key><confml:value>800</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangeZoneReverseAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageRemovedAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>newPageAddedAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetDragEffectDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetDropEffectDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>defaultPageId</confml:key><confml:value>1</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>maximumPageCount</confml:key><confml:value>8</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>isShortcutLabelVisible</confml:key><confml:value>true</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>bounceFeedbackEffectDistance</confml:key><confml:value>3</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangePanDistanceInPixels</confml:key><confml:value>120</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>tapAndHoldDistance</confml:key><confml:value>16</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangeZoneWidth</confml:key><confml:value>60</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageIndicatorSpacing</confml:key><confml:value>8</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>maximumWidgetHeight</confml:key><confml:value>39</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>maximumWidgetWidth</confml:key><confml:value>48</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>minimumWidgetHeight</confml:key><confml:value>8.75</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>minimumWidgetWidth</confml:key><confml:value>8.75</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangePanDistance</confml:key><confml:value>17.91</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageChangeFeedbackEffect</confml:key><confml:value>Sensitive</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetPickFeedbackEffect</confml:key><confml:value>ItemPick</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetDropFeedbackEffect</confml:key><confml:value>ItemDrop</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetRepositionFeedbackEffect</confml:key><confml:value>BounceEffect</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetOverTrashbinFeedbackEffect</confml:key><confml:value>ItemMoveOver</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetDropToTrashbinFeedbackEffect</confml:key><confml:value>ItemDrop</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>shortcutWidgetTapFeedbackEffect</confml:key><confml:value>BasicItem</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetMoveBlockedFeedbackEffect</confml:key><confml:value>Basic</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>clockWidgetTapFeedbackEffect</confml:key><confml:value>BasicItem</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>widgetSnappingFeedbackEffect</confml:key><confml:value>ItemMoveOver</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>isSnapEnabled</confml:key><confml:value>true</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>snapTimeout</confml:key><confml:value>100</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>snapForce</confml:key><confml:value>30</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>snapGap</confml:key><confml:value>6</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>pageMargin</confml:key><confml:value>0</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>snapLineFadeInDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>snapLineFadeOutDuration</confml:key><confml:value>100</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>isSnapEffectsEnabled</confml:key><confml:value>true</confml:value></confml:Configuration>
+      <confml:Configuration><confml:key>sceneType</confml:key><confml:value>PageWallpapers</confml:value></confml:Configuration>
+    </confml:HomeScreenDbSettings>
+  </confml:data>
+</confml:configuration>
--- a/homescreenapp/hsapplication/conf/base/confml/homescreendb.confml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/conf/base/confml/homescreendb.confml	Wed Aug 18 09:40:07 2010 +0300
@@ -1,125 +1,127 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<confml:configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:confml="http://www.s60.com/xml/confml/2" xsi:schemaLocation="http://www.s60.com/xml/confml/2 http://www.s60.com/xml/confml/1#//confml2" name="HomeScreen database settings">
-  <confml:feature ref="HomeScreenDbSettings" name="HomeScreen database settings">
-    <confml:setting ref="Pages" mapKey="id" mapValue="id" name="Pages" type="sequence">
-      <confml:setting ref="id" name="ID" type="int"/>
-      <confml:setting ref="indexPosition" name="Index Position" type="int"/>
-    </confml:setting>
-    <confml:setting ref="Widgets" mapKey="id" mapValue="id" name="Widgets" type="sequence">
-      <confml:setting ref="id" name="ID" type="int"/>
-      <confml:setting ref="uri" name="URI" type="string"/>
-      <confml:setting ref="pageId" name="Page ID" type="selection">
-        <confml:option map="HomeScreenDbSettings/Pages"/>
-      </confml:setting>
-    </confml:setting>
-    <confml:setting ref="WidgetPresentations" name="Widget presentations" type="sequence">
-      <confml:setting ref="key" name="Key" type="string"/>
-      <confml:setting ref="x" name="X position" type="real"/>
-      <confml:setting ref="y" name="Y position" type="real"/>
-      <confml:setting ref="zValue" name="Z value" type="real"/>
-      <confml:setting ref="widgetId" name="Widget ID" type="selection">
-        <confml:option map="HomeScreenDbSettings/Widgets"/>
-      </confml:setting>
-    </confml:setting>
-    <confml:setting ref="WidgetPreferences" name="Widget preferences" type="sequence">
-      <confml:setting ref="key" name="Key" type="string"/>
-      <confml:setting ref="value" name="Value" type="string"/>
-      <confml:setting ref="widgetId" name="Widget ID" type="selection">
-        <confml:option map="HomeScreenDbSettings/Widgets"/>
-      </confml:setting>
-    </confml:setting>
-    <confml:setting ref="Configuration" name="Configuration" type="sequence">
-      <confml:setting ref="key" name="Key" type="string"/>
-      <confml:setting ref="value" name="Value" type="string"/>
-    </confml:setting>
-  </confml:feature>
-  <confml:data>
-    <confml:HomeScreenDbSettings>
-      <confml:Widgets><confml:id>1</confml:id><confml:uri>hsclockwidgetplugin</confml:uri><confml:pageId  map="HomeScreenDbSettings/Pages[@key='1']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>2</confml:id><confml:uri>hsdialerwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='1']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>3</confml:id><confml:uri>ftuhswidget</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='1']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>4</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>5</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>6</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>7</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>8</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>9</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>10</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='2']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>11</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='3']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>12</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='3']"></confml:pageId></confml:Widgets>
-      <confml:Widgets><confml:id>13</confml:id><confml:uri>hsshortcutwidgetplugin</confml:uri><confml:pageId map="HomeScreenDbSettings/Pages[@key='3']"></confml:pageId></confml:Widgets>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>landscape</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>136</confml:x><confml:y>276</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='2']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>landscape</confml:key><confml:x>136</confml:x><confml:y>176</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='2']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>400</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='3']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>landscape</confml:key><confml:x>300</confml:x><confml:y>150</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='3']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='4']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>100</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='5']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>185</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='6']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>270</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='7']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>185</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='8']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>100</confml:x><confml:y>185</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='9']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>185</confml:x><confml:y>185</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='10']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>15</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='11']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>100</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='12']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPresentations><confml:key>portrait</confml:key><confml:x>185</confml:x><confml:y>80</confml:y><confml:zValue>0.0</confml:zValue><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='13']"></confml:widgetId></confml:WidgetPresentations>
-      <confml:WidgetPreferences><confml:key>clockType</confml:key><confml:value>Analog</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x20022EF9</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='4']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x10005901</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='5']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x20029F80</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='6']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x2001FE79</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='7']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x10207C62</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='8']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x10005951</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='9']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x20025FD9</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='10']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x102828D6</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='11']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x101FB751</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='12']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:WidgetPreferences><confml:key>uid</confml:key><confml:value>0x100059EE</confml:value><confml:widgetId map="HomeScreenDbSettings/Widgets[@key='13']"></confml:widgetId></confml:WidgetPreferences>
-      <confml:Pages><confml:id>1</confml:id><confml:indexPosition>0</confml:indexPosition></confml:Pages>
-      <confml:Pages><confml:id>2</confml:id><confml:indexPosition>1</confml:indexPosition></confml:Pages>
-      <confml:Pages><confml:id>3</confml:id><confml:indexPosition>2</confml:indexPosition></confml:Pages>
-      <confml:Configuration><confml:key>bounceEffect</confml:key><confml:value>20</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetTapAndHoldTimeout</confml:key><confml:value>500</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>sceneTapAndHoldTimeout</confml:key><confml:value>500</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangeAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangeZoneAnimationDuration</confml:key><confml:value>800</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangeZoneReverseAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageRemovedAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>newPageAddedAnimationDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetDragEffectDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetDropEffectDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>defaultPageId</confml:key><confml:value>1</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>maximumPageCount</confml:key><confml:value>8</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>isShortcutLabelVisible</confml:key><confml:value>true</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>bounceFeedbackEffectDistance</confml:key><confml:value>3</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangePanDistanceInPixels</confml:key><confml:value>120</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>tapAndHoldDistance</confml:key><confml:value>16</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangeZoneWidth</confml:key><confml:value>60</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageIndicatorSpacing</confml:key><confml:value>8</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>maximumWidgetHeight</confml:key><confml:value>39</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>maximumWidgetWidth</confml:key><confml:value>48</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>minimumWidgetHeight</confml:key><confml:value>8.75</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>minimumWidgetWidth</confml:key><confml:value>8.75</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangePanDistance</confml:key><confml:value>17.91</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>pageChangeFeedbackEffect</confml:key><confml:value>Sensitive</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetPickFeedbackEffect</confml:key><confml:value>ItemPick</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetDropFeedbackEffect</confml:key><confml:value>ItemDrop</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetRepositionFeedbackEffect</confml:key><confml:value>BounceEffect</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetOverTrashbinFeedbackEffect</confml:key><confml:value>ItemMoveOver</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetDropToTrashbinFeedbackEffect</confml:key><confml:value>ItemDrop</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>shortcutWidgetTapFeedbackEffect</confml:key><confml:value>BasicItem</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetMoveBlockedFeedbackEffect</confml:key><confml:value>Basic</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>clockWidgetTapFeedbackEffect</confml:key><confml:value>BasicItem</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>widgetSnappingFeedbackEffect</confml:key><confml:value>ItemMoveOver</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>isSnapEnabled</confml:key><confml:value>true</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>snapTimeout</confml:key><confml:value>100</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>snapForce</confml:key><confml:value>30</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>snapGap</confml:key><confml:value>6</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>snapBorderGap</confml:key><confml:value>0</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>snapLineFadeInDuration</confml:key><confml:value>200</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>snapLineFadeOutDuration</confml:key><confml:value>100</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>isSnapEffectsEnabled</confml:key><confml:value>true</confml:value></confml:Configuration>
-      <confml:Configuration><confml:key>sceneType</confml:key><confml:value>PageWallpapers</confml:value></confml:Configuration>
-    </confml:HomeScreenDbSettings>
-  </confml:data>
-</confml:configuration>
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:confml="http://www.s60.com/xml/confml/2" xsi:schemaLocation="http://www.s60.com/xml/confml/2 http://www.s60.com/xml/confml/1#//confml2" name="HomeScreen database settings">
+  <feature ref="HomeScreenDbSettings" name="HomeScreen database settings">
+    <setting ref="Pages" mapKey="id" mapValue="id" name="Pages" type="sequence">
+      <setting ref="id" name="ID" type="int"/>
+      <setting ref="indexPosition" name="Index Position" type="int"/>
+    </setting>
+    <setting ref="Widgets" mapKey="id" mapValue="id" name="Widgets" type="sequence">
+      <setting ref="id" name="ID" type="int"/>
+      <setting ref="uri" name="URI" type="string"/>
+      <setting ref="pageId" name="Page ID" type="selection">
+        <option map="HomeScreenDbSettings/Pages"/>
+      </setting>
+    </setting>
+    <setting ref="WidgetPresentations" name="Widget presentations" type="sequence">
+      <setting ref="key" name="Key" type="string"/>
+      <setting ref="x" name="X position" type="real"/>
+      <setting ref="y" name="Y position" type="real"/>
+      <setting ref="zValue" name="Z value" type="real"/>
+      <setting ref="widgetId" name="Widget ID" type="selection">
+        <option map="HomeScreenDbSettings/Widgets"/>
+      </setting>
+    </setting>
+    <setting ref="WidgetPreferences" name="Widget preferences" type="sequence">
+      <setting ref="key" name="Key" type="string"/>
+      <setting ref="value" name="Value" type="string"/>
+      <setting ref="widgetId" name="Widget ID" type="selection">
+        <option map="HomeScreenDbSettings/Widgets"/>
+      </setting>
+    </setting>
+    <setting ref="Configuration" name="Configuration" type="sequence">
+      <setting ref="key" name="Key" type="string"/>
+      <setting ref="value" name="Value" type="string"/>
+    </setting>
+  </feature>
+  <data>
+    <HomeScreenDbSettings>
+      <Widgets><id>1</id><uri>hsclockwidgetplugin</uri><pageId  map="HomeScreenDbSettings/Pages[@key='1']"></pageId></Widgets>
+      <Widgets><id>2</id><uri>dialerwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='1']"></pageId></Widgets>
+      <Widgets><id>3</id><uri>ftuhswidget</uri><pageId map="HomeScreenDbSettings/Pages[@key='1']"></pageId></Widgets>
+      <Widgets><id>4</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>5</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>6</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>7</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>8</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>9</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>10</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='2']"></pageId></Widgets>
+      <Widgets><id>11</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='3']"></pageId></Widgets>
+      <Widgets><id>12</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='3']"></pageId></Widgets>
+      <Widgets><id>13</id><uri>hsshortcutwidgetplugin</uri><pageId map="HomeScreenDbSettings/Pages[@key='3']"></pageId></Widgets>
+      <WidgetPresentations><key>portrait</key><x>15</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>landscape</key><x>15</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>136</x><y>276</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='2']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>landscape</key><x>136</x><y>176</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='2']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>15</x><y>400</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='3']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>landscape</key><x>300</x><y>150</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='3']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>15</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='4']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>100</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='5']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>185</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='6']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>270</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='7']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>15</x><y>185</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='8']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>100</x><y>185</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='9']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>185</x><y>185</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='10']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>15</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='11']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>100</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='12']"></widgetId></WidgetPresentations>
+      <WidgetPresentations><key>portrait</key><x>185</x><y>80</y><zValue>0.0</zValue><widgetId map="HomeScreenDbSettings/Widgets[@key='13']"></widgetId></WidgetPresentations>
+      <WidgetPreferences><key>clockType</key><value>Analog</value><widgetId map="HomeScreenDbSettings/Widgets[@key='1']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x20022EF9</value><widgetId map="HomeScreenDbSettings/Widgets[@key='4']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x10005901</value><widgetId map="HomeScreenDbSettings/Widgets[@key='5']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x20029F80</value><widgetId map="HomeScreenDbSettings/Widgets[@key='6']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x2001FE79</value><widgetId map="HomeScreenDbSettings/Widgets[@key='7']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x10207C62</value><widgetId map="HomeScreenDbSettings/Widgets[@key='8']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x10005951</value><widgetId map="HomeScreenDbSettings/Widgets[@key='9']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x20025FD9</value><widgetId map="HomeScreenDbSettings/Widgets[@key='10']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x102828D6</value><widgetId map="HomeScreenDbSettings/Widgets[@key='11']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x101FB751</value><widgetId map="HomeScreenDbSettings/Widgets[@key='12']"></widgetId></WidgetPreferences>
+      <WidgetPreferences><key>uid</key><value>0x100059EE</value><widgetId map="HomeScreenDbSettings/Widgets[@key='13']"></widgetId></WidgetPreferences>
+      <Pages><id>1</id><indexPosition>0</indexPosition></Pages>
+      <Pages><id>2</id><indexPosition>1</indexPosition></Pages>
+      <Pages><id>3</id><indexPosition>2</indexPosition></Pages>
+      <Configuration><key>bounceEffect</key><value>20</value></Configuration>
+      <Configuration><key>widgetTapAndHoldTimeout</key><value>500</value></Configuration>
+      <Configuration><key>sceneTapAndHoldTimeout</key><value>500</value></Configuration>
+      <Configuration><key>pageChangeAnimationDuration</key><value>200</value></Configuration>
+      <Configuration><key>pageChangeZoneAnimationDuration</key><value>800</value></Configuration>
+      <Configuration><key>pageChangeZoneReverseAnimationDuration</key><value>200</value></Configuration>
+      <Configuration><key>pageRemovedAnimationDuration</key><value>200</value></Configuration>
+      <Configuration><key>newPageAddedAnimationDuration</key><value>200</value></Configuration>
+      <Configuration><key>widgetDragEffectDuration</key><value>200</value></Configuration>
+      <Configuration><key>widgetDropEffectDuration</key><value>200</value></Configuration>
+      <Configuration><key>defaultPageId</key><value>1</value></Configuration>
+      <Configuration><key>maximumPageCount</key><value>8</value></Configuration>
+      <Configuration><key>isShortcutLabelVisible</key><value>true</value></Configuration>
+      <Configuration><key>bounceFeedbackEffectDistance</key><value>3</value></Configuration>
+      <Configuration><key>pageChangePanDistanceInPixels</key><value>120</value></Configuration>
+      <Configuration><key>tapAndHoldDistance</key><value>16</value></Configuration>
+      <Configuration><key>pageChangeZoneWidth</key><value>60</value></Configuration>
+      <Configuration><key>pageIndicatorSpacing</key><value>8</value></Configuration>
+      <Configuration><key>maximumWidgetHeight</key><value>39</value></Configuration>
+      <Configuration><key>maximumWidgetWidth</key><value>48</value></Configuration>
+      <Configuration><key>minimumWidgetHeight</key><value>8.75</value></Configuration>
+      <Configuration><key>minimumWidgetWidth</key><value>8.75</value></Configuration>
+      <Configuration><key>pageChangePanDistance</key><value>17.91</value></Configuration>
+      <Configuration><key>pageChangeFeedbackEffect</key><value>Sensitive</value></Configuration>
+      <Configuration><key>widgetPickFeedbackEffect</key><value>ItemPick</value></Configuration>
+      <Configuration><key>widgetDropFeedbackEffect</key><value>ItemDrop</value></Configuration>
+      <Configuration><key>widgetRepositionFeedbackEffect</key><value>BounceEffect</value></Configuration>
+      <Configuration><key>widgetOverTrashbinFeedbackEffect</key><value>ItemMoveOver</value></Configuration>
+      <Configuration><key>widgetDropToTrashbinFeedbackEffect</key><value>ItemDrop</value></Configuration>
+      <Configuration><key>shortcutWidgetTapFeedbackEffect</key><value>BasicItem</value></Configuration>
+      <Configuration><key>widgetMoveBlockedFeedbackEffect</key><value>Basic</value></Configuration>
+      <Configuration><key>clockWidgetTapFeedbackEffect</key><value>BasicItem</value></Configuration>
+      <Configuration><key>widgetSnappingFeedbackEffect</key><value>ItemMoveOver</value></Configuration>
+      <Configuration><key>isSnapEnabled</key><value>true</value></Configuration>
+      <Configuration><key>snapTimeout</key><value>100</value></Configuration>
+      <Configuration><key>snapForce</key><value>30</value></Configuration>
+      <Configuration><key>snapGap</key><value>6</value></Configuration>
+      <Configuration><key>pageMargin</key><value>0</value></Configuration>
+      <Configuration><key>snapLineFadeInDuration</key><value>200</value></Configuration>
+      <Configuration><key>snapLineFadeOutDuration</key><value>100</value></Configuration>
+      <Configuration><key>isSnapEffectsEnabled</key><value>true</value></Configuration>
+      <Configuration><key>sceneType</key><value>PageWallpapers</value></Configuration>
+      <Configuration><key>bounceAnimationEasingCurve</key><value>Linear</value></Configuration>
+      <Configuration><key>pageChangeAnimationEasingCurve</key><value>Linear</value></Configuration>      
+    </HomeScreenDbSettings>
+  </data>
+</configuration>
--- a/homescreenapp/hsapplication/conf/base/implml/homescreendb.implml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/conf/base/implml/homescreendb.implml	Wed Aug 18 09:40:07 2010 +0300
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <container xmlns="http://www.symbianfoundation.org/xml/implml/1">
-    <tag name="target" value="rofs3"/>
-    
+  <tag name="target" value="rofs2"/> 
+  <tag name="target" value="rofs3"/> 
+  
     <!--
     Override the setting refs so that modifying HomeScreenDbSettings
     causes the execution of both the TemplateML and CommandML
@@ -15,6 +16,10 @@
     
     <!-- TemplateML implementation to create the .sql files -->
     <templateml xmlns="http://www.s60.com/xml/templateml/1">
+    
+    <!-- just to create empty folder -->
+    <output dir="content/private/20022f35/" file="homescreen.db" encoding="UTF-8"></output>
+    
         <output dir="private/20022f35/sql/" file="create.sql" encoding="UTF-8">
             <template file="homescreendb_templates/create.sql"></template>
         </output>
@@ -26,13 +31,13 @@
     <!-- CommandML implementation to create the database using the .sql files -->
     <commandml xmlns="http://www.s60.com/xml/commandml/1">
         <command executable="sqlite3" shell="true" cwd="%CONE_OUT_ABSOLUTE%/private/20022f35/sql">
-            <argument value='../homescreen.db ".read create.sql"'/>
+            <argument value='%CONE_OUT_ABSOLUTE%/content/private/20022f35/homescreen.db ".read create.sql"'/>
         </command>
         <command executable="sqlite3" shell="true" cwd="%CONE_OUT_ABSOLUTE%/private/20022f35/sql">
-            <argument value='../homescreen.db ".genfkey --exec"'/>
+            <argument value='%CONE_OUT_ABSOLUTE%/content/private/20022f35/homescreen.db ".genfkey --exec"'/>
         </command>
         <command executable="sqlite3" shell="true" cwd="%CONE_OUT_ABSOLUTE%/private/20022f35/sql">
-            <argument value='../homescreen.db ".read fill.sql"'/>
+            <argument value='%CONE_OUT_ABSOLUTE%/content/private/20022f35/homescreen.db ".read fill.sql"'/>
         </command>
     </commandml>
 </container>
\ No newline at end of file
--- a/homescreenapp/hsapplication/hsapplication.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/hsapplication.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -14,10 +14,14 @@
 # Description:
 #
 
-HEADERS += ./inc/hshomescreen.h
+HEADERS += ./inc/hshomescreen.h \
+           ./inc/hsstatemachine.h
 SOURCES += ./src/hshomescreen.cpp \
+           ./src/hsstatemachine.cpp \        
            ./src/main.cpp
 symbian:{
-    HEADERS += ./inc/hshomescreenclientserviceprovider.h
-    SOURCES += ./src/hshomescreenclientserviceprovider.cpp 
+    HEADERS += ./inc/hshomescreenclientserviceprovider.h \
+               ./inc/hsrecoverymanager.h
+    SOURCES += ./src/hshomescreenclientserviceprovider.cpp \
+               ./src/hsrecoverymanager.cpp
 }
--- a/homescreenapp/hsapplication/hsapplication.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/hsapplication.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -18,16 +18,17 @@
 
 include(../common.pri)
 
-LIBS += -lhsutils -lhsdomainmodel
 CONFIG += console
 
-QT += xml
+#QT += xml
 
 CONFIG += hb mobility
-MOBILITY = serviceframework
+MOBILITY = serviceframework publishsubscribe
 
 fute:DEFINES += FUTE
 
+new_short:DEFINES += HSWIDGETORGANIZER_ALGORITHM
+
 DEPENDPATH += . \
               ./inc \
               ./src
@@ -40,7 +41,8 @@
 TRANSLATIONS = homescreen.ts
 
 LIBS += -lhsutils \
-        -lhsdomainmodel
+        -lhsdomainmodel \
+	-lcaclient
 
 
 symbian: {
@@ -56,12 +58,12 @@
     include(hsapplication_exports_to_rom.pri)    
 
     CONFIG += service
-    LIBS +=  -lxqservice -lxqserviceutil 
+    LIBS +=  -lxqservice -lxqserviceutil -lXQKeyCapture
            
     SERVICE.FILE = ipc_service_conf.xml
 }
 
-win32: {
+!symbian: {
     include(installs_win.pri)
 }
 
--- a/homescreenapp/hsapplication/hsapplication_exports_to_rom.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/hsapplication_exports_to_rom.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -16,6 +16,7 @@
 
 # configuration file exports
 BLD_INF_RULES.prj_exports += \
+    "conf/base/confml/CI_homescreendb.confml                APP_LAYER_CONFML(CI_homescreendb.confml)" \
     "conf/base/confml/homescreendb.confml                   APP_LAYER_CONFML(homescreendb.confml)" \
     "conf/base/implml/homescreendb.implml                   APP_LAYER_CRML(homescreendb.implml)" \
     "conf/base/implml/homescreendb_templates/create.sql     APP_LAYER_CRML(homescreendb_templates/create.sql)" \
--- a/homescreenapp/hsapplication/inc/hshomescreen.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/inc/hshomescreen.h	Wed Aug 18 09:40:07 2010 +0300
@@ -53,7 +53,7 @@
     bool eventFilter(QObject *watched, QEvent *event);
 
 private:
-    void registerServicePlugins(QServiceManager &serviceManager);
+    void registerServicePlugins();
     void registerServicePlugins(const QString &root, QServiceManager &serviceManager);
 
 private slots:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplication/inc/hsrecoverymanager.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* 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:
+*
+*/
+
+#ifndef HSRECOVERYMANAGER_H
+#define HSRECOVERYMANAGER_H
+
+#include <QObject>
+#include <QTimer>
+
+#include "hstest_global.h"
+HOMESCREEN_TEST_CLASS(t_hsapplication)
+
+class HsRecoveryManager : public QObject
+{
+    Q_OBJECT
+
+public:
+    HsRecoveryManager(QObject *parent = 0);
+    ~HsRecoveryManager();
+
+    void execute();
+    
+private slots:
+    void restoreRomDatabase();
+    void resetCrashCount();
+           
+private:
+    Q_DISABLE_COPY(HsRecoveryManager)
+    int crashCount();
+    
+private:
+    QTimer mTimer;
+
+    HOMESCREEN_TEST_FRIEND_CLASS(t_hsapplication)
+};
+
+#endif // HSRECOVERYMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplication/inc/hsstatemachine.h	Wed Aug 18 09:40:07 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:  Default implementation of the home screen runtime.
+*
+*/
+
+#ifndef HSSTATEMACHINE_H
+#define HSSTATEMACHINE_H
+
+#include <QStateMachine>
+#include <qmobilityglobal.h>
+
+#ifdef Q_OS_SYMBIAN
+#include <XQKeyCapture>
+#endif
+
+#include "hstest_global.h"
+
+class HsContentService;
+QTM_BEGIN_NAMESPACE
+class QValueSpacePublisher;
+QTM_END_NAMESPACE
+
+QTM_USE_NAMESPACE
+
+HOMESCREEN_TEST_CLASS(t_hsapplication)
+
+class HsStateMachine : public QStateMachine
+{
+    Q_OBJECT
+
+public:
+    HsStateMachine(QObject *parent = 0);
+    ~HsStateMachine();
+
+signals:
+    void event_exit();
+    void event_toIdle();
+    void event_toAppLib();
+protected:
+    bool eventFilter(QObject *watched, QEvent *event);
+
+private:
+    Q_DISABLE_COPY(HsStateMachine)
+
+
+    void registerAnimations();
+    void createStatePublisher();
+    void createContentServiceParts();
+    void createStates();
+	void updatePSKeys();
+    void captureEndKey(bool enable); 
+
+private slots:
+	void onIdleStateEntered();
+	void onIdleStateExited();
+	void activityRequested(const QString &name);
+	
+
+private:
+    HsContentService *mContentService;	
+	
+	bool mHomeScreenActive;
+	bool mIdleStateActive;
+    bool mEndKeyCaptured;
+
+	QValueSpacePublisher *mPublisher;
+	
+#ifdef Q_OS_SYMBIAN
+    XQKeyCapture keyCapture;
+#endif
+    
+    HOMESCREEN_TEST_FRIEND_CLASS(t_hsapplication)
+};
+
+#endif
--- a/homescreenapp/hsapplication/installs_symbian.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/installs_symbian.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -17,21 +17,29 @@
 deploy.path = z:
 
 exports1.path = /private/20022F35
+# this database is only for winscw emulator, for HW it is generated during image creation from confml
+exports1.sources += resource/resource_emulator/homescreen.db
 exports1.sources += data/backup_registration.xml
 for(export1, exports1.sources):BLD_INF_RULES.prj_exports += "./$$export1 $$deploy.path$$exports1.path/$$basename(export1)"
 
 exports2.path = /private/20022f35/wallpapers/scene
-exports2.sources += resource/scene/default_landscape.png
-exports2.sources += resource/scene/default_portrait.png
+exports2.sources += resource/wallpapers/scene/default_landscape.png
+exports2.sources += resource/wallpapers/scene/default_portrait.png
 for(export2, exports2.sources):BLD_INF_RULES.prj_exports += "./$$export2 $$deploy.path$$exports2.path/$$basename(export2)"
 
 exports3.path = /private/20022f35/wallpapers/page
-exports3.sources += resource/page/default_landscape.png
-exports3.sources += resource/page/default_portrait.png
-exports3.sources += resource/page/1_landscape.png
-exports3.sources += resource/page/1_portrait.png
-exports3.sources += resource/page/2_landscape.png
-exports3.sources += resource/page/2_portrait.png
-exports3.sources += resource/page/3_landscape.png
-exports3.sources += resource/page/3_portrait.png
+exports3.sources += resource/wallpapers/page/default_landscape.png
+exports3.sources += resource/wallpapers/page/default_portrait.png
+exports3.sources += resource/wallpapers/page/1_landscape.png
+exports3.sources += resource/wallpapers/page/1_portrait.png
+exports3.sources += resource/wallpapers/page/2_landscape.png
+exports3.sources += resource/wallpapers/page/2_portrait.png
+exports3.sources += resource/wallpapers/page/3_landscape.png
+exports3.sources += resource/wallpapers/page/3_portrait.png
 for(export3, exports3.sources):BLD_INF_RULES.prj_exports += "./$$export3 $$deploy.path$$exports3.path/$$basename(export3)"
+
+exports4.path = /private/20022f35/wallpapers/originals
+exports4.sources += resource/wallpapers/page/originals/car.png
+exports4.sources += resource/wallpapers/page/originals/shapes.png
+exports4.sources += resource/wallpapers/page/originals/shoes.png
+for(export4, exports4.sources):BLD_INF_RULES.prj_exports += "./$$export4 $$deploy.path$$exports4.path/$$basename(export4)"
--- a/homescreenapp/hsapplication/installs_win.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/installs_win.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -16,9 +16,9 @@
 
 kqtihswallpapers.CONFIG += no_build
 kqtihswallpapers.path = $$DESTDIR/resource/kqtihswallpapers
-kqtihswallpapers.files = ./resource/bg_1.png \
-                         ./resource/bg_2.png \
-                         ./resource/bg_3.png
+kqtihswallpapers.files = ./resource/wallpapers/page/originals/car.png \
+                         ./resource/wallpapers/page/originals/shapes.png \
+                         ./resource/wallpapers/page/originals/shoes.png
 
 homescreendb.CONFIG += no_build
 homescreendb.path = $$DESTDIR/private/20022f35
@@ -26,19 +26,19 @@
 
 scenewallpapers.CONFIG += no_build
 scenewallpapers.path = $$DESTDIR/private/20022f35/wallpapers/scene
-scenewallpapers.files = ./resource/scene/default_landscape.png \
-                   ./resource/scene/default_portrait.png
+scenewallpapers.files = ./resource/wallpapers/scene/default_landscape.png \
+                        ./resource/wallpapers/scene/default_portrait.png
 
 pagewallpapers.CONFIG += no_build
 pagewallpapers.path = $$DESTDIR/private/20022f35/wallpapers/page
-pagewallpapers.files = ./resource/page/default_landscape.png \
-                       ./resource/page/default_portrait.png \
-                       ./resource/page/1_portrait.png \
-                       ./resource/page/1_landscape.png \
-                       ./resource/page/2_portrait.png \
-                       ./resource/page/2_landscape.png \
-                       ./resource/page/3_portrait.png \
-                       ./resource/page/3_landscape.png
+pagewallpapers.files = ./resource/wallpapers/page/default_landscape.png \
+                       ./resource/wallpapers/page/default_portrait.png \
+                       ./resource/wallpapers/page/1_portrait.png \
+                       ./resource/wallpapers/page/1_landscape.png \
+                       ./resource/wallpapers/page/2_portrait.png \
+                       ./resource/wallpapers/page/2_landscape.png \
+                       ./resource/wallpapers/page/3_portrait.png \
+                       ./resource/wallpapers/page/3_landscape.png
 
 INSTALLS += kqtihswallpapers homescreendb scenewallpapers pagewallpapers
 PRE_TARGETDEPS += install_kqtihswallpapers install_homescreendb install_scenewallpapers install_pagewallpapers
Binary file homescreenapp/hsapplication/resource/bg_1.png has changed
Binary file homescreenapp/hsapplication/resource/bg_2.png has changed
Binary file homescreenapp/hsapplication/resource/bg_3.png has changed
Binary file homescreenapp/hsapplication/resource/page/1_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/page/1_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/page/2_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/page/2_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/page/3_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/page/3_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/page/default_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/page/default_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/resource_emulator/homescreen.db has changed
Binary file homescreenapp/hsapplication/resource/resource_win/homescreen.db has changed
Binary file homescreenapp/hsapplication/resource/scene/default_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/scene/default_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/1_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/1_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/2_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/2_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/3_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/3_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/default_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/default_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/originals/car.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/originals/shapes.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/page/originals/shoes.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/scene/default_landscape.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/scene/default_portrait.png has changed
Binary file homescreenapp/hsapplication/resource/wallpapers/scene/originals/kites.png has changed
--- a/homescreenapp/hsapplication/src/hshomescreen.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/src/hshomescreen.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -26,6 +26,7 @@
 
 #include "hshomescreen.h"
 #include "hstest_global.h"
+#include "hsstatemachine.h"
 #ifdef Q_OS_SYMBIAN
 #include "hshomescreenclientserviceprovider.h"
 #endif
@@ -35,8 +36,7 @@
     \class HsHomeScreen
     \ingroup group_hsapplication
     \brief Homescreen application main class.
-    Loads a runtime from a runtime provider plugin. Manages
-    the state machine execution.
+    Manages the state machine execution.
 */
 
 /*!
@@ -52,34 +52,17 @@
 {
     HSTEST_FUNC_ENTRY("HS::HsHomeScreen::HsHomeScreen");
 
-    QServiceManager serviceManager;
-
-    registerServicePlugins(serviceManager);
+    registerServicePlugins();
     
-    QServiceFilter filter("com.nokia.symbian.IHomeScreenRuntime");
-    QList<QServiceInterfaceDescriptor> interfaces = serviceManager.findInterfaces(filter);
-
-    if (interfaces.isEmpty()) {
-        emit exit();
-        return;
-    }
+    mRuntime = new HsStateMachine(this);
 
-    QObject *object = serviceManager.loadInterface(interfaces.first().interfaceName());
-    mRuntime = qobject_cast<QStateMachine *>(object);
-
-    if (mRuntime) {
-        mRuntime->setParent(this);
-        connect(mRuntime, SIGNAL(started()), SLOT(onRuntimeStarted()));
-        connect(mRuntime, SIGNAL(stopped()), SLOT(onRuntimeStopped()));
-        hbInstance->allMainWindows().first()->installEventFilter(this);
+    connect(mRuntime, SIGNAL(started()), SLOT(onRuntimeStarted()));
+    connect(mRuntime, SIGNAL(stopped()), SLOT(onRuntimeStopped()));
+    hbInstance->allMainWindows().first()->installEventFilter(this);
 #ifdef Q_OS_SYMBIAN
-        mHomeScreenClientServiceProvider = new HsHomeScreenClientServiceProvider;
-        mHomeScreenClientServiceProvider->setParent(this);
+    mHomeScreenClientServiceProvider = new HsHomeScreenClientServiceProvider;
+    mHomeScreenClientServiceProvider->setParent(this);
 #endif
-    } else {
-        delete object;
-        emit exit();
-    }
 
     HSTEST_FUNC_EXIT("HS::HsHomeScreen::HsHomeScreen");
 }
@@ -97,26 +80,21 @@
 */
 
 /*!
-    Starts the runtime.
+    Starts the state machine.
 */
 void HsHomeScreen::start()
 {
     HSTEST_FUNC_ENTRY("HS::HsHomeScreen::start");
-    if (mRuntime) {
-        mRuntime->start();
-    } else {
-        HSTEST_FUNC_EXIT("HS::HsHomeScreen::start, mRuntime not created, exit application");
-        emit exit();
-    }
+    mRuntime->start();
     HSTEST_FUNC_EXIT("HS::HsHomeScreen::start");
 }
 
 /*!
-    Stops the runtime.
+    Stops the state machine.
 */
 void HsHomeScreen::stop()
 {
-	if (mRuntime && mRuntime->isRunning()) {
+	if (mRuntime->isRunning()) {
         QEventLoop eventLoop;
         connect(mRuntime, SIGNAL(finished()), &eventLoop, SLOT(quit()));
         QMetaObject::invokeMethod(mRuntime, "event_exit", Qt::QueuedConnection);
@@ -137,14 +115,14 @@
 }
 
 /*!
-    Called after the runtime has started.
+    Called after the state machine has started.
 */
 void HsHomeScreen::onRuntimeStarted()
 {
 }
 
 /*!
-    Called after the runtime has stopped.
+    Called after the state machine has stopped.
 */
 void HsHomeScreen::onRuntimeStopped()
 {
@@ -154,13 +132,15 @@
 /*!
     Registers service plugins pre-installed on the device.
 */
-void HsHomeScreen::registerServicePlugins(QServiceManager &serviceManager)
-{
+void HsHomeScreen::registerServicePlugins()
+{    
     HSTEST_FUNC_ENTRY("HS::HsHomeScreen::registerServicePlugins()");
+    
+    QServiceManager serviceManager;
+    
     QStringList pluginPaths;
     
-    pluginPaths << "private/20022F35";    
-    pluginPaths << "hsresources/plugins";
+    pluginPaths << "private/20022F35";
 
     QFileInfoList drives = QDir::drives();
     foreach(const QString pluginPath, pluginPaths) {
@@ -182,6 +162,12 @@
     HSTEST_FUNC_EXIT("HS::HsHomeScreen::registerServicePlugins()");
 }
 
+#ifdef COVERAGE_MEASUREMENT 
+#ifndef Q_OS_SYMBIAN 
+#pragma CTC SKIP
+#endif // Q_OS_SYMBIAN
+#endif //COVERAGE_MEASUREMENT
+
 /*!
     Recursively registers service plugins starting from given /a root
     directory. All directories containing plugins are added to
@@ -214,3 +200,9 @@
     }
     HSTEST_FUNC_EXIT("HS::HsHomeScreen::registerServicePlugins(const QString &)");
 }
+
+#ifdef COVERAGE_MEASUREMENT
+#ifndef Q_OS_SYMBIAN 
+#pragma CTC ENDSKIP
+#endif // Q_OS_SYMBIAN
+#endif //COVERAGE_MEASUREMENT
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplication/src/hsrecoverymanager.cpp	Wed Aug 18 09:40:07 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:
+*
+*/
+
+#include <e32property.h>
+
+#include <QFile>
+
+#include "hsrecoverymanager.h"
+
+const TInt KPSCategoryUid(0x20022F36);
+const TInt KPSCrashCountKey(1);
+const int KCrashCountThreshold(3);
+const int KResetCrashCountInterval(60000);
+
+/*!
+    \class HsRecoveryManager
+    \ingroup group_hsapplication
+    \brief Used during homescreen startup for recovering from possible crash situations.
+*/
+
+/*!
+    Constructs a new recovery manager with the given \a parent item.
+*/
+HsRecoveryManager::HsRecoveryManager(QObject *parent)
+  : QObject(parent)
+{    
+    mTimer.setInterval(KResetCrashCountInterval);
+    mTimer.setSingleShot(true);
+    connect(&mTimer, SIGNAL(timeout()), SLOT(resetCrashCount()));
+}
+
+/*!
+    Destructor.
+*/
+HsRecoveryManager::~HsRecoveryManager()
+{
+}
+
+/*!
+    Executes this recovery manager. If crash count exceeds the
+    threshold, the ROM configuration is selected. Otherwise,
+    the existing one is used.
+*/
+void HsRecoveryManager::execute()
+{
+    int count = crashCount();    
+    if (KCrashCountThreshold <= count) {
+        restoreRomDatabase();
+        resetCrashCount();
+        return;
+    }
+    if (0 < count) {
+        mTimer.start();
+    }
+}
+
+/*!
+    Restores the ROM database to c: drive.
+*/
+void HsRecoveryManager::restoreRomDatabase()
+{
+    // If exists, remove the database from c:
+    QFile file("c:/private/20022f35/homescreen.db");
+    if (file.exists()) {        
+        file.remove();
+    }          
+    // Copy the rom database to c: and set permissions.
+    file.setFileName("z:/private/20022f35/homescreen.db");     
+    file.copy("c:/private/20022f35/homescreen.db");
+    file.setFileName("c:/private/20022f35/homescreen.db");
+    file.setPermissions(QFile::ReadOwner | QFile::WriteOwner);
+}
+
+/*!
+    Resets the crash count to zero.
+*/
+void HsRecoveryManager::resetCrashCount()
+{
+    RProperty::Set(TUid::Uid(KPSCategoryUid), KPSCrashCountKey, 0); 
+}
+
+/*!
+    Returns the current crash count.
+*/
+int HsRecoveryManager::crashCount()
+{
+    TInt count = 0;
+    RProperty::Get(TUid::Uid(KPSCategoryUid), KPSCrashCountKey, count);    
+    return count;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplication/src/hsstatemachine.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,426 @@
+/*
+* 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:  Default implementation of the home state machine.
+*
+*/
+
+#include <QState>
+#include <QFinalState>
+#include <QHistoryState>
+#include <QSignalTransition>
+#include <QKeyEventTransition>
+#include <QKeyEvent>
+
+#include <qvaluespacepublisher.h>
+#include <qservicemanager.h>
+#include <qservicefilter.h>
+#include <qserviceinterfacedescriptor.h>
+
+#include <HbApplication>
+#include <HbActivityManager>
+#include <HbInstance>
+#include <HbIconAnimationManager>
+#include <HbIconAnimationDefinition>
+
+#include "hsmenueventfactory.h"
+#include "homescreendomainpskeys.h"
+#include "hsstatemachine.h"
+#include "hsdatabase.h"
+#include "hscontentservice.h"
+#include "hsshortcutservice.h"
+#include "hsmenueventtransition.h"
+#include "hswidgetpositioningonorientationchange.h"
+#include "hswidgetpositioningonwidgetadd.h"
+#include "hsconfiguration.h"
+#include "hstest_global.h"
+#include "hswidgetpositioningonwidgetmove.h"
+
+QTM_USE_NAMESPACE
+#define hbApp qobject_cast<HbApplication*>(qApp)
+
+namespace
+{
+    const char KHsRootStateInterface[] = "com.nokia.homescreen.state.HsRootState";
+    const char KHsLoadSceneStateInterface[] = "com.nokia.homescreen.state.HsLoadSceneState";
+    const char KHsIdleStateInterface[] = "com.nokia.homescreen.state.HsIdleState";
+    const char KHsAppLibraryStateInterface[] = "com.nokia.homescreen.state.HsAppLibraryState";
+    const char KHsMenuWorkerStateInterface[] = "com.nokia.homescreen.state.HsMenuWorkerState";
+    const char KHsBacupRestoreStateInterface[] = "com.nokia.homescreen.state.HsBackupRestoreState";
+}
+
+
+/*!
+    \class HsStateMachine
+    \ingroup group_hsstatemachine
+    \brief Default implementation of the home screen state machine.
+    Creates an execution context (EC) and populates it with
+    runtime services. States are loaded from state plugins.
+    Each state is given an access to the EC. States
+    are added to a state machine. Finally, the state machine
+    is started.
+*/
+
+/*!
+    Constructs state machine with \a parent as the parent object.
+*/
+HsStateMachine::HsStateMachine(QObject *parent)
+    : QStateMachine(parent),
+      mContentService(0),	  
+      mHomeScreenActive(false),
+      mIdleStateActive(false),
+      mEndKeyCaptured(false),
+      mPublisher(NULL)
+#ifdef Q_OS_SYMBIAN
+	  ,keyCapture()
+#endif
+{
+    HSTEST_FUNC_ENTRY("HS::HsStateMachine::HsStateMachine");
+
+    HsDatabase *db = new HsDatabase(QCoreApplication::instance());
+    db->setConnectionName("homescreen.dbc");
+#ifdef Q_OS_SYMBIAN
+    db->setDatabaseName("c:/private/20022f35/homescreen.db");
+#else
+    db->setDatabaseName("private/20022f35/homescreen.db");
+#endif    
+    db->open();
+    HsDatabase::setInstance(db);
+
+    HsConfiguration::setInstance(new HsConfiguration(QCoreApplication::instance()));
+    HsConfiguration::instance()->load();
+            
+    HsWidgetPositioningOnOrientationChange::setInstance(
+        new HsAdvancedWidgetPositioningOnOrientationChange);
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    HsWidgetPositioningOnWidgetAdd::setInstance(
+        new HsWidgetOrganizer);
+#else
+    HsWidgetPositioningOnWidgetAdd::setInstance(
+        new HsAnchorPointInBottomRight);
+#endif
+
+    HsWidgetPositioningOnWidgetMove::setInstance(
+        new HsSnapToLines);
+
+    registerAnimations();
+
+    createStatePublisher();
+    createContentServiceParts();
+    createStates();    
+
+    // create the instance so that singleton is accessible from elsewhere
+    HsShortcutService::instance(this);
+
+    QCoreApplication::instance()->installEventFilter(this);
+
+    if (hbApp) { // Qt test framework uses QApplication.
+        connect(hbApp->activityManager(), SIGNAL(activityRequested(QString)), 
+                this, SLOT(activityRequested(QString)));
+    }
+    HSTEST_FUNC_EXIT("HS::HsStateMachine::HsStateMachine");
+}
+
+/*!
+    Destructor.
+*/
+HsStateMachine::~HsStateMachine()
+{
+    HsWidgetPositioningOnOrientationChange::setInstance(0);
+    HsWidgetPositioningOnWidgetAdd::setInstance(0);
+    HsWidgetPositioningOnWidgetMove::setInstance(0);
+    delete mPublisher;
+}
+
+/*!
+    \fn void HsStateMachine::stopStateMachine()
+    Emission of this signal initiates a transition to the final state.
+*/
+
+/*!
+    \copydoc QObject::eventFilter(QObject *watched, QEvent *event)
+*/
+bool HsStateMachine::eventFilter(QObject *watched, QEvent *event)
+{
+    Q_UNUSED(watched);
+
+    switch (event->type()) {
+        case QEvent::ApplicationActivate:
+            qDebug() << "HsStateMachine::eventFilter: QEvent::ApplicationActivate";
+            mHomeScreenActive = true;
+            updatePSKeys();
+            break;
+        case QEvent::ApplicationDeactivate:
+            qDebug() << "HsStateMachine::eventFilter: QEvent::ApplicationDeactivate";
+            mHomeScreenActive = false;
+            updatePSKeys();
+            break;
+        default:
+            break;
+    }
+        
+    bool result =  QStateMachine::eventFilter(watched, event);    
+    if (event->type() == QEvent::KeyPress ) {
+        QKeyEvent* ke = static_cast<QKeyEvent *>(event);                 
+        result = (ke->key() == Qt::Key_Home);
+    }
+    return result;
+}
+
+
+/*!
+    Registers framework animations.
+*/
+void HsStateMachine::registerAnimations()
+{
+    HbIconAnimationManager *manager = HbIconAnimationManager::global();
+    manager->addDefinitionFile(QLatin1String("qtg_anim_loading.axml"));
+}
+
+/*!
+    Creates Home screen state publisher.
+*/
+void HsStateMachine::createStatePublisher()
+{
+    mPublisher = new QValueSpacePublisher(QValueSpace::PermanentLayer, HsStatePSKeyPath);
+
+    if (!mPublisher->isConnected()){
+    	// No permanent layer available
+    	mPublisher = new QValueSpacePublisher(HsStatePSKeyPath);
+    }
+
+    mPublisher->setValue(HsStatePSKeySubPath, EHomeScreenInactive);
+}
+
+/*!
+    Creates content service parts.
+*/
+void HsStateMachine::createContentServiceParts()
+{
+    HSTEST_FUNC_ENTRY("HS::HsStateMachine::createContentServiceParts");
+
+    mContentService = new HsContentService(this);
+
+    HSTEST_FUNC_EXIT("HS::HsStateMachine::createContentServiceParts");
+}
+
+/*!
+    Creates states.
+*/
+void HsStateMachine::createStates()
+{
+    HSTEST_FUNC_ENTRY("HS::HsStateMachine::createStates");
+
+    QFinalState *finalState = new QFinalState();
+    addState(finalState);
+
+    QState *guiRootState = new QState();
+    addState(guiRootState);
+
+    guiRootState->addTransition(this, SIGNAL(event_exit()), finalState);
+
+    QServiceManager manager;
+
+    
+    QObject *loadSceneStateObj = manager.loadInterface(KHsLoadSceneStateInterface);
+    QState *loadSceneState = qobject_cast<QState *>(loadSceneStateObj);
+    loadSceneState->setParent(guiRootState);
+    loadSceneState->setObjectName(KHsLoadSceneStateInterface);
+
+    QObject *rootStateObj = manager.loadInterface(KHsRootStateInterface);
+    QState *rootState = qobject_cast<QState *>(rootStateObj);   
+    rootState->setParent(guiRootState);
+    rootState->setObjectName(KHsRootStateInterface);       
+
+    QObject *idleStateObj = manager.loadInterface(KHsIdleStateInterface);
+    QState *idleState = qobject_cast<QState *>(idleStateObj);
+    idleState->setParent(rootState);
+    idleState->setObjectName(KHsIdleStateInterface);
+	connect(idleState, SIGNAL(entered()), SLOT(onIdleStateEntered()));
+	connect(idleState, SIGNAL(exited()), SLOT(onIdleStateExited()));
+
+
+    //menu state
+    QState *menuParallelState = new QState(
+            QState::ParallelStates, rootState);
+    QState *menuRootState = new QState(menuParallelState);
+
+    QObject *appLibraryStateObj = manager.loadInterface(KHsAppLibraryStateInterface);
+    QState *appLibraryState = qobject_cast<QState *>(appLibraryStateObj);
+    appLibraryState->setParent(menuRootState);
+    appLibraryState->setObjectName(KHsAppLibraryStateInterface);
+    menuRootState->setInitialState(appLibraryState);
+
+    QHistoryState *historyState = new QHistoryState(rootState);
+    historyState->setDefaultState(idleState);
+    
+    loadSceneState->addTransition(
+            loadSceneState, SIGNAL(event_history()), historyState);            
+
+    QObject *menuWorkerStateObj = manager.loadInterface(KHsMenuWorkerStateInterface);
+    QState *menuWorkerState = qobject_cast<QState *>(menuWorkerStateObj);
+    menuWorkerState->setParent(menuParallelState);
+    menuWorkerState->setObjectName(KHsMenuWorkerStateInterface);
+
+    connect(appLibraryState, SIGNAL(collectionEntered()), 
+            menuWorkerState, SIGNAL(reset()));
+
+    //Backup/Restore state
+    QObject *backupRestoreStateObj = manager.loadInterface(KHsBacupRestoreStateInterface);
+    QState *backupRestoreState = qobject_cast<QState *>(backupRestoreStateObj);   
+    backupRestoreState->setParent(guiRootState);
+    backupRestoreState->setObjectName(KHsBacupRestoreStateInterface);
+    backupRestoreState->addTransition(
+            backupRestoreState, SIGNAL(event_loadScene()), loadSceneState);
+
+    // root state transitions
+    idleState->addTransition(idleState, SIGNAL(event_applicationLibrary()), menuRootState);
+    appLibraryState->addTransition(
+            appLibraryState, SIGNAL(toHomescreenState()), idleState);
+    rootState->addTransition(rootState, SIGNAL(event_backupRestore()), backupRestoreState);
+    // opening shortcut to Application Library
+    HsMenuEventTransition *idleToAppLibTransition =
+        new HsMenuEventTransition(HsMenuEvent::OpenApplicationLibrary,
+                                  idleState, appLibraryState);
+    idleState->addTransition(idleToAppLibTransition);
+
+    HsMenuEventTransition *appLibToIdleTransition =
+        new HsMenuEventTransition(
+            HsMenuEvent::OpenHomeScreen, appLibraryState, idleState);
+    appLibraryState->addTransition(appLibToIdleTransition);
+
+    HbMainWindow *window = hbInstance->allMainWindows().first();
+
+#ifndef  Q_OS_SYMBIAN   
+    // key driven transition from idle to menu
+    QKeyEventTransition *idleToMenuRootTransition =
+        new QKeyEventTransition(
+                window, QEvent::KeyPress, Qt::Key_Home);
+    idleToMenuRootTransition->setTargetState(menuRootState);
+    idleState->addTransition(idleToMenuRootTransition);
+    // key driven transition from menu to idle
+    QKeyEventTransition *menuToIdleTransition =
+        new QKeyEventTransition(
+                window, QEvent::KeyPress, Qt::Key_Home);
+    menuToIdleTransition->setTargetState(idleState);
+    menuRootState->addTransition(menuToIdleTransition);
+#endif 
+    // key driven transition from menu to idle
+    QKeyEventTransition *menuToIdleTransitionNoKey =
+        new QKeyEventTransition(
+                window, QEvent::KeyPress, Qt::Key_No);
+    menuToIdleTransitionNoKey->setTargetState(idleState);
+    menuRootState->addTransition(menuToIdleTransitionNoKey);
+    
+    // add transition to switch to idle
+    menuRootState->addTransition( this, SIGNAL(event_toIdle()), idleState);    
+    // add transition to switch to applib 
+    idleState->addTransition( this, SIGNAL(event_toAppLib()), menuRootState);
+    
+    // transitions to child states
+    // opening shortcut to a colleciton
+    QList<QState *> collectionStates =
+        appLibraryState->
+            findChildren<QState *>
+                ("homescreen.nokia.com/state/applibrarystate/collectionstate");
+    qDebug(
+        "Found %d \"collectionstate\" children for Application Library State",
+            collectionStates.count());
+    if (collectionStates.count()) {
+        HsMenuEventTransition *idleToCollectionTransition =
+            new HsMenuEventTransition(HsMenuEvent::OpenCollection,
+                                      idleState, collectionStates[0]);
+        idleState->addTransition(idleToCollectionTransition);
+    }
+
+    guiRootState->setInitialState(loadSceneState);
+    setInitialState(guiRootState);
+    
+    HSTEST_FUNC_EXIT("HS::HsStateMachine::createStates");
+}
+
+
+/*!
+    Publishes Home screen states via Publish & Subscribe.
+*/
+void HsStateMachine::updatePSKeys()
+{	
+	if (!mPublisher){
+		createStatePublisher();
+	}
+
+	if (mHomeScreenActive && mIdleStateActive){
+    	qDebug() << "HsStateMachine::updatePSKeys: EHomeScreenIdleState";
+    	mPublisher->setValue(HsStatePSKeySubPath, EHomeScreenIdleState);
+    }
+    else{
+    	qDebug() << "HsStateMachine::updatePSKeys: EHomeScreenInactive";
+    	mPublisher->setValue(HsStatePSKeySubPath, EHomeScreenInactive);
+    }	
+    
+    if (mHomeScreenActive && !mIdleStateActive) {
+        captureEndKey(true);
+    } else {
+        captureEndKey(false);
+    }
+}
+
+/*!
+    capture End key 
+*/
+void HsStateMachine::captureEndKey(bool enable) 
+{
+#ifdef Q_OS_SYMBIAN
+    if (enable && !mEndKeyCaptured) {
+        mEndKeyCaptured = true;
+        keyCapture.captureKey(Qt::Key_No);        
+    } else if (mEndKeyCaptured) {
+        mEndKeyCaptured = false;
+        keyCapture.cancelCaptureKey(Qt::Key_No);
+    }
+#endif
+}
+
+/*!
+    Called when state machine is in Idle state.
+*/
+void HsStateMachine::onIdleStateEntered()
+{
+	mIdleStateActive = true;
+	updatePSKeys();
+}
+
+/*!
+    Called when state machine leaves the Idle state.
+*/
+void HsStateMachine::onIdleStateExited()
+{
+	mIdleStateActive = false;
+	updatePSKeys();
+}
+
+/*!
+    Activity requested by another client 
+*/
+void HsStateMachine::activityRequested(const QString &name) 
+{
+    if (name == groupAppLibRecentView()) {
+        this->postEvent(
+            HsMenuEventFactory::createOpenCollectionEvent(0,
+            collectionDownloadedTypeName()));
+    } else if (name == activityHsIdleView()) {
+        emit event_toIdle();
+    } else if (name == activityAppLibMainView()) {
+        emit event_toAppLib();
+    }
+}
--- a/homescreenapp/hsapplication/src/main.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsapplication/src/main.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -36,6 +36,7 @@
 #include <e32debug.h>
 #include <apgwgnam.h>
 
+#include "hsrecoverymanager.h"
 
 void loadTranslationFilesOnSymbian(QTranslator &commonTranslator, 
                                     QTranslator &hsTranslator, 
@@ -43,6 +44,7 @@
 void copyWallpapersFromRom();
 void copyHsDatabaseFileFromRom();
 void createPrivateFolder();
+void copyWallpaperOriginalsFromRomToPhotos();
 
 /*!
     \fn setHomescreenAsSystemAppL(CEikonEnv* eikonEnv)
@@ -133,6 +135,8 @@
     
 #ifdef Q_OS_SYMBIAN
     copyHsDatabaseFileFromRom();
+    HsRecoveryManager recoveryManager;
+    recoveryManager.execute();
     copyWallpapersFromRom();
 #endif
     
@@ -203,7 +207,7 @@
         HSTEST("HS::main() - homescreen.db not in c:");
         file.setFileName("z:/private/20022f35/homescreen.db");
         if(!file.exists()) {
-            HSTEST("HS::main() - homescreen.db not in ROM!");
+            qWarning() << "HS::main() - homescreen.db not in ROM!";
         } else {
             HSTEST("HS::main() - homescreen.db found from z:");
             createPrivateFolder();
@@ -214,10 +218,12 @@
             HSTEST("HS::main() - homescreen.db copied from ROM to c:!");
             file.setFileName("c:/private/20022f35/homescreen.db");
             if(!file.setPermissions(QFile::ReadOwner | QFile::WriteOwner)) {
-                HSTEST("HS::main() - homescreen.db ReadWrite permission settings on c: failed!");
+                qWarning() << "HS::main() - homescreen.db ReadWrite permission settings on c: failed!";
             }
             HSTEST("HS::main() - homescreen.db permission set to ReadWrite!");
         }
+        // Copy wallpaper originals to C drive user data to be visible in Photos
+        copyWallpaperOriginalsFromRomToPhotos();
     }
 #ifdef __WINS__
     else if(!file.setPermissions(QFile::ReadOwner | QFile::WriteOwner)) {
@@ -280,6 +286,36 @@
 }
 
 /*!
+    \fn copyWallpaperOriginalFromRomToPhotos()
+    \ingroup group_hsapplication
+    \internal    
+    \brief Wallpaper original copier
+    Copies homescreen wallpaper originals from rom to C for Photos
+    does not exist on c: drive
+*/
+void copyWallpaperOriginalsFromRomToPhotos()
+{
+    QString targetPath("e:/data/images/wallpapers");
+    QDir dir(targetPath);
+    if(!dir.exists()) {
+        dir.mkpath(targetPath);    
+        QDir dir2("z:/private/20022f35/wallpapers/originals");
+        dir2.setFilter(QDir::Files);
+        QStringList files = dir2.entryList();
+        foreach(QString file, files) {
+            QString targetFile(targetPath + "/" + file);
+            if ( QFile::copy(dir2.absoluteFilePath(file), targetFile) ) {
+                qDebug() << "Wallpaper original copied from " << dir2.absoluteFilePath(file) << "to " << targetFile;
+            } 
+            QFile createdFile(targetFile);
+            if(!createdFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner)) {
+                qDebug() << "Read write permission set failed for wallpaper original" << targetFile;
+            }
+        }
+    }
+}
+
+/*!
     \fn loadTranslationFilesOnSymbian(QTranslator &commonTranslator, 
                                       QTranslator &hsTranslator, 
                                       QTranslator &alTranslator)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/group/hsapplicationlauncher.mmp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 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:  Makefile of hsapplicationlauncher
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET hsapplicationlauncher.exe
+
+targettype exe
+
+UID             0x1000008d 0x20022F36
+CAPABILITY      ReadDeviceData WriteDeviceData
+VENDORID        VID_DEFAULT
+SECUREID        0x20022F36
+
+EPOCHEAPSIZE	0x1000 0x100000   // 4KB - 1 MB
+EPOCSTACKSIZE	0x5000
+
+SOURCEPATH		../src
+SOURCE			hsapplicationlauncher.cpp
+SOURCE			hsprocessmonitor.cpp
+SOURCE			hsshutdownmonitor.cpp
+
+USERINCLUDE		. 
+USERINCLUDE		../inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY			euser.lib  // CBase etc
+LIBRARY			bafl.lib   // descriptors
+LIBRARY			ssmcmn.lib // state manager
+LIBRARY         centralrepository.lib
+LIBRARY         cenrepnotifhandler.lib
+
+LANG			SC
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/hsapplicationlauncher.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2010 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: Main project file for homescreen application
+#
+
+TEMPLATE = subdirs
+
+symbian: {
+    BLD_INF_RULES.prj_mmpfiles += "./group/hsapplicationlauncher.mmp"    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/inc/hsapplicationlauncher.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 1020 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: application class.
+*/
+
+#ifndef __HS_LAUNCH_
+#define __HS_LAUNCH_
+
+#include <e32base.h>
+#include <centralrepository.h>
+#include <cenrepnotifyhandler.h>
+#include "hsprocessmonitor.h"
+#include "hsshutdownmonitor.h"
+
+class t_hsapplicationlauncher;
+
+/**
+ * CHsLaunch
+ * 
+ * application class.
+ * 
+ * @since S60 5.2  
+ */
+class CHsLaunch : public CActive,
+                         MCenRepNotifyHandlerCallback,
+                         MHsProcessMonitorObserver,
+                         MHsShutdownMonitorObserver
+    {
+    public:
+        /**
+         * Create new launcher
+         *
+         * @since S60 5.2     
+         */    
+        static CHsLaunch* NewL();
+        
+        /**
+         * Destructor.
+         *
+         * @since S60 5.2     
+         */
+        virtual ~CHsLaunch();
+
+        /**
+         * Set active object to be ran
+         * 
+         * @since S60 5.2
+         */        
+        void Activate();        
+
+        /**
+         * Get application return value
+         * 
+         * @return TInt     Application return value
+         * @since S60 5.2
+         */        
+        TInt ApplicationReturnValue();      
+        
+    protected:
+        /**
+         * C++ constructor.
+         *
+         * @since S60 5.2      
+         */        
+        CHsLaunch();    
+        
+        /**
+         * Symbian 2nd phase constructor
+         * 
+         * @since S60 5.2
+         */        
+        void ConstructL();
+    
+    private: // From CActive.
+        /**
+         * From CActive
+         */        
+        void RunL();
+
+        /**
+         * From CActive
+         * 
+         * @since S60 5.2
+         */        
+        void DoCancel(); 
+
+        /**
+         * From CActive
+         * 
+         * @since S60 5.2
+         */        
+        TInt RunError( TInt aError );
+
+    private: // From MCenRepNotifyHandlerCallback
+        /**
+         * From MCenRepNotifyHandlerCallback
+         */
+        void HandleNotifyInt(TUint32 aId, TInt aNewValue);
+        
+    private: // From MHsProcessMonitorObserver
+        /**
+         * From MHsProcessMonitorObserver
+         */
+        void ProcessEnded( const TExitType& aExitType,
+                           const TInt aExitReason,
+                           const TExitCategoryName& aExitCategory );
+
+        /**
+         * From MHsProcessMonitorObserver
+         */
+        void ProcessMonitoringError( TInt aError );
+
+    private: // From MHsShutdownMonitorObserver
+        /**
+         * From MHsShutdownMonitorObserver
+         */
+        void SystemShutdownEvent();
+
+    private:
+        /**
+         * Initialize process monitor
+         * 
+         * @param aProcessId    Id of process to monitor 
+         */
+        void InitProcessMonitorL( const TInt aProcessId );
+        
+        /**
+         * Shut down application 
+         * 
+         * @param aApplicationReturnValue   Application return value.
+         */
+        void ShutdownApp( const TInt aApplicationReturnValue );         
+        
+        /**
+         * Starts the home screen application.
+         */
+        void StartHomeScreen();
+        
+        /**
+         * Checks if the language is selected.
+         */
+        TBool IsLanguageSelectedL();
+        
+        /**
+         * Starts listening the repository notifications for
+         * language selection.
+         */
+        void StartListeningLanguageSelectionL();
+        
+        /**
+         * Stops listening the repository notifications for
+         * language selection.
+         */
+        void StopListeningLanguageSelection();
+        
+    private: // data.
+        // Process monitor. Owned.
+        CHsProcessMonitor* iProcessMonitor;
+        
+        // Shutdown monitor. Owned.
+        CHsShutdownMonitor* iShutdownMonitor;
+        
+        // Repository.
+        CRepository *iRepository;
+
+        // Repository notify handler.
+        CCenRepNotifyHandler* iCenRepNotifyHandler;
+        
+        // Application return value
+        TInt iApplicationReturnValue;
+
+        friend class t_hsapplicationlauncher;
+    };
+
+#endif // __HS_LAUNCH_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/inc/hsprocessmonitor.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 1020 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: process monitor.
+*/
+
+
+#ifndef __HS_PROCESS_MONITOR__
+#define __HS_PROCESS_MONITOR__
+
+#include <e32base.h>
+
+class t_hsapplicationlauncher;
+
+/**
+ * MHsProcessMonitorObserver
+ * 
+ * Monitor component observer.
+ * 
+ * @since S60 5.2
+ */
+class MHsProcessMonitorObserver
+    {    
+    public:
+        /**
+         * Called when monitored process is ended.
+         * 
+         * @param aExitType         Exit type
+         * @param aExitReason       Exit reason
+         * @param aExitCategory     Exit category
+         */
+        virtual void ProcessEnded( const TExitType& aExitType,
+                                   const TInt aExitReason,
+                                   const TExitCategoryName& aExitCategory ) = 0;
+
+        /**
+         * Called when error occured during monitoring.
+         * 
+         * @param aError System wide error code.
+         */        
+        virtual void ProcessMonitoringError( TInt aError ) = 0;											
+    };
+
+/**
+ * HsProcessMonitor
+ * 
+ * Component for monitoring process states.
+ * 
+ * @since S60 5.2
+ */  
+class CHsProcessMonitor : public CActive
+    {
+    public:
+        /**
+         * Create new monitor
+         * 
+         * @param aProcessName	process id
+         * @param aObserver monitor observer
+         * @since S60 5.2     
+         */    
+        static CHsProcessMonitor* NewL( const TInt aProcessId,
+                                        MHsProcessMonitorObserver& aObserver );   
+        
+        /**
+         * Destructor
+         * 
+         * @since S60 5.2     
+         */    
+        ~CHsProcessMonitor();
+    
+        /**
+         * Attach monitor
+         * 
+         * @return TInt     System wide error code.       
+         * @since S60 5.2
+         */        
+        TInt AttachMonitor();
+        
+        /**
+         * Start monitor
+         * 
+         * @return TInt     System wide error code.
+         * @since S60 5.2
+         */        
+        TInt StartMonitor();        
+
+    protected:
+        /** 
+         * C++ constructor
+         *
+         * @param aProcessName  process id
+         * @param aObserver     watchdog observer.   
+         * @since S60 5.2      
+         */        
+        CHsProcessMonitor( const TInt aProcessId,
+                           MHsProcessMonitorObserver& aObserver );    
+
+        /**
+         * Symbian 2nd phase constructor
+         * 
+         * @since S60 5.2
+         */        
+        void ConstructL();
+
+    private: // From CActive
+        /**
+         * From CActive
+         */        
+        void RunL();
+
+        /**
+         * From CActive
+         * 
+         * @since S60 5.2
+         */        
+        void DoCancel(); 
+
+        /**
+         * From CActive
+         * 
+         * @since S60 5.2
+         */        
+        TInt RunError( TInt aError );
+
+    private: // New methods
+        /**
+         * Close process handle if open
+         * 
+         * @since S60 5.2
+         */        
+        void SecureProcessHandleAsClosed();     
+
+    private:	
+        // process id
+        TInt iProcessId;        
+        
+        // watchdog observer
+        MHsProcessMonitorObserver& iObserver;
+        
+        // Process handle
+        RProcess iProcess;
+        
+        // boolean to represent whether process handle is open
+        TBool iProcessHandleOpen;        
+
+        friend class t_hsapplicationlauncher;
+    };
+
+#endif // __HS_PROCESS_MONITOR__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/inc/hsshutdownmonitor.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 1020 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: shutdown monitor.
+*/
+
+
+#ifndef __HS_SHUTDOWN_MONITOR__
+#define __HS_SHUTDOWN_MONITOR__
+
+#include <e32base.h>
+#include <ssm/ssmstateawaresession.h>
+
+class t_hsapplicationlauncher;
+
+/**
+ * MHsShutdownMonitorObserver
+ * 
+ * Monitor component observer.
+ * 
+ * @since S60 5.2
+ */
+class MHsShutdownMonitorObserver
+    {    
+    public:
+        /**
+         * Called when shutdown occurs 
+         */
+        virtual void SystemShutdownEvent() = 0;
+    };
+
+/**
+ * HsShutdownMonitor
+ * 
+ * Component for monitoring shutdown
+ * 
+ * @since S60 5.2
+ */  
+class CHsShutdownMonitor : public CActive
+    {
+    public:
+        /**
+         * Create new monitor
+         * 
+         * @param aObserver monitor observer
+         * @since S60 5.2     
+         */    
+        static CHsShutdownMonitor* NewL(
+                MHsShutdownMonitorObserver& aObserver );   
+        
+        /**
+         * Destructor
+         * 
+         * @since S60 5.2     
+         */    
+        ~CHsShutdownMonitor();
+    
+        /**
+         * Start monitor
+         * 
+         * @since S60 5.2
+         */        
+        void StartMonitor();        
+
+    protected:
+        /** 
+         * C++ constructor
+         *
+         * @param aObserver     monitor observer.   
+         * @since S60 5.2      
+         */        
+        CHsShutdownMonitor( MHsShutdownMonitorObserver& aObserver );    
+
+        /**
+         * Symbian 2nd phase constructor
+         * 
+         * @since S60 5.2
+         */        
+        void ConstructL();
+
+    private: // From CActive
+        /**
+         * From CActive
+         */        
+        void RunL();
+
+        /**
+         * From CActive
+         * 
+         * @since S60 5.2
+         */        
+        void DoCancel(); 
+
+        /**
+         * From CActive
+         * 
+         * @since S60 5.2
+         */        
+        TInt RunError( TInt aError );
+
+    private:	
+        // watchdog observer
+        MHsShutdownMonitorObserver& iObserver;
+
+        // State aware session.
+        RSsmStateAwareSession iSAS;
+
+        friend class t_hsapplicationlauncher;
+    };
+
+#endif // __HS_PROCESS_MONITOR__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/src/hsapplicationlauncher.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,452 @@
+/*
+ * Copyright (c) 2008 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: application class.                 
+ *
+ */
+
+#include <e32property.h>
+#include <e32debug.h>
+#include "hsapplicationlauncher.h"
+
+// ========================= DECLARATIONS ==================================
+_LIT( KHsExeName, "hsapplication.exe" );
+_LIT( KHsProcessName, "hsapplication.exe" );
+const TInt KSleepOnRetry = 250000; // 250ms
+const TUid KPSCategoryUid = TUid::Uid( 0x20022F36 );
+const TInt KPSCrashCountKey = 1;
+_LIT_SECURITY_POLICY_C1( KPSReadPolicy, ECapabilityReadDeviceData );
+_LIT_SECURITY_POLICY_C1( KPSWritePolicy, ECapabilityWriteDeviceData );
+
+// ========================= LOCAL FUNCTIONS ==================================
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif //COVERAGE_MEASUREMENT
+void RunAppL()
+    {
+    // Construct active scheduler.
+    CActiveScheduler* activeScheduler = new ( ELeave )CActiveScheduler();
+    CleanupStack::PushL( activeScheduler );
+    CActiveScheduler::Install( activeScheduler );
+
+    // Construct app.
+    CHsLaunch* app = CHsLaunch::NewL();
+    CleanupStack::PushL( app );
+    
+    app->Activate();
+    
+    // Signal startup.
+    RProcess::Rendezvous(KErrNone);
+    
+    // Start active scheduler.
+    CActiveScheduler::Start();
+    
+    User::LeaveIfError( app->ApplicationReturnValue() );
+    
+    // Cleanup.
+    CleanupStack::PopAndDestroy( app );
+    CleanupStack::PopAndDestroy( activeScheduler );
+    }
+
+#ifndef HOMESCREEN_TEST
+// -----------------------------------------------------------------------------
+// E32Main
+// entry-point
+// -----------------------------------------------------------------------------
+//
+TInt E32Main()
+    {            
+    TInt error = KErrNone;
+    
+    __UHEAP_MARK;    
+    
+    // Construct cleanup stack.
+    CTrapCleanup* cleanupstack = CTrapCleanup::New();
+    if( !cleanupstack )
+        {
+        error  = KErrNoMemory;
+        }
+    
+    // Call next phase of startup.
+    if( !error )
+        {
+        TRAP( error, RunAppL() );
+        }
+    
+    // Cleanup.
+    delete cleanupstack;
+    cleanupstack = NULL;
+    
+    __UHEAP_MARKEND;
+    
+    return error;
+    }
+#endif //HOMESCREEN_TEST
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
+// ========================= MEMBER FUNCTIONS ==================================
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+CHsLaunch* CHsLaunch::NewL()
+    {
+    CHsLaunch* self = new ( ELeave ) CHsLaunch();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::ConstructL()
+    {
+    iRepository = CRepository::NewL(TUid::Uid(0x2002b3aa));
+    
+    iShutdownMonitor = CHsShutdownMonitor::NewL( *this );
+    iShutdownMonitor->StartMonitor();
+    
+    // Create property to pub/sub.    
+    TInt error = RProperty::Define( KPSCrashCountKey,
+                                    RProperty::EInt,
+                                    KPSReadPolicy,
+                                    KPSWritePolicy );    
+    if( error == KErrNone )
+        {
+        // Init it to zero.
+        error = RProperty::Set( KPSCategoryUid, KPSCrashCountKey, 0 );
+        }                
+    else if( error == KErrAlreadyExists )
+        {
+        error = KErrNone;        
+        }        
+    
+    User::LeaveIfError( error );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::CHsLaunch()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+CHsLaunch::CHsLaunch() :
+        CActive( EPriorityStandard ),
+        iApplicationReturnValue( KErrNone )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::~CHsLaunch()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CHsLaunch::~CHsLaunch()
+    {
+    Cancel();
+    
+    delete iRepository;
+    iRepository = NULL;
+    
+    delete iProcessMonitor;
+    iProcessMonitor = NULL;
+    
+    delete iShutdownMonitor;
+    iShutdownMonitor = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::Activate()
+// Set active object to be ran
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::Activate()
+    {   
+    SetActive();
+    TRequestStatus* tmp = &iStatus;
+    User::RequestComplete( tmp, KErrNone );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::ApplicationReturnValue()
+// Get application return value
+// -----------------------------------------------------------------------------
+//
+TInt CHsLaunch::ApplicationReturnValue()
+    {
+    return iApplicationReturnValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::RunL
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::RunL()
+    {
+#if defined( __WINS__ )
+    StartHomeScreen();
+#else 
+    if (IsLanguageSelectedL()) 
+        {
+        StartHomeScreen();
+        } 
+    else 
+        {
+        StartListeningLanguageSelectionL();
+        }
+#endif //__WINS__
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::DoCancel()
+// From CActive.
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::DoCancel()
+    {
+    if( iProcessMonitor )
+        {
+        iProcessMonitor->Cancel();
+        }
+    
+    if( iShutdownMonitor )
+        {
+        iShutdownMonitor->Cancel();
+        }
+    }      
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::RunError()
+// From CActive.
+// -----------------------------------------------------------------------------
+//
+TInt CHsLaunch::RunError( TInt aError )
+    {
+    /* Shutdown. This application
+     * will be restarted by startup sw. */
+    ShutdownApp( KErrGeneral );
+    return KErrNone;
+    } 
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::HandleNotifyInt()
+// From MCenRepNotifyHandlerCallback
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::HandleNotifyInt(TUint32 aId, TInt aNewValue)
+{
+    if (aId == 0x00000007 && aNewValue) 
+        {
+        StopListeningLanguageSelection();
+        StartHomeScreen();
+        }
+}
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::ProcessEndedL()
+// From MHsProcessMonitorObserver
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::ProcessEnded( const TExitType& aExitType,
+                              const TInt aExitReason,
+                              const TExitCategoryName& /*aExitCategory*/ )
+    {    
+    TInt crashCount = 0;
+    TInt error = RProperty::Get( KPSCategoryUid,
+                                 KPSCrashCountKey,
+                                 crashCount );
+    
+    // increment crash count in cenrep if the process has panic'd or killed with
+    // an error code
+    if( aExitType == EExitPanic ||
+        ( aExitType == EExitKill && aExitReason != KErrNone ) )
+        {
+        if( error == KErrNone )
+            {
+            crashCount++;
+            error = RProperty::Set( KPSCategoryUid,
+                                    KPSCrashCountKey,
+                                    crashCount );                          
+            }
+        
+        if( error == KErrNone )
+            {      
+            User::After( KSleepOnRetry ); 
+            Activate();
+            }
+        else
+            {           
+            ShutdownApp( error );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::ProcessMonitoringErrorL()
+// From MHsProcessMonitorObserver
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::ProcessMonitoringError( TInt aError )
+    {
+    /* Error in this method is critical and it might cause
+     * endless active scheduler loop if no active objects are
+     * not triggered. Therefore shutdown. This application
+     * will be restarted by startup sw. */
+    ShutdownApp( aError );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::SystemShutdownEvent()
+// From MHsShutdownMonitorObserver
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::SystemShutdownEvent()
+    {
+    // Do not shut down app. Startup app would try to restart this app.
+    // Just deactivate all active objects and wait for power off.
+    if( IsActive() )
+        {
+        Cancel();
+        }
+    else
+        {
+        DoCancel();
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::InitProcessMonitorL()
+// Initialize process monitor
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::InitProcessMonitorL( const TInt aProcessId )
+    {
+    if( iProcessMonitor )
+        {
+        delete iProcessMonitor;
+        iProcessMonitor = NULL;
+        }
+    iProcessMonitor = CHsProcessMonitor::NewL( aProcessId, *this );    
+    User::LeaveIfError( iProcessMonitor->StartMonitor() );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::ShutdownApp()
+// Shut down application
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::ShutdownApp( const TInt aApplicationReturnValue )
+    {
+    if( IsActive() )
+        {
+        Cancel();
+        }
+    else
+        {
+        DoCancel();
+        }
+    
+    iApplicationReturnValue = aApplicationReturnValue;
+#ifndef HOMESCREEN_TEST    
+    CActiveScheduler::Stop();
+#endif //HOMESCREEN_TEST
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::StartHomeScreen()
+// Starts the homescreen application.
+// -----------------------------------------------------------------------------
+//
+void CHsLaunch::StartHomeScreen()
+    {
+    // Create app or connect to existing.
+    TInt processExisted = EFalse;
+    
+    RProcess process;
+    TInt processError = process.Create( KHsExeName, KNullDesC );    
+    if( processError == KErrAlreadyExists )
+        {        
+        processError = process.Open( KHsProcessName, EOwnerProcess );
+        processExisted = ETrue;
+        }
+    TInt monitorError = KErrNone;
+    if( processError == KErrNone )
+        {
+        TRAP( monitorError, InitProcessMonitorL( process.Id() ) );
+        }
+    
+    if( processError == KErrNone &&
+        !processExisted )
+        {
+        // Make sure process is started even if monitor startup
+        // fails. This will assure that process is not left in
+        // suspended state. Resume can not be called for
+        // already running process (will cause KERN-EXEC 46).
+        process.Resume();
+        }
+                     
+    process.Close();
+    
+    if( processError != KErrNone ||
+        monitorError != KErrNone )
+        {
+        /* Error in this method is critical and it might cause
+         * endless active scheduler loop if no active objects are
+         * not triggered. Therefore shutdown. This application
+         * will be restarted by startup sw. */
+        ShutdownApp( KErrGeneral );
+        }
+    }
+        
+// -----------------------------------------------------------------------------
+// CHsLaunch::IsLanguageSelected()
+// Checks if the language is selected.
+// -----------------------------------------------------------------------------
+//  
+TBool CHsLaunch::IsLanguageSelectedL()
+    {
+    TInt value;
+    User::LeaveIfError(iRepository->Get(0x00000007, value));
+    return value;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsLaunch::StartListeningLanguageSelection()
+// Starts to listen repository notifications.
+// -----------------------------------------------------------------------------
+//  
+void CHsLaunch::StartListeningLanguageSelectionL()
+    {
+    iCenRepNotifyHandler = CCenRepNotifyHandler::NewL(
+            *this, *iRepository, CCenRepNotifyHandler::EIntKey, 0x00000007);
+    iCenRepNotifyHandler->StartListeningL();
+    }
+        
+// -----------------------------------------------------------------------------
+// CHsLaunch::StopListeningLanguageSelection()
+// Stops to listen repository notifications.
+// -----------------------------------------------------------------------------
+//      
+void CHsLaunch::StopListeningLanguageSelection()
+    {
+    iCenRepNotifyHandler->StopListening();
+    delete iCenRepNotifyHandler;
+    iCenRepNotifyHandler = NULL;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/src/hsprocessmonitor.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,184 @@
+/* 
+ * Copyright (c) 2008 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: process monitor.                 
+ *
+ */
+
+#include "hsprocessmonitor.h"
+
+// ========================= MEMBER FUNCTIONS ==================================
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::NewL()
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+CHsProcessMonitor* CHsProcessMonitor::NewL( const TInt iProcessId,
+                                            MHsProcessMonitorObserver& aObserver )
+    {
+    CHsProcessMonitor* self = new ( ELeave ) CHsProcessMonitor( iProcessId,
+                                                                aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::~CHsProcessMonitor()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CHsProcessMonitor::~CHsProcessMonitor()
+    {
+    Cancel();
+    SecureProcessHandleAsClosed();    	
+    iProcessId = KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::AttachMonitor()
+// Attach monitor
+// -----------------------------------------------------------------------------
+//
+TInt CHsProcessMonitor::AttachMonitor()
+    {   
+    SecureProcessHandleAsClosed();
+    
+    TInt error = iProcess.Open( iProcessId, EOwnerProcess );
+    
+    if( error == KErrNone )
+        {
+        iProcessHandleOpen = ETrue;
+        }
+    
+    return error;
+    }   
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::StartMonitor()
+// Start monitor
+// -----------------------------------------------------------------------------
+//
+TInt CHsProcessMonitor::StartMonitor()
+    {
+    TInt error = KErrNone;
+    
+    if( !iProcessHandleOpen )
+        {
+        error = AttachMonitor();
+        }
+    
+    if( error == KErrNone )
+        {
+        iProcess.Logon( iStatus );
+        SetActive();                
+        }
+    
+    return error;
+    }   
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::CHsProcessMonitor()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+CHsProcessMonitor::CHsProcessMonitor( const TInt aProcessId,
+                                      MHsProcessMonitorObserver& aObserver ) :
+        CActive( EPriorityStandard ),
+        iProcessId( aProcessId ),
+        iObserver( aObserver ),
+        iProcessHandleOpen( EFalse )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CHsProcessMonitor::ConstructL()
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::RunL
+// -----------------------------------------------------------------------------
+//
+void CHsProcessMonitor::RunL()
+    {
+    iProcess.LogonCancel( iStatus );    	
+    
+    const TInt error = iStatus.Int();        
+    
+    if( error == KErrCancel )
+        {
+        }
+    else if( error == KErrNoMemory )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    else
+        {
+        const TExitType exitType = iProcess.ExitType();									
+        if( exitType == EExitPending )
+            {
+            User::LeaveIfError( StartMonitor() );
+            }
+        else
+            {
+            iObserver.ProcessEnded( exitType,
+                                    iProcess.ExitReason(),
+                                    iProcess.ExitCategory() );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::DoCancel()
+// From CActive.
+// -----------------------------------------------------------------------------
+//
+void CHsProcessMonitor::DoCancel()
+    {
+    iProcess.LogonCancel( iStatus );
+    }      
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::RunError()
+// From CActive.
+// -----------------------------------------------------------------------------
+//
+TInt CHsProcessMonitor::RunError( TInt aError )
+    {    
+    iObserver.ProcessMonitoringError( aError );
+
+    // Observer will handle error. Return green light.
+    return KErrNone;    
+    }  
+
+// -----------------------------------------------------------------------------
+// CHsProcessMonitor::SecureProcessHandleAsClosed()
+// Close process handle if open
+// -----------------------------------------------------------------------------
+//
+void CHsProcessMonitor::SecureProcessHandleAsClosed()
+    {
+    if( iProcessHandleOpen )
+        {
+        iProcess.Close();
+        iProcessHandleOpen = EFalse;
+        }
+    } 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsapplicationlauncher/src/hsshutdownmonitor.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,130 @@
+/* 
+ * Copyright (c) 2008 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: shutdown monitor.                 
+ *
+ */
+
+#include <ssm/ssmstate.h>
+#include <ssm/ssmdomaindefs.h>
+
+#include "hsshutdownmonitor.h"
+
+// ========================= MEMBER FUNCTIONS ==================================
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::NewL()
+// Two-phased constructor
+// -----------------------------------------------------------------------------
+CHsShutdownMonitor* CHsShutdownMonitor::NewL(
+        MHsShutdownMonitorObserver& aObserver )
+    {
+    CHsShutdownMonitor* self = new ( ELeave ) CHsShutdownMonitor( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::~CHsShutdownMonitor()
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CHsShutdownMonitor::~CHsShutdownMonitor()
+    {
+    Cancel();
+    iSAS.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::StartMonitor()
+// Start monitor
+// -----------------------------------------------------------------------------
+//
+void CHsShutdownMonitor::StartMonitor()
+    {
+    iSAS.RequestStateNotification( iStatus );
+    SetActive();    
+    }   
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::CHsShutdownMonitor()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+CHsShutdownMonitor::CHsShutdownMonitor( MHsShutdownMonitorObserver& aObserver ) :
+        CActive( EPriorityStandard ),
+        iObserver( aObserver )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CHsShutdownMonitor::ConstructL()
+    {
+    User::LeaveIfError( iSAS.Connect( KSM2GenMiddlewareDomain3 ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::RunL
+// -----------------------------------------------------------------------------
+//
+void CHsShutdownMonitor::RunL()
+    {
+    User::LeaveIfError( iStatus.Int() );
+    
+    TBool registerForMoreEvents = ETrue;
+    
+    TSsmState state = iSAS.State();
+    if( state.MainState() == ESsmShutdown )
+        {
+        iObserver.SystemShutdownEvent();
+        registerForMoreEvents = EFalse;
+        }
+    
+    if( registerForMoreEvents )
+        {
+        iSAS.AcknowledgeAndRequestStateNotification( KErrNone, iStatus );
+        SetActive();
+        }
+    else
+        {
+        iSAS.AcknowledgeStateNotification( KErrNone );
+        }        
+    }
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::DoCancel()
+// From CActive.
+// -----------------------------------------------------------------------------
+//
+void CHsShutdownMonitor::DoCancel()
+    {
+    iSAS.RequestStateNotificationCancel();
+    }      
+
+// -----------------------------------------------------------------------------
+// CHsShutdownMonitor::RunError()
+// From CActive.
+// -----------------------------------------------------------------------------
+//
+TInt CHsShutdownMonitor::RunError( TInt aError )
+    {
+    return aError;
+    }
+
+// End of File
--- a/homescreenapp/hsdomainmodel/hsdomainmodel.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/hsdomainmodel.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -19,6 +19,7 @@
            ./inc/hsdatabase.h  \
            ./inc/hsdomainmodel_global.h  \
            ./inc/hspage.h \
+           ./inc/hspagevisual.h \
            ./inc/hspagenewwidgetlayout.h \
            ./inc/hsgui.h  \
            ./inc/hsscene.h \
@@ -27,18 +28,24 @@
            ./inc/hswallpaper.h \
            ./inc/hswallpaperloader.h \
            ./inc/hswallpaperloaderthread.h \
+           ./inc/hshostedwidgetfactory.h \
            ./inc/hswidgethost.h \
+           ./inc/hswidgethostvisual.h \
            ./inc/hswidgetcomponentregistry.h \
            ./inc/hswidgetcomponent.h \
            ./inc/hswidgetcomponentdescriptor.h \
            ./inc/hsbackuprestoreobserver.h \
            ./inc/hsconfiguration.h \
            ./inc/hswidgettoucharea.h \
-           ./inc/hspagetoucharea.h
+           ./inc/hspagetoucharea.h \
+           ./inc/hsidlewidget.h \
+           ./inc/hsdocumentloader.h
+        
 
 SOURCES += ./src/hscontentservice.cpp \
            ./src/hsdatabase.cpp \
            ./src/hspage.cpp \
+           ./src/hspagevisual.cpp \
            ./src/hspagenewwidgetlayout.cpp \
            ./src/hsgui.cpp \
            ./src/hsscene.cpp \
@@ -46,14 +53,18 @@
            ./src/hswallpaper.cpp \
            ./src/hswallpaperloader.cpp \
            ./src/hswallpaperloaderthread.cpp \
+           ./src/hshostedwidgetfactory.cpp \
            ./src/hswidgethost.cpp \
+           ./src/hswidgethostvisual.cpp \
            ./src/hswidgetcomponentregistry.cpp \
            ./src/hswidgetcomponent.cpp \
            ./src/hswidgetcomponentdescriptor.cpp \
            ./src/hsbackuprestoreobserver.cpp \
            ./src/hsconfiguration.cpp \
            ./src/hswidgettoucharea.cpp \
-           ./src/hspagetoucharea.cpp
+           ./src/hspagetoucharea.cpp \
+           ./src/hsidlewidget.cpp \
+           ./src/hsdocumentloader.cpp
 
 symbian: {
 HEADERS += ./inc/hsbackuprestoreobserver_p.h \
--- a/homescreenapp/hsdomainmodel/hsdomainmodel.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/hsdomainmodel.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -40,11 +40,16 @@
                ../hsutils/inc \
                ../hsapplication/inc
 
+RESOURCES += hsdomainmodel.qrc
+
 symbian: {
     TARGET.UID3 = 0x20022F38
     LIBS += -lxqsettingsmanager -labclient
 }
-win32:{
+!symbian:{
     QT += network 
 }
+
+new_short:DEFINES += HSWIDGETORGANIZER_ALGORITHM
+
 include(hsdomainmodel.pri)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/hsdomainmodel.qrc	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/" >           
+        <file alias="controllayer.docml">resource/controllayer.docml</file>
+    </qresource>    
+</RCC>
--- a/homescreenapp/hsdomainmodel/inc/hsconfiguration.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hsconfiguration.h	Wed Aug 18 09:40:07 2010 +0300
@@ -20,6 +20,7 @@
 
 #include <QObject>
 #include <QVariant>
+#include <QEasingCurve>
 
 #include <HbFeedback>
 
@@ -47,7 +48,7 @@
     Q_PROPERTY(int widgetDragEffectDuration READ widgetDragEffectDuration WRITE setWidgetDragEffectDuration)
     Q_PROPERTY(int widgetDropEffectDuration READ widgetDropEffectDuration WRITE setWidgetDropEffectDuration)
     Q_PROPERTY(int defaultPageId READ defaultPageId WRITE setDefaultPageId)
-    Q_PROPERTY(int maximumPageCount READ maximumPageCount WRITE setMaximumPageCount)    
+    Q_PROPERTY(int maximumPageCount READ maximumPageCount WRITE setMaximumPageCount)
     Q_PROPERTY(bool isShortcutLabelVisible READ isShortcutLabelVisible WRITE setShortcutLabelVisible)
     Q_PROPERTY(qreal bounceFeedbackEffectDistance READ bounceFeedbackEffectDistance WRITE setBounceFeedbackEffectDistance)
     Q_PROPERTY(qreal pageChangePanDistanceInPixels READ pageChangePanDistanceInPixels WRITE setPageChangePanDistanceInPixels)
@@ -73,11 +74,13 @@
     Q_PROPERTY(int snapTimeout READ snapTimeout WRITE setSnapTimeout)
     Q_PROPERTY(qreal snapForce READ snapForce WRITE setSnapForce)
     Q_PROPERTY(qreal snapGap READ snapGap WRITE setSnapGap)
-    Q_PROPERTY(qreal snapBorderGap READ snapBorderGap WRITE setSnapBorderGap)
+    Q_PROPERTY(qreal pageMargin READ pageMargin WRITE setPageMargin)
     Q_PROPERTY(int snapLineFadeInDuration READ snapLineFadeInDuration WRITE setSnapLineFadeInDuration)
     Q_PROPERTY(int snapLineFadeOutDuration READ snapLineFadeOutDuration WRITE setSnapLineFadeOutDuration)
     Q_PROPERTY(bool isSnapEffectsEnabled READ isSnapEffectsEnabled WRITE setSnapEffectsEnabled)
     Q_PROPERTY(SceneType sceneType READ sceneType WRITE setSceneType)
+    Q_PROPERTY(QEasingCurve::Type bounceAnimationEasingCurve READ bounceAnimationEasingCurve WRITE setBounceAnimationEasingCurve)
+    Q_PROPERTY(QEasingCurve::Type pageChangeAnimationEasingCurve READ pageChangeAnimationEasingCurve WRITE setPageChangeAnimationEasingCurve)
 
     Q_ENUMS(SceneType)
 
@@ -91,107 +94,122 @@
         SceneWallpaper
     };
 
+#define SETVALUE(member, name) \
+    if (member != value) { \
+        member = value; \
+        emit propertyChanged(name); \
+    }
+
     int bounceEffect() const { return mBounceEffect; }
-    void setBounceEffect(int effect) { mBounceEffect = effect; }
+    void setBounceEffect(int value) { SETVALUE(mBounceEffect, "bounceEffect") }
     int widgetTapAndHoldTimeout() const { return mWidgetTapAndHoldTimeout; }
-    void setWidgetTapAndHoldTimeout(int timeout) { mWidgetTapAndHoldTimeout = timeout; }
+    void setWidgetTapAndHoldTimeout(int value) { SETVALUE(mWidgetTapAndHoldTimeout, "widgetTapAndHoldTimeout") }
     int sceneTapAndHoldTimeout() const { return mSceneTapAndHoldTimeout; }
-    void setSceneTapAndHoldTimeout(int timeout) { mSceneTapAndHoldTimeout = timeout; }
+    void setSceneTapAndHoldTimeout(int value) { SETVALUE(mSceneTapAndHoldTimeout, "sceneTapAndHoldTimeout") }
     int pageChangeAnimationDuration() const { return mPageChangeAnimationDuration; }
-    void setPageChangeAnimationDuration(int duration) { mPageChangeAnimationDuration = duration; }    
+    void setPageChangeAnimationDuration(int value) { SETVALUE(mPageChangeAnimationDuration, "pageChangeAnimationDuration") }
     int pageChangeZoneAnimationDuration() const { return mPageChangeZoneAnimationDuration; }
-    void setPageChangeZoneAnimationDuration(int duration) { mPageChangeZoneAnimationDuration = duration; }    
+    void setPageChangeZoneAnimationDuration(int value) { SETVALUE(mPageChangeZoneAnimationDuration, "pageChangeZoneAnimationDuration") }
     int pageChangeZoneReverseAnimationDuration() const { return mPageChangeZoneReverseAnimationDuration; }
-    void setPageChangeZoneReverseAnimationDuration(int duration) { mPageChangeZoneReverseAnimationDuration = duration; }
+    void setPageChangeZoneReverseAnimationDuration(int value) { SETVALUE(mPageChangeZoneReverseAnimationDuration, "pageChangeZoneReverseAnimationDuration") }
     int pageRemovedAnimationDuration() const { return mPageRemovedAnimationDuration; }
-    void setPageRemovedAnimationDuration(int duration) { mPageRemovedAnimationDuration = duration; }    
+    void setPageRemovedAnimationDuration(int value) { SETVALUE(mPageRemovedAnimationDuration, "pageRemovedAnimationDuration") }
     int newPageAddedAnimationDuration() const { return mNewPageAddedAnimationDuration; }
-    void setNewPageAddedAnimationDuration(int duration) { mNewPageAddedAnimationDuration = duration; }  
+    void setNewPageAddedAnimationDuration(int value) { SETVALUE(mNewPageAddedAnimationDuration, "newPageAddedAnimationDuration") }
     int widgetDragEffectDuration() const { return mWidgetDragEffectDuration; }
-    void setWidgetDragEffectDuration(int duration) { mWidgetDragEffectDuration = duration; }  
+    void setWidgetDragEffectDuration(int value) { SETVALUE(mWidgetDragEffectDuration, "widgetDragEffectDuration") }
     int widgetDropEffectDuration() const { return mWidgetDropEffectDuration; }
-    void setWidgetDropEffectDuration(int duration) { mWidgetDropEffectDuration = duration; }  
+    void setWidgetDropEffectDuration(int value) { SETVALUE(mWidgetDropEffectDuration, "widgetDropEffectDuration") }
     int defaultPageId() const { return mDefaultPageId; }
-    void setDefaultPageId(int id) { mDefaultPageId = id; }
+    void setDefaultPageId(int value) { SETVALUE(mDefaultPageId, "defaultPageId") }
     int maximumPageCount() const { return mMaximumPageCount; }
-    void setMaximumPageCount(int count) { mMaximumPageCount = count; }  
+    void setMaximumPageCount(int value) { SETVALUE(mMaximumPageCount, "maximumPageCount") }
     bool isShortcutLabelVisible() const { return mIsShortcutLabelVisible; }
-    void setShortcutLabelVisible(bool visible) { mIsShortcutLabelVisible = visible; }  
+    void setShortcutLabelVisible(bool value) { SETVALUE(mIsShortcutLabelVisible, "isShortcutLabelVisible") }
     qreal bounceFeedbackEffectDistance() const { return mBounceFeedbackEffectDistance; }
-    void setBounceFeedbackEffectDistance(qreal distance) { mBounceFeedbackEffectDistance = distance; }  
+    void setBounceFeedbackEffectDistance(qreal value) { SETVALUE(mBounceFeedbackEffectDistance, "bounceFeedbackEffectDistance") }
     qreal pageChangePanDistanceInPixels() const { return mPageChangePanDistanceInPixels; }
-    void setPageChangePanDistanceInPixels(qreal distance) { mPageChangePanDistanceInPixels = distance; }  
+    void setPageChangePanDistanceInPixels(qreal value) { SETVALUE(mPageChangePanDistanceInPixels, "pageChangePanDistanceInPixels") }
     qreal tapAndHoldDistance() const { return mTapAndHoldDistance; }
-    void setTapAndHoldDistance(qreal distance) { mTapAndHoldDistance = distance; }  
+    void setTapAndHoldDistance(qreal value) { SETVALUE(mTapAndHoldDistance, "tapAndHoldDistance") }
     qreal pageChangeZoneWidth() const { return mPageChangeZoneWidth; }
-    void setPageChangeZoneWidth(qreal width) { mPageChangeZoneWidth = width; }  
+    void setPageChangeZoneWidth(qreal value) { SETVALUE(mPageChangeZoneWidth, "pageChangeZoneWidth") }
     qreal pageIndicatorSpacing() const { return mPageIndicatorSpacing; }
-    void setPageIndicatorSpacing(qreal spacing) { mPageIndicatorSpacing = spacing; }
+    void setPageIndicatorSpacing(qreal value) { SETVALUE(mPageIndicatorSpacing, "pageIndicatorSpacing") }
     qreal maximumWidgetHeight() const { return mMaximumWidgetHeight; }
-    void setMaximumWidgetHeight(qreal height) { mMaximumWidgetHeight = height; }  
+    void setMaximumWidgetHeight(qreal value) { SETVALUE(mMaximumWidgetHeight, "maximumWidgetHeight") }
     qreal maximumWidgetWidth() const { return mMaximumWidgetWidth; }
-    void setMaximumWidgetWidth(qreal width) { mMaximumWidgetWidth = width; }  
+    void setMaximumWidgetWidth(qreal value) { SETVALUE(mMaximumWidgetWidth, "maximumWidgetWidth") }
     qreal minimumWidgetHeight() const { return mMinimumWidgetHeight; }
-    void setMinimumWidgetHeight(qreal height) { mMinimumWidgetHeight = height; }
+    void setMinimumWidgetHeight(qreal value) { SETVALUE(mMinimumWidgetHeight, "minimumWidgetHeight") }
     qreal minimumWidgetWidth() const { return mMinimumWidgetWidth; }
-    void setMinimumWidgetWidth(qreal width) { mMinimumWidgetWidth = width; }  
+    void setMinimumWidgetWidth(qreal value) { SETVALUE(mMinimumWidgetWidth, "minimumWidgetWidth") }
     qreal pageChangePanDistance() const { return mPageChangePanDistance; }
-    void setPageChangePanDistance(qreal distance) { mPageChangePanDistance = distance; }  
+    void setPageChangePanDistance(qreal value) { SETVALUE(mPageChangePanDistance, "pageChangePanDistance") }
     HbFeedback::InstantEffect pageChangeFeedbackEffect() const { return mPageChangeFeedbackEffect; }
-    void setPageChangeFeedbackEffect(HbFeedback::InstantEffect effect) { mPageChangeFeedbackEffect = effect; }   
+    void setPageChangeFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mPageChangeFeedbackEffect, "pageChangeFeedbackEffect") }
     HbFeedback::InstantEffect widgetPickFeedbackEffect() const { return mWidgetPickFeedbackEffect; }
-    void setWidgetPickFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetPickFeedbackEffect = effect; }  
+    void setWidgetPickFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetPickFeedbackEffect, "widgetPickFeedbackEffect") }
     HbFeedback::InstantEffect widgetDropFeedbackEffect() const { return mWidgetDropFeedbackEffect; }
-    void setWidgetDropFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetDropFeedbackEffect = effect; }  
+    void setWidgetDropFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetDropFeedbackEffect, "widgetDropFeedbackEffect") }
     HbFeedback::InstantEffect widgetRepositionFeedbackEffect() const { return mWidgetRepositionFeedbackEffect; }
-    void setWidgetRepositionFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetRepositionFeedbackEffect = effect; } 
+    void setWidgetRepositionFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetRepositionFeedbackEffect, "widgetRepositionFeedbackEffect") }
     HbFeedback::InstantEffect widgetOverTrashbinFeedbackEffect() const { return mWidgetOverTrashbinFeedbackEffect; }
-    void setWidgetOverTrashbinFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetOverTrashbinFeedbackEffect = effect; } 
+    void setWidgetOverTrashbinFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetOverTrashbinFeedbackEffect, "widgetOverTrashbinFeedbackEffect") }
     HbFeedback::InstantEffect widgetDropToTrashbinFeedbackEffect() const { return mWidgetDropToTrashbinFeedbackEffect; }
-    void setWidgetDropToTrashbinFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetDropToTrashbinFeedbackEffect = effect; } 
+    void setWidgetDropToTrashbinFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetDropToTrashbinFeedbackEffect, "widgetDropToTrashbinFeedbackEffect") }
     HbFeedback::InstantEffect shortcutWidgetTapFeedbackEffect() const { return mShortcutWidgetTapFeedbackEffect; }
-    void setShortcutWidgetTapFeedbackEffect(HbFeedback::InstantEffect effect) { mShortcutWidgetTapFeedbackEffect = effect; } 
+    void setShortcutWidgetTapFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mShortcutWidgetTapFeedbackEffect, "shortcutWidgetTapFeedbackEffect") }
     HbFeedback::InstantEffect widgetMoveBlockedFeedbackEffect() const { return mWidgetMoveBlockedFeedbackEffect; }
-    void setWidgetMoveBlockedFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetMoveBlockedFeedbackEffect = effect; } 
+    void setWidgetMoveBlockedFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetMoveBlockedFeedbackEffect, "widgetMoveBlockedFeedbackEffect") }
     HbFeedback::InstantEffect clockWidgetTapFeedbackEffect() const { return mClockWidgetTapFeedbackEffect; }
-    void setClockWidgetTapFeedbackEffect(HbFeedback::InstantEffect effect) { mClockWidgetTapFeedbackEffect = effect; } 
+    void setClockWidgetTapFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mClockWidgetTapFeedbackEffect, "clockWidgetTapFeedbackEffect") }
     HbFeedback::InstantEffect widgetSnappingFeedbackEffect() const { return mWidgetSnappingFeedbackEffect; }
-    void setWidgetSnappingFeedbackEffect(HbFeedback::InstantEffect effect) { mWidgetSnappingFeedbackEffect = effect; }
+    void setWidgetSnappingFeedbackEffect(HbFeedback::InstantEffect value) { SETVALUE(mWidgetSnappingFeedbackEffect, "widgetSnappingFeedbackEffect") }
     bool isSnapEnabled() const { return mIsSnapEnabled; }
-    void setSnapEnabled(bool enabled) { mIsSnapEnabled = enabled; }
+    void setSnapEnabled(bool value) { SETVALUE(mIsSnapEnabled, "isSnapEnabled") }
     int snapTimeout() const { return mSnapTimeout; }
-    void setSnapTimeout(int timeout) { mSnapTimeout = timeout; }
+    void setSnapTimeout(int value) { SETVALUE(mSnapTimeout, "snapTimeout") }
     qreal snapForce() const { return mSnapForce; }
-    void setSnapForce(qreal force) { mSnapForce = force; }  
+    void setSnapForce(qreal value) { SETVALUE(mSnapForce, "snapForce") }
     qreal snapGap() const { return mSnapGap; }
-    void setSnapGap(qreal gap) { mSnapGap = gap; }  
-    qreal snapBorderGap() const { return mSnapBorderGap; }
-    void setSnapBorderGap(qreal gap) { mSnapBorderGap = gap; }
+    void setSnapGap(qreal value) { SETVALUE(mSnapGap, "snapGap") }
+    qreal pageMargin() const { return mPageMargin; }
+    void setPageMargin(qreal value) { SETVALUE(mPageMargin, "pageMargin") }
     int snapLineFadeInDuration() const { return mSnapLineFadeInDuration; }
-    void setSnapLineFadeInDuration(int duration) { mSnapLineFadeInDuration = duration; }
+    void setSnapLineFadeInDuration(int value) { SETVALUE(mSnapLineFadeInDuration, "snapLineFadeInDuration") }
     int snapLineFadeOutDuration() const { return mSnapLineFadeOutDuration; }
-    void setSnapLineFadeOutDuration(int duration) { mSnapLineFadeOutDuration = duration; }
+    void setSnapLineFadeOutDuration(int value) { SETVALUE(mSnapLineFadeOutDuration, "snapLineFadeOutDuration") }
     bool isSnapEffectsEnabled() const { return mIsSnapEffectsEnabled; }
-    void setSnapEffectsEnabled(bool enabled) { mIsSnapEffectsEnabled = enabled; }
+    void setSnapEffectsEnabled(bool value) { SETVALUE(mIsSnapEffectsEnabled, "isSnapEffectsEnabled") }
     SceneType sceneType() const { return mSceneType; }
-    void setSceneType(SceneType type) { mSceneType = type; }
-     
+    void setSceneType(SceneType value) { SETVALUE(mSceneType, "sceneType") }
+    QEasingCurve::Type bounceAnimationEasingCurve() const { return mBounceAnimationEasingCurve; }
+    void setBounceAnimationEasingCurve(QEasingCurve::Type value) { SETVALUE(mBounceAnimationEasingCurve, "bounceAnimationEasingCurve") }
+    QEasingCurve::Type pageChangeAnimationEasingCurve() const { return mPageChangeAnimationEasingCurve; }
+    void setPageChangeAnimationEasingCurve(QEasingCurve::Type value) { SETVALUE(mPageChangeAnimationEasingCurve, "pageChangeAnimationEasingCurve") }
+
+#undef SETVALUE
+
     QSizeF minimumWidgetSizeInUnits() const;
     QSizeF maximumWidgetSizeInUnits() const;
     QSizeF minimumWidgetSizeInPixels() const;
     QSizeF maximumWidgetSizeInPixels() const;
-    
+
     bool load();
     bool importFromFile(const QString &path);
     bool exportToFile(const QString &path);
-        
+
     static HsConfiguration *instance();
     static HsConfiguration *takeInstance();
     static void setInstance(HsConfiguration *instance);
 
+signals:
+    void propertyChanged(const QString &name);
+
 private:
     Q_DISABLE_COPY(HsConfiguration)
-    
+
 private:
     int mBounceEffect;
     int mWidgetTapAndHoldTimeout;
@@ -230,12 +248,14 @@
     int mSnapTimeout;
     qreal mSnapForce;
     qreal mSnapGap;
-    qreal mSnapBorderGap;
+    qreal mPageMargin;
     int mSnapLineFadeInDuration;
     int mSnapLineFadeOutDuration;
     bool mIsSnapEffectsEnabled;
     SceneType mSceneType;
-
+    QEasingCurve::Type mBounceAnimationEasingCurve;
+    QEasingCurve::Type mPageChangeAnimationEasingCurve;
+    
     static HsConfiguration *mInstance;
 
     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/inc/hsdocumentloader.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* 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:  Homescreen document loader class.
+*
+*/
+
+#ifndef HSDOCUMENTLOADER_H
+#define HSDOCUMENTLOADER_H
+
+#include <hbdocumentloader.h>
+#include "hstest_global.h"
+
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
+
+class HsDocumentLoader : public HbDocumentLoader
+{
+public:
+    HsDocumentLoader();
+    virtual ~HsDocumentLoader();
+
+public:
+    QObject *createObject(const QString &type, const QString &name);
+
+private:
+
+    Q_DISABLE_COPY(HsDocumentLoader)
+
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
+};
+
+#endif
--- a/homescreenapp/hsdomainmodel/inc/hsdomainmodel_global.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hsdomainmodel_global.h	Wed Aug 18 09:40:07 2010 +0300
@@ -19,7 +19,7 @@
 #ifndef HSDOMAINMODEL_GLOBAL_H
 #define HSDOMAINMODEL_GLOBAL_H
 
-#include <Qt/qglobal.h>
+#include <qglobal.h>
 
 // services uri; services key names used when the service is passed as property in state
 const char CONTENT_SERVICE_KEY[]  = "http://homescreen.nokia.com/runtimeservices/contentservice";
--- a/homescreenapp/hsdomainmodel/inc/hsdomainmodeldatastructures.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hsdomainmodeldatastructures.h	Wed Aug 18 09:40:07 2010 +0300
@@ -19,7 +19,7 @@
 #define HSDOMAINMODELDATASTRUCTURES_H
 
 #include <QPointF>
-
+#include <QString>
 #include "hsdomainmodel_global.h"
 
 class HSDOMAINMODEL_EXPORT HsSceneData
--- a/homescreenapp/hsdomainmodel/inc/hsgui.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hsgui.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,34 +18,61 @@
 #ifndef HSGUI_H
 #define HSGUI_H
 
+
+#include <QObject>
 #include <QPointer>
-
+#include <Hb> 
 #include "hsdomainmodel_global.h"
 #include "hstest_global.h"
 
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
 
 class HbView;
-class HbMainWindow;
+class HsIdleWidget;
+class HsPropertyAnimationWrapper;
 
-class HSDOMAINMODEL_EXPORT HsGui
+struct HsGuiImpl;
+
+class HSDOMAINMODEL_EXPORT HsGui: public QObject
 {
+    Q_OBJECT
 public:
-	static HbView *idleView();	
-	static HbView *takeIdleView();
-	static void setIdleView(HbView *idleView);	
-	
-    static HbMainWindow *mainWindow();
+    ~HsGui();
+
+    static HsGui *setInstance(HsGui *);
+    static HsGui *instance();
+    static HsGui *takeInstance();
+
+    void setupIdleUi();
+    void cleanupIdleUi();
+
+    void setOrientation(Qt::Orientation);
+    Qt::Orientation orientation();
+    
+    HbView *idleView() const;
+    HsIdleWidget *idleWidget() const;
+   
+    QRectF layoutRect() const;
+    
+    void show();
+    
+    HsPropertyAnimationWrapper *pageChangeAnimation();
+    HsPropertyAnimationWrapper *pageCrawlingAnimation();
+signals:
+    void orientationChanged(Qt::Orientation);
+    void navigateToApplibrary();
+ 
+private:
+    HsGui(QObject *parent=0);
 
 private:
-    HsGui() {}
-
-private:
-	static QPointer<HbView> mIdleView;
-	
+    static HsGui *mInstance;
+    HsGuiImpl *mImpl;
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
 };
 
-Q_DECLARE_METATYPE(HsGui*)
+
 
 #endif // HSGUI_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/inc/hshostedwidgetfactory.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* 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:
+*
+*/
+
+#ifndef HSHOSTEDWIDGETFACTORY_H
+#define HSHOSTEDWIDGETFACTORY_H
+
+#include <QObject>
+
+
+#include "hsdomainmodel_global.h"
+#include "hsdomainmodeldatastructures.h"
+
+#include "hstest_global.h"
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
+
+struct HsHostedWidgetFactoryImpl;
+
+class HSDOMAINMODEL_EXPORT HsHostedWidgetFactory : public QObject
+{
+    Q_OBJECT
+
+public:
+    static HsHostedWidgetFactory *instance();
+    static HsHostedWidgetFactory *takeInstance();
+    static HsHostedWidgetFactory *setInstance(HsHostedWidgetFactory *);
+    ~HsHostedWidgetFactory();
+
+    QObject *createWidget(const QString &uri);
+private:
+    Q_DISABLE_COPY(HsHostedWidgetFactory)
+    HsHostedWidgetFactory(QObject *parent = 0);
+private:
+    static HsHostedWidgetFactory *mInstance;
+    HsHostedWidgetFactoryImpl *mImpl;
+    
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
+};
+
+#endif // HSWIDGETHOST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/inc/hsidlewidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* 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:
+*
+*/
+
+
+#ifndef HSIDLEWIDGET_H
+#define HSIDLEWIDGET_H
+
+#include <HbWidget>
+
+#include "hstest_global.h"
+#include "hsdomainmodel_global.h"
+
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
+
+class HsPage;
+class HsTrashBinWidget;
+class HsPageIndicator;
+class HsSnapLine;
+
+class HSDOMAINMODEL_EXPORT HsIdleWidget : public HbWidget
+{
+    Q_OBJECT
+    Q_PROPERTY(qreal sceneX READ sceneX WRITE setSceneX)
+
+public:
+    HsIdleWidget(QGraphicsItem *parent = 0);
+		~HsIdleWidget();
+
+    qreal sceneX() const;
+    void setSceneX(qreal x);
+
+    void setGeometry(const QRectF &rect);
+
+    void setActivePage(int index);
+    void insertPage(int index, HsPage *page);
+    void removePage(int index);
+
+    HbWidget *controlLayer() const { return mControlLayer; }
+    HbWidget *pageLayer() const { return mPageLayer; }
+    HbWidget *pageWallpaperLayer() const { return mPageWallpaperLayer; }
+    HbWidget *sceneLayer() const { return mSceneLayer; }
+
+    HsTrashBinWidget *trashBin() const { return mTrashBin; }
+    HsPageIndicator *pageIndicator() const { return mPageIndicator; }
+
+    qreal parallaxFactor() const;
+
+
+public slots:
+    void showTrashBin();
+    void showPageIndicator();
+
+    void showVerticalSnapLine(const QLineF &snapLine);	
+    void hideVerticalSnapLine();
+    void showHorizontalSnapLine(const QLineF &snapLine);
+    void hideHorizontalSnapLine();
+
+protected:
+    void polishEvent();
+
+private:
+    Q_DISABLE_COPY(HsIdleWidget)
+    void loadControlLayer();
+        
+private:
+    HbWidget *mControlLayer;
+    HbWidget *mPageLayer;
+    HbWidget *mPageWallpaperLayer;
+    HbWidget *mSceneLayer;
+
+    HsTrashBinWidget *mTrashBin;
+    HsPageIndicator *mPageIndicator;
+
+    HsSnapLine *mHorizontalSnapLine;
+    HsSnapLine *mVerticalSnapLine;
+
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
+};
+
+#endif // HSIDLEWIDGET_H
--- a/homescreenapp/hsdomainmodel/inc/hspage.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hspage.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,6 +18,7 @@
 #ifndef HSPAGE_H
 #define HSPAGE_H
 
+#include <QPointF>
 #include <HbWidget>
 #include <HbIconItem>
 #include "hsdomainmodel_global.h"
@@ -27,62 +28,60 @@
 class HsPageData;
 class HsWallpaper;
 class HsPageTouchArea;
+class HsPageVisual;
 
 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
 
-class HSDOMAINMODEL_EXPORT HsPage : public HbWidget
+class HSDOMAINMODEL_EXPORT HsPage : public QObject
 {
     Q_OBJECT
     Q_PROPERTY(int pageIndex READ pageIndex)
 
 public:
-    HsPage(QGraphicsItem *parent = 0);
+    HsPage(QObject *parent = 0);
     ~HsPage();
-
     int databaseId() const;
     void setDatabaseId(int id);
-
-    void setGeometry(const QRectF &rect);
-
+   // void setGeometry(const QRectF &rect);
     bool load();
-
     HsWallpaper *wallpaper() const;
-
     bool addExistingWidget(HsWidgetHost *widgetHost);
     bool removeWidget(HsWidgetHost *widgeHost);
-
     QList<HsWidgetHost *> newWidgets();
     bool addNewWidget(HsWidgetHost *widgetHost, const QPointF &position = QPointF());
     void layoutNewWidgets();
     void resetNewWidgets();
     bool deleteFromDatabase();
-
     QList<HsWidgetHost *> widgets() const;
-
     bool isRemovable() const;
     void setRemovable(bool removable);
-
     bool isDefaultPage() const;
     bool isActivePage() const;
-    
     static HsPage *createInstance(const HsPageData &pageData);
-
-    QPointF mTouchPoint;
-
+    QPointF adjustedWidgetPosition(const QRectF &origWidgetRect);
+    QRectF contentGeometry();
+    QRectF contentGeometry(Qt::Orientation orientation);
+    QRectF contentRect();
+    QRectF contentRect(Qt::Orientation orientation);
+    HsPageVisual *visual() const;
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    enum sortOrder { height, width};
+#endif //HSWIDGETORGANIZER_ALGORITHM
 public slots:
     void showWidgets();
     void hideWidgets();
     void setOnline(bool online = true);
-
     void updateZValues();
-
     int pageIndex();
 
 private:
     Q_DISABLE_COPY(HsPage)
-    void setupTouchArea();
+  //  void setupTouchArea();
     void connectWidget(HsWidgetHost *widget);
     void disconnectWidget(HsWidgetHost *widget);
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    void sortWidgets(sortOrder order, QList<HsWidgetHost*> &widgets);
+#endif //HSWIDGETORGANIZER_ALGORITHM
 
 private slots:
     void onWidgetFinished();
@@ -90,18 +89,20 @@
     void onWidgetResized();
     void onWidgetAvailable();
     void onWidgetUnavailable();
-
     void onOrientationChanged(Qt::Orientation orientation);
+    void onPageMarginChanged(const QString &value);
 
 private:
     int mDatabaseId;
+    HsPageVisual *mPageVisual;
     HsWallpaper *mWallpaper;
     bool mRemovable;
     QList<HsWidgetHost*> mWidgets;
     QList<HsWidgetHost*> mNewWidgets;
     QList<HsWidgetHost*> mUnavailableWidgets;
-    HsPageTouchArea *mTouchArea;
-    
+    //HsPageTouchArea *mTouchArea;
+    QPointF mTouchPoint;    
+    qreal mPageMargin;
     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
 };
 
--- a/homescreenapp/hsdomainmodel/inc/hspagenewwidgetlayout.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hspagenewwidgetlayout.h	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 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"
@@ -35,9 +35,13 @@
     void removeAt(int index);
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
     void setGeometry(const QRectF &rect);
-    
     void addItem(HsWidgetHost *item);
-    
+    enum sortOrder { height, width};
+
+private:
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    QList<HsWidgetHost*> sortWidgets(sortOrder order);
+#endif    
 private:
     QSizeF mSize;
     QList<HsWidgetHost*> mNewWidgets;
@@ -46,5 +50,4 @@
     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
 };
 
-
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/inc/hspagevisual.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* 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:
+*
+*/
+
+#ifndef HSPAGEVISUAL_H
+#define HSPAGEVISUAL_H
+
+
+#include <HbWidget>
+#include "hsdomainmodel_global.h"
+#include "hstest_global.h"
+
+
+class HsPageTouchArea;
+
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
+
+class HSDOMAINMODEL_EXPORT HsPageVisual : public HbWidget
+{
+    Q_OBJECT
+   
+
+public:
+    HsPageVisual(QGraphicsItem *parent = 0);
+    ~HsPageVisual();
+   
+    void setGeometry(const QRectF &rect);
+
+private:
+    Q_DISABLE_COPY(HsPageVisual)
+    void setupTouchArea();
+
+private:
+    HsPageTouchArea *mTouchArea;
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
+};
+
+#endif
--- a/homescreenapp/hsdomainmodel/inc/hsscene.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hsscene.h	Wed Aug 18 09:40:07 2010 +0300
@@ -71,8 +71,8 @@
     static HsScene *instance();
     static HsScene *takeInstance();
     static void setInstance(HsScene *instance);
-    static HbMainWindow *mainWindow();
-    static Qt::Orientation orientation();
+    //static HbMainWindow *mainWindow();
+    //static Qt::Orientation orientation();
 
 signals:
     void pageTapAndHoldFinished(QGestureEvent *event);
@@ -105,7 +105,7 @@
 
     friend class HsPage;
     friend class HsPageTouchArea;
-    friend class HsWidgetHost;
+    friend class HsWidgetHostVisual;
     friend class HsWidgetTouchArea;
     friend class HsWidgetMoveTouchArea;
 
--- a/homescreenapp/hsdomainmodel/inc/hswidgethost.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hswidgethost.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,7 +18,7 @@
 #ifndef HSWIDGETHOST_H
 #define HSWIDGETHOST_H
 
-#include <HbWidget>
+#include <QObject>
 #include <QMetaMethod>
 #include <QMetaProperty>
 
@@ -33,13 +33,14 @@
 class HsWidgetTouchArea;
 class HsWidgetComponent;
 class HsPage;
+class HsWidgetHostVisual;
 
-class HSDOMAINMODEL_EXPORT HsWidgetHost : public HbWidget
+class HSDOMAINMODEL_EXPORT HsWidgetHost : public QObject
 {
     Q_OBJECT
 
 public:
-    HsWidgetHost(int databaseId, QGraphicsItem *parent = 0);
+    HsWidgetHost(int databaseId, QObject *parent = 0);
     ~HsWidgetHost();
 
     static HsWidgetHost *createInstance(
@@ -58,8 +59,8 @@
     bool savePresentation(HsWidgetPresentationData &presentation);
     bool getPresentation(HsWidgetPresentationData &presentation);
     bool removePresentation(Qt::Orientation orientation);
-    QPainterPath shape() const;
-
+    
+    HsWidgetHostVisual *visual() const;
 signals:
     void event_startAndShow();
     void event_startAndHide();
@@ -73,7 +74,6 @@
     
     void finished();
     void faulted();
-    void resized();
     void available();
     void unavailable();
 
@@ -90,22 +90,20 @@
     void startDropEffect();
 
 protected:
-    bool eventFilter(QObject *watched, QEvent *event);
+/*    bool eventFilter(QObject *watched, QEvent *event);
     void gestureEvent(QGestureEvent *event);
     void mousePressEvent(QGraphicsSceneMouseEvent *) {}
-
+*/
 private:
     Q_DISABLE_COPY(HsWidgetHost)
-    void setupTouchArea();
-    void setupEffects();
+  
     void setupStates();
 
     bool setProperty(const char *name, QMetaProperty &property); 
     bool setMethod(const char *signature, QMetaMethod &method);    
     bool hasSignal(const char *signature);
 
-    void setNewSize(const QSizeF &size);
-
+  
     bool setPreferencesToWidget();
 
 private slots:
@@ -127,12 +125,13 @@
     void onSetPreferences(const QStringList &names);
 
 private:
-    int mDatabaseId;        
+    int mDatabaseId;
+    HsWidgetHostVisual *mVisual;
     QStateMachine *mStateMachine;
-    QGraphicsWidget *mWidget;
+    QObject *mWidget;
     HsPage *mPage;    
     HsWidgetComponent *mComponent;
-    HsWidgetTouchArea *mTouchArea;
+
     QMetaMethod mOnInitializeMethod;
     QMetaMethod mOnShowMethod;
     QMetaMethod mOnHideMethod;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/inc/hswidgethostvisual.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* 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:
+*
+*/
+
+#ifndef HSWIDGETHOSTVISUAL_H
+#define HSWIDGETHOSTVISUAL_H
+
+#include <HbWidget>
+#include <QMetaMethod>
+#include <QMetaProperty>
+
+#include "hsdomainmodel_global.h"
+#include "hsdomainmodeldatastructures.h"
+
+#include "hstest_global.h"
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
+
+class QStateMachine;
+
+class HsWidgetTouchArea;
+class HsWidgetComponent;
+class HsPage;
+class HsWidgetHost;
+
+class HSDOMAINMODEL_EXPORT HsWidgetHostVisual : public HbWidget
+{
+    Q_OBJECT
+
+public:
+    HsWidgetHostVisual(QGraphicsItem *parent = 0);
+    ~HsWidgetHostVisual();
+    
+    QPainterPath shape() const;
+    void setWidget(QObject *widget);
+    void setVisualModel(HsWidgetHost *model);
+    HsWidgetHost *visualModel() const;
+signals:
+    void resized();
+
+public slots:
+    void startDragEffect();
+    void startDropEffect();
+
+protected:
+    bool eventFilter(QObject *watched, QEvent *event);
+    void gestureEvent(QGestureEvent *event);
+    void mousePressEvent(QGraphicsSceneMouseEvent *) {}
+
+private:
+    Q_DISABLE_COPY(HsWidgetHostVisual)
+    void setupTouchArea();
+    void setupEffects();
+
+    void setNewSize(const QSizeF &size);
+
+private:
+    HsWidgetTouchArea *mTouchArea;
+    HsWidgetHost *mVisualModel;
+    QGraphicsWidget *mWidget;
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
+};
+
+#endif // HSWIDGETHOST_H
--- a/homescreenapp/hsdomainmodel/inc/hswidgettoucharea.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hswidgettoucharea.h	Wed Aug 18 09:40:07 2010 +0300
@@ -24,14 +24,14 @@
 
 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
 
-class HsWidgetHost;
+class HsWidgetHostVisual;
 
 class HsWidgetTouchArea : public HbTouchArea
 {
     Q_OBJECT
 
 public:
-    HsWidgetTouchArea(HsWidgetHost *widgetHost);
+    HsWidgetTouchArea(HsWidgetHostVisual *widgetHost);
     ~HsWidgetTouchArea();
 
     bool sceneEvent(QEvent *event);
@@ -44,7 +44,7 @@
     Q_DISABLE_COPY(HsWidgetTouchArea)
     
 private:
-    HsWidgetHost *mWidgetHost;
+    HsWidgetHostVisual *mWidgetHostVisual;
 
     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/resource/controllayer.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.9">
+    <widget name="controlLayer" type="HbWidget">
+        <widget name="pageIndicator" type="HsPageIndicator">
+            <sizehint height="2.5un" type="PREFERRED"/>
+        </widget>
+        <widget name="trashBin" type="HsTrashBinWidget">
+            <sizehint type="PREFERRED" height="11un" width="11un"/>
+        </widget>
+        <layout type="anchor">
+            <anchoritem dst="pageIndicator" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+            <anchoritem dst="pageIndicator" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+            <anchoritem dst="pageIndicator" dstEdge="BOTTOM" spacing="-1un" src="" srcEdge="BOTTOM"/>
+            <anchoritem dst="trashBin" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
+            <anchoritem dst="trashBin" dstEdge="BOTTOM" spacing="-1un" src="" srcEdge="BOTTOM"/>
+        </layout>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/homescreenapp/hsdomainmodel/src/hsconfiguration.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hsconfiguration.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -73,11 +73,13 @@
     mSnapTimeout(100),
     mSnapForce(30),
     mSnapGap(6),
-    mSnapBorderGap(0),
+    mPageMargin(0),
     mSnapLineFadeInDuration(200),
     mSnapLineFadeOutDuration(100),
     mIsSnapEffectsEnabled(true),    
-    mSceneType(PageWallpapers)
+    mSceneType(PageWallpapers),
+    mBounceAnimationEasingCurve(QEasingCurve::Linear),
+    mPageChangeAnimationEasingCurve(QEasingCurve::Linear)
 {    
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/src/hsdocumentloader.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* 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:  Homescreen document loader class.
+*
+*/
+
+#include "hsdocumentloader.h"
+#include "hspageindicator.h"
+#include "hstrashbinwidget.h"
+#include "hsconfiguration.h"
+
+/*!
+    \class HsDocumentLoader
+    \ingroup group_hshomescreenstateplugin
+    \brief Homescreen document loader class.
+
+    Loads own widgets from docml.
+*/
+
+/*!
+    Constructor.
+*/
+HsDocumentLoader::HsDocumentLoader()
+    : HbDocumentLoader()
+{
+}
+
+/*!
+    Destructor.
+*/
+HsDocumentLoader::~HsDocumentLoader()
+{
+}
+
+/*!
+    Looks up an object which inherits class type and of which object name equals to name.
+    \a type type of the desired object.
+    \a name object name of the desired object.
+    */
+QObject *HsDocumentLoader::createObject(const QString &type, const QString &name)
+{
+    if (type == HsPageIndicator::staticMetaObject.className()) {
+        QObject *object = new HsPageIndicator(HSCONFIGURATION_GET(pageIndicatorSpacing));
+        object->setObjectName(name);
+        return object;
+    }
+    else if (type == HsTrashBinWidget::staticMetaObject.className()) {
+        QObject *object = new HsTrashBinWidget;
+        object->setObjectName(name);
+        return object;
+    }
+        
+    return HbDocumentLoader::createObject(type, name);
+}
--- a/homescreenapp/hsdomainmodel/src/hsgui.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hsgui.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -16,9 +16,19 @@
 */
 
 #include <HbInstance>
+#include <HbMainWindow>
 #include <HbView>
+#include <HbMenu>
+#include <HbAction>
 
 #include "hsgui.h"
+#include "hsidlewidget.h"
+#include "hsscene.h"
+#include "hsconfiguration.h"
+#include "hspropertyanimationwrapper.h"
+namespace {
+      const char gApplicationLibraryIconName[] = "qtg_mono_applications_all";
+}
 
 /*!
     \class HsGui
@@ -27,47 +37,160 @@
     HsGui includes common UI components for Home screen.
 */
 
-/*!
-    Returns the idle view. 
-*/
-HbView *HsGui::idleView()
+HsGui *HsGui::mInstance(0);
+
+struct HsGuiImpl
 {
-    return mIdleView;    
+    HsIdleWidget *mIdleWidget;
+    HbView *mIdleView;
+    HbMainWindow *mWindow;
+    HbAction *mNavigationAction;
+    HsPropertyAnimationWrapper *mPageChangeAnimation;
+    HsPropertyAnimationWrapper *mPageCrawlingAnimation;
+};
+
+
+
+HsGui::~HsGui()
+{
+    if (mImpl->mNavigationAction) {
+        delete mImpl->mNavigationAction;
+    }
+
+    if (mImpl->mPageChangeAnimation) {
+        mImpl->mPageChangeAnimation->stop();
+        delete mImpl->mPageChangeAnimation;
+    }
+    if (mImpl->mPageCrawlingAnimation) {
+        mImpl->mPageCrawlingAnimation->stop();
+        delete mImpl->mPageCrawlingAnimation;
+    }
+    delete mImpl;
 }
 
-/*!
-    Returns the current idle view instance. Callers of this 
-    function take ownership of the instance. The current 
-    view instance will be reset to null.    
-*/
-HbView *HsGui::takeIdleView()
-{	
-    HbView *idleView = mIdleView;
-    mIdleView = 0;
-    return idleView;
+HsGui *HsGui::setInstance(HsGui *instance)
+{
+    HsGui *old = mInstance;
+    if (mInstance != instance) {
+        mInstance = instance;
+    }
+    return old;
+}
+
+HsGui *HsGui::instance()
+{
+    if (!mInstance) {
+        mInstance = new HsGui(QCoreApplication::instance());
+    }
+    return mInstance;
+}
+
+HsGui *HsGui::takeInstance()
+{
+    HsGui *instance = mInstance;
+    mInstance = 0;
+    return instance;
+}
+
+void HsGui::setupIdleUi()
+{
+    if (!mImpl->mIdleWidget) {
+        mImpl->mIdleWidget = new HsIdleWidget;
+        mImpl->mIdleView = mImpl->mWindow->addView(mImpl->mIdleWidget);
+        mImpl->mIdleView->setContentFullScreen();
+
+        delete mImpl->mNavigationAction;
+        mImpl->mNavigationAction = 0;
+        mImpl->mNavigationAction = new HbAction;
+        mImpl->mNavigationAction->setIcon(HbIcon(gApplicationLibraryIconName));
+        mImpl->mNavigationAction->setObjectName("applib_navigation_action");
+        connect(mImpl->mNavigationAction, SIGNAL(triggered()), SIGNAL(navigateToApplibrary()));
+        mImpl->mIdleView->setNavigationAction(mImpl->mNavigationAction);
+    }
+    bool animate  = !mImpl->mWindow->isObscured();
+    mImpl->mWindow->setCurrentView(mImpl->mIdleView, animate);    
 }
 
-/*!
-    Sets the idle view instance. The existing instance
-    will be deleted.
-*/
-void HsGui::setIdleView(HbView *idleView)
+void HsGui::cleanupIdleUi()
 {
-    if (mIdleView != idleView) {
-        delete mIdleView;
-        mIdleView = idleView;
+    if (mImpl->mIdleView) {
+        mImpl->mIdleView->setNavigationAction(0);
+        delete mImpl->mNavigationAction;
+        mImpl->mNavigationAction = 0;
+        
+        mImpl->mWindow->removeView(mImpl->mIdleView);
+        delete mImpl->mIdleView;
+        mImpl->mIdleView = 0;
+
+        delete mImpl->mPageChangeAnimation;
+        mImpl->mPageChangeAnimation = 0;
+        
+        delete mImpl->mPageCrawlingAnimation;
+        mImpl->mPageCrawlingAnimation = 0;
     }
+    
+}
+
+void HsGui::setOrientation(Qt::Orientation orientation)
+{
+    mImpl->mWindow->setOrientation(orientation);
+}
+
+Qt::Orientation HsGui::orientation()
+{
+    return mImpl->mWindow->orientation();
+}
+
+HbView *HsGui::idleView() const
+{
+    return mImpl->mIdleView;
+}
+
+HsIdleWidget *HsGui::idleWidget() const
+{
+    return mImpl->mIdleWidget;
 }
 
-/*!
-    Returns the main window.
-*/
-HbMainWindow *HsGui::mainWindow()
+QRectF HsGui::layoutRect() const
 {
-    return hbInstance->allMainWindows().first();
+    return mImpl->mWindow->layoutRect();
+}
+
+void HsGui::show()
+{
+    mImpl->mWindow->raise();
+    mImpl->mWindow->show();
 }
 
-/*!
-    Points to the idle view instance.
-*/
-QPointer<HbView> HsGui::mIdleView(0);
+HsPropertyAnimationWrapper *HsGui::pageChangeAnimation()
+{
+    if (!mImpl->mPageChangeAnimation) {
+        mImpl->mPageChangeAnimation = new HsPropertyAnimationWrapper;
+        mImpl->mPageChangeAnimation->setTargetObject(mImpl->mIdleWidget);
+        mImpl->mPageChangeAnimation->setPropertyName("sceneX"); 
+    }
+    return mImpl->mPageChangeAnimation;
+}
+HsPropertyAnimationWrapper *HsGui::pageCrawlingAnimation()
+{
+    if (!mImpl->mPageCrawlingAnimation) {
+        mImpl->mPageCrawlingAnimation = new HsPropertyAnimationWrapper;
+        mImpl->mPageCrawlingAnimation->setTargetObject(mImpl->mIdleWidget);
+        mImpl->mPageCrawlingAnimation->setPropertyName("sceneX"); 
+    }
+    return mImpl->mPageCrawlingAnimation;
+}
+
+HsGui::HsGui(QObject *parent):
+    QObject(parent),mImpl(new HsGuiImpl)
+{
+    mImpl->mIdleView = 0;
+    mImpl->mIdleWidget = 0;
+    mImpl->mNavigationAction = 0;
+    mImpl->mPageChangeAnimation = 0;
+    mImpl->mPageCrawlingAnimation = 0;
+
+    mImpl->mWindow = hbInstance->allMainWindows().first();
+    connect(mImpl->mWindow, SIGNAL(orientationChanged(Qt::Orientation)),
+        SIGNAL(orientationChanged(Qt::Orientation)));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/src/hshostedwidgetfactory.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* 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:
+*
+*/
+
+
+
+#include <qservicemanager.h>
+#include <qservicefilter.h>
+#include <qserviceinterfacedescriptor.h>
+#include <QGraphicsWidget>
+#include "hshostedwidgetfactory.h"
+
+QTM_USE_NAMESPACE
+
+/*!
+    \class HsWidgetFactory
+    \ingroup group_hsdomainmodel
+    \brief Each widget is controlled by the home screen framework through a widget host.
+*/
+
+
+struct HsHostedWidgetFactoryImpl{
+    QServiceManager mServiceManager;
+    QServiceFilter mFilter;
+};
+
+
+
+HsHostedWidgetFactory *HsHostedWidgetFactory::mInstance = 0;
+
+HsHostedWidgetFactory *HsHostedWidgetFactory::instance()
+{
+    if (!mInstance) {
+        mInstance = new HsHostedWidgetFactory;
+    }
+    return mInstance;
+}
+
+HsHostedWidgetFactory *HsHostedWidgetFactory::takeInstance()
+{
+    HsHostedWidgetFactory *instance = mInstance;
+    mInstance = 0;
+    return instance;
+}
+
+HsHostedWidgetFactory *HsHostedWidgetFactory::setInstance
+                                             (HsHostedWidgetFactory *instance)
+{
+    HsHostedWidgetFactory *old = mInstance;
+    if (mInstance != instance) {
+        mInstance = instance;
+    }
+    return old;
+}
+
+QObject *HsHostedWidgetFactory::createWidget(const QString &uri)
+{
+    mImpl->mFilter.setServiceName(uri);
+    QList<QServiceInterfaceDescriptor> interfaces = 
+        mImpl->mServiceManager.findInterfaces(mImpl->mFilter);
+    
+    if (interfaces.isEmpty()) {
+        return 0;
+    }
+    // In theory we support QGraphicsWidget derived widgets
+    QObject *widgetObject = mImpl->mServiceManager.loadInterface(interfaces.first());
+    
+    if (!qobject_cast<QGraphicsWidget *>(widgetObject)) {
+        delete widgetObject;
+        widgetObject = 0;
+    }
+    return widgetObject;
+}
+
+/*!
+    Constructs a new widget host with given \a databaseId and
+    \a parent item.
+*/
+HsHostedWidgetFactory::HsHostedWidgetFactory(QObject *parent)
+  : QObject(parent),
+    mImpl(new HsHostedWidgetFactoryImpl)
+{
+    mImpl->mFilter.setInterface("com.nokia.symbian.IHomeScreenWidget");
+}
+
+/*!
+    Destructor.
+*/
+HsHostedWidgetFactory::~HsHostedWidgetFactory()
+{
+    delete mImpl;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/src/hsidlewidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,409 @@
+/*
+* 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:
+*
+*/
+
+#include <QApplication>
+#include <QGraphicsSceneMouseEvent>
+#include <QGraphicsLinearLayout>
+#include <QDir>
+
+#include <HbMainWindow>
+#include <HbVkbHost>
+
+#include "hsidlewidget.h"
+#include "hsscene.h"
+#include "hspage.h"
+#include "hspagevisual.h"
+#include "hswidgethost.h"
+#include "hswallpaper.h"
+#include "hstrashbinwidget.h"
+#include "hspageindicator.h"
+#include "hsdocumentloader.h"
+#include "hsconfiguration.h"
+#include "hsapp_defs.h"
+#include "hssnapline.h"
+#include "hsgui.h"
+
+
+namespace
+{
+    const char gControlLayerDocmlName[] = "controllayer.docml";
+    const char gControlLayerName[]      = "controlLayer";
+    const char gTrashBinName[]          = "trashBin";
+    const char gPageIndicatorName[]     = "pageIndicator";
+}
+
+/*!
+    \class HsIdleWidget
+    \ingroup group_hshomescreenstateplugin
+    \brief View part of the home screen idle state.
+
+    Maintains the idle view ui layers and takes care of
+    receiving user input and communicating it to the idle
+    state for further processing.
+*/
+
+/*!
+    Constructs a new idle widget with the given \a parent.
+*/
+HsIdleWidget::HsIdleWidget(QGraphicsItem *parent)
+  : HbWidget(parent),
+    mControlLayer(0), mPageLayer(0), mPageWallpaperLayer(0),
+    mSceneLayer(0),
+    mTrashBin(0), mPageIndicator(0),
+    mHorizontalSnapLine(0), mVerticalSnapLine(0)
+{
+    setFlag(ItemHasNoContents);
+
+    loadControlLayer();
+
+    QGraphicsLinearLayout *linearLayout = 0;
+
+    linearLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    linearLayout->setContentsMargins(0, 0, 0, 0);
+    linearLayout->setSpacing(0);
+    mPageLayer = new HbWidget(this);
+    mPageLayer->setLayout(linearLayout);
+    mPageLayer->setZValue(2);
+    
+    linearLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    linearLayout->setContentsMargins(0, 0, 0, 0);
+    linearLayout->setSpacing(0);
+    mPageWallpaperLayer = new HbWidget(this);
+    mPageWallpaperLayer->setLayout(linearLayout);
+    mPageWallpaperLayer->setZValue(1);
+    
+    linearLayout = new QGraphicsLinearLayout(Qt::Horizontal);
+    linearLayout->setContentsMargins(0, 0, 0, 0);
+    linearLayout->setSpacing(0);
+    mSceneLayer = new HbWidget(this);
+    mSceneLayer->setLayout(linearLayout);
+    mSceneLayer->setZValue(0);
+}
+
+/*!
+    Destroys this idle widget.
+*/
+HsIdleWidget::~HsIdleWidget()
+{
+    QList<HsPage *> pages = HsScene::instance()->pages();
+    foreach (HsPage *page, pages) {
+        page->visual()->setParentItem(0);
+        if (page->visual()->scene()) {
+            page->visual()->scene()->removeItem(page->visual());
+        }
+        HsWallpaper *pageWallpaper = page->wallpaper();
+        if (pageWallpaper) {
+            pageWallpaper->setParentItem(0);
+            if (pageWallpaper->scene()) {
+                pageWallpaper->scene()->removeItem(pageWallpaper);
+            }
+        }
+    }
+
+    HsWallpaper *sceneWallpaper = HsScene::instance()->wallpaper();
+    if (sceneWallpaper) {
+        sceneWallpaper->setParentItem(0);
+        if (sceneWallpaper->scene()) {
+            sceneWallpaper->scene()->removeItem(sceneWallpaper);
+        }
+    }
+}
+
+qreal HsIdleWidget::sceneX() const
+{
+    return mPageLayer->x();
+}
+
+void HsIdleWidget::setSceneX(qreal x)
+{
+    if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::SceneWallpaper) {
+        mPageLayer->setX(x);
+        mSceneLayer->setX((parallaxFactor() * x) - HSCONFIGURATION_GET(bounceEffect) / 2);
+    } else {
+        mPageLayer->setX(x);
+        mPageWallpaperLayer->setX(x);
+    }
+}
+
+/*!
+    Layouts the ui layers according to the given \a rect.
+    If given \a rect has different size than a fullscreen view, rect
+    is lifted up by statuspane height. Normally HsIdleWidget position is 0,0 
+    relative to it's parent container (HbView). This functionality tackles
+    problem caused by HbStackedLayout which sets top most rect for all items 
+    (views) in a stack (not considering fullscreen mode).
+*/
+void HsIdleWidget::setGeometry(const QRectF &rect)
+{
+    
+    int n = HsScene::instance()->pages().count();
+    QRectF layoutRect(HsGui::instance()->layoutRect());
+    if (layoutRect == rect || (layoutRect.height() == rect.width() && layoutRect.width() == rect.height())) {
+        mControlLayer->resize(rect.size());
+        mPageLayer->resize(n * rect.width(), rect.height());
+        if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
+            mPageWallpaperLayer->resize(n * rect.width(), rect.height());
+        }
+        mSceneLayer->resize(2 * rect.width() + HSCONFIGURATION_GET(bounceEffect), rect.height());
+        HbWidget::setGeometry(rect);
+    } else {
+        QRectF sceneRect = mapToScene(rect).boundingRect();
+        // HbView is a container item for widget, thus 0,0 is relative to view's position.
+        // Lift rect by offset. Fullscreen view is in 0,0 position in scene coordinates otherwise
+        // it's e.g 0,68 (statuspane being at 0,0 and view at 0,68)
+        sceneRect.setTop(-sceneRect.top());
+        HbWidget::setGeometry(sceneRect);
+    }
+}
+
+/*!
+    Sets the active page \a index to the page
+    indicator.
+*/
+void HsIdleWidget::setActivePage(int index)
+{
+    mPageIndicator->setActiveItemIndex(index);
+}
+
+/*!
+    Inserts the given \a page at index position
+    \a index in the page layer.
+*/
+void HsIdleWidget::insertPage(int index, HsPage *page)
+{
+    QGraphicsLinearLayout *layout =
+        static_cast<QGraphicsLinearLayout *>(mPageLayer->layout());
+    layout->insertItem(index, page->visual());
+    mPageLayer->resize(
+        layout->count() * size().width(), size().height());
+
+    if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
+        QGraphicsLinearLayout *layout =
+            static_cast<QGraphicsLinearLayout *>(mPageWallpaperLayer->layout());
+        layout->insertItem(index, page->wallpaper());
+        mPageWallpaperLayer->resize(
+            layout->count() * size().width(), size().height());
+    }
+}
+
+/*!
+    Removes the page at index position
+    \a index in the page layer.
+*/
+void HsIdleWidget::removePage(int index)
+{
+    QGraphicsLinearLayout *layout =
+        static_cast<QGraphicsLinearLayout *>(mPageLayer->layout());
+    layout->removeAt(index);
+    mPageLayer->resize(
+        layout->count() * size().width(), size().height());
+
+    if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
+        QGraphicsLinearLayout *layout =
+            static_cast<QGraphicsLinearLayout *>(mPageWallpaperLayer->layout());
+        layout->removeAt(index);
+        mPageWallpaperLayer->resize(
+            layout->count() * size().width(), size().height());
+    }
+    mPageIndicator->removeItem(index);
+}
+
+/*!
+    \fn HsIdleWidget::controlLayer() const
+
+    Returns the control layer.
+*/
+
+/*!
+    \fn HsIdleWidget::pageLayer() const
+
+    Returns the page layer.
+*/
+
+/*!
+    \fn HsIdleWidget::sceneLayer() const
+
+    Returns the scene layer.
+*/
+
+/*!
+    \fn HsIdleWidget::trashBin() const
+
+    Returns the trashbin widget.
+*/
+
+/*!
+    \fn HsIdleWidget::pageIndicator() const
+
+    Returns the page indicator widget.
+*/
+
+/*!
+    Sets the trashbin visible and hides the page indicator.
+*/
+void HsIdleWidget::showTrashBin()
+{
+    mPageIndicator->hide();
+    mTrashBin->show();
+}
+
+/*!
+    Sets the page indicator visible and hides the trashbin.
+*/
+void HsIdleWidget::showPageIndicator()
+{
+    mTrashBin->hide();
+    mTrashBin->deactivate();
+    mPageIndicator->setSpacing(HSCONFIGURATION_GET(pageIndicatorSpacing)); // for usability optimization widget, can be removed later on
+    mPageIndicator->setVisible(1 < mPageIndicator->itemCount());
+}
+
+/*!
+    Shows the Vertical snapping lines showing the guidance
+*/
+void HsIdleWidget::showVerticalSnapLine(const QLineF &snapLine)
+{
+    QVariantHash snapConfiguration;
+    snapConfiguration[SNAPLINEFADEINDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeInDuration));
+    snapConfiguration[SNAPLINEFADEOUTDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeOutDuration));
+
+    mVerticalSnapLine->setConfiguration(snapConfiguration);
+    mVerticalSnapLine->showLine(snapLine);
+}
+
+/*!
+    Shows the Horizontal snapping lines showing the guidance
+*/
+void HsIdleWidget::showHorizontalSnapLine(const QLineF &snapLine)
+{
+    QVariantHash snapConfiguration;
+    snapConfiguration[SNAPLINEFADEINDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeInDuration));
+    snapConfiguration[SNAPLINEFADEOUTDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeOutDuration));
+
+    mHorizontalSnapLine->setConfiguration(snapConfiguration);
+    mHorizontalSnapLine->showLine(snapLine);
+}
+
+/*!
+    Hides the Vertical snapping line showing the guidance
+*/
+void HsIdleWidget::hideVerticalSnapLine()
+{
+    mVerticalSnapLine->hideLine();
+}
+
+/*!
+    Hides the Horizontal snapping line showing the guidance
+*/
+void HsIdleWidget::hideHorizontalSnapLine()
+{
+    mHorizontalSnapLine->hideLine();
+}
+
+/*!
+    Reimplements QGraphicsWidget::polishEvent().
+*/
+void HsIdleWidget::polishEvent()
+{
+    HsScene *scene = HsScene::instance();
+    Q_ASSERT(scene);
+
+    QGraphicsLinearLayout *pageLayout = 
+        static_cast<QGraphicsLinearLayout *>(mPageLayer->layout());
+
+    QList<HsPage *> pages = scene->pages();
+
+    foreach (HsPage *page, pages) {
+        pageLayout->addItem(page->visual());
+        if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
+            QGraphicsLinearLayout *pageWallpaperLayout = 
+                static_cast<QGraphicsLinearLayout *>(mPageWallpaperLayer->layout());
+            pageWallpaperLayout->addItem(page->wallpaper());
+        }
+    }
+   if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::SceneWallpaper) {
+        QGraphicsLinearLayout *sceneLayout = 
+            static_cast<QGraphicsLinearLayout *>(mSceneLayer->layout());
+    	HsWallpaper *wallpaper = HsScene::instance()->wallpaper();
+        sceneLayout->addItem(wallpaper);
+    }
+           
+    mPageIndicator->initialize(pages.count(), scene->activePageIndex());    
+    showPageIndicator();
+
+   // HsGui::instance()->scene()->installEventFilter(this);
+}
+
+/*!
+    Loads the control layer declared in a docml file.
+*/
+void HsIdleWidget::loadControlLayer()
+{
+    HsDocumentLoader loader;
+    bool loaded = false;
+
+#ifndef Q_OS_SYMBIAN
+    QString path = QDir::currentPath();
+#else
+    QString path = "c:";
+#endif
+
+    QString file = path + "/hsresources/" + gControlLayerDocmlName;
+    QString fallbackPath = QString(":/") + gControlLayerDocmlName;
+
+    if (QFile::exists(file)) {
+        loader.load(file, &loaded);
+        if (!loaded) {
+            loader.load(fallbackPath, &loaded);
+        }
+    } else {
+        loader.load(fallbackPath, &loaded);
+    }
+
+    if (loaded) {
+        mControlLayer = qobject_cast<HbWidget *>(loader.findWidget(gControlLayerName));
+        mControlLayer->setZValue(3);
+        mControlLayer->setParentItem(this);
+
+        mTrashBin = qobject_cast<HsTrashBinWidget *>(loader.findWidget(gTrashBinName));
+        mTrashBin->setZValue(1e6);
+
+        mPageIndicator = qobject_cast<HsPageIndicator *>(loader.findWidget(gPageIndicatorName));
+        mPageIndicator->setZValue(1e6);
+
+
+        mHorizontalSnapLine = new HsSnapLine(mControlLayer);
+        mHorizontalSnapLine->setZValue(10);
+
+        mVerticalSnapLine = new HsSnapLine(mControlLayer);
+        mVerticalSnapLine->setZValue(10);
+    } else {
+        // TODO: Handle error.
+    }
+}
+
+qreal HsIdleWidget::parallaxFactor() const
+{   
+    qreal clw = mControlLayer->size().width();
+    qreal slw = mSceneLayer->size().width() - HSCONFIGURATION_GET(bounceEffect);
+    int n = HsScene::instance()->pages().count();
+    if (n < 2) {
+        return 1;
+    } else {
+        return (slw - clw) / ((n - 1) * clw);
+    }
+}
--- a/homescreenapp/hsdomainmodel/src/hspage.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hspage.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -19,15 +19,18 @@
 
 #include "hsdomainmodeldatastructures.h"
 #include "hspage.h"
+#include "hspagevisual.h"
 #include "hspagetoucharea.h"
 #include "hspagenewwidgetlayout.h"
 #include "hsscene.h"
 #include "hsdatabase.h"
 #include "hswidgethost.h"
+#include "hswidgethostvisual.h"
 #include "hswallpaper.h"
 #include "hswidgetpositioningonwidgetadd.h"
 #include "hswidgetpositioningonorientationchange.h"
 #include "hsconfiguration.h"
+#include "hsgui.h"
 
 
 /*!
@@ -43,18 +46,18 @@
     \a parent Owner.
     \a aFlags Window flags.
 */
-HsPage::HsPage(QGraphicsItem* parent)
-    : HbWidget(parent),
+HsPage::HsPage(QObject* parent)
+    : QObject(parent),
       mDatabaseId(-1),
+      mPageVisual(new HsPageVisual), 
       mWallpaper(0),
       mRemovable(true),
-      mTouchArea(0)
+      mPageMargin(0.0)
 {
-    setFlag(QGraphicsItem::ItemHasNoContents);
-    setSizePolicy(QSizePolicy(QSizePolicy::Ignored,
-                              QSizePolicy::Ignored));
-
-    setupTouchArea();
+ 
+    //Page margin
+    mPageMargin = HSCONFIGURATION_GET(pageMargin);
+    connect(HsConfiguration::instance(), SIGNAL(propertyChanged(QString)), SLOT(onPageMarginChanged(QString)));
 }
 
 /*!
@@ -62,6 +65,36 @@
 */
 HsPage::~HsPage()
 {
+    // visuals are owned by widget host, detach those from page visual
+    HsWidgetHostVisual *visual(0);
+    foreach (HsWidgetHost *widget, mWidgets) {
+        visual = widget->visual();
+        visual->setParent(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
+    }
+   
+    foreach (HsWidgetHost *widget, mNewWidgets) {
+        visual = widget->visual();
+        visual->setParent(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
+    }
+   
+    foreach (HsWidgetHost *widget, mUnavailableWidgets) {
+        visual = widget->visual();
+        visual->setParent(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
+    }
+    qDeleteAll(mWidgets);
+    qDeleteAll(mNewWidgets);
+    qDeleteAll(mUnavailableWidgets);
+
+    delete mPageVisual;
     delete mWallpaper;
 }
 
@@ -80,7 +113,7 @@
 {
     mDatabaseId = id;
 }
-
+/*
 void HsPage::setGeometry(const QRectF &rect)
 {
     if (mTouchArea) {
@@ -89,7 +122,7 @@
 
     HbWidget::setGeometry(rect);
 }
-
+*/
 /*!
     Loads widgets.
 */
@@ -112,14 +145,23 @@
 
     foreach (HsWidgetData data, datas) {
         HsWidgetHost *widget = new HsWidgetHost(data.id);
-        mWidgets.append(widget);
-        connectWidget(widget);
-        widget->setPage(this);
-        widget->setParentItem(this);
-        widget->startWidget(isDefaultPage());
+        if (!widget->loadPresentation(Qt::Horizontal) &&
+            !widget->loadPresentation(Qt::Vertical)) {
+            widget->setPage(this);
+            widget->visual()->hide();
+            connectWidget(widget);
+            mNewWidgets << widget;            
+        }
+        else {
+            mWidgets.append(widget);
+            connectWidget(widget);
+            widget->setPage(this);
+            widget->visual()->setParentItem(this->visual());
+            widget->startWidget(isDefaultPage());
+        }
     }
 
-    connect(HsScene::mainWindow(),
+    connect(HsGui::instance(),
         SIGNAL(orientationChanged(Qt::Orientation)),
         SLOT(onOrientationChanged(Qt::Orientation)));
 
@@ -127,7 +169,7 @@
 }
 
 /*!
-    Return wallpaper. 
+    Return wallpaper.
 */
 HsWallpaper *HsPage::wallpaper() const
 {
@@ -152,10 +194,11 @@
 
     connectWidget(widgetHost);
     mWidgets << widgetHost;
-    widgetHost->setParentItem(this);
+    widgetHost->visual()->setParentItem(visual());
 
     return true;
  }
+
 /*!
     Remove given \a widgetHost from a page. Widget is not deleted. 
     Returns true if successful
@@ -168,10 +211,11 @@
 
     disconnectWidget(widgetHost);
     mWidgets.removeOne(widgetHost);
-    widgetHost->setParentItem(0);
+    widgetHost->visual()->setParentItem(0);
 
     return true;
 }
+
 /*!
     Returns list of new widgets belonging to a page. Widgets which are
     not yet layouted are considered as new widgets. 
@@ -195,19 +239,10 @@
     if (mNewWidgets.contains(widgetHost)) {
         return true;
     }
+    
+    widgetHost->setPage(this);    
 
-    HsWidgetPresentationData presentation;
-    presentation.orientation = HsScene::orientation();
-    if (!widgetHost->getPresentation(presentation)) {
-        presentation.orientation = HsScene::orientation();
-        presentation.setPos(mTouchPoint);
-        presentation.zValue = 0;
-        widgetHost->savePresentation(presentation);
-    }
-
-    widgetHost->hide();
-    widgetHost->setPos(presentation.x, presentation.y);
-    widgetHost->setZValue(presentation.zValue);
+    widgetHost->visual()->hide();
 
     connectWidget(widgetHost);
     mNewWidgets << widgetHost;
@@ -224,10 +259,10 @@
         return;
     }
 
-    HsPageNewWidgetLayout *newWidgetLayout = static_cast<HsPageNewWidgetLayout *>(layout());
+    HsPageNewWidgetLayout *newWidgetLayout = static_cast<HsPageNewWidgetLayout *>(visual()->layout());
     if (!newWidgetLayout) {
         newWidgetLayout = new HsPageNewWidgetLayout(mTouchPoint);
-        setLayout(newWidgetLayout);
+        visual()->setLayout(newWidgetLayout);
     }    
     updateZValues();
     HsWidgetHost *widget = 0;
@@ -235,36 +270,67 @@
         widget = mNewWidgets.at(i);
         newWidgetLayout->addItem(widget);
         widget->setPage(this);
-        widget->setParentItem(this);
+        widget->visual()->setParentItem(visual());
         widget->showWidget();
-        widget->show();
+        widget->visual()->show();
     }
     mWidgets << mNewWidgets;
     mNewWidgets.clear();
 }
 
 /*!
+    Clears new widgets list and resets layout.
+*/
+void HsPage::resetNewWidgets()
+{
+    mNewWidgets.clear();
+    visual()->setLayout(0);
+}
+
+/*!
     Remove page and all it's contained widgets from database 
 */
 bool HsPage::deleteFromDatabase()
 {
+    
+    HsWidgetHostVisual *visual(0);
     foreach (HsWidgetHost *widget, mWidgets) {
+        visual = widget->visual();
+        visual->setParent(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
         widget->remove();
     }
     mWidgets.clear();
+    
 
     foreach (HsWidgetHost *widget, mNewWidgets) {
+        visual = widget->visual();
+        visual->setParent(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
         widget->remove();
     }
     mNewWidgets.clear();
 
     foreach (HsWidgetHost *widget, mUnavailableWidgets) {
+        visual = widget->visual();
+        visual->setParent(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
         widget->remove();
     }
     mUnavailableWidgets.clear();
-
+    
+    if (mWallpaper) {
+        mWallpaper->remove();
+    }
     return HsDatabase::instance()->deletePage(mDatabaseId);
 }
+
 /*!
     Return list of widgets belonging to a page 
 */
@@ -289,6 +355,7 @@
 {
     mRemovable = removable;
 }
+
 /*!
     Return true if page is default page.
 */
@@ -296,6 +363,7 @@
 {
     return mDatabaseId == HSCONFIGURATION_GET(defaultPageId);
 }
+
 /*!
     Return true if page is active page.
 */
@@ -303,6 +371,7 @@
 {
     return this == HsScene::instance()->activePage();
 }
+
 /*!
     Create page into database and return instance of a new page.
 */
@@ -322,12 +391,75 @@
 }
 
 /*!
+    The widget is bounded in the rectangle which is smaller by pageMargin on all sides of page.
+*/
+QPointF HsPage::adjustedWidgetPosition(const QRectF &origWidgetRect)
+{
+    QRectF widgetAreaRect = contentGeometry();
+    qreal widgetX = qBound(widgetAreaRect.left(), origWidgetRect.x(), widgetAreaRect.right() - origWidgetRect.width());
+    qreal widgetY = qBound(widgetAreaRect.top(), origWidgetRect.y(), widgetAreaRect.bottom() - origWidgetRect.height());
+
+    return QPointF(widgetX, widgetY);
+}
+
+/*!
+    Returns rect of rectangular where widgets are allowed to be placed in the page.
+*/
+QRectF HsPage::contentGeometry()
+{
+    return contentGeometry(HsGui::instance()->orientation());
+}
+
+/*!
+    Returns rect of rectangular where widgets are allowed to be placed in the page.
+*/
+QRectF HsPage::contentGeometry(Qt::Orientation orientation)
+{
+    QRectF pageRect = HsGui::instance()->layoutRect();
+
+    if (orientation != HsGui::instance()->orientation()) {
+        qreal width = pageRect.width();
+        qreal height = pageRect.height();
+        pageRect.setWidth(height);
+        pageRect.setHeight(width);
+    }
+
+    //Take care of chrome in both orientation
+    pageRect.setTop(64);
+
+    //Shrink by page margins at each side
+    return pageRect.adjusted(mPageMargin, mPageMargin, -mPageMargin, -mPageMargin);
+}
+
+/*!
+    Returns rect of rectangular where widgets are allowed to be placed in the page.
+*/
+QRectF HsPage::contentRect()
+{
+    return contentRect(HsGui::instance()->orientation());
+}
+
+/*!
+    Returns rect of rectangular where widgets are allowed to be placed in the page.
+*/
+QRectF HsPage::contentRect(Qt::Orientation orientation)
+{
+    QRectF rect = contentGeometry(orientation);
+    rect.moveTopLeft(QPointF(0,0));
+    return rect;
+}
+
+HsPageVisual *HsPage::visual() const
+{
+    return mPageVisual;
+}
+/*!
     Calls onShow() for contained widgets.
 */
 void HsPage::showWidgets()
 {
     foreach (HsWidgetHost *widget, mWidgets) {
-        if (widget->parentItem() == this) {
+        if (widget->visual()->parentItem() == visual()) {
             widget->showWidget();
         }
     }
@@ -339,14 +471,14 @@
 void HsPage::hideWidgets()
 {
     foreach (HsWidgetHost *widget, mWidgets) {
-        if (widget->parentItem() == this) {
+        if (widget->visual()->parentItem() == visual()) {
             widget->hideWidget();
         }
     }
 }
 
 /*!
-    Propogate online state to widgets.
+    Propagate online state to widgets.
 */
 void HsPage::setOnline(bool online)
 {
@@ -357,6 +489,7 @@
         widget->setOnline(online);
     }
 }
+
 /*!
     Update widgets z-values and persist those. Active widget has top most 
     z-value.
@@ -368,7 +501,7 @@
     if (!mWidgets.isEmpty()) {
         QMultiMap<qreal, HsWidgetHost *> map;
         foreach (HsWidgetHost *widget, mWidgets) {
-            map.insert(widget->zValue(), widget);
+            map.insert(widget->visual()->zValue(), widget);
         }
 
         QList<HsWidgetHost *> sortedWidgets = map.values();
@@ -380,14 +513,14 @@
         }
 
         foreach (HsWidgetHost *widget, sortedWidgets) {
-            widget->setZValue(z++);
+            widget->visual()->setZValue(z++);
             widget->savePresentation();
         }
     }
 
     if (!mNewWidgets.isEmpty()) {
         foreach (HsWidgetHost *widget, mNewWidgets) {
-            widget->setZValue(z++);
+            widget->visual()->setZValue(z++);
             widget->savePresentation();
         }
     }
@@ -402,11 +535,11 @@
 /*!
     Create touch area for page.
 */
-void HsPage::setupTouchArea()
+/*void HsPage::setupTouchArea()
 {
     mTouchArea = new HsPageTouchArea(this);
     mTouchArea->setZValue(-1);
-}
+}*/
 /*!
     Utility to connect widget signals to page.
 */
@@ -414,7 +547,7 @@
 {
     connect(widget, SIGNAL(finished()), SLOT(onWidgetFinished()));
     connect(widget, SIGNAL(faulted()), SLOT(onWidgetFaulted()));
-    connect(widget, SIGNAL(resized()), SLOT(onWidgetResized()));
+    connect(widget->visual(), SIGNAL(resized()), SLOT(onWidgetResized()));
     connect(widget, SIGNAL(available()), SLOT(onWidgetAvailable()));
     connect(widget, SIGNAL(unavailable()), SLOT(onWidgetUnavailable()));
 }
@@ -423,6 +556,7 @@
 */
 void HsPage::disconnectWidget(HsWidgetHost *widget)
 {
+    widget->visual()->disconnect(this);
     widget->disconnect(this);
 }
 /*!
@@ -437,6 +571,14 @@
     if (!mNewWidgets.removeOne(widget)) {
         mWidgets.removeOne(widget);
     }
+    if (widget){     
+        HsWidgetHostVisual *visual = widget->visual();
+        visual->setParentItem(0);
+        if (visual->scene()) {
+            visual->scene()->removeItem(visual);
+        }
+    }
+    
 
     disconnectWidget(widget);
     widget->remove();
@@ -455,15 +597,11 @@
 */
 void HsPage::onWidgetResized()
 {
-    if ( !layout() ) {
-        HsWidgetHost *widget = qobject_cast<HsWidgetHost *>(sender());
-        QRectF widgetRect = widget->geometry();
-        QRectF pageRect = HsScene::mainWindow()->layoutRect();
-        qreal widgetX = qBound(qreal(0), widgetRect.x(), pageRect.width() - widgetRect.width());
-        qreal widgetY = qBound(qreal(64), widgetRect.y(), pageRect.height() - widgetRect.height());
-        widget->setPos(widgetX, widgetY);
+    if (!visual()->layout()) {
+        HsWidgetHostVisual *widgetVisual = qobject_cast<HsWidgetHostVisual *>(sender());
+        widgetVisual->setPos(adjustedWidgetPosition(widgetVisual->geometry()));
     } else {
-        layout()->invalidate();
+        visual()->layout()->invalidate();
     }
 }
 /*!
@@ -472,13 +610,14 @@
 void HsPage::onWidgetAvailable()
 {
     HsWidgetHost *widget = qobject_cast<HsWidgetHost *>(sender());
+    HsWidgetHostVisual *widgetVisual(widget->visual());
 
     mUnavailableWidgets.removeOne(widget);
     mWidgets.append(widget);
 
-    widget->setParentItem(this);
+    widgetVisual->setParentItem(visual());
     widget->startWidget(isActivePage());
-    widget->show();
+    widgetVisual->show();
 }
 /*!
     Update internal bookkeeping and hide widget
@@ -486,6 +625,7 @@
 void HsPage::onWidgetUnavailable()
 {
     HsWidgetHost *widget = qobject_cast<HsWidgetHost *>(sender());
+    HsWidgetHostVisual *widgetVisual(widget->visual());
 
     if (mWidgets.contains(widget)) {
         mWidgets.removeOne(widget);
@@ -497,46 +637,154 @@
 
     mUnavailableWidgets.append(widget);
 
-    widget->hide();
-    widget->setParentItem(0);
+    widgetVisual->hide();
+    widgetVisual->setParentItem(0);
 }
+
 /*!
     Run positioning algorithm for widgets which don't have position on 
     target orientation. Otherwise set orientation positions for widgets.
 */
 void HsPage::onOrientationChanged(Qt::Orientation orientation)
 {
-    QRectF rect = HsScene::mainWindow()->layoutRect();
-
     HsWidgetPositioningOnOrientationChange *converter =
         HsWidgetPositioningOnOrientationChange::instance();
 
-    qreal chrome = 64;
-    QRectF from(0, chrome, rect.height(), rect.width() - chrome);
-    QRectF to(0, chrome, rect.width(), rect.height() - chrome);
+    Qt::Orientation orientationFrom = orientation == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
+    QRectF from = contentGeometry(orientationFrom);
+    QRectF to = contentGeometry(orientation);
 
     HsWidgetPresentationData presentation;
     presentation.orientation = orientation;
-
+    
+    HsWidgetHostVisual *visual(0);
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    QList<HsWidgetHost*> newWidgets;
+#endif //HSWIDGETORGANIZER_ALGORITHM    
     foreach (HsWidgetHost *widget, mWidgets) {
+        visual = widget->visual();
         if (!widget->getPresentation(presentation)) {
+#ifndef HSWIDGETORGANIZER_ALGORITHM
             QList<QRectF> geometries = converter->convert(
-                from, QList<QRectF>() << widget->geometry(), to);
-            widget->setGeometry(geometries.first());
+                from, QList<QRectF>() << visual->geometry(), to);
+            visual->setGeometry(geometries.first());
             widget->savePresentation();
+#else //HSWIDGETORGANIZER_ALGORITHM
+            newWidgets << widget;
+#endif //HSWIDGETORGANIZER_ALGORITHM
         } else {
-            widget->setPos(presentation.pos());
-            widget->setZValue(presentation.zValue);
+            QRectF adjustWidgetPosition;
+            adjustWidgetPosition = visual->geometry();
+            adjustWidgetPosition.moveTopLeft(presentation.pos());
+            visual->setPos(adjustedWidgetPosition(adjustWidgetPosition));
+            visual->setZValue(presentation.zValue);
+            widget->savePresentation(); //Needed to follow pageMargin dynamic change
+        }
+    }
+    
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    // sort new widgets in order
+    if (newWidgets.count()) {
+        // TODO: read from configuration? or just use height for portrait and width for landscape (currently only height is used)
+        sortOrder order(height);
+        if(orientation == Qt::Horizontal) {
+            order = width;
+        } 
+        sortWidgets(order, newWidgets);
+        // get rects for new widgets
+        QList<QRectF> newRects;
+        foreach (HsWidgetHost *newWidget, newWidgets) {
+            newRects << QRectF(QPointF(), newWidget->visual()->preferredSize());
+        }
+        
+        // get page rect
+        QRectF pageRect = contentGeometry();
+
+        // scan existing widgets rects
+        QList<QRectF> existingRects;
+        foreach (HsWidgetHost *widget, mWidgets) {
+            if (!newWidgets.contains(widget)) {
+                existingRects << QRectF(widget->visual()->pos(), widget->visual()->preferredSize());
+            }
+        }
+         
+        // calculate new widget positions with "stuck 'em all"-algorithm
+        HsWidgetPositioningOnWidgetAdd *algorithm =
+            HsWidgetPositioningOnWidgetAdd::instance();
+        QList<QRectF> calculatedRects =
+            algorithm->convert(pageRect, existingRects, newRects, QPointF());
+
+        for ( int i=0; i<newWidgets.count(); i++) {            
+            int j = mWidgets.indexOf(newWidgets.at(i));
+            mWidgets.at(j)->visual()->setGeometry(calculatedRects.at(i));
+            mWidgets.at(j)->savePresentation();            
+        }               
+    }    
+#endif //HSWIDGETORGANIZER_ALGORITHM
+    
+}
+
+void HsPage::onPageMarginChanged(const QString &value)
+{
+    if (value == "pageMargin") {
+        mPageMargin = HSCONFIGURATION_GET(pageMargin);
+        HsWidgetHostVisual *visual(0);
+        if (!mWidgets.isEmpty()) {
+            foreach (HsWidgetHost *widget, mWidgets) {
+                visual = widget->visual();
+                visual->setPos(adjustedWidgetPosition(visual->geometry()));
+                widget->savePresentation();
+            }
+        }
+
+        if (!mNewWidgets.isEmpty()) {
+            foreach (HsWidgetHost *widget, mNewWidgets) {
+                visual = widget->visual();
+                visual->setPos(adjustedWidgetPosition(visual->geometry()));
+                widget->savePresentation();
+            }
         }
     }
 }
-
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+// TODO: sorting should be done in algorithm class, make widget<->rect mapping here and move sortWidgets function to algorithm side
 /*!
-    Clears new widgets list and resets layout.
+    Sorts widgets in height/width order
 */
-void HsPage::resetNewWidgets()
+void HsPage::sortWidgets(sortOrder order, QList<HsWidgetHost*> &widgets)
 {
-    mNewWidgets.clear();
-    setLayout(0);
+    QList<HsWidgetHost*> tmpWidgets;
+
+    for ( int i = 0; i < widgets.count(); i++) {
+        int index = 0;
+        // add first widget to sorted list
+        if (i == 0) {
+            tmpWidgets << widgets.at(i);
+        } else {
+            // go through existing widgets in the sorted list
+            for ( int j = 0; j < tmpWidgets.count(); j++) {
+                // sort widgets in height order
+                if (order == height) {
+                    /* if widgets heigth is smaller on already
+                       existing ones in the list -> increment index
+                    */
+                    if (widgets.at(i)->visual()->preferredHeight() <= tmpWidgets.at(j)->visual()->preferredHeight()) {
+                        index++;
+                    }
+                // sort widgets in width order
+                } else {
+                    /* if widgets width is smaller on already
+                       existing ones in the sorted list -> increment index
+                    */
+                    if (widgets.at(i)->visual()->preferredWidth() <= tmpWidgets.at(j)->visual()->preferredWidth()) {
+                        index++;
+                    }
+                }
+            }
+            // add widget to its correct index in sorted list
+            tmpWidgets.insert(index, widgets.at(i));
+        }
+    }
+    widgets = tmpWidgets;    
 }
-
+#endif //HSWIDGETORGANIZER_ALGORITHM
--- a/homescreenapp/hsdomainmodel/src/hspagenewwidgetlayout.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hspagenewwidgetlayout.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 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"
@@ -15,17 +15,18 @@
 *
 */
 
-#include <HbInstance>
-
 #include "hsdomainmodeldatastructures.h"
 #include "hspagenewwidgetlayout.h"
 #include "hsscene.h"
+#include "hspage.h"
 #include "hsdatabase.h"
 #include "hswidgethost.h"
+#include "hswidgethostvisual.h"
 #include "hswallpaper.h"
 #include "hswidgetpositioningonwidgetadd.h"
 #include "hswidgetpositioningonorientationchange.h"
 #include "hsconfiguration.h"
+#include "hsgui.h"
 
 
 /*!
@@ -45,7 +46,7 @@
     : QGraphicsLayout(parent),    
     mTouchPoint(touchPoint)
 {
-    mSize = HsScene::mainWindow()->layoutRect().size();
+    mSize = HsGui::instance()->layoutRect().size();
 }
 
 /*!
@@ -68,7 +69,7 @@
 */
 QGraphicsLayoutItem *HsPageNewWidgetLayout::itemAt(int i) const
 {
-    return mNewWidgets.at(i);
+    return mNewWidgets.at(i)->visual();
 }
 
 /*!
@@ -102,10 +103,20 @@
 void HsPageNewWidgetLayout::setGeometry(const QRectF &rect)
 {
     QGraphicsLayout::setGeometry(rect);
-   
-    QList<QRectF> rects;
+
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+    // sort new widgets in order
+    if (mNewWidgets.count() > 1) {
+        // TODO: read from configuration? or just use height for portrait and width for landscape (currently only height is used)
+        sortOrder order(height);
+        mNewWidgets = sortWidgets(order);
+    }
+#endif
+
+    // get rects for new widgets
+    QList<QRectF> newRects;
     foreach (HsWidgetHost *newWidget, mNewWidgets) {
-        rects << QRectF(QPointF(), newWidget->preferredSize());
+        newRects << QRectF(QPointF(), newWidget->visual()->preferredSize());
     }
 
     /* if there is touch point defined (widget added from context menu)
@@ -113,29 +124,38 @@
        -> set widget center point to this touch point
     */
     if (mTouchPoint != QPointF() && mNewWidgets.count() == 1) {
-        QRectF pageRect = HsScene::mainWindow()->layoutRect();
-        qreal widgetX = qBound(qreal(0), mTouchPoint.x() - rects.at(0).width() / 2, pageRect.width() - rects.at(0).width());
-        qreal widgetY = qBound(qreal(64), mTouchPoint.y() - rects.at(0).height() / 2, pageRect.height() - rects.at(0).height());
-        mNewWidgets.at(0)->setGeometry(widgetX,
-                                       widgetY,
-                                       rects.at(0).width(), 
-                                       rects.at(0).height());
+        QRectF widgetRect = newRects.at(0);
+        widgetRect.moveCenter(mTouchPoint);
+        widgetRect.moveTopLeft(HsScene::instance()->activePage()->adjustedWidgetPosition(widgetRect));
+        mNewWidgets.at(0)->visual()->setGeometry(widgetRect);
         /* we have to save widget presentation data here after drawing
            to get correct position for later use
         */
         mNewWidgets.at(0)->savePresentation();
     }
-    // otherwise calculate position with algorithm
+    // otherwise calculate widget positions with algorithm
     else {
+        // get page rect
+        QRectF pageRect = HsScene::instance()->activePage()->contentGeometry();
+
+        // scan existing widgets rects
+        QList<HsWidgetHost*> existingWidgets;
+        existingWidgets = HsScene::instance()->activePage()->widgets();
+        QList<QRectF> existingRects;
+        foreach (HsWidgetHost *widget, existingWidgets) {
+            if (!mNewWidgets.contains(widget)) {
+                existingRects << QRectF(widget->visual()->pos(), widget->visual()->preferredSize());
+            }
+        }
+         
+        // calculate new widget positions with "stuck 'em all"-algorithm
         HsWidgetPositioningOnWidgetAdd *algorithm =
             HsWidgetPositioningOnWidgetAdd::instance();
-        QRectF pageRect = HsScene::mainWindow()->layoutRect();
-        pageRect.adjust( (qreal)0,(qreal)64,(qreal)0,(qreal)0);
         QList<QRectF> calculatedRects =
-            algorithm->convert(pageRect, rects, QPointF());
+            algorithm->convert(pageRect, existingRects, newRects, QPointF());
 
         for ( int i=0; i<mNewWidgets.count(); i++) {
-            mNewWidgets.at(i)->setGeometry(calculatedRects.at(i));
+            mNewWidgets.at(i)->visual()->setGeometry(calculatedRects.at(i));
             mNewWidgets.at(i)->savePresentation();
         }
     }
@@ -148,3 +168,46 @@
 {
     mNewWidgets.append(item);
 }
+
+#ifdef HSWIDGETORGANIZER_ALGORITHM
+// TODO: sorting should be done in algorithm class, make widget<->rect mapping here and move sortWidgets function to algorithm side
+/*!
+    Sorts widgets in height/width order
+*/
+QList<HsWidgetHost*> HsPageNewWidgetLayout::sortWidgets(sortOrder order)
+{
+    QList<HsWidgetHost*> tmpWidgets;
+
+    for ( int i = 0; i < mNewWidgets.count(); i++) {
+        int index = 0;
+        // add first widget to sorted list
+        if (i == 0) {
+            tmpWidgets << mNewWidgets.at(i);
+        } else {
+            // go through existing widgets in the sorted list
+            for ( int j = 0; j < tmpWidgets.count(); j++) {
+                // sort widgets in height order
+                if (order == height) {
+                    /* if widgets heigth is smaller on already
+                       existing ones in the list -> increment index
+                    */
+                    if (mNewWidgets.at(i)->visual()->preferredHeight() <= tmpWidgets.at(j)->visual()->preferredHeight()) {
+                        index++;
+                    }
+                // sort widgets in width order
+                } else {
+                    /* if widgets width is smaller on already
+                       existing ones in the sorted list -> increment index
+                    */
+                    if (mNewWidgets.at(i)->visual()->preferredWidth() <= tmpWidgets.at(j)->visual()->preferredWidth()) {
+                        index++;
+                    }
+                }
+            }
+            // add widget to its correct index in sorted list
+            tmpWidgets.insert(index, mNewWidgets.at(i));
+        }
+    }
+    return tmpWidgets;
+}
+#endif // HSWIDGETORGANIZER_ALGORITHM
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/src/hspagevisual.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* 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:
+*
+*/
+
+#include "hspagevisual.h"
+#include "hspagetoucharea.h"
+
+
+
+/*!
+    \class HsPageVisual
+    \ingroup group_hsdomainmodel
+    \brief Represents a page in the framework.
+    HsPageVisual contains group of widgets. HsPageVisual can have a wallpaper.
+*/
+
+/*!
+    Constructor.
+
+    \a parent Owner.
+    \a aFlags Window flags.
+*/
+HsPageVisual::HsPageVisual(QGraphicsItem* parent)
+    : HbWidget(parent),
+      mTouchArea(0)
+{
+    setFlag(QGraphicsItem::ItemHasNoContents);
+    setSizePolicy(QSizePolicy(QSizePolicy::Ignored,
+                              QSizePolicy::Ignored));
+
+    setupTouchArea();
+}
+
+/*!
+    Destructor.
+*/
+HsPageVisual::~HsPageVisual()
+{
+}
+
+void HsPageVisual::setGeometry(const QRectF &rect)
+{
+    if (mTouchArea) {
+        mTouchArea->resize(rect.size());
+    }
+
+    HbWidget::setGeometry(rect);
+}
+
+/*!
+    Create touch area for page.
+*/
+void HsPageVisual::setupTouchArea()
+{
+    mTouchArea = new HsPageTouchArea(this);
+    mTouchArea->setZValue(-1);
+}
+
+
+
--- a/homescreenapp/hsdomainmodel/src/hsscene.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hsscene.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -164,29 +164,41 @@
         return true;
     }
 
-    int index = mPages.indexOf(page) + 1;
+    int nextIndex = mPages.indexOf(page) + 1;
 
     HsDatabase *db = HsDatabase::instance();
     db->transaction();
-
+    // update page indexes
     HsPageData data;
-    for (int i = index; i < mPages.count(); ++i) {
-        data.id = mPages.at(i)->databaseId();
-        data.indexPosition = i - 1;
+    int pageCount(mPages.count());
+    for (;nextIndex < pageCount; ++nextIndex) {
+        data.id = mPages.at(nextIndex)->databaseId();
+        data.indexPosition = nextIndex - 1;
         if (!db->updatePage(data)) {
             db->rollback();
             return false;
         }
     }
-
+    // page will remove itself from database
     if (!page->deleteFromDatabase()) {
         db->rollback();
         return false;
     }
 
     db->commit();
-
+    // update internal list
+    int index = mPages.indexOf(page);
+    bool lastPage(mPages.last() == page);
     mPages.removeOne(page);
+    if (mPages.isEmpty()) {
+        mActivePage = NULL;
+    }else if (mActivePage == page) {
+        if (lastPage) {
+            index--;
+        }
+        setActivePageIndex(index);
+    }
+    
     return true;
 }
 
@@ -309,18 +321,18 @@
 /*!
     Return main window.
 */
-HbMainWindow *HsScene::mainWindow()
+/*HbMainWindow *HsGui::instance()
 {
     return hbInstance->allMainWindows().first();
 }
-
+*/
 /*!
     Return current orientation.
 */
-Qt::Orientation HsScene::orientation()
+/*Qt::Orientation HsGui::instance()->orientation()
 {
     return mainWindow()->orientation();
-}
+}*/
 
 /*!
     Listens for application background/foreground changes.
--- a/homescreenapp/hsdomainmodel/src/hswallpaper.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hswallpaper.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -28,6 +28,8 @@
 #include "hspage.h"
 #include "hswallpaperloader.h"
 #include "hsconfiguration.h"
+#include "hsgui.h"
+
 
 /*!
     \class HsWallpaper
@@ -58,7 +60,7 @@
     layout->addItem(mIconItem);
     setLayout(layout);
 
-    connect(HsScene::mainWindow(),
+    connect(HsGui::instance(),
         SIGNAL(orientationChanged(Qt::Orientation)),
         SLOT(updateIconItem(Qt::Orientation)));
 }
@@ -110,7 +112,7 @@
     mLandscapeImagePath = infos.first().absoluteFilePath();
     mPortraitImagePath = infos.last().absoluteFilePath();
 
-    updateIconItem(HsScene::orientation());
+    updateIconItem(HsGui::instance()->orientation());
 }
 
 /*!
@@ -150,7 +152,7 @@
     mLandscapeImagePath = infos.first().absoluteFilePath();
     mPortraitImagePath = infos.last().absoluteFilePath();
 
-    updateIconItem(HsScene::orientation());
+    updateIconItem(HsGui::instance()->orientation());
     return true;
 }
 
--- a/homescreenapp/hsdomainmodel/src/hswidgetcomponentregistry.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hswidgetcomponentregistry.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -25,13 +25,12 @@
 #include "caentry.h" 
 #include "cadefs.h"
 #include "canotifier.h"
-#include "hsscene.h"
 
 #include <QSignalMapper>
 #include <QDir>
 #include <QCoreApplication>
 
-#include <HbMainWindow>
+//#include <HbMainWindow>
 
 /*!
     \class HsWidgetComponentRegistry
@@ -58,7 +57,7 @@
 {
     if (!mInstance) {
         mInstance = new HsWidgetComponentRegistry;
-        mInstance->setParent(HsScene::mainWindow());
+        mInstance->setParent(QCoreApplication::instance());
     }
     return mInstance;
 }
--- a/homescreenapp/hsdomainmodel/src/hswidgethost.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hswidgethost.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -19,31 +19,20 @@
 #include <QStateMachine>
 #include <QState>
 #include <QFinalState>
-#include <QGraphicsLinearLayout>
-#include <QParallelAnimationGroup>
-#include <QPropertyAnimation>
-#include <QGraphicsDropShadowEffect>
-#include <QGraphicsSceneResizeEvent>
-#include <QGesture>
-#include <QGraphicsScene>
-
-#include <qservicemanager.h>
-#include <qservicefilter.h>
-#include <qserviceinterfacedescriptor.h>
-
-#include <HbInstantFeedback>
-#include <HbTouchArea>
 
 #include "hsdatabase.h"
 #include "hsdomainmodeldatastructures.h"
 #include "hsscene.h"
 #include "hspage.h"
 #include "hswidgethost.h"
-#include "hswidgettoucharea.h"
+#include "hswidgethostvisual.h"
+#include "hshostedwidgetfactory.h"
+
 #include "hswidgetcomponentregistry.h"
 #include "hswidgetcomponent.h"
 #include "hsconfiguration.h"
 #include "hscontentservice.h"
+#include "hsgui.h"
 
 // Helper macros for connecting state entry and exit actions.
 #define ENTRY_ACTION(state, action) \
@@ -51,7 +40,7 @@
 #define EXIT_ACTION(state, action) \
     connect(state, SIGNAL(exited()), SLOT(action()));
 
-QTM_USE_NAMESPACE
+
 
 
 /*!
@@ -64,8 +53,9 @@
     Constructs a new widget host with given \a databaseId and
     \a parent item.
 */
-HsWidgetHost::HsWidgetHost(int databaseId, QGraphicsItem *parent)
-  : HbWidget(parent),
+HsWidgetHost::HsWidgetHost(int databaseId, QObject *parent)
+  : QObject(parent),
+    mVisual(new HsWidgetHostVisual),
     mDatabaseId(databaseId),
     mStateMachine(0),
     mWidget(0),
@@ -73,19 +63,8 @@
     mComponent(0),
     mIsFinishing(false)
 {
-    setFlag(QGraphicsItem::ItemClipsChildrenToShape);
-    setFlag(QGraphicsItem::ItemHasNoContents);
-
-    grabGesture(Qt::TapGesture);
-    grabGesture(Qt::TapAndHoldGesture);
-    grabGesture(Qt::PanGesture);
-    grabGesture(Qt::PinchGesture);
-    grabGesture(Qt::SwipeGesture);
-    grabGesture(Qt::CustomGesture);
-    
-    setupTouchArea();
-    setupEffects();
     setupStates();
+    mVisual->setVisualModel(this);
 }
 
 /*!
@@ -93,6 +72,7 @@
 */
 HsWidgetHost::~HsWidgetHost()
 {
+    delete mVisual;
 }
 
 /*!
@@ -145,6 +125,7 @@
     }
 
     mPage = page;
+    
     return true;
 }
  
@@ -163,7 +144,7 @@
 */
 bool HsWidgetHost::loadPresentation()
 {
-    return loadPresentation(HsScene::orientation());
+    return loadPresentation(HsGui::instance()->orientation());
 }
 
 /*!
@@ -180,8 +161,8 @@
     if (!db->widgetPresentation(data)) {
         return false;
     }
-    setPos(data.x, data.y);
-    setZValue(data.zValue);
+    mVisual->setPos(data.x, data.y);
+    mVisual->setZValue(data.zValue);
     return true;
 }
 
@@ -191,7 +172,7 @@
 */
 bool HsWidgetHost::savePresentation()
 {
-    return savePresentation(HsScene::orientation());
+    return savePresentation(HsGui::instance()->orientation());
 }
 
 /*!
@@ -204,8 +185,8 @@
         
     HsWidgetPresentationData data;
     data.orientation = orientation;
-    data.setPos(pos());
-    data.zValue = zValue();
+    data.setPos(mVisual->pos());
+    data.zValue = mVisual->zValue();
     data.widgetId = mDatabaseId;
     return db->setWidgetPresentation(data);
 }
@@ -245,29 +226,9 @@
     return db->deleteWidgetPresentation(mDatabaseId, orientation);
 }
 
-/*!
-    Reimplemented from QGraphicsItem. Returns the shape of the
-    this widget host. The shape is computed based on the contained
-    widget.
-*/
-QPainterPath HsWidgetHost::shape() const
+HsWidgetHostVisual *HsWidgetHost::visual() const
 {
-    QPainterPath path;
-
-    if (mWidget) {
-        QRectF currRect = rect();
-        path = mWidget->shape();
-
-        QRectF pathRect(path.boundingRect());
-
-        if (pathRect.width() > currRect.width()
-            || pathRect.height() > currRect.height()) {
-            QPainterPath newPath(currRect.topLeft());
-            newPath.addRect(currRect);
-            path = path.intersected(newPath);
-        }
-    }
-    return path;
+    return mVisual;
 }
 
 /*!
@@ -327,11 +288,7 @@
     host has moved to faulted state.
 */
 
-/*!
-    \fn HsWidgetHost::resized()
-    Notifies the home screen framework that this widget
-    host has resized itself.
-*/
+
 
 /*!
     \fn HsWidgetHost::available()
@@ -424,29 +381,7 @@
 */
 void HsWidgetHost::startDragEffect()
 {
-    /* TODO: Uncomment after the Qt bug has been fixed.
-    QGraphicsDropShadowEffect *effect =
-        static_cast<QGraphicsDropShadowEffect *>(graphicsEffect());
-    */
-    HbInstantFeedback::play(HbFeedback::ItemPick);
-
-    setTransformOriginPoint(rect().center());
-
-    QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup();
-
-    QPropertyAnimation *animation = new QPropertyAnimation(this, "scale");
-    animation->setDuration(HSCONFIGURATION_GET(widgetDragEffectDuration));
-    animation->setEndValue(1.1);
-    animationGroup->addAnimation(animation);
-
-    /* TODO: Uncomment after the Qt bug has been fixed.
-    animation = new QPropertyAnimation(effect, "offset");
-    animation->setDuration(200);
-    animation->setEndValue(QPointF(8 ,8));
-    animationGroup->addAnimation(animation);
-    */
-
-    animationGroup->start(QAbstractAnimation::DeleteWhenStopped);
+   mVisual->startDragEffect();
 }
 
 /*!
@@ -454,98 +389,7 @@
 */
 void HsWidgetHost::startDropEffect()
 {
-    /* TODO: Uncomment after the Qt bug has been fixed.
-    QGraphicsDropShadowEffect *effect =
-        static_cast<QGraphicsDropShadowEffect *>(graphicsEffect());
-    */
-    HbInstantFeedback::play(HbFeedback::ItemDrop);
-
-    QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup;
-
-    QPropertyAnimation *animation = new QPropertyAnimation(this, "scale");
-    animation->setDuration(HSCONFIGURATION_GET(widgetDropEffectDuration));
-    animation->setEndValue(1);
-    animationGroup->addAnimation(animation);
-
-    /* TODO: Uncomment after the Qt bug has been fixed.
-    animation = new QPropertyAnimation(effect, "offset");
-    animation->setDuration(200);
-    animation->setEndValue(QPointF(3, 3));
-    animationGroup->addAnimation(animation);
-    */
-
-    animationGroup->start(QAbstractAnimation::DeleteWhenStopped);
-}
-
-/*!
-    Reimplemented from QObject for monitoring changes in 
-    contained widget's size.
-*/
-bool HsWidgetHost::eventFilter(QObject *watched, QEvent *event)
-{
-    if (event->type() == QEvent::GraphicsSceneResize ) {
-        QGraphicsSceneResizeEvent *resizeEvent = 
-            static_cast<QGraphicsSceneResizeEvent *>(event);
-        setNewSize(resizeEvent->newSize());
-        emit resized();
-    }
-    return HbWidget::eventFilter(watched, event);
-}
-
-/*!
-    Reimplemented from HbWidget for pan gesture handling.
-*/
-void HsWidgetHost::gestureEvent(QGestureEvent *event)
-{
-    HsScene *scene = HsScene::instance();    
-    QGesture *gesture = event->gesture(Qt::PanGesture);
-    if (gesture) {
-        switch (gesture->state()) {
-            case Qt::GestureStarted:
-                grabMouse();
-                emit scene->pagePanStarted(event);
-                break;
-            case Qt::GestureUpdated:
-                emit scene->pagePanUpdated(event);
-                break;
-            case Qt::GestureFinished:
-            case Qt::GestureCanceled:
-                ungrabMouse();
-                emit scene->pagePanFinished(event);
-                break;
-            default:
-                break;
-        }
-    }
-}
-
-/*!
-    \fn HsWidgetHost::mousePressEvent(QGraphicsSceneMouseEvent *)
-    Reimplemented from QGraphicsItem for eating all mouse presses.
-*/
-
-/*!
-    Configures the touch are for this widget host.
-*/
-void HsWidgetHost::setupTouchArea()
-{
-    mTouchArea = new HsWidgetTouchArea(this);
-    mTouchArea->setZValue(1);
-}
-
-/*!
-    Configures the effects for this widget host.
-*/
-void HsWidgetHost::setupEffects()
-{
-    /* TODO: Uncomment after the Qt bug has been fixed.
-    QGraphicsDropShadowEffect *effect =
-        new QGraphicsDropShadowEffect(this);
-    effect->setColor(QColor(0, 0, 0, 150));
-    effect->setBlurRadius(5);
-    effect->setOffset(3);
-    setGraphicsEffect(effect);
-    */
+    mVisual->startDropEffect();
 }
 
 /*!
@@ -681,15 +525,6 @@
     return index >= 0;
 }
 
-/*!
-    Resizes this widget host to the given \a size.
-*/
-void HsWidgetHost::setNewSize(const QSizeF &size)
-{
-    mTouchArea->resize(size);
-    resize(size);
-    setPreferredSize(size);
-}
 
 /*!
     Assigns preferences for the contained widget.
@@ -752,26 +587,21 @@
 */
 void HsWidgetHost::action_load()
 {
-    QServiceManager manager;
-    QServiceFilter filter("com.nokia.symbian.IHomeScreenWidget");
-    filter.setServiceName(mComponent->uri());
-    QList<QServiceInterfaceDescriptor> interfaces = manager.findInterfaces(filter);
-    if (interfaces.isEmpty()) {
+    mWidget = HsHostedWidgetFactory::instance()->createWidget(mComponent->uri());
+    if (!mWidget) {
         emit event_faulted();
         return;
     }
-
-    QObject *widgetObject = manager.loadInterface(interfaces.first());
-    mWidget = qobject_cast<QGraphicsWidget *>(widgetObject);
-
-    if (!mWidget ||
-        !setMethod("onShow()", mOnShowMethod) ||
+    // must have fuctions
+    if (!setMethod("onShow()", mOnShowMethod) || 
         !setMethod("onHide()", mOnHideMethod)) {
+        delete mWidget;
         mWidget = 0;
-        delete widgetObject;
         emit event_faulted();
         return;
     }
+    
+    mVisual->setWidget(mWidget);
 
     setMethod("onInitialize()", mOnInitializeMethod);
     setMethod("onUninitialize()", mOnUninitializeMethod);
@@ -792,21 +622,12 @@
             SLOT(onError()), Qt::QueuedConnection);
     }
 
-    mWidget->installEventFilter(this);
-
-    setMinimumSize(HSCONFIGURATION_GET(minimumWidgetSizeInPixels));
-    setMaximumSize(HSCONFIGURATION_GET(maximumWidgetSizeInPixels));
-    
     loadPresentation();
-
-    mWidget->setParentItem(this);
-
-    setNewSize(mWidget->size());
-
+   
     QString objName(mComponent->uri());
     objName.append(":");
     objName.append(QString::number(mDatabaseId));
-    setObjectName(objName);
+    mVisual->setObjectName(objName);
 }
 
 /*!
@@ -814,6 +635,7 @@
 */
 void HsWidgetHost::action_unload()
 {
+    mVisual->setWidget(0);
     delete mWidget;
     mWidget = 0;
 		// This is needed because QServicePluginCleanup is 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsdomainmodel/src/hswidgethostvisual.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* 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:
+*
+*/
+
+#include <QGraphicsLinearLayout>
+#include <QParallelAnimationGroup>
+#include <QPropertyAnimation>
+#include <QGraphicsDropShadowEffect>
+#include <QGraphicsSceneResizeEvent>
+#include <QGesture>
+#include <QGraphicsScene>
+
+
+#include <HbInstantFeedback>
+#include <HbTouchArea>
+
+#include "hswidgethostvisual.h"
+#include "hswidgethost.h"
+#include "hsscene.h"
+#include "hsconfiguration.h"
+#include "hswidgettoucharea.h"
+
+
+/*!
+    \class HsWidgetHostVisual
+    \ingroup group_hsdomainmodel
+    \brief Each widget is controlled by the home screen framework through a widget host.
+*/
+
+/*!
+    Constructs a new widget host with given \a databaseId and
+    \a parent item.
+*/
+HsWidgetHostVisual::HsWidgetHostVisual(QGraphicsItem *parent)
+  : HbWidget(parent),mWidget(0)
+  
+{
+    setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+    setFlag(QGraphicsItem::ItemHasNoContents);
+
+    grabGesture(Qt::TapGesture);
+    grabGesture(Qt::TapAndHoldGesture);
+    grabGesture(Qt::PanGesture);
+    grabGesture(Qt::PinchGesture);
+    grabGesture(Qt::SwipeGesture);
+    grabGesture(Qt::CustomGesture);
+    
+    setupTouchArea();
+    setupEffects();
+    
+    setMinimumSize(HSCONFIGURATION_GET(minimumWidgetSizeInPixels));
+    setMaximumSize(HSCONFIGURATION_GET(maximumWidgetSizeInPixels));
+    
+}
+
+/*!
+    Destructor.
+*/
+HsWidgetHostVisual::~HsWidgetHostVisual()
+{
+}
+
+
+/*!
+    Reimplemented from QGraphicsItem. Returns the shape of the
+    this widget host. The shape is computed based on the contained
+    widget.
+*/
+QPainterPath HsWidgetHostVisual::shape() const
+{
+    QPainterPath path;
+
+    if (mWidget) {
+        QRectF currRect = rect();
+        path = mWidget->shape();
+
+        QRectF pathRect(path.boundingRect());
+
+        if (pathRect.width() > currRect.width()
+            || pathRect.height() > currRect.height()) {
+            QPainterPath newPath(currRect.topLeft());
+            newPath.addRect(currRect);
+            path = path.intersected(newPath);
+        }
+    }
+    return path;
+}
+void HsWidgetHostVisual::setWidget(QObject *widget)
+{
+    mWidget = qobject_cast<QGraphicsWidget *>(widget);
+    if (mWidget) {
+        mWidget->installEventFilter(this);
+        mWidget->setParentItem(this);
+        setNewSize(mWidget->size());
+    }
+}
+
+void HsWidgetHostVisual::setVisualModel(HsWidgetHost *model)
+{
+    mVisualModel = model;
+}
+HsWidgetHost *HsWidgetHostVisual::visualModel() const
+{
+    return mVisualModel;
+}
+/*!
+    Starts the drag effect.
+*/
+void HsWidgetHostVisual::startDragEffect()
+{
+    /* TODO: Uncomment after the Qt bug has been fixed.
+    QGraphicsDropShadowEffect *effect =
+        static_cast<QGraphicsDropShadowEffect *>(graphicsEffect());
+    */
+    HbInstantFeedback::play(HbFeedback::ItemPick);
+
+    setTransformOriginPoint(rect().center());
+
+    QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup();
+
+    QPropertyAnimation *animation = new QPropertyAnimation(this, "scale");
+    animation->setDuration(HSCONFIGURATION_GET(widgetDragEffectDuration));
+    animation->setEndValue(1.1);
+    animationGroup->addAnimation(animation);
+
+    /* TODO: Uncomment after the Qt bug has been fixed.
+    animation = new QPropertyAnimation(effect, "offset");
+    animation->setDuration(200);
+    animation->setEndValue(QPointF(8 ,8));
+    animationGroup->addAnimation(animation);
+    */
+
+    animationGroup->start(QAbstractAnimation::DeleteWhenStopped);
+}
+
+/*!
+    Starts the drop effect.
+*/
+void HsWidgetHostVisual::startDropEffect()
+{
+    /* TODO: Uncomment after the Qt bug has been fixed.
+    QGraphicsDropShadowEffect *effect =
+        static_cast<QGraphicsDropShadowEffect *>(graphicsEffect());
+    */
+    HbInstantFeedback::play(HbFeedback::ItemDrop);
+
+    QParallelAnimationGroup *animationGroup = new QParallelAnimationGroup;
+
+    QPropertyAnimation *animation = new QPropertyAnimation(this, "scale");
+    animation->setDuration(HSCONFIGURATION_GET(widgetDropEffectDuration));
+    animation->setEndValue(1);
+    animationGroup->addAnimation(animation);
+
+    /* TODO: Uncomment after the Qt bug has been fixed.
+    animation = new QPropertyAnimation(effect, "offset");
+    animation->setDuration(200);
+    animation->setEndValue(QPointF(3, 3));
+    animationGroup->addAnimation(animation);
+    */
+
+    animationGroup->start(QAbstractAnimation::DeleteWhenStopped);
+}
+/*!
+    \fn HsWidgetHost::resized()
+    Notifies the home screen framework that this widget
+    host has resized itself.
+*/
+
+/*!
+    Reimplemented from QObject for monitoring changes in 
+    contained widget's size.
+*/
+bool HsWidgetHostVisual::eventFilter(QObject *watched, QEvent *event)
+{
+    if (event->type() == QEvent::GraphicsSceneResize ) {
+        QGraphicsSceneResizeEvent *resizeEvent = 
+            static_cast<QGraphicsSceneResizeEvent *>(event);
+        setNewSize(resizeEvent->newSize());
+        emit resized();
+    }
+    return HbWidget::eventFilter(watched, event);
+}
+
+/*!
+    Reimplemented from HbWidget for pan gesture handling.
+*/
+void HsWidgetHostVisual::gestureEvent(QGestureEvent *event)
+{
+    HsScene *scene = HsScene::instance();    
+    QGesture *gesture = event->gesture(Qt::PanGesture);
+    if (gesture) {
+        switch (gesture->state()) {
+            case Qt::GestureStarted:
+                grabMouse();
+                emit scene->pagePanStarted(event);
+                break;
+            case Qt::GestureUpdated:
+                emit scene->pagePanUpdated(event);
+                break;
+            case Qt::GestureFinished:
+            case Qt::GestureCanceled:
+                ungrabMouse();
+                emit scene->pagePanFinished(event);
+                break;
+            default:
+                break;
+        }
+    }
+}
+
+/*!
+    \fn HsWidgetHostVisual::mousePressEvent(QGraphicsSceneMouseEvent *)
+    Reimplemented from QGraphicsItem for eating all mouse presses.
+*/
+
+/*!
+    Configures the touch are for this widget host.
+*/
+void HsWidgetHostVisual::setupTouchArea()
+{
+    mTouchArea = new HsWidgetTouchArea(this);
+    mTouchArea->setZValue(1);
+}
+
+/*!
+    Configures the effects for this widget host.
+*/
+void HsWidgetHostVisual::setupEffects()
+{
+    /* TODO: Uncomment after the Qt bug has been fixed.
+    QGraphicsDropShadowEffect *effect =
+        new QGraphicsDropShadowEffect(this);
+    effect->setColor(QColor(0, 0, 0, 150));
+    effect->setBlurRadius(5);
+    effect->setOffset(3);
+    setGraphicsEffect(effect);
+    */
+}
+
+
+/*!
+    Resizes this widget host to the given \a size.
+*/
+void HsWidgetHostVisual::setNewSize(const QSizeF &size)
+{
+    mTouchArea->resize(size);
+    resize(size);
+    setPreferredSize(size);
+}
+
--- a/homescreenapp/hsdomainmodel/src/hswidgettoucharea.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsdomainmodel/src/hswidgettoucharea.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -24,12 +24,12 @@
 #include <HbPanGesture>
 
 #include "hswidgettoucharea.h"
-#include "hswidgethost.h"
+#include "hswidgethostvisual.h"
 #include "hsscene.h"
 
-HsWidgetTouchArea::HsWidgetTouchArea(HsWidgetHost *widgetHost)
-  : HbTouchArea(widgetHost),
-    mWidgetHost(widgetHost)
+HsWidgetTouchArea::HsWidgetTouchArea(HsWidgetHostVisual *visual)
+  : HbTouchArea(visual),
+    mWidgetHostVisual(visual)
 {
     grabGesture(Qt::TapAndHoldGesture);
 }
@@ -44,14 +44,14 @@
     switch (event->type()) {
         case QEvent::TouchBegin:
         case QEvent::GraphicsSceneMousePress:
-            emit scene->widgetTapStarted(mWidgetHost);
+            emit scene->widgetTapStarted(mWidgetHostVisual->visualModel());
             break;        
         case QEvent::TouchEnd:
             {
                 ungrabGesture(Qt::PanGesture);
                 ungrabMouse();
                 QPointF scenePos = static_cast<QTouchEvent *>(event)->touchPoints().first().scenePos();
-                emit scene->widgetMoveFinished(scenePos, mWidgetHost);
+                emit scene->widgetMoveFinished(scenePos, mWidgetHostVisual->visualModel());
             }
             break;
         case QEvent::GraphicsSceneMouseRelease:
@@ -59,7 +59,7 @@
                 ungrabGesture(Qt::PanGesture);
                 ungrabMouse();
                 QPointF scenePos = static_cast<QGraphicsSceneMouseEvent *>(event)->scenePos();
-                emit scene->widgetMoveFinished(scenePos, mWidgetHost);
+                emit scene->widgetMoveFinished(scenePos, mWidgetHostVisual->visualModel());
             }
             break;    
         default:
@@ -71,7 +71,7 @@
 
 QPainterPath HsWidgetTouchArea::shape() const
 {       
-    return mWidgetHost->shape();
+    return mWidgetHostVisual->shape();
 }
 
 void HsWidgetTouchArea::gestureEvent(QGestureEvent *event)
@@ -84,7 +84,7 @@
         if (gesture->state() == Qt::GestureFinished) {
             grabGesture(Qt::PanGesture);
             grabMouse();
-            emit scene->widgetTapAndHoldFinished(event, mWidgetHost);
+            emit scene->widgetTapAndHoldFinished(event, mWidgetHostVisual->visualModel());
         }
         return;
     }
@@ -96,12 +96,12 @@
         switch (gesture->state()) {
             case Qt::GestureStarted:
             case Qt::GestureUpdated:
-                emit scene->widgetMoveUpdated(scenePos, mWidgetHost);
+                emit scene->widgetMoveUpdated(scenePos, mWidgetHostVisual->visualModel());
                 break;
             case Qt::GestureCanceled:
             case Qt::GestureFinished:
                 ungrabGesture(Qt::PanGesture);
-                emit scene->widgetMoveFinished(scenePos, mWidgetHost);
+                emit scene->widgetMoveFinished(scenePos, mWidgetHostVisual->visualModel());
                 break;
             default:
                 break;
--- a/homescreenapp/hsmenuclientplugin/hsmenuclientplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsmenuclientplugin/hsmenuclientplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -23,20 +23,17 @@
 
 LIBS += -lcaclient
 
-INCLUDEPATH += inc
+INCLUDEPATH +=  inc \
+				../../homescreen_plat/homescreenclient_api
 
-HEADERS +=  inc/hsmenuclient.h \
-            inc/hsmenuclientplugin.h \
+HEADERS +=  ../../homescreen_plat/homescreenclient_api/hsmenuclient.h \
+            inc/hsmenuclientplugin.h
 
 SOURCES +=  src/hsmenuclient.cpp \
-            src/hsmenuclientplugin.cpp \
+            src/hsmenuclientplugin.cpp
 
 symbian: {
 	TARGET.UID3 = 0x20028715
-#export interface header to platform
-BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
-BLD_INF_RULES.prj_exports += "inc/hsmenuclient.h \
-	APP_LAYER_PLATFORM_EXPORT_PATH(hsmenuclient.h)"
 }
 
 include(../common.pri)
--- a/homescreenapp/hsmenuclientplugin/inc/hsmenuclient.h	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2010 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: hsmenuclient.h
- *
- */
-
-#ifndef HSMENUCLIENT_H
-#define HSMENUCLIENT_H
-
-#include <QObject>
-#include <QVariant>
-#include <qservicemanager.h>
-
-QTM_USE_NAMESPACE
-
-//mandatory keys
-const QString hsItemName("item:name");
-// or for localized name
-const QString hsItemLocName("item:locname");
-
-const QString hsitemLaunchUri("item:launchuri");
-const QString hsitemPublisherId("item:publisherId");
-
-//not mandatory
-const QString hsItemWidgetUri("widget:uri");
-const QString hsItemDescription("item:description");
-// or for localized name
-const QString hsItemLocDescription("item:locdescription");
-
-//for icon - not mandatory
-const QString hsIconFileName("icon:filename");//to display specific icon from file
-const QString hsIconName("icon:name");// HbIcon
-const QString hsIconApplicationId("icon:applicationid"); // icon from associated application
-
-
-class HsMenuClientPrivate;
-
-class HsMenuClient : public QObject
-{
-    Q_OBJECT
-
-public:
-    HsMenuClient(QObject *parent = 0);
-    ~HsMenuClient();
-public slots:
-   bool add(const QVariantMap &entryPreference = QVariantMap());
-   bool remove(const QVariantMap &queryPreference = QVariantMap()) const;
-   
-   QList<QVariantMap > getList(const QVariantMap &queryPreference = QVariantMap());
-  
-private:
-   Q_DISABLE_COPY(HsMenuClient)
-    /**
-     * Pointer to a private implementation.
-     */
-   HsMenuClientPrivate * const m_d;
-};
-
-
-
-#endif // HSMENUCLIENT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsutils/inc/hsmenudialogfactory.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2010 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:  Menu Dialog
+*
+*/
+
+
+#ifndef HSMENUDIALOG_H
+#define HSMENUDIALOG_H
+
+#include <QScopedPointer>
+
+class QStringList;
+class HbAction;
+class HbMessageBox;
+
+#include "hsutils_global.h"
+
+class HSUTILS_EXPORT HsMenuDialogFactory
+{
+public:
+    enum Options { OkCancel, Close };
+
+    virtual HbMessageBox *create(const QString &text,
+                                 Options options = OkCancel) const;
+    virtual ~HsMenuDialogFactory();
+private:
+    void setUpActions(HbMessageBox *box,
+                      const QStringList &translationIdentifiers) const;
+};
+
+#endif
+
--- a/homescreenapp/hsutils/inc/hsmenuevent.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/inc/hsmenuevent.h	Wed Aug 18 09:40:07 2010 +0300
@@ -46,10 +46,12 @@
         OpenInstalledView,
         OpenHomeScreen,
         ArrangeCollection,
+        ArrangeAllCollections,
         CreateCollection,
         PreviewHSWidget,
         ShowAppSettings,
         ShowAppDetails,
+        ShowInstallationLog,
         Unknown
     };
 
--- a/homescreenapp/hsutils/inc/hsmenueventfactory.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/inc/hsmenueventfactory.h	Wed Aug 18 09:40:07 2010 +0300
@@ -63,19 +63,20 @@
 
     static QEvent *createAddAppsFromApplicationsViewEvent(
         HsSortAttribute aApplicationsSortOder,
-        HsSortAttribute aCollectionsSortOder,
         int aItemId = 0);
 
-    static QEvent *createAddAppsFromCallectionViewEvent(
+    static QEvent *createAddAppsFromCollectionViewEvent(
         int aCollectionId,
-        int aApplicationId = 0,
-        HsSortAttribute aCollectionsSortOder = NoHsSortAttribute);
+        int aApplicationId = 0);
 
     static QEvent *createRemoveAppFromCollectionEvent(int aItemId, int aCollectionId);
 
     static QEvent *createUninstallApplicationEvent(int aItemId);
 
-    static QEvent *createArrangeCollectionEvent(int aTopItemId);
+    static QEvent *createArrangeCollectionEvent(int aTopItemId,
+        int aCollectionId);
+
+    static QEvent *createArrangeAllCollectionsEvent(int aTopItemId);
 
     static QEvent *createPreviewHSWidgetEvent(
         int entryId,
@@ -87,6 +88,8 @@
     static QEvent *createAppSettingsViewEvent(int entryId);
     
     static QEvent *createAppDetailsViewEvent(int entryId);
+    
+    static QEvent *createInstallationLogEvent();
 
     static QEvent *createUnknownEvent();
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsutils/inc/hsmessageboxwrapper.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* 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:
+*
+*/
+
+#ifndef HSMESSAGEBOXWRAPPER_H
+#define HSMESSAGEBOXWRAPPER_H
+
+#include <HbWidget>
+
+#include "hsutils_global.h"
+
+#include "hstest_global.h"
+HOMESCREEN_TEST_CLASS(t_hsUtils)
+
+class HbAction;
+class HbMessageBox;
+struct HsMessageBoxWrapperImpl;
+
+class HSUTILS_EXPORT HsMessageBoxWrapper : public QObject
+{
+    Q_OBJECT
+
+public:
+    HsMessageBoxWrapper(QObject *parent=0);
+    ~HsMessageBoxWrapper();
+
+    void setHeader(const QString &header);
+    void setQueryText(const QString &queryText);
+    void close();
+
+signals:
+    void accepted();
+    void rejected();
+public slots:
+    void show();
+
+private:
+    Q_DISABLE_COPY(HsMessageBoxWrapper)
+
+private slots:
+    void onDialogClosed(int action);
+ 
+private:
+    HsMessageBoxWrapperImpl *mImpl;
+    HbMessageBox *mBox;
+
+    HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils)
+};
+
+#endif // HSPAGEINDICATOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsutils/inc/hspropertyanimationwrapper.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* 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:
+*
+*/
+
+#ifndef HSPROPERTYANIMATIONWRAPPER_H
+#define HSPROPERTYANIMATIONWRAPPER_H
+
+#include <QScopedPointer>
+
+#include "hsutils_global.h"
+#include "hstest_global.h"
+
+HOMESCREEN_TEST_CLASS(t_hsUtils)
+
+class QEasingCurve;
+
+struct HsPropertyAnimationWrapperImpl;
+class HSUTILS_EXPORT HsPropertyAnimationWrapper : public QObject
+{
+    Q_OBJECT
+
+public:
+    HsPropertyAnimationWrapper(QObject *parent=0);
+    ~HsPropertyAnimationWrapper();
+    
+    void setTargetObject(QObject *target);
+    void setPropertyName(const QByteArray &propertyName);
+    bool isRunning();
+    void setEndValue(const QVariant &value);
+    void setDuration(int msecs);
+    void setForward();
+    void setBackward();
+    bool isForward() const;
+    void setEasingCurve(const QEasingCurve &curve);
+
+signals:
+    void finished();
+
+public slots:
+    void start();
+    void stop();
+
+private:
+    Q_DISABLE_COPY(HsPropertyAnimationWrapper)
+
+ 
+private:
+    QScopedPointer<HsPropertyAnimationWrapperImpl> mImpl;
+    HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils)
+};
+
+#endif // HSPAGEINDICATOR_H
--- a/homescreenapp/hsutils/inc/hsutils_global.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/inc/hsutils_global.h	Wed Aug 18 09:40:07 2010 +0300
@@ -19,7 +19,7 @@
 #ifndef HSUTILS_GLOBAL_H
 #define HSUTILS_GLOBAL_H
 
-#include <Qt/qglobal.h>
+#include <qglobal.h>
 
 
 #ifdef HSUTILS_LIB
--- a/homescreenapp/hsutils/inc/hswidgetpositioningonwidgetadd.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/inc/hswidgetpositioningonwidgetadd.h	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 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"
@@ -20,15 +20,19 @@
 
 #include <QList>
 #include <QRectF>
+#include <QPointF>
 #include "hsutils_global.h"
 
+class HsWidgetHost;
+
 class HSUTILS_EXPORT HsWidgetPositioningOnWidgetAdd
 {
 public:
     virtual ~HsWidgetPositioningOnWidgetAdd() {}
     
     virtual QList<QRectF> convert(const QRectF &contentArea,
-                                  const QList<QRectF> &rects, 
+                                  const QList<QRectF> &existingRects,
+                                  const QList<QRectF> &newRects,
                                   const QPointF &startPoint) = 0;
    
     static void setInstance(HsWidgetPositioningOnWidgetAdd *instance);
@@ -42,7 +46,8 @@
 {
 public:
     QList<QRectF> convert(const QRectF &contentArea,
-                          const QList<QRectF> &rects,
+                          const QList<QRectF> &existingRects,
+                          const QList<QRectF> &newRects,
                           const QPointF &startPoint);
  
 };
@@ -51,9 +56,40 @@
 {
 public:
     QList<QRectF> convert(const QRectF &contentArea,
-                          const QList<QRectF> &rects,
+                          const QList<QRectF> &existingRects,
+                          const QList<QRectF> &newRects,
                           const QPointF &startPoint);
  };
 
+class HSUTILS_EXPORT HsWidgetOrganizer : public HsWidgetPositioningOnWidgetAdd
+{
+public:
+    QList<QRectF> convert(const QRectF &contentArea,
+                          const QList<QRectF> &existingRects,
+                          const QList<QRectF> &newRects,
+                          const QPointF &startPoint);
+
+private:
+    bool initAnchors(const QSizeF &areaSize);
+    bool getAnchorPoint(const QSizeF &contentSize);
+    bool searchWidthSpace(const QSizeF &contentSize);
+    bool searchHeightSpace(int contentHeight);
+    bool markReservedAnchors();
+    QPointF getAnchorCoordinates(int index);
+    int getIndexForCoordinate(QPointF position);
+    int lenghtInAnchorPoints(QVariant length);
+
+private:
+    int mAnchorColumns;
+    int mAnchorRows;
+    int mAnchorDistance;
+    QPointF mStartWidthAnchorPoint;
+    QPointF mEndWidthAnchorPoint;
+    QPointF mEndHeightAnchorPoint;
+    // TODO: is there better way to store anchor points, perhaps with pointers?
+    QList<bool> mAnchors;
+
+};
+
 
 #endif // HSWIDGETPOSITIONINGONWIDGETADD_H
--- a/homescreenapp/hsutils/inc/hswidgetpositioningonwidgetmove.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/inc/hswidgetpositioningonwidgetmove.h	Wed Aug 18 09:40:07 2010 +0300
@@ -103,13 +103,20 @@
 private:
 
     void createSnappableRectangles(const QList<QRectF> &inactiveRects);
-    void checkForCenterSnapping();
     void checkInactiveRectLieAboveOrBelowOfMovingRect();
+    void checkInactiveRectVerticalEdgesInRange(qreal movingRectVerticalEdgePosition);
+    void checkInactiveRectBetterFitForHorizontalSnapping(qreal containerVerticalEdgeToInactiveRectVerticalEdge,
+                                                         qreal containerOtherVerticalEdgeToInactiveRectOtherVerticalEdge);
     void compareLeftSideOfMovingRectForSnapping();
     void compareRightSideOfMovingRectForSnapping();
     void checkInactiveRectLieLeftOrRightOfMovingRect();
+    void checkInactiveRectHorizontalEdgesInRange(qreal movingRectHorizontalEdgePosition);
+    void checkInactiveRectBetterFitForVerticalSnapping(qreal containerHorizontalEdgeToInactiveRectHorizontalEdge,
+                                                       qreal containerOtherHorizontalEdgeToInactiveRectOtherHorizontalEdge);
     void compareTopOfMovingRectForSnapping();
     void compareBottomOfMovingRectForSnapping();
+    void createVerticalLine();
+    void createHorizontalLine();
     void extendVerticalLine();
     void extendHorizontalLine();
     void checkInactiveRectPositionToVerticalLine();
@@ -128,6 +135,8 @@
     QRectF mInactiveRectToCompare;
     HsSnapRectangle mInactiveSnapRectToCompare;
     QRectF mMovingRect;
+
+    qreal mMinDistancePosition;
     qreal mHorizontalSnapPosition;
     qreal mVerticalSnapPosition;
 
@@ -140,6 +149,10 @@
     bool mRectLieAbove;
     bool mLeftInRange;
     bool mRightInRange;
+    bool mIsBetterFitHorizontalSnap;
+    qreal mDistanceVerticalEdges;
+    qreal mVerticalEdgeToLeftOfInactiveRect;
+    qreal mVerticalEdgeToRightOfInactiveRect;
     qreal mMinVerticalEdgesDistance;
     qreal mVerticalDistance;
     qreal mVerticalDistanceFromSelectedRect;
@@ -148,6 +161,10 @@
     bool mRectLieLeft;
     bool mTopInRange;
     bool mBottomInRange;
+    bool mIsBetterFitVerticalSnap;
+    qreal mDistanceHorizontalEdges;
+    qreal mHorizontalEdgeToTopOfInactiveRect;
+    qreal mHorizontalEdgeToBottomOfInactiveRect;
     qreal mMinHorizontalEdgesDistance;
     qreal mHorizontalDistance;
     qreal mHorizontalDistanceFromSelectedRect;
@@ -156,7 +173,6 @@
     bool mSnapEnabled;
     qreal mSnapForce;
     qreal mSnapGap;
-    qreal mSnapBorderGap;
 
     bool mRectVerticalEdgeLiesInLineWithVerticalLine;
     bool mRectLieAboveVerticalLine;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsutils/src/hsmenudialogfactory.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2010 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:  Menu Dialog
+*
+*/
+
+#include <QString>
+#include <QStringList>
+#include <QList>
+#include <QAction>
+
+#include <HbAction>
+#include <HbMessageBox>
+#include "hsmenudialogfactory.h"
+
+/*!
+    \class HsMenuDialogFactory
+    \ingroup group_hsutils
+
+    \brief Creates dialog instances for Application Library.
+
+    \sa HsMenuEvent
+*/
+
+/*! \enum HsMenuDialogFactory::Options
+ Describes what actions the dialog will have.
+ */
+
+/*! \var HsMenuDialogFactory::Options HsMenuDialogFactory::OkCancel
+ Requested dialog should have two actions in the following order: Ok (confirm) and Cancel (reject).
+ */
+/*! \var HsMenuDialogFactory::Options HsMenuDialogFactory::Close
+ Requested dialog should have one action: Close.
+ */
+/*!
+    Creates dialog.
+    \param text to be displayed in the dialog.
+    \param options specify dialog actions.
+    \return requested dialog.
+*/
+HbMessageBox *HsMenuDialogFactory::create(const QString &text,
+                                 Options options) const
+{
+
+    QStringList actionIdentifiers; // head of the list will be first action in dialog
+    HbMessageBox::MessageBoxType type(HbMessageBox::MessageTypeNone);
+
+    switch (options) {
+
+    case OkCancel:
+
+        actionIdentifiers << hbTrId("txt_common_button_ok");
+        actionIdentifiers << hbTrId("txt_common_button_cancel");
+        type = HbMessageBox::MessageTypeQuestion;
+        break;
+
+    case Close:
+
+        actionIdentifiers << hbTrId("txt_common_button_close");
+        type = HbMessageBox::MessageTypeInformation;
+        break;
+
+    default:
+        break;
+    }
+
+    QScopedPointer<HbMessageBox> box(new HbMessageBox(type));
+
+    setUpActions(box.data(), actionIdentifiers);
+
+    box->setText(text);
+    box->setAttribute(Qt::WA_DeleteOnClose);
+
+    return box.take();
+}
+
+
+/*!
+    Destructor.
+*/
+HsMenuDialogFactory::~HsMenuDialogFactory() {}
+
+/*!
+    Sets up dialog actions
+    \param box dialog to operate on.
+    \param actionIdentifiers list of translation identifiers for actions. Order of
+    actions in the dialog will reflect the identifiers order in the list.
+*/
+void HsMenuDialogFactory::setUpActions(HbMessageBox *box,
+                                    const QStringList &translationIdentifiers) const
+{
+    box->clearActions();
+
+    foreach (QString identifier, translationIdentifiers) {
+        QScopedPointer<HbAction> action(new HbAction(identifier));
+        action->setParent(box);
+        box->addAction(action.take());
+    }
+}
--- a/homescreenapp/hsutils/src/hsmenuevent.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hsmenuevent.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -57,7 +57,7 @@
     Opening application library from shortcut.
 */
 /*! \var HsMenuEvent::OperationType HsMenuEvent::ArrangeCollection
-    Swith to arrange mode.
+    Switch to arrange mode.
 */
 /*! \var HsMenuEvent::OperationType HsMenuEvent::Unknown
     Unknown menu event.
--- a/homescreenapp/hsutils/src/hsmenueventfactory.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hsmenueventfactory.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -177,18 +177,15 @@
     Creates an HsMenuEvent::AddAppsToCollection event.
 
     \param aApplicationsSortOder applications sort order.
-    \param aCollectionsSortOder collections sort order.
     \param aItemId item id.
     \return Add applications to collection event.
  */
 QEvent *HsMenuEventFactory::createAddAppsFromApplicationsViewEvent(
     HsSortAttribute aApplicationsSortOder,
-    HsSortAttribute aCollectionsSortOder,
     int aItemId)
 {
     QVariantMap params;
     params.insert(appSortOrderKey(), aApplicationsSortOder);
-    params.insert(collectionSortOrderKey(), aCollectionsSortOder);
     params.insert(itemIdKey(), aItemId);
     return  new HsMenuEvent(HsMenuEvent::AddAppsToCollection, params);
 }
@@ -198,18 +195,15 @@
 
     \param aCollectionId collection id.
     \param aApplicationId application id.
-    \param aCollectionsSortOder collections sort order.
     \return Add applications to collection event.
  */
-QEvent *HsMenuEventFactory::createAddAppsFromCallectionViewEvent(
+QEvent *HsMenuEventFactory::createAddAppsFromCollectionViewEvent(
     int aCollectionId,
-    int aApplicationId,
-    HsSortAttribute aCollectionsSortOder)
+    int aApplicationId)
 {
     QVariantMap params;
     params.insert(itemIdKey(), aApplicationId);
     params.insert(collectionIdKey(), aCollectionId);
-    params.insert(collectionSortOrderKey(), aCollectionsSortOder);
     return new HsMenuEvent(HsMenuEvent::AddAppsToCollection, params);
 }
 
@@ -247,16 +241,33 @@
     Creates an HsMenuEvent::ArrangeCollection event.
 
     \param aTopItemId Item id to be scrolled.
-    \return ArrangeCollection event.
+    \param aCollectionId Collection id.
+    \retval ArrangeCollection event.
  */
-QEvent *HsMenuEventFactory::createArrangeCollectionEvent(int aTopItemId)
+QEvent *HsMenuEventFactory::createArrangeCollectionEvent(
+    int aTopItemId,
+    int aCollectionId)
 {
     QVariantMap params;
     params.insert(itemIdKey(), aTopItemId);
+    params.insert(collectionIdKey(), aCollectionId);
     return new HsMenuEvent(HsMenuEvent::ArrangeCollection, params);
 }
 
 /*!
+    Creates an HsMenuEvent::ArrangeAllCollections event.
+
+    \param aTopItemId Item id to be scrolled.
+    \retval ArrangeAllCollections event.
+ */
+QEvent *HsMenuEventFactory::createArrangeAllCollectionsEvent(int aTopItemId)
+{
+    QVariantMap params;
+    params.insert(itemIdKey(), aTopItemId);
+    return new HsMenuEvent(HsMenuEvent::ArrangeAllCollections, params);
+}
+
+/*!
     Prepares event triggered on tap on Widget.
     \param entryId Id of an item.
     \param entryTypeName Name of the entry type (e.g. application, widget).
@@ -315,6 +326,16 @@
 }
 
 /*!
+    Creates an HsMenuEvent::ShowInstallationLog event.
+
+    \return Event for installation log.
+*/
+QEvent *HsMenuEventFactory::createInstallationLogEvent()
+{
+    return new HsMenuEvent(HsMenuEvent::ShowInstallationLog);
+}
+
+/*!
     Creates an HsMenuEvent::Unknown event.
 
     \return Unknown event.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsutils/src/hsmessageboxwrapper.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* 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:
+*
+*/
+
+#include <HbMessageBox>
+#include <HbLabel>
+#include <HbAction>
+#include "hsmessageboxwrapper.h"
+
+/*!
+    \class HsMessageBoxWrapper
+    \ingroup group_hsutils
+    \brief 
+*/
+
+
+struct HsMessageBoxWrapperImpl{
+	 QString mHeader;
+   QString mQueryText;
+
+};
+/*!
+
+*/
+HsMessageBoxWrapper::HsMessageBoxWrapper(QObject *parent)
+  : QObject(parent),
+    mImpl(new HsMessageBoxWrapperImpl),
+    mBox(0)
+{
+}
+
+/*!
+
+*/
+HsMessageBoxWrapper::~HsMessageBoxWrapper()
+{
+  delete mImpl;
+}
+
+/*!
+
+*/
+void HsMessageBoxWrapper::setHeader(const QString &header)
+{
+    mImpl->mHeader = header;
+}
+/*!
+
+*/
+void HsMessageBoxWrapper::setQueryText(const QString &queryText)
+{
+    mImpl->mQueryText = queryText;
+}
+/*!
+
+*/
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif 
+
+void HsMessageBoxWrapper::show()
+{
+    mBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+    mBox->setAttribute(Qt::WA_DeleteOnClose);
+    mBox->setHeadingWidget(new HbLabel(mImpl->mHeader));
+    mBox->setText(mImpl->mQueryText);
+    mBox->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No);
+
+    mBox->open(this,SLOT(onDialogClosed(int)));
+}
+
+void HsMessageBoxWrapper::close()
+{
+    if (mBox) {
+        mBox->close();
+        mBox = NULL;
+    }
+}
+
+/*!
+
+*/
+void HsMessageBoxWrapper::onDialogClosed(int action)
+{
+    if (action == HbMessageBox::Yes){
+       emit accepted();  
+    } else {
+       emit rejected();
+    }
+}
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
--- a/homescreenapp/hsutils/src/hspageindicator.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hspageindicator.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -79,7 +79,7 @@
 */
 void HsPageIndicator::setActiveItemIndex(int activeItemIndex)
 {
-    if (activeItemIndex < 0 || itemCount() <= activeItemIndex) {
+    if (activeItemIndex < 0 || itemCount()-1 < activeItemIndex) {
         return;
     }
 
@@ -116,13 +116,18 @@
 */
 void HsPageIndicator::removeItem(int activeItemIndex)
 {
-    if (activeItemIndex < 0 || itemCount() - 1 <= activeItemIndex) {
+    if (activeItemIndex < 0 || itemCount() <= activeItemIndex) {
         return;
     }
 
+    if (activeItemIndex == itemCount()-1) {
+        activeItemIndex--;
+    }
+
     delete mItems.last();
     mItems.removeLast();
     layoutItems();
+    
     setActiveItemIndex(activeItemIndex);
 }
 
--- a/homescreenapp/hsutils/src/hspageindicatoritem.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hspageindicatoritem.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -111,9 +111,12 @@
     setTransformOriginPoint(rect().center());
     QPropertyAnimation *animation = 
         new QPropertyAnimation(graphicsEffect(), "strength");
+    
     animation->setDuration(800);
     animation->setKeyValueAt(0.2, 1);
     animation->setEndValue(0);
+    
+    connect(this,SIGNAL(destroyed()),animation,SLOT(stop()));
     connect(animation, SIGNAL(finished()), SLOT(animationFinished()));
     animation->start(QAbstractAnimation::DeleteWhenStopped);
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/hsutils/src/hspropertyanimationwrapper.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,118 @@
+/*
+* 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:
+*
+*/
+
+#include <QPropertyAnimation>
+#include <QEasingCurve>
+#include "hspropertyanimationwrapper.h"
+
+/*!
+    \class HsMessageBoxWrapper
+    \ingroup group_hsutils
+    \brief 
+*/
+
+struct HsPropertyAnimationWrapperImpl
+{
+public:
+    QPropertyAnimation *mPropertyAnimation;
+};
+
+/*!
+
+*/
+HsPropertyAnimationWrapper::HsPropertyAnimationWrapper(QObject *parent)
+  : QObject(parent),mImpl(new HsPropertyAnimationWrapperImpl)
+{
+    mImpl->mPropertyAnimation = new QPropertyAnimation(parent);
+    connect(mImpl->mPropertyAnimation,SIGNAL(finished()),SIGNAL(finished()));
+}
+
+/*!
+
+*/
+HsPropertyAnimationWrapper::~HsPropertyAnimationWrapper()
+{
+
+}
+
+/*!
+
+*/
+void HsPropertyAnimationWrapper::setTargetObject(QObject *target)
+{
+   mImpl->mPropertyAnimation->setTargetObject(target);
+}
+/*!
+
+*/
+void HsPropertyAnimationWrapper::setPropertyName(const QByteArray &propertyName)
+{
+   mImpl->mPropertyAnimation->setPropertyName(propertyName);
+}
+
+bool HsPropertyAnimationWrapper::isRunning()
+{
+    return (mImpl->mPropertyAnimation->state() == QAbstractAnimation::Running);
+}
+
+void HsPropertyAnimationWrapper::setEndValue(const QVariant &value)
+{
+    mImpl->mPropertyAnimation->setEndValue(value);
+}
+
+void HsPropertyAnimationWrapper::setDuration(int msecs)
+{
+    mImpl->mPropertyAnimation->setDuration(msecs);
+}
+
+void HsPropertyAnimationWrapper::setForward()
+{
+    mImpl->mPropertyAnimation->setDirection(QAbstractAnimation::Forward);
+}
+
+void HsPropertyAnimationWrapper::setBackward()
+{
+    mImpl->mPropertyAnimation->setDirection(QAbstractAnimation::Backward);
+}
+
+bool HsPropertyAnimationWrapper::isForward() const
+{
+    return (mImpl->mPropertyAnimation->direction() == QAbstractAnimation::Forward);
+}
+/*!
+
+*/
+void HsPropertyAnimationWrapper::start()
+{
+    mImpl->mPropertyAnimation->start();
+}
+/*!
+
+*/
+void HsPropertyAnimationWrapper::stop()
+{
+    mImpl->mPropertyAnimation->stop();
+}
+
+/*!
+
+*/
+void HsPropertyAnimationWrapper::setEasingCurve(const QEasingCurve &curve)
+{
+    mImpl->mPropertyAnimation->setEasingCurve(curve);
+}
+
--- a/homescreenapp/hsutils/src/hssnapline.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hssnapline.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -17,9 +17,10 @@
 
 #include <QGraphicsOpacityEffect>
 #include <QPropertyAnimation>
+#include <hbcolorscheme.h>
 
 #include "hsapp_defs.h"
-#include "HsSnapLine.h"
+#include "hssnapline.h"
 
 /*!
     Constructor.
@@ -44,11 +45,6 @@
 
     mFadeOutAnimation = new QPropertyAnimation(graphicsEffect(), "opacity", this);
     connect(mFadeOutAnimation, SIGNAL(finished()), SLOT(fadeOutAnimationFinished()));
-
-    QPen pen;
-    pen.setWidth(3);
-    pen.setColor(Qt::darkCyan); //TODO: Change the color to the Theme element
-    setPen(pen);
 }
  
 /*!
@@ -111,6 +107,23 @@
         displayLine.translate(-1.0, 0.0);
     }
 
+    QLinearGradient gradient(displayLine.p1(), displayLine.p2());
+    gradient.setColorAt(0.0, Qt::white);
+    QColor snapLineColor = HbColorScheme::color("qtc_hs_snapguide");
+    if (!snapLineColor.isValid()) {
+        //if valid color is not loaded from the theme, the darkCyan color is used as a backup.color
+        snapLineColor = Qt::darkCyan;
+    }
+    gradient.setColorAt(0.4, snapLineColor);
+    gradient.setColorAt(0.6, snapLineColor);
+    gradient.setColorAt(1.0, Qt::white);
+    QBrush brush(gradient);
+    QPen pen;
+    pen.setWidth(3);
+    pen.setCapStyle(Qt::RoundCap);
+    pen.setBrush(brush);
+    setPen(pen);
+
     setLine(displayLine);
     show();
 }
--- a/homescreenapp/hsutils/src/hswidgetpositioningonwidgetadd.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hswidgetpositioningonwidgetadd.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 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"
@@ -15,10 +15,15 @@
 *
 */
 
+#include <QLineF>
 #include <QtGlobal>
+#include <QPointF>
+#include <math.h>
+
+#include <HbInstance>
+
+
 #include "hswidgetpositioningonwidgetadd.h"
-#include <math.h>
-#include <QLineF>
 
 const qreal offset = 40; //TODO: Implement this as configurable parameter
 
@@ -71,9 +76,12 @@
 */
 QList<QRectF> HsAnchorPointInBottomRight::convert(
     const QRectF &contentArea,
-    const QList<QRectF> &rects,
+    const QList<QRectF> &existingRects,
+    const QList<QRectF> &newRects,
     const QPointF &startPoint)
 {
+    Q_UNUSED(existingRects);
+
     QList<QRectF> toGeometries;
 
     //Offset for widgets' bottom right position to each other
@@ -87,16 +95,16 @@
     if(startPoint.isNull()){
 
         QLineF diagonal(contentArea.topLeft(), contentArea.bottomRight());
-        QLineF widgetRightSide(contentArea.center().x()+ rects.at(0).width()/2,
+        QLineF widgetRightSide(contentArea.center().x()+ newRects.at(0).width()/2,
                            contentArea.top(),
-                           contentArea.center().x()+ rects.at(0).width()/2,
+                           contentArea.center().x()+ newRects.at(0).width()/2,
                            contentArea.bottom());
 
         // right side line intersection with diagonal will be bottom right position
         // for the first rect
         if(QLineF::BoundedIntersection != 
             diagonal.intersect(widgetRightSide, &anchorPoint)) {
-            return rects; //Return original since undefined error.
+            return newRects; //Return original since undefined error.
                             //In this case widget's must be wider than the content area.
         }
     }else{
@@ -104,8 +112,8 @@
     }
 
     QRectF widgetRect;
-    for(int i=0;i<rects.count();++i) {
-        widgetRect = rects.at(i);
+    for(int i=0;i<newRects.count();++i) {
+        widgetRect = newRects.at(i);
         widgetRect.moveBottomRight(anchorPoint);
         //if widget rect doesn't fit, try to move it
         if(!contentArea.contains(widgetRect)) {
@@ -137,9 +145,11 @@
 #endif //COVERAGE_MEASUREMENT
 QList<QRectF> HsAnchorPointInCenter::convert(
     const QRectF &contentArea,
-    const QList<QRectF> &rects,
+    const QList<QRectF> &existingRects,
+    const QList<QRectF> &newRects,
     const QPointF &startPoint )
 {
+    Q_UNUSED(existingRects);
     Q_UNUSED(startPoint)
 
     QList<QRectF> toGeometries;
@@ -152,7 +162,7 @@
 
     //First widget to the center of the content area
     QPointF anchorPoint = contentArea.center();
-    foreach (QRectF g, rects) {
+    foreach (QRectF g, newRects) {
         g.moveCenter(anchorPoint);
         toGeometries << g;
         anchorPoint -= offsetPoint;
@@ -163,6 +173,279 @@
     return toGeometries;
 }
 
+/*!
+    \class HsWidgetOrganizer
+    \brief Advanced widget positioning algorithm.
+    
+    Organizes widget's starting from upper left corner towards right,
+    and then continues the on the next line.
+*/
+QList<QRectF> HsWidgetOrganizer::convert(
+    const QRectF &contentArea,
+    const QList<QRectF> &existingRects,
+    const QList<QRectF> &newRects,
+    const QPointF &startPoint)
+{
+    Q_UNUSED(startPoint)
+
+    // TODO: maybe we can utilize start point in some use cases / optimizations?
+
+    QList<QRectF> toGeometries;
+
+    // TODO: anchor distance to configuration?
+    // TODO: optimize anchor distance based on new content amount
+    // TODO: snap value to same as anchor distance?
+    mAnchorDistance = 5;
+    QList<bool> temp;
+    mAnchors = temp;
+
+    // test flag
+    int test = 0;
+
+    // initialize anchor network for widget positions
+    if (test == 0) {
+        initAnchors(contentArea.size());
+    } else {
+        mAnchorDistance = 2;
+        initAnchors(QSizeF(6,6));
+    }
+
+    // mark existing rects (widgets) reserved
+    foreach (QRectF rect, existingRects) {
+        // TODO: could mStartWidthAnchorPoint, mEndWidthAnchorPoint, mEndHeightAnchorPoint be somehow refactored better way?
+        mStartWidthAnchorPoint.setX(lenghtInAnchorPoints(rect.x() - contentArea.x()));
+        mEndWidthAnchorPoint.setX(lenghtInAnchorPoints(rect.x() + rect.width() - contentArea.x()));
+        mStartWidthAnchorPoint.setY(lenghtInAnchorPoints(rect.y() - contentArea.y()));
+        mEndHeightAnchorPoint.setY(lenghtInAnchorPoints(rect.y() + rect.height() - contentArea.y()));
+        // mark reserved anchor points
+        markReservedAnchors();
+        mStartWidthAnchorPoint = QPointF(0,0);
+        mEndWidthAnchorPoint = QPointF(0,0);
+        mEndHeightAnchorPoint = QPointF(0,0);
+    }
+
+    QList<QRectF> notOrganizedRects;
+
+    // get positions for all new rects (widgets)
+    for ( int i = 0; i < newRects.count(); i++) {
+        bool found = false;
+        if (test == 0) {
+            // find first free anchor point for rect
+            found = getAnchorPoint(newRects.at(i).size());
+        } else {
+            found = getAnchorPoint(QSizeF(2,2));
+        }
+
+        if (found) {
+            // save to geometry list
+            toGeometries << QRectF(mStartWidthAnchorPoint.x() * mAnchorDistance + contentArea.x(),
+                                   mStartWidthAnchorPoint.y() * mAnchorDistance + contentArea.y(),
+                                   newRects.at(i).width(), newRects.at(i).height());
+            // mark new widgets rect reserved
+            markReservedAnchors();
+            // TODO: these optimizations could be used for empty page
+            //mStartWidthAnchorPoint.setX(mEndWidthAnchorPoint.x() + 1);
+            //mStartWidthAnchorPoint.setY(mEndWidthAnchorPoint.y());
+        } else {
+            // collect widgets that do not fit
+            notOrganizedRects << newRects.at(i);
+        }
+        // TODO: remove these to optimize for empty page
+        mStartWidthAnchorPoint = QPointF(0,0);
+        mEndWidthAnchorPoint = QPointF(0,0);
+    }
+
+    // use center algorithm with offset for the rest widget that did not fit to screen
+    if (notOrganizedRects.count() > 0) {
+        QList<QRectF> tmpExistingRects;
+        tmpExistingRects += newRects;
+        tmpExistingRects += existingRects;
+        HsAnchorPointInCenter *centerAlgorithm = new HsAnchorPointInCenter();
+        QList<QRectF> calculatedRects =
+            centerAlgorithm->convert(contentArea, tmpExistingRects, notOrganizedRects, QPointF());
+        toGeometries += calculatedRects;
+    }
+
+    return toGeometries;
+}
+
+
+/*!    
+    Initializes anchor points for context area
+*/
+bool HsWidgetOrganizer::initAnchors(const QSizeF &areaSize)
+{
+    // mandatory check ups
+    // TODO: these mAnchorDistance checks to earlier phase
+    if (areaSize == QSizeF(0,0) || areaSize.width() < mAnchorDistance ||
+        areaSize.height() < mAnchorDistance || mAnchorDistance == 0 || mAnchorDistance == 1) {
+        return false;
+    }
+    mAnchorColumns = 0;
+    mAnchorRows = 0;
+
+    // TODO: can we optimize anchor amount utilizing minimum widget size
+    mAnchorColumns = lenghtInAnchorPoints(areaSize.width());
+    mAnchorRows = lenghtInAnchorPoints(areaSize.height());
+
+    // create anchor network
+    for (int i = 0; i < (mAnchorRows * mAnchorColumns); i = i++) {
+        mAnchors << false;
+    }
+    // zero start points
+    mStartWidthAnchorPoint = QPointF(0,0);
+    mEndWidthAnchorPoint = QPointF(0,0);
+
+    return true;
+}
+
+/*!    
+    Finds anchor points for content size
+*/
+bool HsWidgetOrganizer::getAnchorPoint(const QSizeF &contentSize)
+{
+    bool anchorFound = false;
+
+    while (anchorFound == false) {
+        // if no width found for content
+        if (!searchWidthSpace(contentSize)) {
+            // when content organized in height order remove this line for optimization
+            mStartWidthAnchorPoint = QPointF(0,0);
+            mEndWidthAnchorPoint = QPointF(0,0);
+            return false;
+        }
+        // search height for content
+        int height = lenghtInAnchorPoints(contentSize.height());
+        anchorFound = searchHeightSpace(height);
+    }
+    return true;
+}
+
+/*!    
+    Searches anchor point width for content size
+*/
+bool HsWidgetOrganizer::searchWidthSpace(const QSizeF &contentSize) 
+{
+    int availableWidth = 0;    
+    int contentWidth = lenghtInAnchorPoints(contentSize.width());
+    // TODO: use this optimizations for empty page
+    //int contentHeight = lenghtInAnchorPoints(contentSize.height());
+    bool newRow = true;
+
+    for (int i = getIndexForCoordinate(mStartWidthAnchorPoint); i <= mAnchors.count(); i++) {
+        // no width left on the page
+        if ((newRow == false) && ((i % (mAnchorColumns)) == 0)) {
+            availableWidth = 0;
+            // jump to new row
+            mStartWidthAnchorPoint.setX(0);
+            // TODO: use this optimizations for empty page
+            //mStartWidthAnchorPoint.setY(mStartWidthAnchorPoint.y() + contentHeight + 1);
+            mStartWidthAnchorPoint.setY(mStartWidthAnchorPoint.y() + 1);
+            i = getIndexForCoordinate(mStartWidthAnchorPoint) - 1;
+            // if no height found
+            if (i < 0) {
+                return false;
+            }
+            newRow = true;
+        } else {
+            // if enough width found
+            if (availableWidth == contentWidth) {
+                mEndWidthAnchorPoint = getAnchorCoordinates(i);
+                if (mEndWidthAnchorPoint == QPointF()) {
+                    return false;
+                }
+                return true;
+            }
+            // if anchor reserved
+            if (mAnchors[i] == true) {
+                availableWidth = 0;
+            } else {
+                // update available width
+                availableWidth = availableWidth + 1;
+            }
+            newRow = false;
+        }   
+    }
+    return false;
+}
+
+/*!    
+    Searches anchor point area for content size
+*/
+bool HsWidgetOrganizer::searchHeightSpace(int contentHeight)
+{
+    mEndHeightAnchorPoint = QPointF(0,0);
+ 
+    for (int i = mStartWidthAnchorPoint.x(); i <= mEndWidthAnchorPoint.x(); i = i++) {
+        for (int j = mStartWidthAnchorPoint.y(); j <= (mStartWidthAnchorPoint.y() + contentHeight); j = j++) {
+            int index = getIndexForCoordinate(QPointF(i,j));
+            // check that index is not out of bounds
+            if (index == -1) {
+                // update start width point one step
+                mStartWidthAnchorPoint.setX(mStartWidthAnchorPoint.x() + 1); 
+                return false;
+            }
+            // if anchor reserved
+            if (mAnchors[index] == true) {
+                // update start width point one step
+                mStartWidthAnchorPoint.setX(mStartWidthAnchorPoint.x() + 1);
+                return false;
+            }
+        }
+    }
+    mEndHeightAnchorPoint = QPointF(mEndWidthAnchorPoint.x(), mEndWidthAnchorPoint.y() + contentHeight);
+    return true;
+}
+
+/*!    
+    Marks reserved anchor points based on pre-defined starting and ending points
+*/
+bool HsWidgetOrganizer::markReservedAnchors()
+{
+    for (int i = mStartWidthAnchorPoint.x(); i <= mEndWidthAnchorPoint.x(); i++) {
+        for (int j = mStartWidthAnchorPoint.y(); j <= mEndHeightAnchorPoint.y(); j++) {
+            mAnchors[getIndexForCoordinate(QPointF(i,j))] = true;
+        }
+    }
+    return true;
+}
+
+/*!    
+    Returns pixel coordinate based on anchor coordinate
+*/
+QPointF HsWidgetOrganizer::getAnchorCoordinates(int index)
+{
+    if (index < mAnchors.count()) {
+        int x = index % mAnchorColumns;
+        int y = (index - x) / mAnchorColumns;
+        return QPointF(x,y);
+    } else {
+        return QPointF();
+    }
+}
+
+/*!    
+    Returns anchor coordinate based on pixel coordinate
+*/
+int HsWidgetOrganizer::getIndexForCoordinate(QPointF position)
+{
+    int index = (position.y() * mAnchorColumns) + position.x();
+    if (index < mAnchors.count()) {
+        return index;
+    } else {
+        return -1;
+    }
+}
+
+/*!    
+    Calculates pixel length as anchor points
+*/
+int HsWidgetOrganizer::lenghtInAnchorPoints(QVariant length)
+{
+    // check remainder
+    int remainder = length.toInt() % mAnchorDistance;
+    return ((length.toInt() - remainder) / mAnchorDistance);
+}
 
 #ifdef COVERAGE_MEASUREMENT
 #pragma CTC ENDSKIP
--- a/homescreenapp/hsutils/src/hswidgetpositioningonwidgetmove.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/hsutils/src/hswidgetpositioningonwidgetmove.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -53,17 +53,18 @@
     Constructor.
 */
 HsSnapToLines::HsSnapToLines() :
-    mActiveRectWidth(0.0), mActiveRectHeight(0.0),
+    mActiveRectWidth(0.0), mActiveRectHeight(0.0), mMinDistancePosition(0.0),
     mHorizontalSnapPosition(0.0), mVerticalSnapPosition(0.0),
-    mHorizontalSnapFound(false),
-    mVerticalSnapFound(false),
-    mRectLieAbove(false), mLeftInRange(false), mRightInRange(false),
+    mHorizontalSnapFound(false), mVerticalSnapFound(false),
+    mRectLieAbove(false), mLeftInRange(false), mRightInRange(false), mIsBetterFitHorizontalSnap(false),
+    mDistanceVerticalEdges(0.0), mVerticalEdgeToLeftOfInactiveRect(0.0), mVerticalEdgeToRightOfInactiveRect(0.0),
     mMinVerticalEdgesDistance(0.0), mVerticalDistance(0.0),
     mVerticalDistanceFromSelectedRect(0.0), mContainerVerticalEdgeDistance(0.0),
-    mRectLieLeft(false), mTopInRange(false), mBottomInRange(false),
+    mRectLieLeft(false), mTopInRange(false), mBottomInRange(false), mIsBetterFitVerticalSnap(false),
+    mDistanceHorizontalEdges(0.0), mHorizontalEdgeToTopOfInactiveRect(0.0), mHorizontalEdgeToBottomOfInactiveRect(0.0),
     mMinHorizontalEdgesDistance(0.0), mHorizontalDistance(0.0),
     mHorizontalDistanceFromSelectedRect(0.0), mContainerHorizontalEdgeDistance(0.0),
-    mSnapEnabled(false), mSnapForce(0.0), mSnapGap(0.0), mSnapBorderGap(0.0),
+    mSnapEnabled(false), mSnapForce(0.0), mSnapGap(0.0),
     mRectVerticalEdgeLiesInLineWithVerticalLine(false), mRectLieAboveVerticalLine(false), mRectLieBelowVerticalLine(false),
     mRectHorizontalEdgeLiesInLineWithHorizontalLine(false), mRectLieLeftOfHorizontalLine(false), mRectLiesRightOfHorizontalLine(false)
 {
@@ -80,7 +81,6 @@
     //The following values should be in qreal, so the status received in canConvert is ignored
     mSnapForce = configuration[SNAPFORCE].toDouble(&canConvert);
     mSnapGap = configuration[SNAPGAP].toDouble(&canConvert);
-    mSnapBorderGap = configuration[SNAPBORDERGAP].toDouble(&canConvert);
 }
 
 /*!
@@ -91,11 +91,7 @@
                                         const QList<QRectF> &inactiveRects,
                                         const QRectF &activeRect)
 {
-    mContainerRect.setLeft(containerRect.left() + mSnapBorderGap);
-    mContainerRect.setTop(containerRect.top() + mSnapBorderGap);
-    mContainerRect.setRight(containerRect.right() - mSnapBorderGap);
-    mContainerRect.setBottom(containerRect.bottom() - mSnapBorderGap);
-
+    mContainerRect = containerRect;
     mActiveRectWidth = activeRect.width();
     mActiveRectHeight = activeRect.height();
 
@@ -178,16 +174,14 @@
         mContainerHorizontalEdgeDistance = 0.0;
         mVerticalSnapFound = false;
 
-        checkForCenterSnapping();
         for (int i = 0; i < mInactiveSnapRects.count(); ++i) {
             mInactiveSnapRectToCompare = mInactiveSnapRects[i];
             mInactiveRectToCompare = mInactiveSnapRectToCompare.rectangle;
             if (!movingRect.intersects(mInactiveRectToCompare)) { //Only compare if Inactive Rect and moving rect do not overlap.
-                //TODO: Move the above check to another function...
-                // X - Direction Snapping
+                // Horizontal - Direction Snapping
                 compareLeftSideOfMovingRectForSnapping();
                 compareRightSideOfMovingRectForSnapping();
-                // Y - Direction Snapping
+                // Vertical - Direction Snapping
                 compareTopOfMovingRectForSnapping();
                 compareBottomOfMovingRectForSnapping();
             }
@@ -212,29 +206,6 @@
 }
 
 /*!
-    Check if the center of moving rect is in the snap force in the middle of continer rect.
-*/
-void HsSnapToLines::checkForCenterSnapping()
-{
-    QPointF centerOfContainerRect = mContainerRect.center();
-
-    QRectF verticalSnapField = QRectF(QPointF(centerOfContainerRect.x() - (mSnapForce/2), mContainerRect.top()),
-         QPointF(centerOfContainerRect.x() + (mSnapForce/2), mContainerRect.bottom()));
-
-    //Check that the widget lies in the container rect, if the snapping position is proposed... is not required,
-    //unless some widget is bigger than the page width
-    QPointF centerOfMovingRect = mMovingRect.center();
-    if (verticalSnapField.contains(centerOfMovingRect)) {
-        mHorizontalSnapFound = true;
-        mHorizontalSnapPosition = centerOfContainerRect.x() - mActiveRectWidth/2;
-        mMinVerticalEdgesDistance = qAbs(centerOfContainerRect.x() - centerOfMovingRect.x());
-        //save the points for the Vertical line
-        mVerticalLine.setP1(QPointF(centerOfContainerRect.x(), mMovingRect.top()));
-        mVerticalLine.setP2(QPointF(centerOfContainerRect.x(), mMovingRect.bottom()));
-    }
-}
-
-/*!
     Check if the inactive rect being compared with moving rect lies above or below of moving rect.
 */
 void HsSnapToLines::checkInactiveRectLieAboveOrBelowOfMovingRect()
@@ -264,6 +235,81 @@
     }
 }
 
+/*!
+    Check if the Vertical edges (Left and Right Edges) of the inactive rect being compared
+    is in range of the snapping distance of the vertical edge of moving rect
+    \param movingRectVerticalEdgePosition Position of the Vertical edge(either left or right) of moving rect.
+*/
+void HsSnapToLines::checkInactiveRectVerticalEdgesInRange(qreal movingRectVerticalEdgePosition)
+{
+    mLeftInRange = false;
+    mRightInRange = false;
+
+    //calculate the distance of the moving rect's vertical edge to the inactive rect's left and right edges
+    mVerticalEdgeToLeftOfInactiveRect = qAbs(mInactiveRectToCompare.left() - movingRectVerticalEdgePosition);
+    mVerticalEdgeToRightOfInactiveRect = qAbs(mInactiveRectToCompare.right() - movingRectVerticalEdgePosition);
+
+    if (mVerticalEdgeToLeftOfInactiveRect <= mMinVerticalEdgesDistance 
+        && (mRectLieAbove && mInactiveSnapRectToCompare.isLeftSnapableForBelow
+        || !mRectLieAbove && mInactiveSnapRectToCompare.isLeftSnapableForAbove)) { 
+        mLeftInRange = true;
+    }
+    if (mVerticalEdgeToRightOfInactiveRect <= mMinVerticalEdgesDistance
+        && (mRectLieAbove && mInactiveSnapRectToCompare.isRightSnapableForBelow
+        || !mRectLieAbove && mInactiveSnapRectToCompare.isRightSnapableForAbove)) {
+        mRightInRange = true;
+    }
+}
+
+/*!
+    Check if this inactive rect is better fit for Horizontal snapping
+    \param containerVerticalEdgeToInactiveRectVerticalEdge
+           difference between the vertical edge of the container and same vertical edge of inactive rect
+    \param containerOtherVerticalEdgeToInactiveRectOtherVerticalEdge
+           difference between the opposite vertical edges of continer and the inactive rect
+*/
+void HsSnapToLines::checkInactiveRectBetterFitForHorizontalSnapping(qreal containerVerticalEdgeToInactiveRectVerticalEdge,
+                                                                    qreal containerOtherVerticalEdgeToInactiveRectOtherVerticalEdge)
+{
+    //Check if the inactive rect is better fit or if it is inline with already selected position and hence is also a better fit
+    mIsBetterFitHorizontalSnap = false;
+    if (mLeftInRange || mRightInRange) {
+        if (mDistanceVerticalEdges < mMinVerticalEdgesDistance) {
+            mIsBetterFitHorizontalSnap = true;
+        }
+        else if (mDistanceVerticalEdges == mMinVerticalEdgesDistance) { //the distance in the vertical edges is same as from the previously selected rect
+            //check the position of rect with respect to Vertical line
+            checkInactiveRectPositionToVerticalLine();
+            //if horizontal snap position was previously found and the rect's edge is in line with Vertical line
+            if (mHorizontalSnapFound && mRectVerticalEdgeLiesInLineWithVerticalLine) {
+                if (mRectLieAboveVerticalLine || mRectLieBelowVerticalLine) {
+                    extendVerticalLineToIncludeInactiveRect();
+                }
+            }
+            //here the case is that moving rect lies exactly in middle of two same sides of two different inactive widgets.
+            else {
+                //Prioritize first on the fact if the inactive rect is closer to the moving rect in Y - direction.
+                if (mVerticalDistance < mVerticalDistanceFromSelectedRect) {
+                    mIsBetterFitHorizontalSnap = true;
+                }
+                else if (mVerticalDistance == mVerticalDistanceFromSelectedRect) {
+                    //Prioritize next if this Inactive rect's vertical edge is closer to the same vertical edge of the container rect, then the previously selected rect
+                    if (containerVerticalEdgeToInactiveRectVerticalEdge < mContainerVerticalEdgeDistance) {
+                        mIsBetterFitHorizontalSnap = true;
+                    }
+                    //Prioritize next if the Inactive rect's vertical edge lies near to same vertical edge of the container rect than the other pair
+                    else if (containerVerticalEdgeToInactiveRectVerticalEdge < containerOtherVerticalEdgeToInactiveRectOtherVerticalEdge) {
+                        mIsBetterFitHorizontalSnap = true;
+                    }
+                    else {
+                        //This else will happen if this rectangle being compared is exactly the same as the selected rectangle for snapping, but in opposite Y direction.
+                        //In that case it does not matter which is the selected rectangle. Hece we leave the already selected rectangle as the better fit.
+                    }
+                }
+            }
+        }
+    }
+}
 
 /*!
     Check if the left edge of moving rect is snappable to the incative rect's left or right edge.
@@ -273,141 +319,80 @@
 {
     checkInactiveRectLieAboveOrBelowOfMovingRect();
 
-    //calculate the distance of the moving rect's left edge to the inactive rect's left and right edges
-    qreal leftToLeftOfInactiveRect = qAbs(mInactiveRectToCompare.left() - mMovingRect.left());
-    qreal leftToRightOfInactiveRect = qAbs(mInactiveRectToCompare.right() - mMovingRect.left());
-    mLeftInRange = false;
-    mRightInRange = false;
-
-    if (leftToLeftOfInactiveRect <= mMinVerticalEdgesDistance) {
-        if (mRectLieAbove && mInactiveSnapRectToCompare.isLeftSnapableForBelow
-         || !mRectLieAbove && mInactiveSnapRectToCompare.isLeftSnapableForAbove) { 
-            mLeftInRange = true;
-        }
-    }
-    if (leftToRightOfInactiveRect <= mMinVerticalEdgesDistance) {
-        if (mRectLieAbove && mInactiveSnapRectToCompare.isRightSnapableForBelow
-         || !mRectLieAbove && mInactiveSnapRectToCompare.isRightSnapableForAbove) {
-            mRightInRange = true;
-        }
-    }
+    checkInactiveRectVerticalEdgesInRange(mMovingRect.left());
 
     //calculate the distance of inactive rect's left edge and container rect's left edge
     qreal differenceContainerLeftEdgeToInactiveRectLeftEdge = mInactiveRectToCompare.left() - mContainerRect.left();
     //calculate the distance of inactive rect's right edge and container rect's right edge
     qreal differenceContainerRightEdgeToInactiveRectRightEdge = mContainerRect.right() - mInactiveRectToCompare.right();
-
-    qreal minDistancePosition = 0.0;
-    qreal distanceVerticalEdges = 0.0;
     qreal xSnapGapAdjustment = 0.0;
+    mDistanceVerticalEdges = 0.0;
+    mMinDistancePosition = 0.0;
 
     //If only one edge of inactive rect is in snappable range, save that position
     if ((mLeftInRange && !mRightInRange)
         || !mLeftInRange && mRightInRange) {
         if (mLeftInRange) {
-            minDistancePosition = mInactiveRectToCompare.left();
-            distanceVerticalEdges = leftToLeftOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.left();
+            mDistanceVerticalEdges = mVerticalEdgeToLeftOfInactiveRect;
             xSnapGapAdjustment = 0.0;
         }
         else {
-            minDistancePosition = mInactiveRectToCompare.right();
-            distanceVerticalEdges = leftToRightOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.right();
+            mDistanceVerticalEdges = mVerticalEdgeToRightOfInactiveRect;
             xSnapGapAdjustment = mSnapGap;
         }
     }
     //else both edges of inactive rect are in range, check which is a better fit
     else if (mLeftInRange && mRightInRange) {
         //if left edge of moving rect to the left of the inactive rect is closer than the left edge of moving rect to the right of the inactive rect
-        if (leftToLeftOfInactiveRect < leftToRightOfInactiveRect) {
-            minDistancePosition = mInactiveRectToCompare.left();
-            distanceVerticalEdges = leftToLeftOfInactiveRect;
+        if (mVerticalEdgeToLeftOfInactiveRect < mVerticalEdgeToRightOfInactiveRect) {
+            mMinDistancePosition = mInactiveRectToCompare.left();
+            mDistanceVerticalEdges = mVerticalEdgeToLeftOfInactiveRect;
             xSnapGapAdjustment = 0.0;
             mRightInRange = false;
         }
         //if the left edge of inactive rect to left of moving rect is at the same distance as the right edge of inactive rect to the right of moving rect
-        else if (leftToLeftOfInactiveRect == leftToRightOfInactiveRect) {
+        else if (mVerticalEdgeToLeftOfInactiveRect == mVerticalEdgeToRightOfInactiveRect) {
             //if inactive rect lies towards the left or middle of container rect, then the left edge is priortized as the selected edge for outside snapping 
             if (differenceContainerLeftEdgeToInactiveRectLeftEdge <= differenceContainerRightEdgeToInactiveRectRightEdge) { 
-                minDistancePosition = mInactiveRectToCompare.left();
-                distanceVerticalEdges = leftToLeftOfInactiveRect;
+                mMinDistancePosition = mInactiveRectToCompare.left();
+                mDistanceVerticalEdges = mVerticalEdgeToLeftOfInactiveRect;
                 xSnapGapAdjustment = 0.0;
                 mRightInRange = false;
             }
             //else right of the inactive rect lies more close to the right of the container rect, and hence prioritize it for snapping.
             else {
-                minDistancePosition = mInactiveRectToCompare.right();
-                distanceVerticalEdges = leftToRightOfInactiveRect;
+                mMinDistancePosition = mInactiveRectToCompare.right();
+                mDistanceVerticalEdges = mVerticalEdgeToRightOfInactiveRect;
                 xSnapGapAdjustment = mSnapGap;
                 mLeftInRange = false;
             }
         }
         //else right edge of inactive rect to the left of the moving rect is closer than the left edge of inactive rect to the left of the moving rect
         else{
-            minDistancePosition = mInactiveRectToCompare.right();
-            distanceVerticalEdges = leftToRightOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.right();
+            mDistanceVerticalEdges = mVerticalEdgeToRightOfInactiveRect;
             xSnapGapAdjustment = mSnapGap;
             mLeftInRange = false;
         }
     }
 
-    //Check if this inactive rect is better fit than the previous selected rect for X - snapping
-    bool horizontalSnappingBetterFit = false;
-    if (mLeftInRange || mRightInRange) {
-        if (distanceVerticalEdges < mMinVerticalEdgesDistance) {
-            horizontalSnappingBetterFit = true;
-        }
-        else if (distanceVerticalEdges == mMinVerticalEdgesDistance) { //the distance in the vertical edges is same as from the selected rectangle
-            //check the position of rect with respect to Vertical line
-            checkInactiveRectPositionToVerticalLine();
-            //if horizontal snap position was previously found the rect's edges are in line with Vertical line
-            if (mHorizontalSnapFound && mRectVerticalEdgeLiesInLineWithVerticalLine) {
-                if (mRectLieAboveVerticalLine || mRectLieBelowVerticalLine) {
-                    extendVerticalLineToIncludeInactiveRect();
-                }
-            }
-            //here the case is that moving rect lies exactly in middle of two same sides of two inactive widgets.
-            else {
-                //Prioritize first on the fact if the inactive rect is closer to the moving rect in Y - direction.
-                if (mVerticalDistance < mVerticalDistanceFromSelectedRect) {
-                    horizontalSnappingBetterFit = true;
-                }
-                else if (mVerticalDistance == mVerticalDistanceFromSelectedRect) {
-                    //Prioritize next if this Inactive rect is closer to the left edge of the container rect, then the previously selected rect
-                    if (differenceContainerLeftEdgeToInactiveRectLeftEdge < mContainerVerticalEdgeDistance) {
-                        horizontalSnappingBetterFit = true;
-                    }
-                    //Prioritize next if the Inactive widget's left edge lies near to left edge of the container rect
-                    else if (differenceContainerLeftEdgeToInactiveRectLeftEdge < differenceContainerRightEdgeToInactiveRectRightEdge) {
-                        horizontalSnappingBetterFit = true;
-                    }
-                    else {
-                        //This else will happen if this rectangle being compared is exactly the same as the selected rectangle for snapping.
-                        //In that case it does not matter which is the selected rectangle. Hence we leave the already selected rectangle as the better fit.
-                    }
-                }
-            }
-        }
-    }
+    //Check if this inactive rect is better fit than the previous selected rect for Horizontal - snapping
+    checkInactiveRectBetterFitForHorizontalSnapping(differenceContainerLeftEdgeToInactiveRectLeftEdge,
+                                                    differenceContainerRightEdgeToInactiveRectRightEdge);
 
-    if (horizontalSnappingBetterFit) {
-        qreal proposedRightOfActiveRect = minDistancePosition + xSnapGapAdjustment + mActiveRectWidth;
+    if (mIsBetterFitHorizontalSnap) {
+        qreal proposedRightOfActiveRect = mMinDistancePosition + xSnapGapAdjustment + mActiveRectWidth;
         if (qBound(mContainerRect.left(), proposedRightOfActiveRect, mContainerRect.right())
             == proposedRightOfActiveRect) {
             mHorizontalSnapFound = true;
-            mHorizontalSnapPosition = minDistancePosition + xSnapGapAdjustment;
-            mMinVerticalEdgesDistance = distanceVerticalEdges;
+            mHorizontalSnapPosition = mMinDistancePosition + xSnapGapAdjustment;
+            mMinVerticalEdgesDistance = mDistanceVerticalEdges;
             mVerticalDistanceFromSelectedRect = mVerticalDistance;
             //Save the new distance of the Chosen Rectangle's left edge from Container's left edge
             mContainerVerticalEdgeDistance = differenceContainerLeftEdgeToInactiveRectLeftEdge;
-
-            if (mRectLieAbove) {
-                mVerticalLine.setP1(QPointF(minDistancePosition, mInactiveRectToCompare.top()));
-                mVerticalLine.setP2(QPointF(minDistancePosition, mMovingRect.bottom()));
-            }
-            else {
-                mVerticalLine.setP1(QPointF(minDistancePosition, mInactiveRectToCompare.bottom()));
-                mVerticalLine.setP2(QPointF(minDistancePosition, mMovingRect.top()));
-            }
+            createVerticalLine();
         }
     }
 }
@@ -420,143 +405,96 @@
 {
     checkInactiveRectLieAboveOrBelowOfMovingRect();
 
-    //calculate the distance of the moving rect's right edge to the inactive rect's left and right edges
-    qreal rightToLeftOfInactiveRect = qAbs(mInactiveRectToCompare.left() - mMovingRect.right());
-    qreal rightToRightOfInactiveRect = qAbs(mInactiveRectToCompare.right() - mMovingRect.right());
-    mLeftInRange = false;
-    mRightInRange = false;
-
-    if (rightToLeftOfInactiveRect <= mMinVerticalEdgesDistance) {
-        if (mRectLieAbove && mInactiveSnapRectToCompare.isLeftSnapableForBelow
-         || !mRectLieAbove && mInactiveSnapRectToCompare.isLeftSnapableForAbove) {
-            mLeftInRange = true;
-        }
-    }
-    if (rightToRightOfInactiveRect <= mMinVerticalEdgesDistance) {
-        if (mRectLieAbove && mInactiveSnapRectToCompare.isRightSnapableForBelow
-         || !mRectLieAbove && mInactiveSnapRectToCompare.isRightSnapableForAbove) {
-            mRightInRange = true;
-        }
-    }
+    checkInactiveRectVerticalEdgesInRange(mMovingRect.right());
 
     //calculate the distance of inactive rect's left edge and container rect's left edge
     qreal differenceContainerLeftEdgeToInactiveRectLeftEdge = mInactiveRectToCompare.left() - mContainerRect.left();
     //calculate the distance of inactive rect's right edge and container rect's right edge
     qreal differenceContainerRightEdgeToInactiveRectRightEdge = mContainerRect.right() - mInactiveRectToCompare.right();
-    qreal minDistancePosition = 0.0;
-    qreal distanceVerticalEdges = 0.0;
     qreal xSnapGapAdjustment = 0.0;
+    mDistanceVerticalEdges = 0.0;
+    mMinDistancePosition = 0.0;
 
     //If only one edge of inactive rect is in snappable range, save that position
     if ((mLeftInRange && !mRightInRange)
         || !mLeftInRange && mRightInRange) {
         if (mLeftInRange) {
-            minDistancePosition = mInactiveRectToCompare.left();
-            distanceVerticalEdges = rightToLeftOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.left();
+            mDistanceVerticalEdges = mVerticalEdgeToLeftOfInactiveRect;
             xSnapGapAdjustment = mSnapGap;
         }
         else {
-            minDistancePosition = mInactiveRectToCompare.right();
-            distanceVerticalEdges = rightToRightOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.right();
+            mDistanceVerticalEdges = mVerticalEdgeToRightOfInactiveRect;
             xSnapGapAdjustment = 0.0;
         }
     }
     //else both edges of inactive rect are in range, check which is a better fit
     else if (mLeftInRange && mRightInRange) {
         //if right edge of moving rect to the right of the inactive rect is closer than the right edge of moving rect to the left of inactive rect
-        if (rightToRightOfInactiveRect < rightToLeftOfInactiveRect) {
-            minDistancePosition = mInactiveRectToCompare.right();
-            distanceVerticalEdges = rightToRightOfInactiveRect;
+        if (mVerticalEdgeToRightOfInactiveRect < mVerticalEdgeToLeftOfInactiveRect) {
+            mMinDistancePosition = mInactiveRectToCompare.right();
+            mDistanceVerticalEdges = mVerticalEdgeToRightOfInactiveRect;
             xSnapGapAdjustment = 0.0;
             mLeftInRange = false;
         }
         //if the right edge of moving rect to right of inactive rect is at the same distance as the right edge of moving rect to the left of inactive rect
-        else if (rightToRightOfInactiveRect == rightToLeftOfInactiveRect) {
+        else if (mVerticalEdgeToRightOfInactiveRect == mVerticalEdgeToLeftOfInactiveRect) {
             //if inactive rect lies towards the right of container rect, then the right edge is priortized as the selected edge for outside snapping
             if (differenceContainerRightEdgeToInactiveRectRightEdge < differenceContainerLeftEdgeToInactiveRectLeftEdge ) { 
-                minDistancePosition = mInactiveRectToCompare.right();
-                distanceVerticalEdges = rightToRightOfInactiveRect;
+                mMinDistancePosition = mInactiveRectToCompare.right();
+                mDistanceVerticalEdges = mVerticalEdgeToRightOfInactiveRect;
                 xSnapGapAdjustment = 0.0;
                 mLeftInRange = false;
             }
             //else left of the inactive rect lies more close to the left or middle of the container rect, and hence prioritize it
             else {
-                minDistancePosition = mInactiveRectToCompare.left();
-                distanceVerticalEdges = rightToLeftOfInactiveRect;
+                mMinDistancePosition = mInactiveRectToCompare.left();
+                mDistanceVerticalEdges = mVerticalEdgeToLeftOfInactiveRect;
                 xSnapGapAdjustment = mSnapGap;
                 mRightInRange = false;
             }
         }
         //else right edge of moving rect to the left of the inactive rect is closer than the right edge of moving rect to the right of the incoming rect
         else{
-            minDistancePosition = mInactiveRectToCompare.left();
-            distanceVerticalEdges = rightToLeftOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.left();
+            mDistanceVerticalEdges = mVerticalEdgeToLeftOfInactiveRect;
             xSnapGapAdjustment = mSnapGap;
             mRightInRange = false;
         }
     }
 
     //Check if this inactive rect is better fit than the previous selected rect 
-    bool horizontalSnappingBetterFit = false;
-    if (mLeftInRange || mRightInRange) {
-        if (distanceVerticalEdges < mMinVerticalEdgesDistance) {
-            horizontalSnappingBetterFit = true;
-        }
-        else if (distanceVerticalEdges == mMinVerticalEdgesDistance) { //the distance in the vertical edge is same as from the selected rectangle
-            //check the position of rect with respect to Vertical line
-            checkInactiveRectPositionToVerticalLine();
-            //if horizontal snap position was previously found and the rect's edge is in line with Vertical line
-            if (mHorizontalSnapFound && mRectVerticalEdgeLiesInLineWithVerticalLine) {
-                if (mRectLieAboveVerticalLine || mRectLieBelowVerticalLine) {
-                    extendVerticalLineToIncludeInactiveRect();
-                }
-            }
-            //here the case is that moving rect lies exactly in middle of two same sides of two inactive widgets.
-            else {
-                //Prioritize first on the fact if the inactive rect is closer to the moving rect in Y - direction.
-                if (mVerticalDistance < mVerticalDistanceFromSelectedRect) {
-                    horizontalSnappingBetterFit = true;
-                }
-                else if (mVerticalDistance == mVerticalDistanceFromSelectedRect) {
-                    //Prioritize next if this Inactive rect is closer to the right edge of the container rect, then the previously selected rect
-                    if (differenceContainerRightEdgeToInactiveRectRightEdge < mContainerVerticalEdgeDistance) {
-                        horizontalSnappingBetterFit = true;
-                    }
-                    //Prioritize next if the Inactive rect's right edge lies near to right edge of the container rect
-                    else if (differenceContainerRightEdgeToInactiveRectRightEdge < differenceContainerLeftEdgeToInactiveRectLeftEdge) {
-                        horizontalSnappingBetterFit = true;
-                    }
-                    else {
-                        //This else will happen if this rectangle being compared is exactly the same as the selected rectangle for snapping, but in opposite Y direction.
-                        //In that case it does not matter which is the selected rectangle. Hece we leave the already selected rectangle as the better fit.
-                    }
-                }
-            }
-        }
-    }
+    checkInactiveRectBetterFitForHorizontalSnapping(differenceContainerRightEdgeToInactiveRectRightEdge,
+                                                    differenceContainerLeftEdgeToInactiveRectLeftEdge);
 
-    if (horizontalSnappingBetterFit) {
-        qreal proposedLeftOfActiveRect = minDistancePosition - mActiveRectWidth - xSnapGapAdjustment;
+    if (mIsBetterFitHorizontalSnap) {
+        qreal proposedLeftOfActiveRect = mMinDistancePosition - mActiveRectWidth - xSnapGapAdjustment;
         if (qBound(mContainerRect.left(), proposedLeftOfActiveRect, mContainerRect.right())
             == proposedLeftOfActiveRect) {
             mHorizontalSnapFound = true;
             mHorizontalSnapPosition = proposedLeftOfActiveRect;
-            mMinVerticalEdgesDistance = distanceVerticalEdges;
+            mMinVerticalEdgesDistance = mDistanceVerticalEdges;
             mVerticalDistanceFromSelectedRect = mVerticalDistance;
             //Save the new distance of the Chosen Rectangle's right edge from Container's right edge
             mContainerVerticalEdgeDistance = differenceContainerRightEdgeToInactiveRectRightEdge;
+            createVerticalLine();
+        }
+    }
+}
 
-            if (mRectLieAbove) {
-                //save the points for the Vertical line
-                mVerticalLine.setP1(QPointF(minDistancePosition, mInactiveRectToCompare.top()));
-                mVerticalLine.setP2(QPointF(minDistancePosition, mMovingRect.bottom()));
-            }
-            else {
-                //save the points for the Vertical line
-                mVerticalLine.setP1(QPointF(minDistancePosition, mInactiveRectToCompare.bottom()));
-                mVerticalLine.setP2(QPointF(minDistancePosition, mMovingRect.top()));
-            }
-        }
+/*!
+    Create the vertical line for horizontal snap guidance
+*/
+void HsSnapToLines::createVerticalLine()
+{
+    if (mRectLieAbove) {
+        mVerticalLine.setP1(QPointF(mMinDistancePosition, mInactiveRectToCompare.top()));
+        mVerticalLine.setP2(QPointF(mMinDistancePosition, mMovingRect.bottom()));
+    }
+    else {
+        mVerticalLine.setP1(QPointF(mMinDistancePosition, mInactiveRectToCompare.bottom()));
+        mVerticalLine.setP2(QPointF(mMinDistancePosition, mMovingRect.top()));
     }
 }
 
@@ -590,97 +528,49 @@
 }
 
 /*!
-    Check if the top edge of moving rect is snappable to the incative rect's top or bottom edge.
-    The inactive rect's edge is only chosen if it is a better fit for vertical snapping.
+    Check if the Horizontal edges (Top and Bottom Edges) of the inactive rect being compared
+    is in range of the snapping distance of the horizontal edge of moving rect
+    \param movingRectHorizontalEdgePosition Position of the Horizontal edge(either top or bottom) of moving rect.
 */
-void HsSnapToLines::compareTopOfMovingRectForSnapping()
+void HsSnapToLines::checkInactiveRectHorizontalEdgesInRange(qreal movingRectHorizontalEdgePosition)
 {
-    //Check if the inactive rect lies to the left or right of the moving rect
-    checkInactiveRectLieLeftOrRightOfMovingRect();
-
-    //calculate the distance of the moving rect's top edge to the inactive rect's top and bottom edges
-    qreal topToTopOfInactiveRect = qAbs(mInactiveRectToCompare.top() - mMovingRect.top());
-    qreal topToBottomOfInactiveRect = qAbs(mInactiveRectToCompare.bottom() - mMovingRect.top());
     mTopInRange = false;
     mBottomInRange = false;
 
-    if (topToTopOfInactiveRect <= mMinHorizontalEdgesDistance) {
+    //calculate the distance of the moving rect's horizontal edge to the inactive rect's top and bottom edges
+    mHorizontalEdgeToTopOfInactiveRect = qAbs(mInactiveRectToCompare.top() - movingRectHorizontalEdgePosition);
+    mHorizontalEdgeToBottomOfInactiveRect = qAbs(mInactiveRectToCompare.bottom() - movingRectHorizontalEdgePosition);
+
+    if (mHorizontalEdgeToTopOfInactiveRect <= mMinHorizontalEdgesDistance) {
         if (mRectLieLeft && mInactiveSnapRectToCompare.isTopSnapableForRight
          || !mRectLieLeft && mInactiveSnapRectToCompare.isTopSnapableForLeft) {
             mTopInRange = true;
         }
     }
-    if (topToBottomOfInactiveRect <= mMinHorizontalEdgesDistance) {
+    if (mHorizontalEdgeToBottomOfInactiveRect <= mMinHorizontalEdgesDistance) {
         if (mRectLieLeft && mInactiveSnapRectToCompare.isBottomSnapableForRight
          || !mRectLieLeft && mInactiveSnapRectToCompare.isBottomSnapableForLeft) {
             mBottomInRange = true;
         }
     }
-
-    //calculate the distance of inactive rect's top edge and container rect's top edge
-    qreal differenceContainerTopEdgeToInactiveRectTopEdge = mInactiveRectToCompare.top() - mContainerRect.top();
-    //calculate the distance of inactive rect's bottom edge and container rect's bottom edge
-    qreal differenceContainerBottomEdgeToInactiveRectBottomEdge = mContainerRect.bottom() - mInactiveRectToCompare.bottom();
-    qreal minDistancePosition = 0.0;
-    qreal distanceHorizontalEdges = 0.0;
-    qreal ySnapGapAdjustment = 0.0;
+}
 
-    //If only one edge of inactive rect is in snappable range, save that position
-    if ((mTopInRange && !mBottomInRange)
-        || !mTopInRange && mBottomInRange) {
-        if (mTopInRange) {
-            minDistancePosition = mInactiveRectToCompare.top();
-            distanceHorizontalEdges = topToTopOfInactiveRect;
-            ySnapGapAdjustment = 0.0;
-        }
-        else {
-            minDistancePosition = mInactiveRectToCompare.bottom();
-            distanceHorizontalEdges = topToBottomOfInactiveRect;
-            ySnapGapAdjustment = mSnapGap;
-        }
-    }
-    //else both edges of inactive rect are in range, check which is a better fit
-    else if (mTopInRange && mBottomInRange) {
-        //if top edge of moving rect to the top of the inactive rect is closer than the bottom edge of moving rect to the bottom of the inactive rect
-        if (topToTopOfInactiveRect < topToBottomOfInactiveRect) {
-            minDistancePosition = mInactiveRectToCompare.top();
-            distanceHorizontalEdges = topToTopOfInactiveRect;
-            ySnapGapAdjustment = 0.0;
-            mBottomInRange = false;
+/*!
+    Check if this inactive rect is better fit for Vertical snapping
+    \param containerHorizontalEdgeToInactiveRectHorizontalEdge
+           difference between the horizontal edge of the container and same horizontal edge of inactive rect
+    \param containerOtherHorizontalEdgeToInactiveRectOtherHorizontalEdge
+           difference between the opposite horizontal edges of continer and the inactive rect
+*/
+void HsSnapToLines::checkInactiveRectBetterFitForVerticalSnapping(qreal containerHorizontalEdgeToInactiveRectHorizontalEdge,
+                                                       qreal containerOtherHorizontalEdgeToInactiveRectOtherHorizontalEdge)
+{
+    mIsBetterFitVerticalSnap = false;
+    if (mTopInRange || mBottomInRange) {
+        if (mDistanceHorizontalEdges < mMinHorizontalEdgesDistance) {
+            mIsBetterFitVerticalSnap = true;
         }
-        //if the top edge of moving rect to top of inactive rect is at the same distance as the top edge of moving rect to the bottom of inactive rect
-        else if (topToTopOfInactiveRect == topToBottomOfInactiveRect) {
-            //if inactive rect lies towards the top or middle of container rect, then the top edge is priortized as the selected edge for outside snapping
-            if (differenceContainerTopEdgeToInactiveRectTopEdge <= differenceContainerBottomEdgeToInactiveRectBottomEdge) { 
-                minDistancePosition = mInactiveRectToCompare.top();
-                distanceHorizontalEdges = topToTopOfInactiveRect;
-                ySnapGapAdjustment = 0.0;
-                mBottomInRange = false;
-            }
-            //else bottom of the inactive rect lies more close to the bottom of the container rect, and hence prioritize it for snapping.
-            else {
-                minDistancePosition = mInactiveRectToCompare.bottom();
-                distanceHorizontalEdges = topToBottomOfInactiveRect;
-                ySnapGapAdjustment = mSnapGap;
-                mTopInRange = false;
-            }
-        }
-        //else top edge of moving rect to the bottom of the inactive rect is closer than the top edge of moving rect to the top of the inactive rect
-        else{
-            minDistancePosition = mInactiveRectToCompare.bottom();
-            distanceHorizontalEdges = topToBottomOfInactiveRect;
-            ySnapGapAdjustment = mSnapGap;
-            mTopInRange = false;
-        }
-    }
-
-    //Check if this inactive rect is better fit than the previous selected rect 
-    bool verticalSnappingBetterFit = false;
-    if (mTopInRange || mBottomInRange) {
-        if (distanceHorizontalEdges < mMinHorizontalEdgesDistance) {
-            verticalSnappingBetterFit = true;
-        }
-        else if (distanceHorizontalEdges == mMinHorizontalEdgesDistance) { //the distance in the horizontal edge is same as from the selected rectangle
+        else if (mDistanceHorizontalEdges == mMinHorizontalEdgesDistance) { //the distance in the horizontal edge is same as from the selected rectangle
             //check the position of rect with respect to horizontal line
             checkInactiveRectPositionToHorizontalLine();
             //if vertical snap position was already found and this rect's horizontal edges lies in line with Horizontal snap line
@@ -692,16 +582,16 @@
             else {
                 //Prioritize first on the fact if the inactive rect is closer to the moving rect in X - direction.
                 if (mHorizontalDistance < mHorizontalDistanceFromSelectedRect) {
-                    verticalSnappingBetterFit = true;
+                    mIsBetterFitVerticalSnap = true;
                 }
                 else if (mHorizontalDistance == mHorizontalDistanceFromSelectedRect) {
                     //Prioritize next if this Inactive rect is closer to the top edge of the container rect, then the previously selected rect
-                    if (differenceContainerTopEdgeToInactiveRectTopEdge < mContainerHorizontalEdgeDistance) {
-                        verticalSnappingBetterFit = true;
+                    if (containerHorizontalEdgeToInactiveRectHorizontalEdge < mContainerHorizontalEdgeDistance) {
+                        mIsBetterFitVerticalSnap = true;
                     }
                     //Prioritize next if the Inactive widget's top edge lies near to top edge of the container rect
-                    else if (differenceContainerTopEdgeToInactiveRectTopEdge < differenceContainerBottomEdgeToInactiveRectBottomEdge) {
-                        verticalSnappingBetterFit = true;
+                    else if (containerHorizontalEdgeToInactiveRectHorizontalEdge < containerOtherHorizontalEdgeToInactiveRectOtherHorizontalEdge) {
+                        mIsBetterFitVerticalSnap = true;
                     }
                     else {
                         //This else will happen if this rectangle being compared is exactly the same as the selected rectangle for snapping, or in opposite X direction.
@@ -712,27 +602,91 @@
         }
     }
 
-    if (verticalSnappingBetterFit) {
-        qreal proposedBottomOfActiveRect = minDistancePosition + mActiveRectHeight + ySnapGapAdjustment;
+}
+
+/*!
+    Check if the top edge of moving rect is snappable to the incative rect's top or bottom edge.
+    The inactive rect's edge is only chosen if it is a better fit for vertical snapping.
+*/
+void HsSnapToLines::compareTopOfMovingRectForSnapping()
+{
+    //Check if the inactive rect lies to the left or right of the moving rect
+    checkInactiveRectLieLeftOrRightOfMovingRect();
+
+    checkInactiveRectHorizontalEdgesInRange(mMovingRect.top());
+
+    //calculate the distance of inactive rect's top edge and container rect's top edge
+    qreal differenceContainerTopEdgeToInactiveRectTopEdge = mInactiveRectToCompare.top() - mContainerRect.top();
+    //calculate the distance of inactive rect's bottom edge and container rect's bottom edge
+    qreal differenceContainerBottomEdgeToInactiveRectBottomEdge = mContainerRect.bottom() - mInactiveRectToCompare.bottom();
+    qreal ySnapGapAdjustment = 0.0;
+    mDistanceHorizontalEdges = 0.0;
+    mMinDistancePosition = 0.0;
+
+    //If only one edge of inactive rect is in snappable range, save that position
+    if ((mTopInRange && !mBottomInRange)
+        || !mTopInRange && mBottomInRange) {
+        if (mTopInRange) {
+            mMinDistancePosition = mInactiveRectToCompare.top();
+            mDistanceHorizontalEdges = mHorizontalEdgeToTopOfInactiveRect;
+            ySnapGapAdjustment = 0.0;
+        }
+        else {
+            mMinDistancePosition = mInactiveRectToCompare.bottom();
+            mDistanceHorizontalEdges = mHorizontalEdgeToBottomOfInactiveRect;
+            ySnapGapAdjustment = mSnapGap;
+        }
+    }
+    //else both edges of inactive rect are in range, check which is a better fit
+    else if (mTopInRange && mBottomInRange) {
+        //if top edge of moving rect to the top of the inactive rect is closer than the bottom edge of moving rect to the bottom of the inactive rect
+        if (mHorizontalEdgeToTopOfInactiveRect < mHorizontalEdgeToBottomOfInactiveRect) {
+            mMinDistancePosition = mInactiveRectToCompare.top();
+            mDistanceHorizontalEdges = mHorizontalEdgeToTopOfInactiveRect;
+            ySnapGapAdjustment = 0.0;
+            mBottomInRange = false;
+        }
+        //if the top edge of moving rect to top of inactive rect is at the same distance as the top edge of moving rect to the bottom of inactive rect
+        else if (mHorizontalEdgeToTopOfInactiveRect == mHorizontalEdgeToBottomOfInactiveRect) {
+            //if inactive rect lies towards the top or middle of container rect, then the top edge is priortized as the selected edge for outside snapping
+            if (differenceContainerTopEdgeToInactiveRectTopEdge <= differenceContainerBottomEdgeToInactiveRectBottomEdge) { 
+                mMinDistancePosition = mInactiveRectToCompare.top();
+                mDistanceHorizontalEdges = mHorizontalEdgeToTopOfInactiveRect;
+                ySnapGapAdjustment = 0.0;
+                mBottomInRange = false;
+            }
+            //else bottom of the inactive rect lies more close to the bottom of the container rect, and hence prioritize it for snapping.
+            else {
+                mMinDistancePosition = mInactiveRectToCompare.bottom();
+                mDistanceHorizontalEdges = mHorizontalEdgeToBottomOfInactiveRect;
+                ySnapGapAdjustment = mSnapGap;
+                mTopInRange = false;
+            }
+        }
+        //else top edge of moving rect to the bottom of the inactive rect is closer than the top edge of moving rect to the top of the inactive rect
+        else{
+            mMinDistancePosition = mInactiveRectToCompare.bottom();
+            mDistanceHorizontalEdges = mHorizontalEdgeToBottomOfInactiveRect;
+            ySnapGapAdjustment = mSnapGap;
+            mTopInRange = false;
+        }
+    }
+
+    //Check if this inactive rect is better fit than the previous selected rect 
+    checkInactiveRectBetterFitForVerticalSnapping(differenceContainerTopEdgeToInactiveRectTopEdge,
+                                                  differenceContainerBottomEdgeToInactiveRectBottomEdge);
+
+    if (mIsBetterFitVerticalSnap) {
+        qreal proposedBottomOfActiveRect = mMinDistancePosition + mActiveRectHeight + ySnapGapAdjustment;
         if (qBound(mContainerRect.top(), proposedBottomOfActiveRect, mContainerRect.bottom())
             == proposedBottomOfActiveRect) {
             mVerticalSnapFound = true;
-            mVerticalSnapPosition = minDistancePosition + ySnapGapAdjustment;
-            mMinHorizontalEdgesDistance = distanceHorizontalEdges;
+            mVerticalSnapPosition = mMinDistancePosition + ySnapGapAdjustment;
+            mMinHorizontalEdgesDistance = mDistanceHorizontalEdges;
             mHorizontalDistanceFromSelectedRect = mHorizontalDistance;
             //Save the new distance of the Chosen Rectangle's top edge from Container's top edge
             mContainerHorizontalEdgeDistance = differenceContainerTopEdgeToInactiveRectTopEdge;
-
-            if (mRectLieLeft) {
-                //save the points for the Horizontal line
-                mHorizontalLine.setP1(QPointF(mInactiveRectToCompare.left(), minDistancePosition));
-                mHorizontalLine.setP2(QPointF(mMovingRect.right(), minDistancePosition));
-            }
-            else {
-                //save the points for the Horizontal line
-                mHorizontalLine.setP1(QPointF(mInactiveRectToCompare.right(), minDistancePosition));
-                mHorizontalLine.setP2(QPointF(mMovingRect.left(), minDistancePosition));
-            }
+            createHorizontalLine();
         }
     }
 }
@@ -747,142 +701,99 @@
     checkInactiveRectLieLeftOrRightOfMovingRect();
 
     //calculate the distance of the moving rect's bottom edge to the inactive rect's top and bottom edges
-    qreal bottomToTopOfInactiveRect = qAbs(mInactiveRectToCompare.top() - mMovingRect.bottom());
-    qreal bottomToBottomOfInactiveRect = qAbs(mInactiveRectToCompare.bottom() - mMovingRect.bottom());
-    mTopInRange = false;
-    mBottomInRange = false;
-
-    if (bottomToTopOfInactiveRect <= mMinHorizontalEdgesDistance) {
-        if (mRectLieLeft && mInactiveSnapRectToCompare.isTopSnapableForRight
-         || !mRectLieLeft && mInactiveSnapRectToCompare.isTopSnapableForLeft) {
-            mTopInRange = true;
-        }
-    }
-    if (bottomToBottomOfInactiveRect <= mMinHorizontalEdgesDistance) {
-        if (mRectLieLeft && mInactiveSnapRectToCompare.isBottomSnapableForRight
-         || !mRectLieLeft && mInactiveSnapRectToCompare.isBottomSnapableForLeft) {
-            mBottomInRange = true;
-        }
-    }
+    checkInactiveRectHorizontalEdgesInRange(mMovingRect.bottom());
 
     //calculate the distance of inactive rect's top edge and container rect's top edge
     qreal differenceContainerTopEdgeToInactiveRectTopEdge = mInactiveRectToCompare.top() - mContainerRect.top();
     //calculate the distance of inactive rect's bottom edge and container rect's bottom edge
     qreal differenceContainerBottomEdgeToInactiveRectBottomEdge = mContainerRect.bottom() - mInactiveRectToCompare.bottom();
-    qreal minDistancePosition = 0.0;
-    qreal distanceHorizontalEdges = 0.0;
     qreal ySnapGapAdjustment = 0.0;
+    mDistanceHorizontalEdges = 0.0;
+    mMinDistancePosition = 0.0;
 
     //If only one edge of inactive rect is in snappable range, save that position
     if ((mTopInRange && !mBottomInRange)
         || !mTopInRange && mBottomInRange) {
         if (mTopInRange) {
-            minDistancePosition = mInactiveRectToCompare.top();
-            distanceHorizontalEdges = bottomToTopOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.top();
+            mDistanceHorizontalEdges = mHorizontalEdgeToTopOfInactiveRect;
             ySnapGapAdjustment = mSnapGap;
         }
         else {
-            minDistancePosition = mInactiveRectToCompare.bottom();
-            distanceHorizontalEdges = bottomToBottomOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.bottom();
+            mDistanceHorizontalEdges = mHorizontalEdgeToBottomOfInactiveRect;
             ySnapGapAdjustment = 0.0;
         }
     }
     //else both edges of inactive rect are in range, check which is a better fit
     else if (mTopInRange && mBottomInRange) {
         //if bottom edge of moving rect to the bottom of inactive rect is closer than the bottom edge of moving rect to the top of the inactive rect
-        if (bottomToBottomOfInactiveRect < bottomToTopOfInactiveRect ) {
-            minDistancePosition = mInactiveRectToCompare.bottom();
-            distanceHorizontalEdges = bottomToBottomOfInactiveRect;
+        if (mHorizontalEdgeToBottomOfInactiveRect < mHorizontalEdgeToTopOfInactiveRect ) {
+            mMinDistancePosition = mInactiveRectToCompare.bottom();
+            mDistanceHorizontalEdges = mHorizontalEdgeToBottomOfInactiveRect;
             ySnapGapAdjustment = 0.0;
             mTopInRange = false;
         }
         //if bottom edge of moving rect to the bottom of inactive rect is at the same distance as the bottom edge of moving rect to the top of inactive rect
-        else if (bottomToBottomOfInactiveRect == bottomToTopOfInactiveRect) {
+        else if (mHorizontalEdgeToBottomOfInactiveRect == mHorizontalEdgeToTopOfInactiveRect) {
             //if inactive rect lies towards the bottom of container rect, then the bottom edge is priortized as the selected edge for snapping
             //This is done for outside snapping
             if (differenceContainerBottomEdgeToInactiveRectBottomEdge < differenceContainerTopEdgeToInactiveRectTopEdge) {
-                minDistancePosition = mInactiveRectToCompare.bottom();
-                distanceHorizontalEdges = bottomToBottomOfInactiveRect;
+                mMinDistancePosition = mInactiveRectToCompare.bottom();
+                mDistanceHorizontalEdges = mHorizontalEdgeToBottomOfInactiveRect;
                 ySnapGapAdjustment = 0.0;
                 mTopInRange = false;
             }
             //else top of the inactive rect lies more close to the top of the container rect or at the same distance, and hence prioritize it
             else {
-                minDistancePosition = mInactiveRectToCompare.top();
-                distanceHorizontalEdges = bottomToTopOfInactiveRect;
+                mMinDistancePosition = mInactiveRectToCompare.top();
+                mDistanceHorizontalEdges = mHorizontalEdgeToTopOfInactiveRect;
                 ySnapGapAdjustment = mSnapGap;
                 mBottomInRange = false;
             }
         }
         //else bottom edge of moving rect to the top of inactive rect is closer than the bottom edge of moving rect to the bottom of the inactive rect
         else{
-            minDistancePosition = mInactiveRectToCompare.top();
-            distanceHorizontalEdges = bottomToTopOfInactiveRect;
+            mMinDistancePosition = mInactiveRectToCompare.top();
+            mDistanceHorizontalEdges = mHorizontalEdgeToTopOfInactiveRect;
             ySnapGapAdjustment = mSnapGap;
             mBottomInRange = false;
         }
     }
 
     //Check if this inactive rect is better fit than the previous selected rect 
-    bool verticalSnappingBetterFit = false;
-    if (mTopInRange || mBottomInRange) {
-        if (distanceHorizontalEdges < mMinHorizontalEdgesDistance) {
-            verticalSnappingBetterFit = true;
-        }
-        else if (distanceHorizontalEdges == mMinHorizontalEdgesDistance) { //the distance in the horizontal edge is same as from the selected rectangle
-            //check the position of rect with respect to horizontal line
-            checkInactiveRectPositionToHorizontalLine();
-            //if vertical snap was already found and the horizontal line of rect is in line with horizontal snap line
-            if (mVerticalSnapFound && mRectHorizontalEdgeLiesInLineWithHorizontalLine) {
-                if (mRectLieLeftOfHorizontalLine || mRectLiesRightOfHorizontalLine) {
-                    extendHorizontalLineToIncludeInactiveRect();
-                }
-            }
-            else {
-                //Prioritize first on the fact if the inactive rect is closer to the moving rect in X - direction.
-                if (mHorizontalDistance < mHorizontalDistanceFromSelectedRect) {
-                    verticalSnappingBetterFit = true;
-                }
-                else if (mHorizontalDistance == mHorizontalDistanceFromSelectedRect) {
-                    //Prioritize next if this Inactive rect is closer to the bottom edge of the container rect, then the previously selected rect
-                    if (differenceContainerBottomEdgeToInactiveRectBottomEdge < mContainerHorizontalEdgeDistance) {
-                        verticalSnappingBetterFit = true;
-                    }
-                    //Prioritize next if the Inactive widget's bottom edge lies near to bottom edge of the container rect
-                    else if (differenceContainerBottomEdgeToInactiveRectBottomEdge < differenceContainerTopEdgeToInactiveRectTopEdge) {
-                        verticalSnappingBetterFit = true;
-                    }
-                    else {
-                        //This else will happen if this rectangle being compared is exactly the same as the selected rectangle for snapping, or in opposite X direction.
-                        //In that case it does not matter which is the selected rectangle. Hence we leave the already selected rectangle as the better fit.
-                    }
-                }
-            }
-        }
-    }
+    checkInactiveRectBetterFitForVerticalSnapping(differenceContainerBottomEdgeToInactiveRectBottomEdge,
+                                                  differenceContainerTopEdgeToInactiveRectTopEdge);
 
-    if (verticalSnappingBetterFit) {
-        qreal proposedTopOfActiveRect = minDistancePosition - mActiveRectHeight - ySnapGapAdjustment;
+    if (mIsBetterFitVerticalSnap) {
+        qreal proposedTopOfActiveRect = mMinDistancePosition - mActiveRectHeight - ySnapGapAdjustment;
         if (qBound(mContainerRect.top(), proposedTopOfActiveRect, mContainerRect.bottom())
             == proposedTopOfActiveRect) {
             mVerticalSnapFound = true;
             mVerticalSnapPosition = proposedTopOfActiveRect;
-            mMinHorizontalEdgesDistance = distanceHorizontalEdges;
+            mMinHorizontalEdgesDistance = mDistanceHorizontalEdges;
             mHorizontalDistanceFromSelectedRect = mHorizontalDistance;
             //Save the new distance of the Selected Rectangle's bottom edge from Container's bottom edge
             mContainerHorizontalEdgeDistance = differenceContainerBottomEdgeToInactiveRectBottomEdge;
+            createHorizontalLine();
+        }
+    }
+}
 
-            if (mRectLieLeft) {
-                //save the points for the Horizontal line
-                mHorizontalLine.setP1(QPointF(mInactiveRectToCompare.left(), minDistancePosition));
-                mHorizontalLine.setP2(QPointF(mMovingRect.right(), minDistancePosition));
-            }
-            else {
-                //save the points for the Horizontal line
-                mHorizontalLine.setP1(QPointF(mInactiveRectToCompare.right(), minDistancePosition));
-                mHorizontalLine.setP2(QPointF(mMovingRect.left(), minDistancePosition));
-            }
-        }
+/*!
+    Create the horizontal line for vertical snap guidance
+*/
+void HsSnapToLines::createHorizontalLine()
+{
+    if (mRectLieLeft) {
+        //save the points for the Horizontal line
+        mHorizontalLine.setP1(QPointF(mInactiveRectToCompare.left(), mMinDistancePosition));
+        mHorizontalLine.setP2(QPointF(mMovingRect.right(), mMinDistancePosition));
+    }
+    else {
+        //save the points for the Horizontal line
+        mHorizontalLine.setP1(QPointF(mInactiveRectToCompare.right(), mMinDistancePosition));
+        mHorizontalLine.setP2(QPointF(mMovingRect.left(), mMinDistancePosition));
     }
 }
 
--- a/homescreenapp/inc/hsapp_defs.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/inc/hsapp_defs.h	Wed Aug 18 09:40:07 2010 +0300
@@ -42,12 +42,14 @@
 inline const QString menuModeType();
 inline const QString swTypeKey();
 inline const QString javaSwType();
+static const char *const HS_CWRT_APP_TYPE="cwrt";
+static const char *const HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE="wrtwidgetuiplugin";
 inline const QString packageTypeName();
 inline const QString appSettingsPlugin();
 inline const QString groupNameAttributeName();
 inline const QString componentIdAttributeName();
 inline const QString entryShortName();
-inline const QString appLibActivity();
+
 // Sort attribute
 enum HsSortAttribute {
     NoHsSortAttribute,
@@ -71,7 +73,8 @@
     RenameContextAction, 
     DeleteContextAction, 
     RemoveFromCollectionContextAction,
-    AppDetailsContextAction
+    AppDetailsContextAction,
+    OpenContextAction
 };
 
 
@@ -86,7 +89,7 @@
 const char SNAPENABLED[] = "snapenabled";
 const char SNAPFORCE[] = "snapforce";
 const char SNAPGAP[] = "snapgap";
-const char SNAPBORDERGAP[] = "snapbordergap";
+const char PAGEMARGIN[] = "pagemargin";
 const char SNAPLINEFADEINDURATION[] = "snaplinefadeinduration";
 const char SNAPLINEFADEOUTDURATION[] = "snaplinefadeoutduration";
 
--- a/homescreenapp/inc/hsapp_defs.inl	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/inc/hsapp_defs.inl	Wed Aug 18 09:40:07 2010 +0300
@@ -308,15 +308,6 @@
 }
 
 /*!
-    \return app lib activity name
-*/
-inline const QString appLibActivity()
-{
-    static const QString key("AppLibMainView");
-    return key;
-}
-
-/*!
     \return homescreen activitity name to open idle iew
 */
 inline const QString activityHsIdleView()
@@ -325,5 +316,13 @@
     return key;
 }
 
+/*!
+    \return homescreen activitity name to open applib iew
+*/
+inline const QString activityAppLibMainView()
+{
+    static const QString key("AppLibMainView");
+    return key;
+}
 
 #endif
--- a/homescreenapp/rom/homescreenapp_core.iby	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/rom/homescreenapp_core.iby	Wed Aug 18 09:40:07 2010 +0300
@@ -20,6 +20,7 @@
 
 // ---- hsapplication --------------------------------------------
 
+file=ABI_DIR\BUILD_DIR\hsapplicationlauncher.exe                PROGRAMS_DIR\hsapplicationlauncher.exe
 file=ABI_DIR\BUILD_DIR\hsapplication.exe                        PROGRAMS_DIR\hsapplication.exe
 data=ZPRIVATE\10003a3f\import\apps\hsapplication_reg.rsc        private\10003a3f\import\apps\hsapplication_reg.rsc
 data=\epoc32\data\z\resource\apps\hsapplication.mif             resource\apps\hsapplication.mif
@@ -34,6 +35,9 @@
 data=ZPRIVATE\20022f35\wallpapers\page\2_landscape.png          private\20022f35\wallpapers\page\2_landscape.png
 data=ZPRIVATE\20022f35\wallpapers\page\3_portrait.png           private\20022f35\wallpapers\page\3_portrait.png
 data=ZPRIVATE\20022f35\wallpapers\page\3_landscape.png          private\20022f35\wallpapers\page\3_landscape.png
+data=ZPRIVATE\20022f35\wallpapers\originals\car.png             private\20022f35\wallpapers\originals\car.png
+data=ZPRIVATE\20022f35\wallpapers\originals\shapes.png          private\20022f35\wallpapers\originals\shapes.png
+data=ZPRIVATE\20022f35\wallpapers\originals\shoes.png           private\20022f35\wallpapers\originals\shoes.png
 
 // ---- hswidgetuninstaller --------------------------------------------
 file=ABI_DIR\BUILD_DIR\hswidgetuninstaller.exe            PROGRAMS_DIR\hswidgetuninstaller.exe
@@ -53,12 +57,10 @@
 data=\epoc32\data\z\resource\qt\plugins\hshomescreenclientplugin.qtplugin  resource\qt\plugins\hshomescreenclientplugin.qtplugin
 data=ZPRIVATE\20022f35\hshomescreenclientplugin.xml                        private\20022f35\hshomescreenclientplugin.xml
 
-// ---- runtimeplugins --------------------------------------------
+
 
-// -------- hsdefaultruntimeplugin
-file=ABI_DIR\BUILD_DIR\hsdefaultruntimeplugin.dll                              SHARED_LIB_DIR\hsdefaultruntimeplugin.dll
-data=ZPRIVATE\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.qtplugin  private\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.qtplugin
-data=ZPRIVATE\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.xml       private\20022f35\plugins\runtimeplugins\hsdefaultruntimeplugin.xml
+
+
 
 // ---- serviceproviders --------------------------------------------
 
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pri	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# 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:
-#
-
-HEADERS += ./inc/hsdefaultruntime.h \
-           ./inc/hsdefaultruntimeplugin.h
-SOURCES += ./src/hsdefaultruntime.cpp \
-           ./src/hsdefaultruntimeplugin.cpp
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/hsdefaultruntimeplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# 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:
-#
-
-TEMPLATE = lib
-CONFIG += plugin hb mobility
-MOBILITY = serviceframework publishsubscribe
-
-PLUGIN_SUBDIR = /private/20022F35/plugins/runtimeplugins
-
-include (../../common.pri)
-
-LIBS += -lhsdomainmodel \
-        -lhsutils
-        
-QT += xml sql
-
-DEPENDPATH += ./inc \
-              ./src
-INCLUDEPATH += ./inc \
-             ../../hsutils/inc \
-             ../../hsdomainmodel/inc \
-
-symbian: {
-    TARGET.UID3 = 0x20022F3E
-    LIBS += -lxqkeycapture
-}
-
-
-include(hsdefaultruntimeplugin.pri)
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntime.h	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* 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:  Default implementation of the home screen runtime.
-*
-*/
-
-#ifndef HSDEFAULTRUNTIME_H
-#define HSDEFAULTRUNTIME_H
-
-#include <QStateMachine>
-#include <qmobilityglobal.h>
-
-#ifdef Q_OS_SYMBIAN
-#include <xqkeycapture.h>
-#endif
-
-#ifndef HSDEFAULTRUNTIMEPLUGIN_UNITTEST
-	#define TEST_CLASS_FWD
-	#define TEST_FRIEND
-#else
-	#define TEST_CLASS_FWD class DefaultRuntimePluginTest;
-    #define TEST_FRIEND friend class DefaultRuntimePluginTest;
-#endif
-
-class HsContentService;
-QTM_BEGIN_NAMESPACE
-class QValueSpacePublisher;
-QTM_END_NAMESPACE
-
-QTM_USE_NAMESPACE
-
-TEST_CLASS_FWD
-
-class HsDefaultRuntime : public QStateMachine
-{
-    Q_OBJECT
-
-public:
-    HsDefaultRuntime(QObject *parent = 0);
-    ~HsDefaultRuntime();
-
-signals:
-    void event_exit();
-    void event_toIdle();
-protected:
-    bool eventFilter(QObject *watched, QEvent *event);
-
-private:
-    Q_DISABLE_COPY(HsDefaultRuntime)
-
-    void registerAnimations();
-    void createStatePublisher();
-    void createContentServiceParts();
-    void createStates();
-    void assignServices();
-	void updatePSKeys();
-
-private slots:
-	void onIdleStateEntered();
-	void onIdleStateExited();
-	void activityRequested(const QString &name);
-	
-
-private:
-    HsContentService *mContentService;	
-	
-	bool mHomeScreenActive;
-	bool mIdleStateActive;
-
-	QValueSpacePublisher *mPublisher;
-	
-#ifdef Q_OS_SYMBIAN
-    XqKeyCapture keyCapture;
-#endif
-    
-    TEST_FRIEND
-};
-
-#endif
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/inc/hsdefaultruntimeplugin.h	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* 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:  Default runtime provider.
-*
-*/
-
-#ifndef HSDEFAULTRUNTIMEPLUGIN_H
-#define HSDEFAULTRUNTIMEPLUGIN_H
-
-#include <QObject>
-#include <qserviceplugininterface.h>
-
-QTM_USE_NAMESPACE
-
-class HsDefaultRuntimePlugin : public QObject, public QServicePluginInterface
-{
-    Q_OBJECT
-    Q_INTERFACES(QtMobility::QServicePluginInterface)
-
-public:
-    QObject *createInstance(const QServiceInterfaceDescriptor &descriptor,
-                            QServiceContext *context,
-                            QAbstractSecuritySession *session);
-};
-
-#endif //HSDEFAULTRUNTIMEPLUGIN_H
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/resource/hsdefaultruntimeplugin.xml	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<service>
-    <name>hsdefaultruntimeplugin</name>
-    <filepath>hsdefaultruntimeplugin</filepath>
-    <description>Homescreen Runtime Plugin</description>
-    <interface>
-        <name>com.nokia.symbian.IHomeScreenRuntime</name>
-        <version>1.0</version>
-        <description>Default implementation for homescreen runtime</description>
-        <capabilities></capabilities>
-    </interface>
-</service>
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntime.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,447 +0,0 @@
-/*
-* 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:  Default implementation of the home screen runtime.
-*
-*/
-
-#include <QState>
-#include <QFinalState>
-#include <QHistoryState>
-#include <QSignalTransition>
-#include <QKeyEventTransition>
-#include <QKeyEvent>
-
-#include <qvaluespacepublisher.h>
-#include <qservicemanager.h>
-#include <qservicefilter.h>
-#include <qserviceinterfacedescriptor.h>
-
-#include <HbApplication>
-#include <HbActivityManager>
-#include <HbInstance>
-#include <HbIconAnimationManager>
-#include <HbIconAnimationDefinition>
-
-#include "hsmenueventfactory.h"
-#include "homescreendomainpskeys.h"
-#include "hsdefaultruntime.h"
-#include "hsdatabase.h"
-#include "hscontentservice.h"
-#include "hsshortcutservice.h"
-#include "hsmenueventtransition.h"
-#include "hswidgetpositioningonorientationchange.h"
-#include "hswidgetpositioningonwidgetadd.h"
-#include "hsconfiguration.h"
-#include "hstest_global.h"
-#include "hswidgetpositioningonwidgetmove.h"
-
-QTM_USE_NAMESPACE
-#define hbApp qobject_cast<HbApplication*>(qApp)
-
-#ifdef Q_OS_SYMBIAN
-const static Qt::Key applicationKey = Qt::Key_Menu;
-#else
-const static Qt::Key applicationKey = Qt::Key_Home;
-#endif
-
-namespace
-{
-    const char KHsRootStateInterface[] = "com.nokia.homescreen.state.HsRootState";
-    const char KHsLoadSceneStateInterface[] = "com.nokia.homescreen.state.HsLoadSceneState";
-    const char KHsIdleStateInterface[] = "com.nokia.homescreen.state.HsIdleState";
-    const char KHsAppLibraryStateInterface[] = "com.nokia.homescreen.state.HsAppLibraryState";
-    const char KHsMenuWorkerStateInterface[] = "com.nokia.homescreen.state.HsMenuWorkerState";
-    const char KHsBacupRestoreStateInterface[] = "com.nokia.homescreen.state.HsBackupRestoreState";
-}
-
-
-/*!
-    \class HsDefaultRuntime
-    \ingroup group_hsdefaultruntimeplugin
-    \brief Default implementation of the home screen runtime.
-    Creates an execution context (EC) and populates it with
-    runtime services. States are loaded from state plugins.
-    Each state is given an access to the EC. States
-    are added to a state machine. Finally, the state machine
-    is started.
-*/
-
-/*!
-    Constructs runtime with \a parent as the parent object.
-*/
-HsDefaultRuntime::HsDefaultRuntime(QObject *parent)
-    : QStateMachine(parent),
-      mContentService(0),	  
-      mHomeScreenActive(false),
-      mIdleStateActive(false),
-      mPublisher(NULL)
-#ifdef Q_OS_SYMBIAN
-	  ,keyCapture()
-#endif
-{
-    HSTEST_FUNC_ENTRY("HS::HsDefaultRuntime::HsDefaultRuntime");
-
-    HsDatabase *db = new HsDatabase;
-    db->setConnectionName("homescreen.dbc");
-#ifdef Q_OS_SYMBIAN
-    db->setDatabaseName("c:/private/20022f35/homescreen.db");
-#else
-    db->setDatabaseName("private/20022f35/homescreen.db");
-#endif    
-    db->open();
-    HsDatabase::setInstance(db);
-
-    HsConfiguration::setInstance(new HsConfiguration);
-    HsConfiguration::instance()->load();
-            
-    HsWidgetPositioningOnOrientationChange::setInstance(
-        new HsAdvancedWidgetPositioningOnOrientationChange);
-
-    HsWidgetPositioningOnWidgetAdd::setInstance(
-        new HsAnchorPointInBottomRight);
-
-    HsWidgetPositioningOnWidgetMove::setInstance(
-        new HsSnapToLines);
-
-    registerAnimations();
-
-    createStatePublisher();
-    createContentServiceParts();
-    createStates();
-    assignServices();
-
-    // create the instance so that singleton is accessible from elsewhere
-    HsShortcutService::instance(this);
-
-    QCoreApplication::instance()->installEventFilter(this);
-
-    if (hbApp) { // Qt test framework uses QApplication.
-        connect(hbApp->activityManager(), SIGNAL(activityRequested(QString)), 
-                this, SLOT(activityRequested(QString)));
-    }
-    HSTEST_FUNC_EXIT("HS::HsDefaultRuntime::HsDefaultRuntime");
-}
-
-/*!
-    Destructor.
-*/
-HsDefaultRuntime::~HsDefaultRuntime()
-{
-    HsWidgetPositioningOnOrientationChange::setInstance(0);
-    delete mPublisher;
-}
-
-/*!
-    \fn void HsDefaultRuntime::stopStateMachine()
-    Emission of this signal initiates a transition to the final state.
-*/
-
-/*!
-    \copydoc QObject::eventFilter(QObject *watched, QEvent *event)
-*/
-bool HsDefaultRuntime::eventFilter(QObject *watched, QEvent *event)
-{
-    Q_UNUSED(watched);
-
-    switch (event->type()) {
-        case QEvent::ApplicationActivate:
-            qDebug() << "HsDefaultRuntime::eventFilter: QEvent::ApplicationActivate";
-#ifdef Q_OS_SYMBIAN
-            keyCapture.captureKey(applicationKey);
-#endif
-            mHomeScreenActive = true;
-            updatePSKeys();
-            break;
-        case QEvent::ApplicationDeactivate:
-            qDebug() << "HsDefaultRuntime::eventFilter: QEvent::ApplicationDeactivate";
-#ifdef Q_OS_SYMBIAN
-            keyCapture.cancelCaptureKey(applicationKey);
-#endif
-            mHomeScreenActive = false;
-            updatePSKeys();
-            break;
-        default:
-            break;
-    }
-   
-    bool result =  QStateMachine::eventFilter(watched, event);
-    // temporary hack as we should not register twice for events
-    if (event->type() == QEvent::KeyPress ) {
-        QKeyEvent* ke = static_cast<QKeyEvent *>(event);         
-        // Key_Launch0 should be removed when QT starts to send Key_Menu
-        result = (ke->key() == applicationKey) || ke->key() == Qt::Key_Launch0;        
-    }
-    return result;
-}
-
-
-/*!
-    Registers framework animations.
-*/
-void HsDefaultRuntime::registerAnimations()
-{
-    HbIconAnimationManager *manager = HbIconAnimationManager::global();
-    manager->addDefinitionFile(QLatin1String("qtg_anim_loading.axml"));
-}
-
-/*!
-    Creates Home screen state publisher.
-*/
-void HsDefaultRuntime::createStatePublisher()
-{
-    mPublisher = new QValueSpacePublisher(QValueSpace::PermanentLayer, HsStatePSKeyPath);
-
-    if (!mPublisher->isConnected()){
-    	// No permanent layer available
-    	mPublisher = new QValueSpacePublisher(HsStatePSKeyPath);
-    }
-
-    mPublisher->setValue(HsStatePSKeySubPath, EHomeScreenInactive);
-}
-
-/*!
-    Creates content service parts.
-*/
-void HsDefaultRuntime::createContentServiceParts()
-{
-    HSTEST_FUNC_ENTRY("HS::HsDefaultRuntime::createContentServiceParts");
-
-    mContentService = new HsContentService(this);
-
-    HSTEST_FUNC_EXIT("HS::HsDefaultRuntime::createContentServiceParts");
-}
-
-/*!
-    Creates states.
-*/
-void HsDefaultRuntime::createStates()
-{
-    HSTEST_FUNC_ENTRY("HS::HsDefaultRuntime::createStates");
-
-    QFinalState *finalState = new QFinalState();
-    addState(finalState);
-
-    QState *guiRootState = new QState();
-    addState(guiRootState);
-
-    guiRootState->addTransition(this, SIGNAL(event_exit()), finalState);
-
-    QServiceManager manager;
-
-    
-    QObject *loadSceneStateObj = manager.loadInterface(KHsLoadSceneStateInterface);
-    QState *loadSceneState = qobject_cast<QState *>(loadSceneStateObj);
-    loadSceneState->setParent(guiRootState);
-    loadSceneState->setObjectName(KHsLoadSceneStateInterface);
-
-    QObject *rootStateObj = manager.loadInterface(KHsRootStateInterface);
-    QState *rootState = qobject_cast<QState *>(rootStateObj);   
-    rootState->setParent(guiRootState);
-    rootState->setObjectName(KHsRootStateInterface);       
-
-    QObject *idleStateObj = manager.loadInterface(KHsIdleStateInterface);
-    QState *idleState = qobject_cast<QState *>(idleStateObj);
-    idleState->setParent(rootState);
-    idleState->setObjectName(KHsIdleStateInterface);
-	connect(idleState, SIGNAL(entered()), SLOT(onIdleStateEntered()));
-	connect(idleState, SIGNAL(exited()), SLOT(onIdleStateExited()));
-
-
-    //menu state
-    QState *menuParallelState = new QState(
-            QState::ParallelStates, rootState);
-    QState *menuRootState = new QState(menuParallelState);
-
-    QObject *appLibraryStateObj = manager.loadInterface(KHsAppLibraryStateInterface);
-    QState *appLibraryState = qobject_cast<QState *>(appLibraryStateObj);
-    appLibraryState->setParent(menuRootState);
-    appLibraryState->setObjectName(KHsAppLibraryStateInterface);
-    menuRootState->setInitialState(appLibraryState);
-
-    QHistoryState *historyState = new QHistoryState(rootState);
-    historyState->setDefaultState(idleState);
-    
-    loadSceneState->addTransition(
-            loadSceneState, SIGNAL(event_history()), historyState);            
-
-    QObject *menuWorkerStateObj = manager.loadInterface(KHsMenuWorkerStateInterface);
-    QState *menuWorkerState = qobject_cast<QState *>(menuWorkerStateObj);
-    menuWorkerState->setParent(menuParallelState);
-    menuWorkerState->setObjectName(KHsMenuWorkerStateInterface);
-
-    connect(appLibraryState, SIGNAL(collectionEntered()), 
-            menuWorkerState, SIGNAL(reset()));
-    connect(appLibraryState, SIGNAL(allAppsStateEntered ()), 
-            menuWorkerState, SIGNAL(reset()));
-    connect(appLibraryState, SIGNAL(allCollectionsStateEntered ()), 
-            menuWorkerState, SIGNAL(reset()));
-
-    //Backup/Restore state
-    QObject *backupRestoreStateObj = manager.loadInterface(KHsBacupRestoreStateInterface);
-    QState *backupRestoreState = qobject_cast<QState *>(backupRestoreStateObj);   
-    backupRestoreState->setParent(guiRootState);
-    backupRestoreState->setObjectName(KHsBacupRestoreStateInterface);
-    backupRestoreState->addTransition(
-            backupRestoreState, SIGNAL(event_loadScene()), loadSceneState);
-
-    // root state transitions
-    idleState->addTransition(idleState, SIGNAL(event_applicationLibrary()), menuRootState);
-    appLibraryState->addTransition(
-            appLibraryState, SIGNAL(toHomescreenState()), idleState);
-    rootState->addTransition(rootState, SIGNAL(event_backupRestore()), backupRestoreState);
-    // opening shortcut to Application Library
-    HsMenuEventTransition *idleToAppLibTransition =
-        new HsMenuEventTransition(HsMenuEvent::OpenApplicationLibrary,
-                                  idleState, appLibraryState);
-    idleState->addTransition(idleToAppLibTransition);
-
-    HsMenuEventTransition *appLibToIdleTransition =
-        new HsMenuEventTransition(
-            HsMenuEvent::OpenHomeScreen, appLibraryState, idleState);
-    appLibraryState->addTransition(appLibToIdleTransition);
-
-    HbMainWindow *window = hbInstance->allMainWindows().first();
-
-    // key driven transition from idle to menu
-    QKeyEventTransition *idleToMenuRootTransition =
-        new QKeyEventTransition(
-                window, QEvent::KeyPress, applicationKey);
-    idleToMenuRootTransition->setTargetState(menuRootState);
-    idleState->addTransition(idleToMenuRootTransition);
-    // key driven transition from menu to idle
-    QKeyEventTransition *menuToIdleTransition =
-        new QKeyEventTransition(
-                window, QEvent::KeyPress, applicationKey);
-    menuToIdleTransition->setTargetState(idleState);
-    menuRootState->addTransition(menuToIdleTransition);
-    
-    // transition for Key_Launch0 should be removed 
-    // when OT starts to send Key_Menu (maybe wk14)
-    QKeyEventTransition *idleToMenuRootTransition2 =
-        new QKeyEventTransition(
-                window, QEvent::KeyPress, Qt::Key_Launch0);
-    idleToMenuRootTransition2->setTargetState(menuRootState);
-    idleState->addTransition(idleToMenuRootTransition2);
-    // key driven transition from menu to idle
-    QKeyEventTransition *menuToIdleTransition2 =
-        new QKeyEventTransition(
-                window, QEvent::KeyPress, Qt::Key_Launch0);
-    menuToIdleTransition2->setTargetState(idleState);
-    menuRootState->addTransition(menuToIdleTransition2);
-    // add transition to switch to idle
-    menuRootState->addTransition( this, SIGNAL(event_toIdle()), idleState);    
-    
-    // transitions to child states
-    // opening shortcut to a colleciton
-    QList<QState *> collectionStates =
-        appLibraryState->
-            findChildren<QState *>
-                ("homescreen.nokia.com/state/applibrarystate/collectionstate");
-    qDebug(
-        "Found %d \"collectionstate\" children for Application Library State",
-            collectionStates.count());
-    if (collectionStates.count()) {
-        HsMenuEventTransition *idleToCollectionTransition =
-            new HsMenuEventTransition(HsMenuEvent::OpenCollection,
-                                      idleState, collectionStates[0]);
-        idleState->addTransition(idleToCollectionTransition);
-    }
-
-    guiRootState->setInitialState(loadSceneState);
-    setInitialState(guiRootState);
-    
-    HSTEST_FUNC_EXIT("HS::HsDefaultRuntime::createStates");
-}
-
-/*!
-    Assigns services to states based on value of property HS_SERVICES_REGISTRATION_KEY.
-*/
-void HsDefaultRuntime::assignServices()
-{
-    HSTEST_FUNC_ENTRY("HS::HsDefaultRuntime::assignServices");
-
-    QList<QState*> children = findChildren<QState*>();
-    foreach (QState *state, children) {
-        QList<QVariant> services = state->property(HS_SERVICES_REGISTRATION_KEY).toList();
-        foreach (const QVariant &service, services) {
-            QString name = service.toString();
-            qDebug() << "Assign service:" << name << "\n to " << state->objectName();
-            if (name == CONTENT_SERVICE_KEY) {
-                state->setProperty(name.toAscii().data(), qVariantFromValue(mContentService));
-            } else if (name == SHORTCUT_SERVICE_KEY) {
-                state->setProperty(name.toAscii().data(),
-                    qVariantFromValue(HsShortcutService::instance(this)));
-            } else {
-                qWarning() << "WARNING: Service " << name << " is unknown";
-            }
-        }
-    }
-
-    HSTEST_FUNC_EXIT("HS::HsDefaultRuntime::assignServices");
-}
-
-/*!
-    Publishes Home screen states via Publish & Subscribe.
-*/
-void HsDefaultRuntime::updatePSKeys()
-{	
-	if (!mPublisher){
-		createStatePublisher();
-	}
-
-	if (mHomeScreenActive && mIdleStateActive){
-    	qDebug() << "HsDefaultRuntime::updatePSKeys: EHomeScreenIdleState";
-    	mPublisher->setValue(HsStatePSKeySubPath, EHomeScreenIdleState);
-    }
-    else{
-    	qDebug() << "HsDefaultRuntime::updatePSKeys: EHomeScreenInactive";
-    	mPublisher->setValue(HsStatePSKeySubPath, EHomeScreenInactive);
-    }	
-}
-
-/*!
-    Called when state machine is in Idle state.
-*/
-void HsDefaultRuntime::onIdleStateEntered()
-{
-	mIdleStateActive = true;
-	updatePSKeys();
-}
-
-/*!
-    Called when state machine leaves the Idle state.
-*/
-void HsDefaultRuntime::onIdleStateExited()
-{
-	mIdleStateActive = false;
-	updatePSKeys();
-}
-
-/*!
-    Activity requested by another client 
-*/
-void HsDefaultRuntime::activityRequested(const QString &name) 
-{
-    if (name == appLibActivity()) {
-        this->postEvent(
-            HsMenuEventFactory::createOpenAppLibraryEvent(NormalHsMenuMode));
-    }
-    else if (name == groupAppLibRecentView()) {
-        this->postEvent(
-            HsMenuEventFactory::createOpenCollectionEvent(0,
-            collectionDownloadedTypeName()));
-    } else if (name == activityHsIdleView()) {
-        emit event_toIdle();
-    }
-}
--- a/homescreenapp/runtimeplugins/hsdefaultruntimeplugin/src/hsdefaultruntimeplugin.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* 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:  Default runtime plugin.
-*
-*/
-
-#include <qserviceinterfacedescriptor.h>
-#include <qabstractsecuritysession.h>
-#include <qservicecontext.h>
-
-#include "hsdefaultruntimeplugin.h"
-#include "hsdefaultruntime.h"
-
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
-
-QObject *HsDefaultRuntimePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
-                                                QServiceContext *context,
-                                                QAbstractSecuritySession *session)
-{
-    Q_UNUSED(context);
-    Q_UNUSED(session);
-
-    if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenRuntime")) {
-        return new HsDefaultRuntime(this);
-    } else {
-        return 0;
-    }
-}
-
-Q_EXPORT_PLUGIN2(hsdefaultruntimeplugin, HsDefaultRuntimePlugin)
-
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
--- a/homescreenapp/runtimeplugins/runtimeplugins.pro	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#
-# 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:
-#
-
-TEMPLATE = subdirs
-SUBDIRS  = hsdefaultruntimeplugin
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/hsmenuserviceprovider.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/hsmenuserviceprovider.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -23,7 +23,8 @@
 
 DEFINES += MENUSERVICE_LIB
 
-LIBS += -lcaclient
+LIBS += -lcaclient \
+        -lcasoftwareregistry
 
 symbian::TARGET.UID3 = 0x20026FA9
-win32:exportResources(./resource/*.png, resource)
+!symbian:exportResources(./resource/*.png, resource)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsiconsidleloader.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,46 @@
+/*
+ * 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: Menu All Applications state.
+ *
+ */
+
+#ifndef HSICONSIDLELOADER_H_
+#define HSICONSIDLELOADER_H_
+
+#include <QObject>
+#include "hsmenuservice_global.h"
+
+class QTimer;
+class HsMenuItemModel;
+
+
+class HsIconsIdleLoader: public QObject
+{
+    HS_SERVICE_TEST_FRIEND_CLASS(MenuServiceTest)
+    
+    Q_OBJECT
+public:
+    
+    HsIconsIdleLoader(HsMenuItemModel *model, QObject *parent = 0);
+    ~HsIconsIdleLoader();
+    
+private slots:
+    void processWhenIdle();
+    
+private:
+    HsMenuItemModel *mModel;
+    QTimer *mTimer;
+};
+
+#endif /* HSICONSIDLELOADER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuentryremovedhandler.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2010 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:  Entry removal handler.
+*
+*/
+
+
+#ifndef HS_MENU_ENTRY_REMOVED_HANDLER_H
+#define HS_MENU_ENTRY_REMOVED_HANDLER_H
+
+#include <QScopedPointer>
+
+#include <cadefs.h>
+#include <canotifier.h>
+
+#include "hsmenuservice_global.h"
+
+class MENUSERVICE_EXPORT  HsMenuEntryRemovedHandler: public QObject
+{
+    Q_OBJECT
+public:
+    HsMenuEntryRemovedHandler(
+        int entryId, QObject *receiver, const char *callback);
+    virtual ~HsMenuEntryRemovedHandler();
+
+signals:
+    void notify();
+private slots:
+    virtual void entryChanged(int entryId, ChangeType changeType);
+    
+private:
+    void subscribe(int entryId);
+
+private:
+    QScopedPointer<CaNotifier> mNotifier;
+};
+#endif
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuitemmodel.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuitemmodel.h	Wed Aug 18 09:40:07 2010 +0300
@@ -27,10 +27,13 @@
 #include "hsmenuservice_global.h"
 #include "hsmenuservice.h"
 
+class CaUninstallNotifier;
+class HsIconsIdleLoader;
 // Class declaration
 class MENUSERVICE_EXPORT HsMenuItemModel: public CaItemModel
 {
-
+HS_SERVICE_TEST_FRIEND_CLASS(MenuServiceTest)
+Q_OBJECT
 public:
 
     // Data types
@@ -47,6 +50,15 @@
     virtual QVariant data(const QModelIndex &index,
                           int role = Qt::DisplayRole) const;
     bool newIconNeeded(const QModelIndex &index) const;
+    void preloadIcons();
+private slots:
+    void uninstallChange(int componentId, int valueOfProgress);
+    
+private:
+    HsIconsIdleLoader* mIconsIdleLoader;
+    CaUninstallNotifier* mUninstallNotifier;//not own
+    int mComponentId;
+    QList<int> mIds;
 };
 
 #endif // HSMENUITEMMODEL_H 
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h	Wed Aug 18 09:40:07 2010 +0300
@@ -40,8 +40,7 @@
     // Function declarations
     static HsMenuItemModel *getAllApplicationsModel(
         HsSortAttribute sortAttribute = DescendingNameHsSortAttribute);
-    static HsMenuItemModel *getAllCollectionsModel(
-        HsSortAttribute sortAttribute = LatestOnTopHsSortAttribute);
+    static HsMenuItemModel *getAllCollectionsModel();
     static HsMenuItemModel *getInstalledModel(
         HsSortAttribute sortAttribute = DescendingNameHsSortAttribute);
     static HsMenuItemModel *getCollectionModel(int collectionId,
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice_global.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice_global.h	Wed Aug 18 09:40:07 2010 +0300
@@ -19,7 +19,7 @@
 #define HSMENUSERVICE_GLOBAL_H
 
 // System includes
-#include <Qt/qglobal.h>
+#include <qglobal.h>
 
 #ifdef MENUSERVICE_LIB
 #define MENUSERVICE_EXPORT Q_DECL_EXPORT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsiconsidleloader.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,59 @@
+/*
+ * 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: Menu All Applications state.
+ *
+ */
+
+#include <QSize>
+#include <QTimer>
+#include "hsmenuitemmodel.h"
+#include "hsiconsidleloader.h"
+
+/*!
+ Constructor
+ \param model with defined icons
+ \param pointer to parent object
+ */
+HsIconsIdleLoader::HsIconsIdleLoader(HsMenuItemModel *model, QObject *parent):
+    QObject(parent),
+    mModel(model),
+    mTimer(NULL)
+{
+    mTimer = new QTimer(this);
+    connect(mTimer, SIGNAL(timeout()), this, SLOT(processWhenIdle()));
+    mTimer->start(0); // NOTE: zero for idle
+}
+
+/*!
+ Destructor
+ */
+HsIconsIdleLoader::~HsIconsIdleLoader()
+{
+    mTimer->stop();
+}
+
+/*!
+ Preloading icons if idle
+ \retval void
+ */
+void HsIconsIdleLoader::processWhenIdle()
+{
+    const QSize iconSize(mModel->getIconSize());
+    for (int i=0; i<mModel->rowCount(); i++) {
+        QModelIndex idx = mModel->index(i);
+        mModel->entry(idx)->makeIcon(iconSize);
+    }
+    mTimer->stop(); // No more timing
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuentryremovedhandler.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2010 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:  Photos image fetcher client.
+*
+*/
+
+#include <QList>
+
+#include <caservice.h>
+#include <canotifier.h>
+#include <canotifierfilter.h>
+
+#include "hsmenuentryremovedhandler.h"
+/*!
+    \class HsMenuEntryRemovedHandler
+    Listens for entry removal notifications and calls a callback.
+    \ingroup group_hsutils
+    \brief 
+*/
+
+/*!
+ Constructor.
+ \param entryId identifies entry which removal is to be observed.
+ \param receiver object which \a callback is to be called on requested entry
+ removal. If \receiver is passed 0 no action will be taken on the entry removal.
+ \param callback signal or slot that will be called on entry removal. The \a callback
+ signature should correspond to void (*)(int, ChangeType) signal otherwise
+ runtime warning will be provided. If \a callback is 0 no action will be
+ taken on the entry removal.
+*/
+HsMenuEntryRemovedHandler::HsMenuEntryRemovedHandler(
+    int entryId, 
+    QObject *receiver,
+    const char *callback):
+    mNotifier(0)
+{
+    if (receiver != 0 && callback != 0) {
+        connect(this, SIGNAL(notify()), receiver, callback);
+        subscribe(entryId);
+    }
+};
+
+/*!
+ Destructor.
+*/
+HsMenuEntryRemovedHandler::~HsMenuEntryRemovedHandler() {};
+
+/*!
+  Subscribes the observer for notifications for a given entryId and
+  makes sure the \a HsMenuEntryRemovedObserver::entryChagned will be called
+  on any notification for the entry.
+  \param entryId identifier of the entry to be observed.
+
+*/
+void HsMenuEntryRemovedHandler::subscribe(int entryId)
+{
+    // create notifier for a given entryId
+    CaNotifierFilter filter;
+    QList<int> entryIds;
+    entryIds.append(entryId);
+    filter.setIds(entryIds);
+    mNotifier.reset(CaService::instance()->createNotifier(filter));
+
+    connect(mNotifier.data(),
+        SIGNAL(entryChanged(int, ChangeType)),
+        this,
+        SLOT(entryChanged(int, ChangeType)),
+        Qt::UniqueConnection);
+}
+
+
+/*!
+ Handles notification about entry change
+ \param entryId ignored as the observer is subscribed for exactly one entry.
+ \param changeType notified change type.
+ */
+void HsMenuEntryRemovedHandler::entryChanged(int entryId, 
+    ChangeType changeType)
+{
+    Q_UNUSED(entryId); // CaNotifier should care about matching id, skip it here
+    
+    if (changeType == RemoveChangeType) {
+        mNotifier.reset(0);
+        emit notify();
+    }
+}
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuitemmodel.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuitemmodel.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -16,9 +16,12 @@
  */
 
 #include <hbnamespace.h>
+#include <cauninstallnotifier.h>
+#include <casoftwareregistry.h>
 
 #include "hsmenuitemmodel.h"
 #include "hsmenuserviceutils.h"
+#include "hsiconsidleloader.h"
 
 // Constants
 const QSize smallIconSize(55, 55);
@@ -29,9 +32,15 @@
  \param pointer to parent object
  */
 HsMenuItemModel::HsMenuItemModel(const CaQuery &query, QObject *parent) :
-    CaItemModel(query, parent)
+    CaItemModel(query, parent),
+    mIconsIdleLoader(NULL)
 {
     setIconSize(smallIconSize);
+    mComponentId = 0;
+    mUninstallNotifier = 
+        CaSoftwareRegistry::create()->createUninstallNotifier();
+    connect(mUninstallNotifier, SIGNAL(progressChange(int, int)),
+            this, SLOT(uninstallChange(int, int)));
 }
 
 /*!
@@ -39,7 +48,9 @@
  */
 HsMenuItemModel::~HsMenuItemModel()
 {
-
+    if (!mIds.isEmpty()) {
+        mIds.clear();
+    }
 }
 
 /*!
@@ -77,9 +88,9 @@
     } else if (role == Hb::IndexFeedbackRole){
         QVariant display = CaItemModel::data(index, Qt::DisplayRole);
         if (display.type() == QVariant::String){
-            variant = display;
+            variant = QVariant(display.toString().at(0).toUpper());;
         } else {
-            variant = QVariant(display.toList().at(0));
+            variant = QVariant(display.toList().at(0).toString().at(0).toUpper());
         }
     } else {
         variant = CaItemModel::data(index, role);
@@ -106,3 +117,35 @@
     HSMENUTEST_FUNC_EXIT("HsMenuItemModel::newIconNeeded");
     return result;
 }
+
+/*!
+ Updating uninstall progress with value for each item
+  \param componentId Component Id of installed item
+  \param valueOfProgress % value of current progress
+ */
+void HsMenuItemModel::uninstallChange(int componentId, int valueOfProgress)
+{
+    if (componentId!=mComponentId) {
+        if (!mIds.isEmpty()) {
+            mIds.clear();
+        }
+        // get items list with same componentID
+        mIds = CaItemModel::getUninstallingEntriesIds(componentId);
+        mComponentId = componentId;
+    }
+    // update each item with progress value
+    foreach (int id, mIds) {
+        CaItemModel::updateProgress(id, valueOfProgress);
+    }
+}
+
+
+/*!
+ Start preloading icons if idle
+ \param entry entry representing an item
+ \retval void
+ */
+void HsMenuItemModel::preloadIcons()
+{
+    mIconsIdleLoader = new HsIconsIdleLoader(this, this);
+}
--- a/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -34,7 +34,8 @@
 
 // Initialization of a static member variable.
 int HsMenuService::mAllCollectionsId = 0;
-
+const char COLLECTION_TITLE_NAME[] = "title_name";
+const char COLLECTION_SHORT_NAME[] = "short_name";
 /*!
  Returns all applications model
  \param sortAttribute ::  SortAttribute
@@ -63,22 +64,16 @@
 
 /*!
  Returns all collections model
- \param sortAttribute ::  SortAttribute
- \param details : switch to return details or not
  \retval HsMenuItemModel: all collections model
  */
-HsMenuItemModel *HsMenuService::getAllCollectionsModel(
-    HsSortAttribute sortAttribute)
+HsMenuItemModel *HsMenuService::getAllCollectionsModel()
 {
-    qDebug() << "HsMenuService::getAllCollectionsModel" << "sortAttribute:"
-             << sortAttribute;
+    qDebug() << "HsMenuService::getAllCollectionsModel";
     HSMENUTEST_FUNC_ENTRY("HsMenuService::getAllCollectionsModel");
     CaQuery query;
     query.setParentId(allCollectionsId());
     query.setFlagsOn(VisibleEntryFlag);
     query.setFlagsOff(MissingEntryFlag);
-    query.setSort(HsMenuServiceUtils::sortBy(sortAttribute),
-                  HsMenuServiceUtils::sortOrder(sortAttribute));
     HsMenuItemModel *model = new HsMenuCollectionsItemModel(query);
     HSMENUTEST_FUNC_EXIT("HsMenuService::getAllCollectionsModel");
     return model;
@@ -276,6 +271,8 @@
                  << collection;
 
         collection->setText(newCollectionName);
+        collection->setAttribute(COLLECTION_TITLE_NAME, newCollectionName);
+        collection->setAttribute(COLLECTION_SHORT_NAME, newCollectionName);
         result = CaService::instance()->updateEntry(*collection);
     }
     HSMENUTEST_FUNC_EXIT("HsMenuService::renameCollection");
--- a/homescreenapp/sis/homescreenapp.pkg	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/sis/homescreenapp.pkg	Wed Aug 18 09:40:07 2010 +0300
@@ -59,13 +59,6 @@
 
 "/epoc32/release/armv5/urel/hsdomainmodel.dll" - "c:/sys/bin/hsdomainmodel.dll"
 
-; ---- runtimeplugins --------------------------------------------
-
-; -------- hsdefaultruntimeplugin
-"/epoc32/release/armv5/urel/hsdefaultruntimeplugin.dll"     - "c:/sys/bin/hsdefaultruntimeplugin.dll"
-"/epoc32/data/z/hsresources/plugins/runtimeplugins/hsdefaultruntimeplugin.qtplugin" - "c:/hsresources/plugins/runtimeplugins/hsdefaultruntimeplugin.qtplugin"
-"/epoc32/data/z/hsresources/plugins/runtimeplugins/hsdefaultruntimeplugin.manifest"  - "c:/hsresources/plugins/runtimeplugins/hsdefaultruntimeplugin.manifest"
-
 ; ---- serviceproviders --------------------------------------------
 
 ; -------- hsmenuserviceprovider
--- a/homescreenapp/sis/homescreenapp_ut_hs.pkg	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/sis/homescreenapp_ut_hs.pkg	Wed Aug 18 09:40:07 2010 +0300
@@ -33,16 +33,14 @@
 "/epoc32/release/armv5/urel/t_hsapplicationexe.exe"                         - "c:/sys/bin/t_hsapplicationexe.exe"
 "/epoc32/data/z/private/10003a3f/import/apps/t_hsapplicationexe_reg.rsc"    - "c:/private/10003a3f/import/apps/t_hsapplicationexe_reg.rsc"
 "/epoc32/data/z/resource/apps/t_hsapplicationexe.rsc"                       - "c:/resource/apps/t_hsapplicationexe.rsc"
-"/epoc32/release/armv5/urel/mockruntimeplugin.dll"                                                  - "c:/sys/bin/mockruntimeplugin.dll"
-"/epoc32/data/z/private/20022f5f/hsresources/plugins/runtimeplugins/mockruntimeplugin.qtplugin"     - "c:/private/20022f5f/hsresources/plugins/runtimeplugins/mockruntimeplugin.qtplugin"
-"/epoc32/data/z/private/20022f5f/hsresources/plugins/runtimeplugins/mockruntimeplugin.xml"          - "c:/private/20022f5f/hsresources/plugins/runtimeplugins/mockruntimeplugin.xml"
+"/epoc32/release/armv5/urel/mockstateplugins.dll"                                                  - "c:/sys/bin/mockstateplugins.dll"
+"/epoc32/data/z/private/20022f5f/hsresources/plugins/stateplugins/mockstateplugins.qtplugin"     - "c:/private/20022f5f/hsresources/plugins/stateplugins/mockstateplugins.qtplugin"
+"/epoc32/data/z/private/20022f5f/hsresources/plugins/stateplugins/mockstateplugins.xml"          - "c:/private/20022f5f/hsresources/plugins/stateplugins/mockstateplugins.xml"
 
 ;--------------- hsutils ---------------
 "/epoc32/release/armv5/urel/t_hsutils.exe"                         - "c:/sys/bin/t_hsutils.exe"
 "/epoc32/data/z/private/10003a3f/import/apps/t_hsutils_reg.rsc"    - "c:/private/10003a3f/import/apps/t_hsutils_reg.rsc"
 "/epoc32/data/z/resource/apps/t_hsutils.rsc"                       - "c:/resource/apps/t_hsutils.rsc"
-"../hsutils/tsrc/t_hsutils/nokia.png"                              - "c:/hsresources/testresources/nokia.png"
-"../hsutils/tsrc/t_hsutils/large.jpg"                              - "c:/hsresources/testresources/large.jpg"
 
 ;--------------- hsdomainmodel ---------------
 "/epoc32/release/armv5/urel/t_hsdomainmodel.exe"                         - "c:/sys/bin/t_hsdomainmodel.exe"
@@ -69,15 +67,10 @@
 "/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugintoobig.qtplugin" - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugintoobig.qtplugin"
 "/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugintoobig.xml"      - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugintoobig.xml"
 
+"/epoc32/release/armv5/urel/mockwidgetplugincheater.dll"                                             - "c:/sys/bin/mockwidgetplugincheater.dll"
+"/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugincheater.qtplugin" - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugincheater.qtplugin"
+"/epoc32/data/z/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugincheater.xml"      - "c:/private/20022F59/hsresources/plugins/widgetplugins/mockwidgetplugincheater.xml"
 
-;--------------- runtimeplugins ---------------
-;hsdefaultruntimeplugin
-"/epoc32/release/armv5/urel/t_hsdefaultruntimeplugin.exe"                                       - "c:/sys/bin/t_hsdefaultruntimeplugin.exe"
-"/epoc32/data/z/private/10003a3f/import/apps/t_hsdefaultruntimeplugin_reg.rsc"                  - "c:/private/10003a3f/import/apps/t_hsdefaultruntimeplugin_reg.rsc"
-"/epoc32/data/z/resource/apps/t_hsdefaultruntimeplugin.rsc"                                     - "c:/resource/apps/t_hsdefaultruntimeplugin.rsc"
-"/epoc32/release/armv5/urel/mockstateplugins.dll"                                               - "c:/sys/bin/mockstateplugins.dll"
-"/epoc32/data/z/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.qtplugin"    - "c:/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.qtplugin"
-"/epoc32/data/z/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.xml"         - "c:/private/20022f63/hsresources/plugins/stateplugins/mockstateplugins.xml"
 
 ;--------------- serviceproviders ---------------
 
@@ -102,9 +95,9 @@
 
 ;--------------- hshomescreenclientplugin -----------------------
 ;hshomescreenclientplugin
-;"/epoc32/release/armv5/urel/t_hshomescreenclientplugin.exe"                       - "c:/sys/bin/t_hshomescreenclientplugin.exe"
-;"/epoc32/data/z/private/10003a3f/import/apps/t_hshomescreenclientplugin_reg.rsc"  - "c:/private/10003a3f/import/apps/t_hshomescreenclientplugin_reg.rsc"
-;"/epoc32/data/z/resource/apps/t_hshomescreenclientplugin.rsc"                     - "c:/resource/apps/t_hshomescreenclientplugin.rsc"
+"/epoc32/release/armv5/urel/t_hshomescreenclientplugin.exe"                       - "c:/sys/bin/t_hshomescreenclientplugin.exe"
+"/epoc32/data/z/private/10003a3f/import/apps/t_hshomescreenclientplugin_reg.rsc"  - "c:/private/10003a3f/import/apps/t_hshomescreenclientplugin_reg.rsc"
+"/epoc32/data/z/resource/apps/t_hshomescreenclientplugin.rsc"                     - "c:/resource/apps/t_hshomescreenclientplugin.rsc"
 
 ;--------------- hswidgetuninstaller -----------------------
 ;hswidgetuninstaller
Binary file homescreenapp/stateplugins/hsapplibrarystateplugin/conf/CI_hsapplibrary.confml has changed
Binary file homescreenapp/stateplugins/hsapplibrarystateplugin/conf/hsapplibrary.confml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/conf/hsapplibrary.implml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<container xmlns="http://www.symbianfoundation.org/xml/implml/1">
+    <tag name="target" value="rofs2"/>
+    <tag name="target" value="rofs3"/>
+    
+    <settingRefsOverride>
+       <settingRef value="ApplicationLibrary.OperatorStoreURLIcon"/>
+    </settingRefsOverride>
+    
+    <content xmlns="http://www.s60.com/xml/content/2">
+        <output dir="content/private/20022F35/customsvg" flatten="true" file="operatorstore.svg">
+        <input>
+            <include files="${ApplicationLibrary.OperatorStoreURLIcon.localPath}"/>
+        </input>        
+        </output>
+    </content>
+
+</container>
Binary file homescreenapp/stateplugins/hsapplibrarystateplugin/conf/hsapplibrary_20022F97.crml has changed
Binary file homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrary.qm has changed
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrary.ts	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrary.ts	Wed Aug 18 09:40:07 2010 +0300
@@ -9,17 +9,7 @@
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_title_select_applications">
-    <comment>Heading for the mark mode dialog when selecting one or more apps to be added into a collection.</comment>        
-    <source>Select applications</source>
-    <translation variants="no">Select applications</translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_opt_rename_item">
@@ -29,7 +19,7 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_view_installed_applications">
@@ -37,19 +27,9 @@
     <source>View installed applications</source>
     <translation variants="no">View installed applications</translation>
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_03</extra-loc-viewid>
+    <extra-loc-viewid>applib_01</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_menu_resume">
-    <comment>Item specific menu item for an item showing the dowload progress. Resumes the download progress (toggles between the Pause command in the item menu)</comment>        
-    <source>Resume</source>
-    <translation variants="no">Resume</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_05</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_add_to_home_screen">
@@ -59,17 +39,7 @@
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
     <extra-loc-viewid>applib_03, applib_09</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_opt_sub_custom">
-    <comment>Sub-menu item. Sorts by default order or user&apos;s own order when user has organised the list</comment>        
-    <source>Custom</source>
-    <translation variants="no">Custom</translation>
-    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_03, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_sub_ascending">
@@ -79,7 +49,17 @@
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
     <extra-loc-viewid>applib_01, applib_03, applib_05, applib_07, applib_09</extra-loc-viewid>
     <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_sub_oldest_on_top">
+    <comment>Sorting submenu item in Downloaded collection</comment>        
+    <source>Oldest on top</source>
+    <translation variants="no">Oldest on top</translation>
+    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_button_cancel">
@@ -89,27 +69,17 @@
     <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_opt_sort_by_sub_latest_on_top">
-    <comment>Sub-menu item. Sorts by installation time, latest first (default sort).</comment>        
-    <source>Latest on top</source>
-    <translation variants="no">Latest on top</translation>
-    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_05</extra-loc-viewid>
-    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_dialog_delete_1">
-    <comment>Confirmation note for deleting a collection that has no shortcuts on Home Screen.</comment>        
-    <source>Delete %1?</source>
-    <translation variants="no">Delete %1?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_03, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_info_following_applications_will_be_rem">
+    <comment>Second part of the confirmation note displayed if the user tries to delete an application that actually includes more than one application.</comment>        
+    <source>Following applications will be removed:</source>
+    <translation variants="no">Following applications will be removed:</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_29</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="yes" id="txt_applib_dblist_val_ln_new_applications">
@@ -122,7 +92,7 @@
     <extra-loc-layout_id>qtl_list_sec_large_graphic</extra-loc-layout_id>    
     <extra-loc-viewid>applib_03</extra-loc-viewid>
     <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_opt_help">
@@ -132,27 +102,27 @@
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_list_new_collection">
-    <comment>First option in a dialogue where user selects the target collection for an item. Opens an input field to name the new collection.</comment>        
-    <source>New collection</source>
-    <translation variants="no">New collection</translation>
-    <extra-loc-layout_id>qtl_list_popup_pri_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_opt_sub_latest_on_top">
+    <comment>Sorting submenu item in Downloaded view</comment>        
+    <source>Latest on top</source>
+    <translation variants="no">Latest on top</translation>
+    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_dialog_deletes_1_also_from_home_screen">
-    <comment>Confirmation note for deleting a collection, operation also deletes possible shortcuts on Home Screen.</comment>        
-    <source>Deletes %1 also from Home Screen. Continue?</source>
-    <translation variants="no">Deletes %1 also from Home Screen. Continue?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_03, applib_09</extra-loc-viewid>
+<message numerus="no" id="txt_applib_dialog_installed">
+    <comment>Shown in text entry of installed app in installation log dialog</comment>        
+    <source>Installed</source>
+    <translation variants="no">Installed</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_20</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_menu_pause">
@@ -162,7 +132,7 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_sub_descending">
@@ -172,17 +142,27 @@
     <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
     <extra-loc-viewid>applib_01, applib_03, applib_05, applib_07, applib_09</extra-loc-viewid>
     <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_info_delete_1_and_associated_data">
+    <comment>Confirmation note displayed if the user tries to delete an application. %1 is the application name.</comment>        
+    <source>Delete %1 and associated data?</source>
+    <translation variants="no">Delete %1 and associated data?</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_29</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_dialog_1_will_be_removed_from_phone_c">
     <comment>Confirmation note for uninstalling an application or a widget that does not have shortcuts on HS or in collections.</comment>        
     <source>%1 will be removed from phone. Continue?</source>
     <translation variants="no">%1 will be removed from phone. Continue?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_07, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_27</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_add_content">
@@ -192,7 +172,357 @@
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
     <extra-loc-viewid>applib_09</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_name">
+    <comment>Name label shown in application details dialog</comment>        
+    <source>Name:</source>
+    <translation variants="no">Name:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_l1_mb">
+    <comment>Size field in app details dialog. App size shown in megabytes, shown after Size-label.</comment>        
+    <source>%L1 MB</source>
+    <translation variants="no">%L1 MB</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_button_add_to_homescreen">
+    <comment>Button in widget preview dialog</comment>        
+    <source>Add to Homescreen</source>
+    <translation variants="no">Add to Homescreen</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_13</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_1_mass_storage">
+    <comment>Shown after &quot;Memory in use&quot; header in Application details dialog</comment>        
+    <source>%1: Mass storage</source>
+    <translation variants="no">%1: Mass storage</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_sub_installation_time">
+    <comment>Sub-menu item. Sorts by installation time in the Downloaded collection (latest first, default sort)</comment>        
+    <source>Installation time</source>
+    <translation variants="no">Installation time</translation>
+    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_info_delete_1_all_its_shortcuts_and">
+    <comment>Confirmation note displayed if the user tries to delete an application that actually includes more than one application, which has shortcuts. %1 is the application name.</comment>        
+    <source>Delete %1, all it&apos;s shortcuts and associated data?</source>
+    <translation variants="no">Delete %1, all it&apos;s shortcuts and associated data?</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_29</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dblist_uninstalling_1">
+    <comment>List text shown on application item when the app is being uninstalled. %1 is the app name</comment>        
+    <source>Uninstalling %1</source>
+    <translation variants="no">Uninstalling %1</translation>
+    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_21</extra-loc-viewid>
+    <extra-loc-positionid>dblist_1</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_title_applications">
+    <comment>Title for all Application library views</comment>        
+    <source>Applications</source>
+    <translation variants="no">Applications</translation>
+    <extra-loc-layout_id>qtl_titlebar</extra-loc-layout_id>    
+    <extra-loc-viewid>applib</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_menu_delete">
+    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Erases something completely from the phone, list, or memory card, for example. Delete should only be used when something in removed permanently.</comment>        
+    <source>Delete</source>
+    <translation variants="no">Delete</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>common</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_menu_rename_item">
+    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Allows user to rename the selected item (file, folder, music track, image etc.).</comment>        
+    <source>Rename</source>
+    <translation variants="no">Rename</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>common</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_menu_cancel_download">
+    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Cancels the ongoing download.</comment>        
+    <source>Cancel download</source>
+    <translation variants="no">Cancel download</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>common</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_title_arrange">
+    <comment>Heading for the Arrange dialog</comment>        
+    <source>Arrange</source>
+    <translation variants="no">Arrange</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_16</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_installation_log">
+    <comment>Options menu item for viewing installation log</comment>        
+    <source>Installation log</source>
+    <translation variants="no">Installation log</translation>
+    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_07</extra-loc-viewid>
+    <extra-loc-positionid>opt</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_sort_by">
+    <comment>Options list item. Opens sublist for sorting criteria</comment>        
+    <source>Sort by</source>
+    <translation variants="no">Sort by</translation>
+    <extra-loc-layout_id>qtl_menu_pri_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_07, applib_09</extra-loc-viewid>
+    <extra-loc-positionid>opt_3</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_sort_by_sub_oldest_on_top">
+    <comment>Sub-menu item. Sorts by installation time, oldest first.</comment>        
+    <source>Oldest on top</source>
+    <translation variants="no">Oldest on top</translation>
+    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_task_switcher">
+    <comment>Options menu item. Opens the Task Switcher application. (Same command in Home Screen Options menu.)</comment>        
+    <source>Task Switcher</source>
+    <translation variants="no">Task Switcher</translation>
+    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_07, applib_09, applib_11</extra-loc-viewid>
+    <extra-loc-positionid>opt</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_info_no_preview_available">
+    <comment>Text shown in widget preview dialog if no preview is available</comment>        
+    <source>(No preview available)</source>
+    <translation variants="no">(No preview available)</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_30</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_menu_cancel_installing">
+    <comment>Item specific menu item for an item showing the dowload progress. Cancels the ongoing installing progress</comment>        
+    <source>Cancel installing</source>
+    <translation variants="no">Cancel installing</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_add_to_collection">
+    <comment>Options list item. Allows the user to add one or more applications into a virtual collection. Involves several steps, indicated by the ... at the end of the command.</comment>        
+    <source>Add to collection...</source>
+    <translation variants="no">Add to collection...</translation>
+    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_01</extra-loc-viewid>
+    <extra-loc-positionid>opt</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dpophead_added_to_homescreen">
+    <comment>Notification dialog shown after content (Widget or App shortcut) has been added from AppLib to Homescreen</comment>        
+    <source>Added to Homescreen</source>
+    <translation variants="no">Added to Homescreen</translation>
+    <extra-loc-layout_id>qtl_notifdialog_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_18</extra-loc-viewid>
+    <extra-loc-positionid>dpophead</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_menu_details">
+    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Opens a view where information about the item is given.</comment>        
+    <source>Details</source>
+    <translation variants="no">Details</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>common</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_check_software_updates">
+    <comment>Options list item. Launches SW Update application where user can view and select softwares to be updated.</comment>        
+    <source>Check software updates</source>
+    <translation variants="no">Check software updates</translation>
+    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_01</extra-loc-viewid>
+    <extra-loc-positionid>opt</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_1_must_be_closed_before_deletin">
+    <comment>Confirmation note displayed if the user tries to delete a java application that is active at the time.</comment>        
+    <source>%1 must be closed before deleting. Close now? </source>
+    <translation variants="no">%1 must be closed before deleting. Close now? </translation>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_28</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_entry_collectionl1">
+    <comment>Default entry text when naming a new collection, where %L1 is the next available number differentiating between otherwise similar collection names.</comment>        
+    <source>Collection(%L1)</source>
+    <translation variants="no">Collection(%L1)</translation>
+    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_15</extra-loc-viewid>
+    <extra-loc-positionid>dialog_1_entry</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_button_ok">
+    <comment>Button. Note! Use this text ID only if there are max. two buttons in the dialog. When this button is pressed, the focused item or operation will be selected or accepted.</comment>        
+    <source>OK</source>
+    <translation variants="no">OK</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>common</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_menu_resume">
+    <comment>Item specific menu item for an item showing the dowload progress. Resumes the download progress (toggles between the Pause command in the item menu)</comment>        
+    <source>Resume</source>
+    <translation variants="no">Resume</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_sub_custom">
+    <comment>Sub-menu item. Sorts by default order or user&apos;s own order when user has organised the list</comment>        
+    <source>Custom</source>
+    <translation variants="no">Custom</translation>
+    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_03, applib_09</extra-loc-viewid>
+    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_opt_sort_by_sub_latest_on_top">
+    <comment>Sub-menu item. Sorts by installation time, latest first (default sort).</comment>        
+    <source>Latest on top</source>
+    <translation variants="no">Latest on top</translation>
+    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_05</extra-loc-viewid>
+    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_delete_1">
+    <comment>Confirmation note for deleting a collection that has no shortcuts on Home Screen.</comment>        
+    <source>Delete %1?</source>
+    <translation variants="no">Delete %1?</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_24</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_info_launching_the_application_failed">
+    <comment>If lauching an application fails, thie note is shown. %1 is error code.</comment>        
+    <source>Launching the application failed (error code %1)</source>
+    <translation variants="no">Launching the application failed (error code %1)</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_31</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_format">
+    <comment>Format label of application details dialog. Format can be for example Symbian, Java or Widget</comment>        
+    <source>Format:</source>
+    <translation variants="no">Format:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_deletes_1_also_from_home_screen">
+    <comment>Confirmation note for deleting a collection, operation also deletes possible shortcuts on Home Screen.</comment>        
+    <source>Deletes %1 also from Home Screen. Continue?</source>
+    <translation variants="no">Deletes %1 also from Home Screen. Continue?</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_25</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_button_delete">
+    <comment>Delete button</comment>        
+    <source>Delete</source>
+    <translation variants="no">Delete</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>common</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_l1_kb">
+    <comment>Size field in app details dialog. App size shown in kilobytes, shown after Size-label.</comment>        
+    <source>%L1 KB</source>
+    <translation variants="no">%L1 KB</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_description">
+    <comment>Description label of application details dialog. Free-form description of the purpose of the application.</comment>        
+    <source>Description:</source>
+    <translation variants="no">Description:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_title_collection_name">
@@ -200,9 +530,9 @@
     <source>Collection name:</source>
     <translation variants="no">Collection name:</translation>
     <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
+    <extra-loc-viewid>applib_15</extra-loc-viewid>
     <extra-loc-positionid>dialog_1</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_menu_settings">
@@ -212,17 +542,17 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_button_add_to_homescreen">
-    <comment>Button in widget preview dialog</comment>        
-    <source>Add to Homescreen</source>
-    <translation variants="no">Add to Homescreen</translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_12</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dpophead_added_to_collection_1">
+    <comment>Confirmation for a successful operation, app/widget added to a collection. (Use only when user is not inside the target collection.). %1 is the collection name.</comment>        
+    <source>Added to collection %1</source>
+    <translation variants="no">Added to collection %1</translation>
+    <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_32</extra-loc-viewid>
+    <extra-loc-positionid>dpophead</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_dblist_downloaded_val_empty">
@@ -232,47 +562,27 @@
     <extra-loc-layout_id>qtl_list_sec_large_graphic</extra-loc-layout_id>    
     <extra-loc-viewid>applib_03</extra-loc-viewid>
     <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_opt_sub_installation_time">
-    <comment>Sub-menu item. Sorts by installation time in the Downloaded collection (latest first, default sort)</comment>        
-    <source>Installation time</source>
-    <translation variants="no">Installation time</translation>
-    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_05</extra-loc-viewid>
-    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_title_applications">
-    <comment>Title for all Application library views</comment>        
-    <source>Applications</source>
-    <translation variants="no">Applications</translation>
-    <extra-loc-layout_id>qtl_titlebar</extra-loc-layout_id>    
-    <extra-loc-viewid>applib</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_info_uninstallation_failed">
+    <comment>Dialog shown when uninstallation of an application fails</comment>        
+    <source>Uninstallation failed</source>
+    <translation variants="no">Uninstallation failed</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_08</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_common_menu_delete">
-    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Erases something completely from the phone, list, or memory card, for example. Delete should only be used when something in removed permanently.</comment>        
-    <source>Delete</source>
-    <translation variants="no">Delete</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>common</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_menu_rename_item">
-    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Allows user to rename the selected item (file, folder, music track, image etc.).</comment>        
-    <source>Rename</source>
-    <translation variants="no">Rename</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>common</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_removed">
+    <comment>Shown in text entry of removed app in installation log dialog</comment>        
+    <source>Removed</source>
+    <translation variants="no">Removed</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_20</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_dialog_file_corrupted_unable_to_use_wi">
@@ -280,39 +590,9 @@
     <source>File corrupted, unable to use widget. Delete widget? </source>
     <translation variants="no">File corrupted, unable to use widget. Delete widget? </translation>
     <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_common_menu_cancel_download">
-    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Cancels the ongoing download.</comment>        
-    <source>Cancel download</source>
-    <translation variants="no">Cancel download</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>common</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_title_arrange">
-    <comment>Heading for the Arrange dialog</comment>        
-    <source>Arrange</source>
-    <translation variants="no">Arrange</translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_03 </extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_opt_sort_by">
-    <comment>Options list item. Opens sublist for sorting criteria</comment>        
-    <source>Sort by</source>
-    <translation variants="no">Sort by</translation>
-    <extra-loc-layout_id>qtl_menu_pri_add</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_07, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>opt_3</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-viewid>applib_33</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_menu_install">
@@ -322,7 +602,7 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_arrange">
@@ -332,37 +612,27 @@
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
     <extra-loc-viewid>applib_03</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_opt_sort_by_sub_oldest_on_top">
-    <comment>Sub-menu item. Sorts by installation time, oldest first.</comment>        
-    <source>Oldest on top</source>
-    <translation variants="no">Oldest on top</translation>
-    <extra-loc-layout_id>qtl_menu_sec_add</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_05</extra-loc-viewid>
-    <extra-loc-positionid>opt_3_sub</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_opt_task_switcher">
-    <comment>Options menu item. Opens the Task Switcher application. (Same command in Home Screen Options menu.)</comment>        
-    <source>Task Switcher</source>
-    <translation variants="no">Task Switcher</translation>
-    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_07, applib_09, applib_11</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_1_memory_card">
+    <comment>Shown after &quot;Memory in use&quot; header in Application details dialog if the app is installed in memory card without name</comment>        
+    <source>%1: Memory card</source>
+    <translation variants="no">%1: Memory card</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_menu_cancel_installing">
-    <comment>Item specific menu item for an item showing the dowload progress. Cancels the ongoing installing progress</comment>        
-    <source>Cancel installing</source>
-    <translation variants="no">Cancel installing</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_05</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_supplier">
+    <comment>Supplier label of application details dialog</comment>        
+    <source>Supplier:</source>
+    <translation variants="no">Supplier:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_menu_add_to_collection">
@@ -372,17 +642,47 @@
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
     <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_formlabel_no_search_results">
+    <comment>Text for empty view when searching and no results are found</comment>        
+    <source>No search results</source>
+    <translation variants="no">No search results</translation>
+    <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_19</extra-loc-viewid>
+    <extra-loc-positionid>formlabel_1</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_opt_add_to_collection">
-    <comment>Options list item. Allows the user to add one or more applications into a virtual collection. Involves several steps, indicated by the ... at the end of the command.</comment>        
-    <source>Add to collection...</source>
-    <translation variants="no">Add to collection...</translation>
-    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_size">
+    <comment>Size label on application details dialog. Size of the app is shown after this label.</comment>        
+    <source>Size:</source>
+    <translation variants="no">Size:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_1_2">
+    <comment>Shown after &quot;Memory in use&quot; header in Application details dialog. %1 is the drive letter and %2 is the user-given</comment>        
+    <source>%1: %2</source>
+    <translation variants="no">%1: %2</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_1_device_memory">
+    <comment>Shown after &quot;Memory in use&quot; header in Application details dialog</comment>        
+    <source>%1: Device memory</source>
+    <translation variants="no">%1: Device memory</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_title_add_to">
@@ -390,9 +690,19 @@
     <source>Add to:</source>
     <translation variants="no">Add to:</translation>
     <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_09</extra-loc-viewid>
+    <extra-loc-viewid>applib_34</extra-loc-viewid>
     <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_title_installation_logs">
+    <comment>Heading for fullscreen Installation logs dialog</comment>        
+    <source>Installation logs</source>
+    <translation variants="no">Installation logs</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_20</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_menu_send_to_friend">
@@ -402,37 +712,37 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_common_menu_details">
-    <comment>Item specific menu item. Note! Only use this text ID if there are no icons. Opens a view where information about the item is given.</comment>        
-    <source>Details</source>
-    <translation variants="no">Details</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>common</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+<message numerus="no" id="txt_applib_formlabel_no_content">
+    <comment>Text for empty Collection</comment>        
+    <source>No content</source>
+    <translation variants="no">No content</translation>
+    <extra-loc-layout_id>qtl_dataform_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_22</extra-loc-viewid>
+    <extra-loc-positionid>formlabel_1</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_opt_check_software_updates">
-    <comment>Options list item. Launches SW Update application where user can view and select softwares to be updated.</comment>        
-    <source>Check software updates</source>
-    <translation variants="no">Check software updates</translation>
-    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_button_create_new">
+    <comment>Button for creating new collection</comment>        
+    <source>Create new</source>
+    <translation variants="no">Create new</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_34</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_dialog_uninstalls_1_and_deletes_all_sh">
     <comment>Confirmation note for uninstalling an application or a widget that has shortcuts on HS or in collections.</comment>        
     <source>%1 and all its shortcuts will be removed from phone. Continue?</source>
     <translation variants="no">%1 and all its shortcuts will be removed from phone. Continue?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_07, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-layout_id>qtl_dialog_pri5_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_23</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_menu_remove_from_collection">
@@ -442,7 +752,7 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>applib_09</extra-loc-viewid>
     <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_common_opt_delete">
@@ -452,37 +762,27 @@
     <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
     <extra-loc-viewid>common</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_applib_dialog_1_must_be_closed_before_deletin">
-    <comment>Confirmation note displayed if the user tries to delete a java application that is active at the time.</comment>        
-    <source>%1 must be closed before deleting. Close %1? </source>
-    <translation variants="no">%1 must be closed before deleting. Close %1? </translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_07, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>common</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_dialog_entry_collectionl1">
-    <comment>Default entry text when naming a new collection, where %L1 is the next available number differentiating between otherwise similar collection names.</comment>        
-    <source>Collection(%L1)</source>
-    <translation variants="no">Collection(%L1)</translation>
-    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>dialog_1_entry</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_memory_in_use">
+    <comment>Memory in use label in application details dialog</comment>        
+    <source>Memory in use:</source>
+    <translation variants="no">Memory in use:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_menu_add_to_home_screen">
-    <comment>Item specific menu item for an app/widget. adds application/widget to Homescreen</comment>        
-    <source>Add to Home Screen</source>
-    <translation variants="no">Add to Home Screen</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_partially_installed">
+    <comment>Shown in text entry of partially installed app in installation log dialog</comment>        
+    <source>Partially installed</source>
+    <translation variants="no">Partially installed</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_20</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_opt_new_collection">
@@ -492,7 +792,27 @@
     <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
     <extra-loc-viewid>applib_03</extra-loc-viewid>
     <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_menu_add_to_home_screen">
+    <comment>Item specific menu item for an app/widget. adds application/widget to Homescreen</comment>        
+    <source>Add to Home Screen</source>
+    <translation variants="no">Add to Home Screen</translation>
+    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_09</extra-loc-viewid>
+    <extra-loc-positionid>menu</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_dialog_remove_1_from_collection">
+    <comment>Confirmation for removing an app/widget from a collection. Does not delete the item from the device.</comment>        
+    <source>Remove %1 from collection?</source>
+    <translation variants="no">Remove %1 from collection?</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_26</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_subtitle_installed">
@@ -502,17 +822,27 @@
     <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
     <extra-loc-viewid>applib_07</extra-loc-viewid>
     <extra-loc-positionid>subtitle</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_dialog_remove_1_from_collection">
-    <comment>Confirmation for removing an app/widget from a collection. Does not delete the item from the device.</comment>        
-    <source>Remove %1 from collection?</source>
-    <translation variants="no">Remove %1 from collection?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_09</extra-loc-viewid>
+<message numerus="no" id="txt_applib_dialog_protection_domain">
+    <comment>Protection domain label shown in application details dialog. The value of this field is retrieved from the value, not from platform. The value can be one of the following: Operator, Manufacturer, Trusted 3rd party, Untrusted 3rd party.</comment>        
+    <source>Protection domain:</source>
+    <translation variants="no">Protection domain:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
     <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_applib_title_select_items">
+    <comment>Heading for the mark mode dialog when selecting one or more apps to be added into a collection.</comment>        
+    <source>Select items:</source>
+    <translation variants="no">Select items:</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_35</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 <message numerus="no" id="txt_applib_dialog_entry_collection">
@@ -520,29 +850,29 @@
     <source>Collection</source>
     <translation variants="no">Collection</translation>
     <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_05, applib_09</extra-loc-viewid>
+    <extra-loc-viewid>applib_15</extra-loc-viewid>
     <extra-loc-positionid>dialog_1_entry</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_applib_dpopinfo_added_to_collection_1">
-    <comment>Confirmation for a successful operation, app/widget added to a collection. (Use only when user is not inside the target collection.)</comment>        
-    <source>Added to collection %1</source>
-    <translation variants="no">Added to collection %1</translation>
-    <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
-    <extra-loc-viewid>applib_01, applib_03, applib_05, applib_09</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ap</extra-loc-feature>
+<message numerus="no" id="txt_applib_dialog_version">
+    <comment>Version label shown in application details dialog</comment>        
+    <source>Version:</source>
+    <translation variants="no">Version:</translation>
+    <extra-loc-layout_id>qtl_dialog_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>dialog</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
-<message numerus="no" id="txt_common_button_ok">
-    <comment>Button. Note! Use this text ID only if there are max. two buttons in the dialog. When this button is pressed, the focused item or operation will be selected or accepted.</comment>        
-    <source>OK</source>
-    <translation variants="no">OK</translation>
-    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
-    <extra-loc-viewid>common</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>co</extra-loc-feature>
+<message numerus="no" id="txt_applib_title_details">
+    <comment>Header of application details dialog</comment>        
+    <source>Details</source>
+    <translation variants="no">Details</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>applib_17</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>applib</extra-loc-feature>
     <extra-loc-blank>False</extra-loc-blank>
 </message>
 </context>
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -32,7 +32,7 @@
     TARGET.UID3 = 0x20022F97
     nft::LIBS += -lhal
     include(hsapplibrarystateplugin_exports_to_rom.pri)
-    exists($${EPOCROOT}epoc32/include/platform/mw/XQSettingsManager):LIBS += -lxqsettingsmanager
+    LIBS += -lxqsettingsmanager
 }
 exportResources(./*.qm, resource/qt/translations)
 RESOURCES = hsapplibrarystateplugin.qrc
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.qrc	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin.qrc	Wed Aug 18 09:40:07 2010 +0300
@@ -1,6 +1,11 @@
 <RCC>
     <qresource prefix="/xml">
-        <file alias="applibrary.docml">resource/applibrary.docml</file>
+        <file alias="addcontentlabeledview.docml">resource/addcontentlabeledview.docml</file>
+        <file alias="common_objects.docml">resource/common_objects.docml</file>
+        <file alias="emptylabeledview.docml">resource/emptylabeledview.docml</file>
+        <file alias="labeledlistview.docml">resource/labeledlistview.docml</file>
+        <file alias="listview.docml">resource/listview.docml</file>
+        <file alias="searchview.docml">resource/searchview.docml</file>
     </qresource>
     <qresource prefix="/css">
         <file alias="hsapplibrarystateplugin.css">resource/hsapplibrarystateplugin.css</file>
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin_exports_to_rom.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/hsapplibrarystateplugin_exports_to_rom.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -17,5 +17,7 @@
 BLD_INF_RULES.prj_exports += \
     "$${LITERAL_HASH}include <platform_paths.hrh>" \
     "conf/hsapplibrary.confml           APP_LAYER_CONFML(hsapplibrary.confml)" \
+    "conf/CI_hsapplibrary.confml        APP_LAYER_CONFML(CI_hsapplibrary.confml)" \
+    "conf/hsapplibrary.implml           APP_LAYER_CRML(hsapplibrary.implml)" \
     "conf/hsapplibrary_20022F97.crml    APP_LAYER_CRML(hsapplibrary_20022F97.crml)"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsaddmodeproxymodel.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,58 @@
+/*
+ * 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: Proxy model for view in add to homescreen mode.
+ *
+ */
+
+#ifndef HSADDMODEPROXYMODEL_H
+#define HSADDMODEPROXYMODEL_H
+
+#include <QSortFilterProxyModel>
+#include <caquery.h>
+#include <caentry.h>
+
+#include "hsmenustates_global.h"
+
+class CaNotifier;
+
+class HsAddModeProxyModel : public QSortFilterProxyModel
+{
+    Q_OBJECT
+
+    HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
+    
+public:
+
+    HsAddModeProxyModel(QObject *parent = 0);
+    ~HsAddModeProxyModel();
+    void initilizeCwrtWidgetCache();
+
+private slots:
+
+    void updateCacheOnAddWidget(const QString &uri, const QVariantHash &preferences);
+    void updateCacheOnRemoveWidget(const QString &uri, const QVariantHash &preferences);
+    void updateEntryStatus(const CaEntry &entry, ChangeType changeType);
+
+private:
+    
+    virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
+    static int findCwrtWidgetEntryId(const QVariantHash &preferences);
+
+    QHash<int,bool> mCwrtWidgetCache;
+    CaQuery mQuery;
+    QScopedPointer<CaNotifier> mNotifier;
+};
+
+#endif //HSADDMODEPROXYMODEL_H
+
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,19 +18,15 @@
 #ifndef HSALLAPPSSTATE_H
 #define HSALLAPPSSTATE_H
 
-#include <qstate.h>
-#include <QModelIndex>
-#include <QPointer>
-
+#include <QState>
 #include "hsbaseviewstate.h"
 #include "hsmenumodewrapper.h"
 
 
+
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
 class HbView;
-class HbAction;
-class HbMenu;
 class HbAbstractViewItem;
 class QPointF;
 class HsMenuViewBuilder;
@@ -52,40 +48,26 @@
 signals:
     void toAppLibraryState();
 
-public slots:
-    void scrollToBeginning();
-    void collectionsSortOrder(HsSortAttribute sortAttribute);
 private slots:
-    bool openTaskSwitcher();
-    int checkSoftwareUpdates();
-    void listItemActivated(const QModelIndex &index);
     void addActivated(const QModelIndex &index);
-    void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords);
     void addLongPressed(HbAbstractViewItem *item, const QPointF &coords);
     void addToCollection();
     void openInstalledView();
     void ascendingMenuAction();
     void descendingMenuAction();
-    void stateEntered();
+    void normalModeEntered();
     void addModeEntered();
-    void normalModeEntered();
     void stateExited();
     void contextMenuAction(HbAction *action);
 private:
     void construct();
     void setMenuOptions();
     void addToHomeScreen(const QModelIndex &index);
+    void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags);
+
 private:
-    HbAction *mSecondarySoftkeyAction;
+    HsAddModeProxyModel *mAddModeProxyModel;
     HsSortAttribute mSortAttribute;
-    HsSortAttribute mCollectionsSortAttribute;
-    HsMenuView mMenuView;
-    HsMenuModeWrapper &mMenuMode;
-    HsMenuItemModel *mAllAppsModel;
-    HsMainWindow &mMainWindow;
-    QModelIndex mContextModelIndex;
-    QPointer<HbMenu> mContextMenu;
-
 };
 
 #endif // HSALLAPPSSTATE_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,17 +18,11 @@
 #ifndef HSALLCOLLECTIONSSTATE_H
 #define HSALLCOLLECTIONSSTATE_H
 
-#include <qstate.h>
-#include <QModelIndex>
-#include <QPointF>
-#include <QPointer>
-
 #include "hsbaseviewstate.h"
-#include "hsmenumodewrapper.h"
 
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
-class HbMenu;
+class QPointF;
 class HsMenuViewBuilder;
 class HbAbstractViewItem;
 class HbAction;
@@ -36,6 +30,7 @@
 class HsMenuItemModel;
 class HsMenuView;
 class HsMainWindow;
+class HsMenuModeWrapper;
 
 class HsAllCollectionsState: public HsBaseViewState
 {
@@ -49,24 +44,13 @@
     ~HsAllCollectionsState();
 protected:
 signals:
-    void sortOrderChanged(HsSortAttribute sortAttribute);
     void toAppLibraryState();
 
-public slots:
-    void scrollToBeginning();
 private slots:
-    bool openTaskSwitcher();
-    void listItemActivated(const QModelIndex &index);
     void addActivated(const QModelIndex &index);
-    void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords);
     void addLongPressed(HbAbstractViewItem *item, const QPointF &coords);
     void createNewCollection();
     void createArrangeCollection();
-    void customMenuAction();
-    void ascendingMenuAction();
-    void descendingMenuAction();
-    void stateEntered();
-    void addModeEntered();
     void normalModeEntered();
     void normalModeExited();
     void stateExited();
@@ -74,15 +58,7 @@
 private:
     void construct();
     void setMenuOptions();
-private:
-    HbAction *mSecondarySoftkeyAction;
-    HsSortAttribute mSortAttribute;
-    HsMenuView mMenuView;
-    HsMenuModeWrapper &mMenuMode;
-    HsMenuItemModel *mAllCollectionsModel;
-    HsMainWindow &mMainWindow;
-    QModelIndex mContextModelIndex;
-    QPointer<HbMenu> mContextMenu;
+    void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags);
 };
 
 #endif // HSALLCOLLECTIONSSTATE_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibrarystate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibrarystate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -84,28 +84,13 @@
 private:
 
     HsMenuViewBuilder mMenuViewBuilder;
-    /**
-     * All Applications state.
-     * Own.
-     */
+
     HsAllAppsState *mAllAppsState;
 
-    /**
-     * Transition to remember last visited child state in Application Library.
-     * Own.
-     */
     HsMenuModeTransition *mHistoryTransaction;
 
-    /**
-     * All Collections state.
-     * Own.
-     */
     HsAllCollectionsState *mAllCollectionsState;
 
-    /**
-     * Collection state.
-     * Own.
-     */
     HsCollectionState *mCollectionState;
 
     HsInstalledAppsState *mInstalledAppsState;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsapplibstateutils.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,38 @@
+/*
+ * 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: Utils for application library state plugin.
+ *
+ */
+
+#ifndef HSAPPLIBSTATEUTILS_H
+#define HSAPPLIBSTATEUTILS_H
+
+#include <QObject>
+
+#include "hsmenustates_global.h"
+
+class CaEntry;
+
+class HsAppLibStateUtils
+{
+    HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
+    
+public:
+    
+    static bool isCWRTWidgetOnHomeScreen(const CaEntry *entry);
+    
+};
+
+#endif //HSAPPLIBSTATEUTILS_H
+
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsbaseviewstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsbaseviewstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,14 +18,23 @@
 #ifndef HSBASEVIEWSTATE_H
 #define HSBASEVIEWSTATE_H
 
-#include <qstate.h>
+#include <QState>
+#include <QPointer>
+#include <QModelIndex>
 
 #include "hsmenustates_global.h"
 #include "hsmenuservice.h"
 #include "hsmenuview.h"
 
+
+class HbMenu;
+class HbAction;
 class HbMessageBox;
+class HbAbstractViewItem;
 class CaNotifier;
+class HsMenuModeWrapper;
+class HsMainWindow;
+class HsAddModeProxyModel;
 
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
@@ -37,35 +46,56 @@
     
 public:
     
-    HsBaseViewState(QState *parent);    
+    HsBaseViewState(HsMainWindow &mainWindow, QState *parent);
+    HsBaseViewState(HsMainWindow &mainWindow, 
+        HsMenuModeWrapper& menuMode, QState *parent);
     ~HsBaseViewState();
-    
+    void scrollToBeginning();
+
 private slots:
 
-    void applicationLaunchFailMessageFinished(HbAction*);
-    
+    virtual void openAppLibrary();
+
 protected slots:
     
-    void stateExited();
+    virtual void stateEntered();
+    virtual void stateExited();
+    virtual void addModeEntered();
+    virtual void addModeExited();
+    virtual void normalModeEntered();
+    virtual void normalModeExited();
+    virtual void launchItem(const QModelIndex &index);
+    virtual void openCollection(const QModelIndex &index);
+    virtual void showContextMenu(HbAbstractViewItem *item, const QPointF &coords);
+    virtual int checkSoftwareUpdates();
+    virtual bool openTaskSwitcher();
+    virtual void closeContextMenu();
     
 protected:
     
+    void initialize(HsMenuViewBuilder &menuViewBuilder, HsStateContext stateContext);
     void createApplicationLaunchFailMessage(int errorCode,int itemId);
-    void subscribeForMemoryCardRemove();
-    
+    void defineTransitions();
+
+private:
+
+    virtual void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags) = 0;
+    virtual void setMenuOptions() = 0;
+
 private:
     
-    void construct();
-    void cleanUpApplicationLaunchFailMessage();
-    
-private:
+    QPointer<HbMessageBox> mApplicationLaunchFailMessage;
+
+protected:
     
-    CaNotifier *mNotifier;
-    
-    int mMessageRelatedItemId;
-    
-    HbMessageBox *mApplicationLaunchFailMessage;
-
+    HsMenuItemModel *mModel;
+    QPointer<HbMenu> mContextMenu;
+    QModelIndex mContextModelIndex;
+    HbAction *mBackKeyAction;
+    QScopedPointer<HsMenuView> mMenuView;
+    HsMenuModeWrapper *mMenuMode;
+    HsMainWindow &mMainWindow;
+    HbMenu *mViewOptions;
 };
 
 
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,9 +18,8 @@
 #ifndef HSCOLLECTIONSTATE_H
 #define HSCOLLECTIONSTATE_H
 
-#include <qstate.h>
-#include <qabstractitemmodel.h>
-#include <QPointer>
+#include <QState>
+#include <QAbstractItemModel>
 
 #include "hsbaseviewstate.h"
 
@@ -30,7 +29,6 @@
 class HbAction;
 class HbMenu;
 class HbAbstractViewItem;
-class QModelIndex;
 class HsMenuItemModel;
 class HsMenuModeWrapper;
 class HsMenuViewBuilder;
@@ -46,29 +44,25 @@
                       HsMainWindow &mainWindow,
                       QState *parent = 0);
     ~HsCollectionState();
-public slots:
-    void collectionsSortOrder(HsSortAttribute sortAttribute);
 protected:
     void onEntry(QEvent *event);
 signals:
     void sortOrderChanged(HsSortAttribute sortAttribute);
 private slots:
-    bool openTaskSwitcher();
-    void listItemActivated(const QModelIndex &index);
-    void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords);
     void addAppsAction(bool addApps = true);
     void addCollectionShortcutToHomeScreenAction();
     void renameAction();
     void deleteAction();
-    void backSteppingAction();
     void updateLabel();
     void stateEntered();
+
     void stateExited();
     void latestOnTopMenuAction();
     void oldestOnTopMenuAction();
     void contextMenuAction(HbAction *action);
     void handleEmptyChange(bool empty);
     void lockSearchButton(bool lock);
+    void createArrangeCollection();
 
 private:
     void construct();
@@ -76,20 +70,13 @@
     void makeConnect();
     void makeDisconnect();
     void addElementToHomeScreen(const QModelIndex &index);
+    void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags);
+    void setMenuOptions();
 
 private:
     HsSortAttribute mSortAttribute;
-    HsSortAttribute mCollectionsSortAttribute;
     int mCollectionId;
     QString mCollectionType;
-    HsMenuView mMenuView;
-    HsMenuModeWrapper &mMenuMode;
-    HbAction *const mSecondarySoftkeyAction;
-    HsMenuItemModel *mCollectionModel;
-    HbMenu *mOptions;
-    QModelIndex mContextModelIndex;
-    QPointer<HbMenu> mContextMenu;
-    HsMainWindow &mMainWindow;
 };
 
 #endif // HSCOLLECTIONSTATE_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsinstalledappsstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsinstalledappsstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,9 +18,7 @@
 #ifndef HSINSTALLEDAPPSSTATE_H
 #define HSINSTALLEDAPPSSTATE_H
 
-#include <qstate.h>
-#include <QModelIndex>
-#include <QPointer>
+#include <QState>
 
 #include "hsbaseviewstate.h"
 
@@ -51,15 +49,7 @@
 
 private slots:
 
-    bool openTaskSwitcher();
-
-    void listItemActivated(const QModelIndex &index);
-
-    void listItemLongPressed(HbAbstractViewItem *item,
-                             const QPointF &coords);
-
-    void backAction();
-
+    void openInstallationLog();
     void stateEntered();
 
     void stateExited();
@@ -71,33 +61,8 @@
 private:
 
     void construct();
-
     void setMenuOptions();
-
-private:
-    /**
-     * The View widget.
-     * Own.
-     */
-    HsMenuView mMenuView;
-
-    /**
-     * Item Model for the List.
-     * Own.
-     */
-    HsMenuItemModel *mInstalledAppsModel;
-
-    /**
-     * Secondary Softkey action.
-     * Backstepping functionality.
-     * Own.
-     */
-    HbAction *const mSecondarySoftkeyAction;
-    
-    HsMainWindow &mMainWindow;
-
-    QModelIndex mContextModelIndex;
-    QPointer<HbMenu> mContextMenu;
+    void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags);
 };
 
 #endif // HSINSTALLEDAPPSSTATE_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hslistviewitem.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hslistviewitem.h	Wed Aug 18 09:40:07 2010 +0300
@@ -19,10 +19,21 @@
 #define CUSTOMLISTVIEWITEM_H
 
 #include <hblistviewitem.h>
+#include <HbProgressBar>
 
 #include "hsmenustates_global.h"
 
-class HbProgressBar;
+// TODO: this is only temporary class for show progress bar.
+// It should be remove when fix from orbit will be in official platfrom.
+class HsProgressBar: public HbProgressBar {
+public:
+    HsProgressBar(QGraphicsItem *parent=0):HbProgressBar(parent) {}
+    
+protected:
+    void paint ( QPainter * painter, 
+            const QStyleOptionGraphicsItem * option, 
+            QWidget * widget = 0 );
+};
 
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
@@ -33,17 +44,18 @@
                 
         explicit HsListViewItem(QGraphicsItem* parent=0);
         virtual ~HsListViewItem();
-        
+   
         virtual HbAbstractViewItem* createItem();
         virtual void updateChildItems();
     
+    protected:    
 	    virtual void polish(HbStyleParameters& params);
 
     private:
-
-        HbProgressBar *progress;
+	    HsProgressBar *progress;
         bool isProgress;
     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
 };
 
+
 #endif // CUSTOMLISTVIEWITEM_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmainwindow.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmainwindow.h	Wed Aug 18 09:40:07 2010 +0300
@@ -20,31 +20,20 @@
 
 #include <QObject>
 #include <QPixmap>
+#include "hsmenustates_global.h"
 
-class HsMenuView;
-class HsMainWindow: public QObject
+HS_STATES_TEST_CLASS(MenuStatesTest)
+
+class HbView;
+
+class HsMainWindow
 {
-    Q_OBJECT
-    
 public:
     HsMainWindow();
     virtual ~HsMainWindow();
 
-    virtual void setCurrentView(const HsMenuView &menuView);
-    virtual QPixmap grabScreenshot();
-       
-    public slots:
-    virtual void saveActivity();
-    
-    signals:
-    void viewIsReady();
-    
-    private:
-    /*
-     * not owned
-     * 
-     */
-    QObject* mActivityClient;
+    virtual void setCurrentView(HbView *view);
+
 };
 
 #endif // HS_MAIN_WINDOW_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuview.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuview.h	Wed Aug 18 09:40:07 2010 +0300
@@ -21,10 +21,12 @@
 #include <QObject>
 #include <QModelIndex>
 #include <QAbstractItemView>
+#include <QScopedPointer>
 #include <QSortFilterProxyModel>
 #include <HbAbstractItemView>
 #include "hsmenustates_global.h"
 #include "hsmenuviewbuilder.h"
+#include "hssearchview.h"
 #include "hsapp_defs.h"
 
 class QPointF;
@@ -32,100 +34,74 @@
 class HbView;
 class HbMainWindow;
 class HbAction;
-class HbAbstractItemView;
 class HbListView;
 class HbGroupBox;
 class HbWidget;
-class HbStaticVkbHost;
+class HbShrinkingVkbHost;
+class HsMainWindow;
 class HsMenuItemModel;
 
+HS_STATES_TEST_CLASS(MenuStatesTest)
 
-HS_STATES_TEST_CLASS(MenuStatesTest)
 
 class HsMenuView: public QObject
 {
     Q_OBJECT
 
 public:
-    HsMenuView(HsMenuViewBuilder &builder, HsViewContext viewContext);
+    HsMenuView(HsMenuViewBuilder &builder, HsStateContext stateContext,
+               HsMainWindow& mainWindow);
     ~HsMenuView();
 
-    void setSearchPanelVisible(bool visible);
-    void setContext(HsViewContext viewContext,
-                    HsOperationalContext context);
-
     HbView *view() const;
 
     HbListView *listView() const;
-    HbPushButton *collectionButton() const;
+    HbPushButton *contentButton() const;
 
     void activate();
     void inactivate();
 
     HbGroupBox *viewLabel() const;
 
-    void setModel(HsMenuItemModel *model);
+    void setModel(QAbstractItemModel *model);
+    QAbstractItemModel *model() const;
 
-
+    void reset(HsOperationalContext operationalContext);
 signals:
     void activated(const QModelIndex &index);
     void longPressed(HbAbstractViewItem *item, const QPointF &coords);
-
+    void listViewChange();
 public slots:
 
-    void activatedProxySlot(const QModelIndex &index);
-    void longPressedProxySlot(HbAbstractViewItem *item,
-                              const QPointF &coords);
-
     void showSearchPanel();
     void hideSearchPanel();
 
     void disableSearch(bool disable);
 
-
 private slots:
     void scrollToRow(int row,
                      QAbstractItemView::ScrollHint hint =
                          QAbstractItemView::PositionAtTop);
-    void findItem(QString criteriaStr);
-
-    void vkbOpened();
-    void vkbClosed();
 
 private:
 
-    QModelIndex firstVisibleItemIndex(const HbListView *view) const;
-
-    void connectSearchPanelSignals();
-    void disconnectSearchPanelSignals();
-    void connectSearchItemViewsSignals();
-    void disconnectSearchItemViewsSignals();
-
-    void searchFinished();
-    void searchBegins();
     HbAbstractItemView::ScrollHint convertScrollHint(
         QAbstractItemView::ScrollHint hint);
 
+    void switchBuilderContext();
+    void synchronizeCache();
 private:
-
-    const HsViewContext mViewContext;
     HsMenuViewBuilder &mBuilder;
-
-    QModelIndex mSearchViewInitialIndex;
-    QModelIndex mIndexToScrollAfterSearchDone;
-    QModelIndex mSearchViewLongPressedIndex;
+    const HsStateContext mStateContext;
+    HsOperationalContext mOperationalContext;
+    HsMainWindow &mMainWindow;
 
-    QSortFilterProxyModel *mProxyModel; // owned
-
-    HbView *mView;
-    HbListView *mListView;
-    HbGroupBox *mViewLabel;
+    HbView *mView; // once this is constructed it is not NULL
+    HbListView *mListView; // may be NULL in some contexts
+    HbGroupBox *mViewLabel; // may be NULL in some contexts
+    HbPushButton *mAddContentButton; // may be NULL in some contexts
 
-    HbListView *mSearchListView;
-    HbSearchPanel *mSearchPanel;
-    HbStaticVkbHost* mVkbHost;
-
-    HbPushButton *mCollectionButton;
+    QScopedPointer<HsSearchView> mHsSearchView;
 
     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
 };
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuviewbuilder.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsmenuviewbuilder.h	Wed Aug 18 09:40:07 2010 +0300
@@ -20,7 +20,9 @@
 
 #include <QFlags>
 #include <QMap>
+#include <QPair>
 #include <QSet>
+#include <QSharedPointer>
 #include <QString>
 #include <qnamespace.h>
 #include <HbDocumentLoader>
@@ -31,25 +33,25 @@
 class HbGroupBox;
 class HbLineEdit;
 class HbListView;
-class HbSearchPanel;
 class HbToolBar;
 class HbView;
 class HbWidget;
 class HbToolBarExtension;
 class HbPushButton;
 
-enum HsViewContext {
-    HsAllAppsContext,
+enum HsStateContext {
+    HsAllAppsContext = 0,
     HsAllCollectionsContext,
     HsInstalledAppsContext,
     HsCollectionContext,
+    InvalidStateContext
 };
 
 enum HsOperationalContext {
-    HsItemViewContext,
-    HsSearchContext,
+    HsItemViewContext = 0,
     HsButtonContext,
-    HsEmptyLabelContext
+    HsEmptyLabelContext,
+    InvalidOperationalContext
 };
 
 HS_STATES_TEST_CLASS(MenuStatesTest)
@@ -71,58 +73,53 @@
     HbToolBarExtension *toolBarExtension() const;
 
     // mandatory context dependent widgets accessors
-    HbView *currentView() const;
-    HbListView *currentListView() const;
+    HbView *currentView();
+    HbListView *currentListView();
 
 
     // optional widgets accessors
-    HbGroupBox *currentViewLabel() const;
-    HbSearchPanel *currentSearchPanel() const;
-    HbPushButton *collectionButton() const;
-
-
-    void setViewContext(HsViewContext viewContext);
-    void setOperationalContext(HsOperationalContext operationalContext);
-    bool build();
-
-private:
-    void init();
-
-    bool parseSection(const QString &sectionName = QString());
+    HbGroupBox *currentViewLabel();
+    HbPushButton *currentAddContentButton();
 
 
-    bool readContextConfiguration(HsViewContext, HsOperationalContext);
+    void setStateContext(HsStateContext stateContext);
+    void setOperationalContext(HsOperationalContext operationalContext);
+
+private:
+    typedef QPair<HsStateContext, HsOperationalContext> Context;
+    typedef QMap<Context, QSharedPointer<HbDocumentLoader> > LoaderMap;
+
+    QSharedPointer<HbDocumentLoader>
+            parseDocument(const QString &documentBaseName);
+
+    QSharedPointer<HbDocumentLoader> readContextConfiguration();
+
+    Context context() const;
+
+    QSharedPointer<HbDocumentLoader> currentLoader();
 
 
-    void searchPanelVisibilityChange(bool visible);
-
-    HbLineEdit *searchPanelLineEdit() const;
-
-    QMap<HsViewContext, QString > mViewContextToStringMap;
-    QMap<HsOperationalContext, QString > mOperationalContextToStringMap;
-
-    HbDocumentLoader mDocumentLoader;
     QSet<QObject *> mLoadedObjects;
 
-    const QString DOCUMENT_FILE_NAME;
+
     const QString ALL_APPS_ACTION_NAME;
     const QString ALL_COLLECTIONS_ACTION_NAME;
     const QString SEARCH_ACTION_NAME;
     const QString OVI_STORE_ACTION_NAME;
     const QString OPERATOR_ACTION_NAME;
-    const QString SEARCH_PANEL_NAME;
-    const QString BUTTON_NAME;
-    const QString TOOL_BAR_NAME;
 
     QActionGroup *mToolBarActionGroup;
     HbToolBar *mToolBar;
     HbToolBarExtension *mToolBarExtension;
     HbAction *mToolBarExtensionAction;
 
-    HsViewContext mViewContext;
+    HsStateContext mStateContext;
     HsOperationalContext mOperationalContext;
 
     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
+
+    LoaderMap mLoaderMap;
+    QSharedPointer<HbDocumentLoader> mCommonObjectsLoader;
 };
 
 #endif // HSMENUVIEWBUILDER_H
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsoperatorhandler.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsoperatorhandler.h	Wed Aug 18 09:40:07 2010 +0300
@@ -23,6 +23,7 @@
 #include "hsmenustates_global.h"
 
 class HsOperatorHandlerPrivate;
+class HbAction;
 
 class HsOperatorHandler: public QObject
 {
@@ -33,10 +34,17 @@
 public:
     HsOperatorHandler(QObject *parent = 0);
     virtual ~HsOperatorHandler();
-    HbIcon icon();
+    bool operatorStorePresent();
+    bool oviStorePresent();
+    bool operatorStoreFirst();
+    HbAction *prepareOperatorStoreAction(
+            HbAction *const operatorAction);
     QString text();
 
-public slots:
+private:
+    HbIcon icon();
+
+private slots:
     void action();
 
 private:
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsoperatorhandler_p.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsoperatorhandler_p.h	Wed Aug 18 09:40:07 2010 +0300
@@ -14,18 +14,17 @@
  * Description: Hs Operator Handler Private.
  *
  */
-
 #ifndef HSOPERATORHANDLER_P_H_
 #define HSOPERATORHANDLER_P_H_
 
-#ifndef NO_QT_EXTENSIONS
+#ifdef QT_EXTENSIONS
 
 #include <QObject>
+#include <XQSettingsManager>
 #include <HbIcon>
 #include "hsmenustates_global.h"
 
 class CaEntry;
-class XQSettingsManager;
 
 class HsOperatorHandlerPrivate: public QObject
 {
@@ -34,23 +33,46 @@
     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
 
 public:
+
+    enum HsStoreType {
+        NoneType,
+        UrlType,
+        ApplicationType
+    };
+
     HsOperatorHandlerPrivate(QObject *parent = 0);
     virtual ~HsOperatorHandlerPrivate();
     HbIcon icon();
     QString text();
     void action();
+    bool oviStorePresent();
+    bool operatorStorePresent();
+    bool operatorStoreFirst();
 
 private:
+    bool storeValue(XQSettingsManager *crManager, int storePresenceKey);
+    QVariant getVariantFromKey(
+            XQSettingsManager *crManager,
+            int crKey,
+            XQSettingsManager::Type type);
+    HsStoreType operatorStoreType(XQSettingsManager *crManager);
+
     void readCentralRepository();
     HbIcon createIcon(XQSettingsManager *crManager);
-    QString readText(XQSettingsManager *crManager);
+    QString operatorStoreTitle(XQSettingsManager *crManager);
     CaEntry *createAppEntry(XQSettingsManager *crManager);
     CaEntry *createUrlEntry(XQSettingsManager *crManager);
+    bool operatorStoreFirst(XQSettingsManager *crManager);
 
 private:
+    bool mOviStorePresent;
+    bool mOperatorStorePresent;
+    HsStoreType mStoreType;
     CaEntry *mOperatorEntry;
     HbIcon mIcon;
-    QString mText;
+    QString mOperatorStoreTitle;
+    bool mOperatorStoreFirst;
+
 };
 
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hssearchview.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,110 @@
+/*
+ * 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: Search view.
+ *
+ */
+
+#ifndef HSSEARCHVIEW_H
+#define HSSEARCHVIEW_H
+
+#include <QModelIndex>
+#include <QScopedPointer>
+
+#include <HbShrinkingVkbHost>
+
+#include "hsmenustates_global.h"
+#include "hsmenuviewbuilder.h"
+#include "hssearchviewbuilder.h"
+
+class QSortFilterProxyModel;
+class HsMainWindow;
+class HbAbstractViewItem;
+class HbLineEdit;
+class HbSearchPanel;
+
+HS_STATES_TEST_CLASS(MenuStatesTest)
+
+class HsSearchView : public QObject
+{
+    Q_OBJECT
+
+    HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
+
+public:
+
+    HsSearchView(
+            HsMenuViewBuilder &builder,
+            HsStateContext stateContext,
+            HsMainWindow &mainWindow);
+    ~HsSearchView();
+
+    void setSearchPanelVisible(bool visible);
+private:
+
+    bool isActive() const;
+
+    QModelIndex firstVisibleItemIndex(const HbListView *view) const;
+    void searchBegins();
+
+    void connectSearchItemViewsSignals();
+    void disconnectSearchItemViewsSignals();
+
+    void connectSearchPanelSignals();
+
+    void disconnectSearchPanelSignals();
+
+    void searchFinished();
+
+signals:
+    void activated(const QModelIndex &index);
+    void longPressed(HbAbstractViewItem *item, const QPointF &coords);
+
+public slots:
+    void hideSearchPanel();
+
+private slots:
+    void activatedProxySlot(const QModelIndex &index);
+    void longPressedProxySlot(
+            HbAbstractViewItem *item, const QPointF &coords);
+
+private slots:
+    void findItem(QString criteriaStr);
+    void setNoResultsVisibility();
+
+private:
+    void setOriginatingContext();
+    void initSearchPanel(HbSearchPanel &searchPanel);
+    HbLineEdit *searchPanelLineEdit(HbSearchPanel &searchPanel) const;
+
+private:
+
+    QModelIndex mSearchViewInitialIndex;
+    QModelIndex mIndexToScrollAfterSearchDone;
+    QModelIndex mSearchViewLongPressedIndex;
+    QSortFilterProxyModel *mProxyModel; // owned
+    HbView *mSearchView;
+    HbListView *mSearchListView;
+    HbSearchPanel *mSearchPanel;
+    const HsStateContext mStateContext;
+    HsOperationalContext mAfterSearchContext;
+    HsMenuViewBuilder &mBuilder;
+    HsMainWindow &mMainWindow;
+    HbListView *mListView;
+    QScopedPointer<HbShrinkingVkbHost> mVkbHost;
+    HsSearchViewBuilder mSearchViewBuilder;
+    bool mEmptyResultText;
+
+};
+
+#endif /* HSSEARCHVIEW_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hssearchviewbuilder.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,54 @@
+/*
+ * 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: Menu View Builder
+ *
+ */
+
+#ifndef HSSEARCHVIEWBUILDER_H_
+#define HSSEARCHVIEWBUILDER_H_
+
+#include <HbDocumentLoader>
+#include "hsmenustates_global.h"
+
+class HbSearchPanel;
+class HbView;
+class HbListView;
+class HbGroupBox;
+
+HS_STATES_TEST_CLASS(MenuStatesTest)
+
+class HsSearchViewBuilder
+{
+
+    HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
+
+public:
+    HsSearchViewBuilder();
+    virtual ~HsSearchViewBuilder();
+
+    HbView *searchView();
+    HbListView *searchListView();
+    HbSearchPanel *searchPanel();
+    HbGroupBox *searchViewLabel();
+    void setSearchLabledContext();
+    bool loadViewEmptySection();
+    bool loadViewListSection();
+
+private:
+    QSet<QObject *> mLoadedObjects;
+    QSharedPointer<HbDocumentLoader> mLoader;
+    bool mLabledContext;
+};
+
+#endif /* HSSEARCHVIEWBUILDER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/addcontentlabeledview.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="view" type="HbView">
+        <widget name="container" role="HbView:widget" type="HbWidget">
+            <widget name="label" type="HbGroupBox">
+                <string name="heading" value="."/>
+                <bool name="marqueeHeading" value="TRUE"/>
+                <fontspec name="fontSpec" role="Title" textheight="0"/>
+            </widget>
+            <widget name="buttonContainer" type="HbWidget">
+                <widget name="addContentButton" type="HbPushButton">
+                    <string locid="txt_applib_button_add_to_collection" name="text"/>
+                    <bool name="checkable" value="TRUE"/>
+                    <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+                </widget>
+                <layout orientation="Horizontal" spacing="0.0un" type="linear">
+                    <stretchitem stretchfactor="1"/>
+                    <linearitem itemname="addContentButton" stretchfactor="5"/>
+                    <stretchitem stretchfactor="1"/>
+                </layout>
+            </widget>
+            <layout orientation="Vertical" spacing="0.0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="label"/>
+                <stretchitem stretchfactor="1"/>
+                <linearitem itemname="buttonContainer"/>
+                <stretchitem stretchfactor="5"/>
+            </layout>
+        </widget>
+        <string locid="txt_applib_title_applications" name="title"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/applibrary.docml	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,509 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.1">
-    <object name="allAppsAction" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_applications_all" name="icon"/>
-    </object>
-    <object name="allCollectionsAction" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_applications_collections" name="icon"/>
-    </object>
-    <object name="searchAction" type="HbAction">
-        <icon iconName="qtg_mono_search" name="icon"/>
-    </object>
-    <object name="oviStoreAction" type="HbAction">
-        <icon iconName="qtg_mono_ovistore" name="icon"/>
-    </object>
-    <object name="operatorAction" type="HbAction"/>
-    <widget name="view" type="HbView">
-        <widget name="container" role="HbView:widget" type="HbWidget">
-            <widget name="collectionLabel" type="HbGroupBox">
-
-                <sizehint height="6un" type="MAXIMUM" width="100un"/>
-                <bool name="visible" value="FALSE"/>
-                <string name="heading" value="."/>
-                <bool name="marqueeHeading" value="TRUE"/>
-                <fontspec name="fontSpec" role="Title" textheight="0"/>
-                <integer name="groupBoxType" value="1"/>
-            </widget>
-            <widget name="searchPanel" type="HbSearchPanel">
-                <bool name="progressive" value="TRUE"/>
-                <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                <bool name="visible" value="FALSE"/>
-            </widget>
-        </widget>
-        <bool name="contentFullScreen" value="FALSE"/>
-        <bool name="visible" value="FALSE"/>
-    </widget>
-    <section name="allAppsViewDefinition">
-        <widget name="allAppsView" type="HbView">
-            <widget name="allAppsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="allAppsListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="allAppsSearchListView" type="HbListView">
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="allAppsListView"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="allAppsSearchViewDefinition">
-        <widget name="allAppsView" type="HbView">
-            <widget name="allAppsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="10un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="allAppsListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="allAppsSearchListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="allAppsSearchListView"/>
-                    <linearitem itemname="searchPanel"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="allCollectionsViewDefinition">
-        <widget name="allCollectionsView" type="HbView">
-            <widget name="allCollectionsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="allCollectionsListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="allCollectionsListView"/>
-                </layout>
-            </widget>
-            <widget name="allCollectionsSearchListView" type="HbListView">
-                <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                <bool name="visible" value="FALSE"/>
-            </widget>
-            <widget name="searchPanel" type="HbSearchPanel">
-                <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                <bool name="visible" value="FALSE"/>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="allCollectionsSearchViewDefinition">
-        <widget name="allCollectionsView" type="HbView">
-            <widget name="allCollectionsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="10un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="allCollectionsListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="allCollectionsSearchListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="allCollectionsSearchListView"/>
-                    <linearitem itemname="searchPanel"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="installedAppsViewDefinition">
-        <widget name="installedAppsView" type="HbView">
-            <widget name="installedAppsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="installedAppsLabel" type="HbGroupBox">
-                    <string locid="txt_applib_subtitle_installed" name="heading"/>
-                    <bool name="marqueeHeading" value="TRUE"/>
-                    <sizehint height="6un" type="MAXIMUM" width="-1"/>
-                    <fontspec name="fontSpec" role="Title" textheight="0"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="installedAppsListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="installedAppsSearchListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="installedAppsEmptyLabel" type="HbLabel">
-                    <sizehint height="0un" type="MINIMUM" width="0un"/>
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="installedAppsLabel"/>
-                    <linearitem itemname="installedAppsListView"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="installedAppsSearchViewDefinition">
-        <widget name="installedAppsView" type="HbView">
-            <widget name="installedAppsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="installedAppsLabel" type="HbGroupBox">
-                    <string locid="txt_applib_subtitle_installed" name="heading"/>
-                    <bool name="marqueeHeading" value="TRUE"/>
-                    <sizehint height="6un" type="MAXIMUM" width="-1"/>
-                    <fontspec name="fontSpec" role="Title" textheight="0"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="10un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="installedAppsListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="installedAppsSearchListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="installedAppsEmptyLabel" type="HbLabel">
-                    <sizehint height="0un" type="MINIMUM" width="0un"/>
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="installedAppsLabel"/>
-                    <linearitem itemname="installedAppsSearchListView"/>
-                    <linearitem itemname="searchPanel"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="installedAppsEmptyLabelViewDefinition">
-        <widget name="installedAppsView" type="HbView">
-            <widget name="installedAppsContainer" role="HbView:widget" type="HbWidget">
-                <widget name="installedAppsLabel" type="HbGroupBox">
-                    <string locid="txt_applib_subtitle_installed" name="heading"/>
-                    <bool name="marqueeHeading" value="TRUE"/>
-                    <sizehint height="6un" type="MAXIMUM" width="-1"/>
-                    <fontspec name="fontSpec" role="Title" textheight="0"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="installedAppsListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="installedAppsSearchListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="installedAppsEmpytLabelContainer" type="HbWidget">
-                    <widget name="installedAppsEmptyLabel" type="HbLabel">
-                        <enums name="alignment" value="AlignHCenter"/>
-                        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Minimum" verticalStretch="0"/>
-                        <sizehint height="10un" type="MINIMUM" width="50un"/>
-                        <sizehint height="10un" type="MAXIMUM" width="50un"/>
-                        <enums name="elideMode" value="ElideMiddle"/>
-                        <bool name="visible" value="TRUE"/>
-                        <string locid="txt_applib_formlabel_empty" name="plainText"/>
-                        <fontspec name="fontSpec" role="Title" textheight="4un"/>
-                    </widget>
-                    <sizehint height="11.9403un" type="PREFERRED" width="23.8806un"/>
-                    <layout orientation="Horizontal" type="linear">
-                        <stretchitem stretchfactor="1"/>
-                        <linearitem itemname="installedAppsEmptyLabel"/>
-                        <stretchitem stretchfactor="1"/>
-                    </layout>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="installedAppsLabel"/>
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="installedAppsEmpytLabelContainer"/>
-                    <stretchitem stretchfactor="5"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="collectionViewDefinition">
-        <widget name="collectionView" type="HbView">
-            <widget name="collectionContainer" role="HbView:widget" type="HbWidget">
-                <widget name="collectionLabel" type="HbGroupBox">
-                    <sizehint height="6un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="collectionListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="collectionSearchListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionButton" type="HbPushButton">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <string locid="txt_applib_button_add_to_collection" name="text"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionAppsEmptyLabel" type="HbLabel">
-                    <sizehint height="0un" type="MINIMUM" width="0un"/>
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="collectionLabel"/>
-                    <linearitem itemname="collectionListView"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="collectionSearchViewDefinition">
-        <widget name="collectionView" type="HbView">
-            <widget name="collectionContainer" role="HbView:widget" type="HbWidget">
-                <widget name="collectionLabel" type="HbGroupBox">
-                    <sizehint height="6un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="10un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="collectionListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionSearchListView" type="HbListView">
-                    <bool name="itemRecycling" value="TRUE"/>
-                    <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
-                    <sizehint height="100un" type="MAXIMUM" width="-1"/>
-                    <bool name="frictionEnabled" value="TRUE"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <widget name="collectionButton" type="HbPushButton">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionAppsEmptyLabel" type="HbLabel">
-                    <sizehint height="0un" type="MINIMUM" width="0un"/>
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="collectionLabel"/>
-                    <linearitem itemname="collectionSearchListView"/>
-                    <linearitem itemname="searchPanel"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="collectionButtonViewDefinition">
-        <widget name="collectionView" type="HbView">
-            <widget name="collectionContainer" role="HbView:widget" type="HbWidget">
-                <widget name="collectionLabel" type="HbGroupBox">
-                    <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                    <sizehint height="6un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="collectionListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionSearchListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionButtonContainer" type="HbWidget">
-                    <widget name="collectionButton" type="HbPushButton">
-                        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                        <sizehint type="FIXED" width="50un"/>
-                        <sizehint height="10un" type="MINIMUM" width="50un"/>
-                        <sizehint height="10un" type="MAXIMUM" width="50un"/>
-                        <bool name="visible" value="TRUE"/>
-                    </widget>
-                    <sizehint height="11.9403un" type="PREFERRED" width="23.8806un"/>
-                    <layout orientation="Horizontal" type="linear">
-                        <stretchitem stretchfactor="1"/>
-                        <linearitem itemname="collectionButton"/>
-                        <stretchitem stretchfactor="1"/>
-                    </layout>
-                </widget>
-                <widget name="collectionAppsEmptyLabel" type="HbLabel">
-                    <sizehint height="0un" type="MINIMUM" width="0un"/>
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="collectionLabel"/>
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="collectionButtonContainer"/>
-                    <stretchitem stretchfactor="5"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="collectionEmptyLabelViewDefinition">
-        <widget name="collectionView" type="HbView">
-            <widget name="collectionContainer" role="HbView:widget" type="HbWidget">
-                <widget name="collectionLabel" type="HbGroupBox">
-                    <sizehint height="6un" type="MAXIMUM" width="100un"/>
-                    <bool name="visible" value="TRUE"/>
-                    <integer name="groupBoxType" value="1"/>
-                </widget>
-                <widget name="collectionListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionSearchListView" type="HbListView">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="searchPanel" type="HbSearchPanel">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionButton" type="HbPushButton">
-                    <sizehint height="0un" type="MAXIMUM" width="0un"/>
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="collectionEmpytLabelContainer" type="HbWidget">
-                    <widget name="collectionAppsEmptyLabel" type="HbLabel">
-                        <enums name="alignment" value="AlignHCenter"/>
-                        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Minimum" verticalStretch="0"/>
-                        <sizehint height="10un" type="MINIMUM" width="50un"/>
-                        <sizehint height="10un" type="MAXIMUM" width="50un"/>
-                        <enums name="elideMode" value="ElideMiddle"/>
-                        <bool name="visible" value="TRUE"/>
-                        <string locid="txt_applib_formlabel_empty" name="plainText"/>
-                        <fontspec name="fontSpec" role="Title" textheight="4un"/>
-                    </widget>
-                    <sizehint height="11.9403un" type="PREFERRED" width="23.8806un"/>
-                    <layout orientation="Horizontal" type="linear">
-                        <stretchitem stretchfactor="1"/>
-                        <linearitem itemname="collectionAppsEmptyLabel"/>
-                        <stretchitem stretchfactor="1"/>
-                    </layout>
-                </widget>
-                <layout orientation="Vertical" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="collectionLabel"/>
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="collectionEmpytLabelContainer"/>
-                    <stretchitem stretchfactor="5"/>
-                </layout>
-            </widget>
-            <string locid="txt_applib_title_applications" name="title"/>
-            <bool name="contentFullScreen" value="FALSE"/>
-        </widget>
-    </section>
-    <metadata activeUIState="collection view with empty label state" display="NHD-3.2-inch_portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="all apps view state" sections="#common allAppsViewDefinition"/>
-        <uistate name="all apps search view state" sections="#common allAppsSearchViewDefinition"/>
-        <uistate name="all collections view state" sections="#common allCollectionsViewDefinition"/>
-        <uistate name="all collections search view state" sections="#common allCollectionsSearchViewDefinition"/>
-        <uistate name="installed apps view state" sections="#common installedAppsViewDefinition"/>
-        <uistate name="installed apps search view state" sections="#common installedAppsSearchViewDefinition"/>
-        <uistate name="installed apps empty view state" sections="#common installedAppsEmptyLabelViewDefinition"/>
-        <uistate name="collection view state" sections="#common collectionViewDefinition"/>
-        <uistate name="collection search view state" sections="#common collectionSearchViewDefinition"/>
-        <uistate name="collection view with button state" sections="#common collectionButtonViewDefinition"/>
-        <uistate name="collection view with empty label state" sections="#common collectionEmptyLabelViewDefinition"/>
-        <dummydata objectName="allAppsListView" section="allAppsViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allAppsSearchListView" section="allAppsViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allAppsListView" section="allAppsSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allAppsSearchListView" section="allAppsSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allCollectionsSearchListView" section="allCollectionsViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allCollectionsListView" section="allCollectionsViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allCollectionsSearchListView" section="allCollectionsSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="allCollectionsListView" section="allCollectionsSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="installedAppsListView" section="installedAppsViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="installedAppsSearchListView" section="installedAppsViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="installedAppsListView" section="installedAppsSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="installedAppsSearchListView" section="installedAppsSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="installedAppsListView" section="installedAppsEmptyLabelViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="installedAppsSearchListView" section="installedAppsEmptyLabelViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionListView" section="collectionViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionSearchListView" section="collectionViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionListView" section="collectionSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionSearchListView" section="collectionSearchViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionListView" section="collectionButtonViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionSearchListView" section="collectionButtonViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionListView" section="collectionEmptyLabelViewDefinition" value="app_list_template5"/>
-        <dummydata objectName="collectionSearchListView" section="collectionEmptyLabelViewDefinition" value="app_list_template5"/>
-    </metadata>
-</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/common_objects.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="allAppsAction" type="HbAction">
+        <bool name="checkable" value="TRUE"/>
+        <icon iconName="qtg_mono_applications_all" name="icon"/>
+    </object>
+    <object name="allCollectionsAction" type="HbAction">
+        <bool name="checkable" value="TRUE"/>
+        <icon iconName="qtg_mono_applications_collections" name="icon"/>
+    </object>
+    <object name="searchAction" type="HbAction">
+        <icon iconName="qtg_mono_search" name="icon"/>
+    </object>
+    <object name="oviStoreAction" type="HbAction">
+        <icon iconName="qtg_mono_ovistore" name="icon"/>
+    </object>
+    <object name="operatorAction" type="HbAction"/>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/emptylabeledview.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+        <widget name="view" type="HbView">
+            <widget name="container" role="HbView:widget" type="HbWidget">
+                <widget name="label" type="HbGroupBox">
+                    <string name="heading" value="."/>
+                    <bool name="marqueeHeading" value="TRUE"/>
+                    <fontspec name="fontSpec" role="Title" textheight="0"/>
+                </widget>
+                <widget name="emptyViewLabelContainer" type="HbWidget">
+                    <widget name="emptyViewLabel" type="HbLabel">
+                        <enums name="alignment" value="AlignHCenter"/>
+                        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Minimum" verticalStretch="0"/>
+                        <enums name="elideMode" value="ElideMiddle"/>
+                        <bool name="visible" value="TRUE"/>
+                        <string locid="txt_applib_formlabel_no_content" name="plainText"/>
+                        <fontspec name="fontSpec" role="Title" textheight="4un"/>
+                    </widget>
+                    <layout orientation="Horizontal" spacing="0.0un" type="linear">
+                        <stretchitem stretchfactor="1"/>
+                        <linearitem itemname="emptyViewLabel"/>
+                        <stretchitem stretchfactor="1"/>
+                    </layout>
+                </widget>
+                <layout orientation="Vertical" spacing="0.0un" type="linear">
+                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <linearitem itemname="label"/>
+                    <stretchitem stretchfactor="1"/>
+                    <linearitem itemname="emptyViewLabelContainer"/>
+                    <stretchitem stretchfactor="5"/>
+                </layout>
+            </widget>
+            <string locid="txt_applib_title_applications" name="title"/>
+        </widget>
+</hbdocument>
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/hslistviewitem.widgetml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/hslistviewitem.widgetml	Wed Aug 18 09:40:07 2010 +0300
@@ -1,50 +1,4 @@
 <hbwidget version="0.1" type="listviewitem">
-    <layout name="applib_text1" type="mesh">
-
-      <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT"  spacing="-6px"/>
-      <meshitem src="icon-1" srcEdge="TOP" dst="" dstEdge="TOP"  spacing="-5px" />
-      <meshitem src="icon-1" srcEdge="RIGHT" dst="text-1" dstEdge="LEFT" spacing="15px"/>
-      <meshitem src="icon-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"  spacing="6px" />
-
-      <meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-      <meshitem src="text-1" srcEdge="CENTERV" dst="icon-1" dstEdge="CENTERV" />      
-         
-      <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-      <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
-      <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-      <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-  
-      <meshitem src="frame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-      <meshitem src="frame" srcEdge="TOP" dst="" dstEdge="TOP" />
-      <meshitem src="frame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-      <meshitem src="frame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-  </layout>
-
-  <layout name="applib_text2" type="mesh">
-    
-    <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT"  spacing="-6px" />
-    <meshitem src="icon-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-5px"/>
-    <meshitem src="icon-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"  spacing="6px" />
-    <meshitem src="icon-1" srcEdge="RIGHT" dst="text-1" dstEdge="LEFT" spacing="15px"/>
-
-    <meshitem src="text-1" srcEdge="BOTTOM" dst="icon-1" dstEdge="CENTERV" />    
-    <meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-    
-    <meshitem src="text-2" srcEdge="LEFT" dst="text-1" dstEdge="LEFT" />
-    <meshitem src="text-2" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-    <meshitem src="text-2" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="8px" />
-
-    <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-    <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
-    <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-    <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-
-    <meshitem src="frame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-    <meshitem src="frame" srcEdge="TOP" dst="" dstEdge="TOP" />
-    <meshitem src="frame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-    <meshitem src="frame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-  </layout>
-
   <layout name="applib_progress" type="mesh">
 
     <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT"  spacing="-var(hb-param-margin-gene-left)" />
@@ -74,5 +28,4 @@
     <meshitem src="multiselection-toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
     <meshitem src="multiselection-toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
   </layout>
-
 </hbwidget>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/labeledlistview.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+        <widget name="view" type="HbView">
+            <widget name="container" role="HbView:widget" type="HbWidget">
+                <widget name="label" type="HbGroupBox">
+                    <string name="heading" value="."/>
+                    <bool name="marqueeHeading" value="TRUE"/>
+                    <fontspec name="fontSpec" role="Title" textheight="0"/>
+                </widget>
+                <widget name="listView" type="HbListView">
+                     <bool name="itemRecycling" value="TRUE"/>
+                     <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
+                     <bool name="frictionEnabled" value="TRUE"/>
+                 </widget>
+                <layout orientation="Vertical" spacing="0.0un" type="linear">
+                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                    <linearitem itemname="label"/>
+                    <linearitem itemname="listView"/>
+                </layout>
+            </widget>
+            <string locid="txt_applib_title_applications" name="title"/>
+        </widget>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/listview.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="view" type="HbView">
+        <widget name="container" role="HbView:widget" type="HbWidget">
+            <widget name="listView" type="HbListView">
+           </widget>
+            <layout orientation="Vertical" spacing="0.0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="listView"/>
+            </layout>
+        </widget>
+        <string locid="txt_applib_title_applications" name="title"/>
+    </widget>
+</hbdocument>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/resource/searchview.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <widget name="view" type="HbView">
+        <widget name="container" role="HbView:widget" type="HbWidget">
+            <widget name="label" type="HbGroupBox">
+                <bool name="marqueeHeading" value="TRUE"/>
+                <string name="heading" value="."/>
+                <fontspec name="fontSpec" role="Title" textheight="0"/>
+            </widget>
+            <widget name="emptyViewLabelContainer" type="HbWidget">
+                <widget name="emptyViewLabel" type="HbLabel">
+                    <enums name="alignment" value="AlignHCenter"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Minimum"
+                        verticalStretch="0"/>
+                    <enums name="elideMode" value="ElideMiddle"/>
+                    <bool name="visible" value="TRUE"/>
+                    <string locid="txt_applib_formlabel_no_search_results" name="plainText"/>
+                    <fontspec name="fontSpec" role="Title" textheight="4un"/>
+                </widget>
+                <layout orientation="Horizontal" spacing="0.0un" type="linear">
+                    <stretchitem stretchfactor="1"/>
+                    <linearitem itemname="emptyViewLabel"/>
+                    <stretchitem stretchfactor="1"/>
+                </layout>
+            </widget>
+			<widget name="listView" type="HbListView">
+				 <bool name="itemRecycling" value="TRUE"/>
+				 <enums name="horizontalScrollBarPolicy" value="ScrollBarAutoHide"/>
+				 <bool name="frictionEnabled" value="TRUE"/>
+			</widget>
+            <widget name="searchPanel" type="HbSearchPanel"/>
+        </widget>
+        <string locid="txt_applib_title_applications" name="title"/>
+    </widget>
+	
+	<section name="searchViewLabeledList">
+		<widget name="view" type="HbView">
+			<widget name="container" role="HbView:widget" type="HbWidget">
+				<widget name="label" type="HbGroupBox">
+					<bool name="visible" value="TRUE"/>
+				</widget>
+				<widget name="emptyViewLabelContainer" type="HbWidget">
+					<bool name="visible" value="FALSE"/>
+				</widget>
+				<widget name="listView" type="HbListView">
+					 <bool name="visible" value="TRUE"/>
+				</widget>
+				<layout orientation="Vertical" spacing="0.0un" type="linear">
+					<contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+					<linearitem itemname="label"/>
+					<linearitem itemname="listView"/>
+					<linearitem itemname="searchPanel"/>
+				</layout>
+			</widget>
+			<string locid="txt_applib_title_applications" name="title"/>
+			<bool name="contentFullScreen" value="TRUE"/>
+		</widget>
+    </section>
+
+	<section name="searchViewList">
+		<widget name="view" type="HbView">
+			<widget name="container" role="HbView:widget" type="HbWidget">
+				<widget name="label" type="HbGroupBox">
+					<bool name="visible" value="FALSE"/>
+				</widget>
+				<widget name="emptyViewLabelContainer" type="HbWidget">
+					<bool name="visible" value="FALSE"/>
+				</widget>
+				<widget name="listView" type="HbListView">
+					 <bool name="visible" value="TRUE"/>
+				 </widget>
+				<layout orientation="Vertical" spacing="0.0un" type="linear">
+					<contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+					<linearitem itemname="listView"/>
+					<linearitem itemname="searchPanel"/>
+				</layout>
+			</widget>
+			<string locid="txt_applib_title_applications" name="title"/>
+			<bool name="contentFullScreen" value="TRUE"/>
+		</widget>
+    </section>
+
+	<section name="searchViewLabeledEmpty">
+	    <widget name="view" type="HbView">
+			<widget name="container" role="HbView:widget" type="HbWidget">
+				<widget name="label" type="HbGroupBox">
+					 <bool name="visible" value="TRUE"/>
+				</widget>
+				<widget name="emptyViewLabelContainer" type="HbWidget">
+					<bool name="visible" value="TRUE"/>
+				</widget>
+				<widget name="listView" type="HbListView">
+					<bool name="visible" value="FALSE"/>
+				</widget>
+				<layout orientation="Vertical" spacing="0un" type="linear">
+					<contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+					<linearitem itemname="label"/>
+					<stretchitem stretchfactor="1"/>
+					<linearitem itemname="emptyViewLabelContainer"/>
+					<stretchitem stretchfactor="5"/>
+					<linearitem itemname="searchPanel"/>
+				</layout>
+			</widget>
+			<string locid="txt_applib_title_applications" name="title"/>
+		</widget>
+	</section>
+	
+	<section name="searchViewEmpty">
+	    <widget name="view" type="HbView">
+			<widget name="container" role="HbView:widget" type="HbWidget">
+				<widget name="emptyViewLabelContainer" type="HbWidget">
+					<bool name="visible" value="TRUE"/>
+				</widget>
+				<widget name="label" type="HbGroupBox">
+					 <bool name="visible" value="FALSE"/>
+				</widget>
+				<widget name="listView" type="HbListView">
+					<bool name="visible" value="FALSE"/>
+				</widget>
+				<layout orientation="Vertical" spacing="0un" type="linear">
+					<contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+					<stretchitem stretchfactor="1"/>
+					<linearitem itemname="emptyViewLabelContainer"/>
+					<stretchitem stretchfactor="5"/>
+					<linearitem itemname="searchPanel"/>
+				</layout>
+			</widget>
+			<string locid="txt_applib_title_applications" name="title"/>
+		</widget>
+	</section>
+	
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait"
+        unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsaddmodeproxymodel.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,188 @@
+/*
+ * 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: Proxy model for view in add to homescreen mode.
+ *
+ */
+
+#include <QObject>
+#include <canotifier.h>
+
+#include "hscontentservice.h"
+#include "hsaddmodeproxymodel.h"
+#include "hsmenuitemmodel.h"
+#include "hsapplibstateutils.h"
+
+/*!
+ \class HsAddModeProxyModel
+ \ingroup group_hsmenustateplugin
+ \brief Proxy Model for add to homescreen mode.
+ Filtering cwrt widgets to not displaing them in add mode when they are alredy present on HS.
+ \lib ?library
+ \see QSortFilterProxyModel
+ */
+
+/*!
+ Constructor.
+ \param parent parent for object.
+ */
+HsAddModeProxyModel::HsAddModeProxyModel(QObject *parent) :
+    QSortFilterProxyModel(parent),
+    mCwrtWidgetCache(),
+    mQuery()
+{
+    initilizeCwrtWidgetCache();
+    invalidateFilter();
+    connect(HsContentService::instance(),
+        SIGNAL(widgetAdded(const QString &, const QVariantHash &)),
+        this, SLOT(updateCacheOnAddWidget(const QString&, const QVariantHash&)));
+    connect(HsContentService::instance(),
+        SIGNAL(widgetRemoved(const QString &, const QVariantHash &)),
+        this, SLOT(updateCacheOnRemoveWidget(const QString&, const QVariantHash&)));
+    // create notifier for a cwrt widgets with query created in initilizeCwrtWidgetCache
+    CaNotifierFilter filter(mQuery);
+    mNotifier.reset(CaService::instance()->createNotifier(filter));
+    connect(mNotifier.data(),
+            SIGNAL(entryChanged(const CaEntry&, ChangeType)),
+            this,
+            SLOT(updateEntryStatus(const CaEntry&, ChangeType)));
+}
+
+/*
+ Destructor.
+ */
+HsAddModeProxyModel::~HsAddModeProxyModel()
+{
+}
+
+void HsAddModeProxyModel::initilizeCwrtWidgetCache()
+{
+    QStringList entryTypeNames;
+    entryTypeNames.append(applicationTypeName());
+    mQuery.setEntryTypeNames(entryTypeNames);
+    mQuery.setAttribute(swTypeKey(), HS_CWRT_APP_TYPE);
+    mQuery.setAttribute(widgetUriAttributeName(),
+                       HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE);
+    QList< QSharedPointer<CaEntry> > entries =
+            CaService::instance()->getEntries(mQuery);
+    foreach (QSharedPointer<CaEntry> entry, entries) {
+        QVariantHash preferences;
+        QMap<QString, QString> attributes = entry->attributes();
+        QMapIterator<QString, QString> i(attributes);
+        while (i.hasNext()) {
+            i.next();
+            QString key(i.key());
+            QString value(i.value());
+            if (key.contains(widgetParam())) {
+                preferences.insert(key.remove(widgetParam()),value);
+            }
+        }
+        int count(0);
+        HsContentService::instance()->widgets(
+                HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE,preferences,count);
+        mCwrtWidgetCache.insert(entry->id(), count > 0);
+    }
+
+}
+
+/*!
+ Return entryid for given Cwrt with mini view widget.
+ \param uri of a widget.
+ \param preferences widget preferences.
+ \retval int entry id or 0 for not cwrt with mini view widgets.
+ */
+int HsAddModeProxyModel::findCwrtWidgetEntryId(const QVariantHash &preferences)
+{
+    int result = 0;
+    CaQuery query;
+    QStringList entryTypeNames;
+    query.setEntryTypeNames(entryTypeNames);
+    query.setAttribute(swTypeKey(), HS_CWRT_APP_TYPE);
+    query.setAttribute(widgetUriAttributeName(),
+            HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE);
+    foreach (QString key, preferences.keys()) {
+        query.setAttribute(widgetParam()+key,
+            preferences.value(key).toString());
+    }
+    QList< QSharedPointer<CaEntry> > entries =
+        CaService::instance()->getEntries(query);
+    if( entries.count() > 0 )
+    {
+        result = entries[0]->id();
+    }
+    return result;
+}
+
+/*
+ Slot called when widget is added to homescreen.
+ If widget is removed we checkhow many instance of this widget is left on HS.
+ \param uri of a widget.
+ \param preferences widget preferences.
+ */
+void HsAddModeProxyModel::updateCacheOnAddWidget(const QString &uri,
+    const QVariantHash &preferences){
+	if (uri == HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE) {
+        int entryId = findCwrtWidgetEntryId(preferences);
+        if (!mCwrtWidgetCache.value(entryId) ) {
+            mCwrtWidgetCache.insert(entryId,true);
+            invalidateFilter();
+        }
+    }
+}
+
+/*
+ Slot called when widget is removed from homescreen.
+ If widget is removed we checkhow many instance of this widget is left on HS.
+ \param uri of a widget.
+ \param preferences widget preferences.
+*/
+void HsAddModeProxyModel::updateCacheOnRemoveWidget(const QString &uri,
+    const QVariantHash &preferences)
+{
+    if (uri == HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE) {
+        int entryId = findCwrtWidgetEntryId(preferences);
+        if (mCwrtWidgetCache.value(entryId)) {
+            mCwrtWidgetCache.insert(entryId,false);
+            invalidateFilter();
+        }
+    }
+}
+
+/*
+ Reimplementated from QSortFilterProxyModel.
+ \param source_row row in source model.
+ \param source_parent source parent index.
+ */
+bool HsAddModeProxyModel::filterAcceptsRow(int source_row,
+        const QModelIndex &source_parent) const
+{
+    QVariant entryId = sourceModel()->data(
+            sourceModel()->index(source_row,0,source_parent),
+            CaItemModel::IdRole);
+    return !mCwrtWidgetCache.value(entryId.toInt());
+}
+
+/*
+ Update cache if some cwrt widgets were install/uninstal/update or on mmc card.
+ \param entry changed entry.
+ \param changeType the type of the change. 
+ */
+void HsAddModeProxyModel::updateEntryStatus(const CaEntry &entry, ChangeType changeType)
+{
+    if (changeType == RemoveChangeType) {
+        mCwrtWidgetCache.remove(entry.id());
+    } else {
+        mCwrtWidgetCache.insert(entry.id(),
+            HsAppLibStateUtils::isCWRTWidgetOnHomeScreen(&entry));
+    }
+}
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallappsstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallappsstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,30 +15,29 @@
  *
  */
 
-#include <qstatemachine.h>
-#include <hbview.h>
-#include <hblistview.h>
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <hbabstractviewitem.h>
-#include <hsmenueventfactory.h>
-#include <hbinstance.h>
+#include <QStateMachine>
+#include <HbMenu>
+#include <HbAction>
+#include <HbAbstractViewItem>
+#include <HbIndexFeedback>
+#include <HbListView>
+#include <HbScrollBar>
+#include <HbView>
+
+#include <cadefs.h>
 #include <caentry.h>
-#include <hbsearchpanel.h>
-#include <HbScrollBar>
-#include <HbIndexFeedback>
+#include <caitemmodel.h>
+#include <caservice.h>
 
+#include "hsapp_defs.h"
+#include "hsmenueventfactory.h"
 #include "hsmenuitemmodel.h"
-#include "cadefs.h"
 #include "hsallappsstate.h"
-#include "hsaddappstocollectionstate.h"
-#include "hsapp_defs.h"
 #include "hsmenumodewrapper.h"
 #include "hsmenuviewbuilder.h"
-#include "hsmenumodetransition.h"
-#include "caentry.h"
-#include "caservice.h"
 #include "hsmainwindow.h"
+#include "hsaddmodeproxymodel.h"
+#include "hsapplibstateutils.h"
 
 /*!
  \class HsAllAppsState
@@ -55,40 +54,24 @@
  */
 
 /*!
- \var HsAllAppsState::mCollectionsSortAttribute
- Collections sort order
- */
-
-/*!
- \var HsAllAppsState::mMenuView
- Wrapper for All Applications View.
- */
-
-/*!
- \var HsAllAppsState::mMenuMode
- Menu view mode wrapper.
- Not Own.
- */
-
-/*!
  Constructor.
  \param menuViewBuilder Menu view builder.
- \param menuMode reference to object representing menu mode (add mode on/add mode off).
+ \param menuMode Menu mode object(add mode on/add mode off).
+ \param mainWindow Main window wrapper.
  \param parent Owner.
  */
 HsAllAppsState::HsAllAppsState(HsMenuViewBuilder &menuViewBuilder,
                                HsMenuModeWrapper &menuMode,
                                HsMainWindow &mainWindow,
                                QState *parent) :
-    HsBaseViewState(parent), mSortAttribute(AscendingNameHsSortAttribute),
-    mCollectionsSortAttribute(LatestOnTopHsSortAttribute),
-    mMenuView(menuViewBuilder, HsAllAppsContext),
-    mMenuMode(menuMode),
-    mAllAppsModel(0),
-    mMainWindow(mainWindow),
-    mContextModelIndex(), mContextMenu(0)
+    HsBaseViewState(mainWindow, menuMode, parent),
+    mAddModeProxyModel(0),
+    mSortAttribute(AscendingNameHsSortAttribute)
 {
+    initialize(menuViewBuilder, HsAllAppsContext);
     construct();
+	mAddModeProxyModel = new HsAddModeProxyModel(this);
+    mAddModeProxyModel->setSourceModel(mModel);
 }
 
 /*!
@@ -98,64 +81,46 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::construct");
 
-    QState *initialState = new QState(this);
-    setInitialState(initialState);
-
-    QState *addModeState = new QState(this);
-    connect(addModeState, SIGNAL(entered()),SLOT(addModeEntered()));
-
-    QState *normalModeState = new QState(this);
-    connect(normalModeState, SIGNAL(entered()),SLOT(normalModeEntered()));
-
-    initialState->addTransition(new HsMenuModeTransition(
-                                    mMenuMode, NormalHsMenuMode, normalModeState));
-    initialState->addTransition(new HsMenuModeTransition(
-                                    mMenuMode, AddHsMenuMode, addModeState));
+    defineTransitions();
 
     const QString parentName =
         parent() != 0 ? parent()->objectName() : QString("");
     setObjectName(parentName + "/allappsstate");
 
-    connect(this, SIGNAL(entered()),SLOT(stateEntered()));
-    connect(this, SIGNAL(exited()),SLOT(stateExited()));
+    connect(mBackKeyAction, SIGNAL(triggered()), SIGNAL(toAppLibraryState()));
 
-    mSecondarySoftkeyAction = new HbAction(Hb::BackNaviAction, this);
-
-    mMenuView.view()->setNavigationAction(
-        mSecondarySoftkeyAction);
+    mModel = HsMenuService::getAllApplicationsModel(mSortAttribute);
+    mMenuView->setModel(mModel);
 
-    connect(mSecondarySoftkeyAction, SIGNAL(triggered()),
-            SIGNAL(toAppLibraryState()));
+    mModel->preloadIcons();
 
-    mAllAppsModel = HsMenuService::getAllApplicationsModel(mSortAttribute);
-    mMenuView.setModel(mAllAppsModel);
-
-    mMenuView.listView()->verticalScrollBar()->setInteractive(true);
-    HbIndexFeedback *indexFeedback = new HbIndexFeedback(mMenuView.view());
+    mMenuView->listView()->verticalScrollBar()->setInteractive(true);
+    HbIndexFeedback *indexFeedback = new HbIndexFeedback(mMenuView->view());
     indexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter);
-    indexFeedback->setItemView(mMenuView.listView());
+    indexFeedback->setItemView(mMenuView->listView());
 
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::construct");
 }
 
+
 /*!
  Creates and installs menu options for the view
  */
 void HsAllAppsState::setMenuOptions()
 {
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::setMenuOptions");
-    QScopedPointer<HbMenu> viewOptions(new HbMenu);
-    viewOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
-                           this, SLOT(openTaskSwitcher()));
-    viewOptions->addAction(hbTrId("txt_applib_opt_add_to_collection"),
+    mViewOptions->clearActions();
+    mViewOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
+                           static_cast<HsBaseViewState*>(this), SLOT(openTaskSwitcher()));
+    mViewOptions->addAction(hbTrId("txt_applib_opt_add_to_collection"),
                            this, SLOT(addToCollection()));
-    viewOptions->addAction(hbTrId("txt_applib_opt_check_software_updates"),
-                           this, SLOT(checkSoftwareUpdates()));
+    mViewOptions->addAction(hbTrId("txt_applib_opt_check_software_updates"),
+                           static_cast<HsBaseViewState*>(this), SLOT(checkSoftwareUpdates()));
 
-    HbMenu *const sortMenu = viewOptions->addMenu(hbTrId(
+    HbMenu *const sortMenu = mViewOptions->addMenu(hbTrId(
                                  "txt_applib_opt_sort_by"));
     //Grouped options are exclusive by default.
-    QActionGroup *sortGroup = new QActionGroup(viewOptions.data());
+    QActionGroup *sortGroup = new QActionGroup(this);
 
     sortGroup->addAction(
         sortMenu->addAction(hbTrId("txt_applib_opt_sub_ascending"),
@@ -164,7 +129,7 @@
         sortMenu->addAction(hbTrId("txt_applib_opt_sub_descending"),
                             this, SLOT(descendingMenuAction())));
 
-    viewOptions->addAction(hbTrId("txt_applib_subtitle_installed"),
+    mViewOptions->addAction(hbTrId("txt_applib_opt_view_installed_applications"),
                            this, SLOT(openInstalledView()));
 
     foreach(QAction *action, sortMenu->actions()) {
@@ -184,7 +149,6 @@
     if (currentSortingPosition >= 0) {
         sortGroup->actions().at(currentSortingPosition)->setChecked(true);
     }
-    mMenuView.view()->setMenu(viewOptions.take());
 
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::setMenuOptions");
 }
@@ -195,63 +159,32 @@
 
 HsAllAppsState::~HsAllAppsState()
 {
-    mMenuView.setModel(NULL);
-    delete mAllAppsModel;
 }
 
-/*!
- Scrolls view to first item at top
- */
-void HsAllAppsState::scrollToBeginning()
-{
-    mMenuView.listView()->scrollTo(
-        mAllAppsModel->index(0), HbAbstractItemView::PositionAtTop);
-}
 
 /*!
- Slot invoked when a state is entered.
+ Slot invoked when normal mode entered.
  */
-
-
-void HsAllAppsState::stateEntered()
+void HsAllAppsState::normalModeEntered()
 {
-    qDebug("AllAppsState::stateEntered()");
-    HSMENUTEST_FUNC_ENTRY("HsAllAppsState::stateEntered");
-    
-    mMainWindow.setCurrentView(mMenuView);
-    mMenuView.activate();
-
-    HSMENUTEST_FUNC_EXIT("HsAllAppsState::stateEntered");
+    HsBaseViewState::normalModeEntered();
+    if (mMenuView->model() != mModel) {
+        mMenuView->setModel(mModel);
+    }
+    connect(mMenuView.data(),
+            SIGNAL(activated(QModelIndex)),
+            static_cast<HsBaseViewState*>(this), SLOT(launchItem(QModelIndex)));
 }
 
 /*!
  Slot invoked when add mode entered.
  */
-void HsAllAppsState::normalModeEntered()
-{    
-    setMenuOptions();
-    connect(&mMainWindow, SIGNAL(viewIsReady()),
-        &mMainWindow, SLOT(saveActivity()),
-        Qt::UniqueConnection);
-    connect(&mMenuView,
-            SIGNAL(activated(QModelIndex)),
-            SLOT(listItemActivated(QModelIndex)));
-    connect(&mMenuView,
-            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF)));
-}
-
-/*!
- Add mode entered.
- */
 void HsAllAppsState::addModeEntered()
 {
-    connect(&mMenuView,
-            SIGNAL(activated(QModelIndex)),
-            SLOT(addActivated(QModelIndex)));
-    connect(&mMenuView,
-            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            SLOT(addLongPressed(HbAbstractViewItem *, QPointF)));
+    HsBaseViewState::addModeEntered();
+    if (mMenuView->model() != mAddModeProxyModel) {
+        mMenuView->setModel(mAddModeProxyModel);
+    }
 }
 
 /*!
@@ -261,161 +194,31 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::stateExited");
 
-    disconnect(&mMainWindow, SIGNAL(viewIsReady()),
-               &mMainWindow, SLOT(saveActivity()));
-       
-    mMenuView.setSearchPanelVisible(false);
-
-    mMenuView.disconnect(this);
+    HsBaseViewState::stateExited();
 
-    mMenuView.view()->setMenu(NULL);
-
-    mMenuView.inactivate();
-
-    if (mContextMenu)
-        mContextMenu->close();
-
-    HsBaseViewState::stateExited();
-    
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::stateExited");
     qDebug("AllAppsState::stateExited()");
 }
 
 /*!
- Open task switcher.
- \retval true if operation is successful.
- */
-bool HsAllAppsState::openTaskSwitcher()
-{
-    return HsMenuService::launchTaskSwitcher();
-}
-
-/*!
- Check software updates.
- \retval 0 if operation is successful.
- */
-int HsAllAppsState::checkSoftwareUpdates()
-{
-    int errCode = HsMenuService::launchSoftwareUpdate();
-    if (errCode != 0){
-        createApplicationLaunchFailMessage(errCode,0);
-    }
-    return errCode;
-}
-
-/*!
- Slot connected to List widget in normal mode.
- \param index Model index of the activated item.
- */
-void HsAllAppsState::listItemActivated(const QModelIndex &index)
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllAppsState::listItemActivated");
-
-    QSharedPointer<const CaEntry> entry = mAllAppsModel->entry(index);
-    
-    if (entry->entryTypeName() == widgetTypeName()) {
-        EntryFlags flags = index.data(CaItemModel::FlagsRole).value<
-                               EntryFlags> ();
-        if (!(flags & UninstallEntryFlag)) {
-            machine()->postEvent(
-                HsMenuEventFactory::createPreviewHSWidgetEvent(
-                    entry->id(), entry->entryTypeName(), entry->attribute(
-                        widgetUriAttributeName()), entry->attribute(
-                        widgetLibraryAttributeName())));
-
-            const int itemId = index.data(CaItemModel::IdRole).toInt();
-            HsMenuService::touch(itemId);
-        }
-    } else {
-        QVariant data = mAllAppsModel->data(index, CaItemModel::IdRole);
-        int errCode = HsMenuService::executeAction(data.toInt());
-        if (errCode != 0) {
-            createApplicationLaunchFailMessage(errCode,index.data(CaItemModel::IdRole).toInt());
-        }
-    }
-    
-    mMenuView.setSearchPanelVisible(false);
-
-    HSMENUTEST_FUNC_EXIT("HsAllAppsState::listItemActivated");
-}
-
-/*!
  Slot connected to List widget in add mode.
  \param index Model index of the activated item.
  */
 void HsAllAppsState::addActivated(const QModelIndex &index)
 {
+    mMenuView->disconnect(this);
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::addActivated");
     addToHomeScreen(index);
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::addActivated");
 }
 
-/*!
- Handles long-item-pressed event in all apps view by showing context menu
- \param item View item
- \param coords Press point coordinates
- */
-void HsAllAppsState::listItemLongPressed(HbAbstractViewItem *item,
-        const QPointF &coords)
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllAppsState::listItemLongPressed");
-
-    EntryFlags flags = item->modelIndex().data(
-                           CaItemModel::FlagsRole).value<EntryFlags> ();
-
-    if (!(flags & UninstallEntryFlag)) {
-        // create context menu
-        mContextMenu = new HbMenu;
-
-        HbAction *addToHomeScreenAction = mContextMenu->addAction(
-            hbTrId("txt_applib_menu_add_to_home_screen"));
-        addToHomeScreenAction->setData(AddToHomeScreenContextAction);
-
-        HbAction *addToCollectionAction = mContextMenu->addAction(
-            hbTrId("txt_applib_menu_add_to_collection"));
-        addToCollectionAction->setData(AddToCollectionContextAction);
-
-        HbAction *uninstallAction = mContextMenu->addAction(
-            hbTrId("txt_common_menu_delete"));
-        uninstallAction->setData(UninstallContextAction);
-        HbAction *appSettingsAction(NULL);
-        HbAction *appDetailsAction(NULL);
-
-        // check conditions and hide irrelevant menu items
-        QSharedPointer<const CaEntry> entry = mAllAppsModel->entry(item->modelIndex());
-
-        if (!(entry->attribute(appSettingsPlugin()).isEmpty())) {
-            appSettingsAction = mContextMenu->addAction(
-                hbTrId("txt_common_menu_settings"));
-            appSettingsAction->setData(AppSettingContextAction);
-        }
-        if (!(entry->attribute(componentIdAttributeName()).isEmpty()) &&
-                (flags & RemovableEntryFlag) ) {
-            appDetailsAction = mContextMenu->addAction(
-                hbTrId("txt_common_menu_details"));
-            appDetailsAction->setData(AppDetailsContextAction);
-        }
-
-        if (!(flags & RemovableEntryFlag)) {
-            uninstallAction->setVisible(false);
-        }
-
-        mContextModelIndex = item->modelIndex();
-        mContextMenu->setPreferredPos(coords);
-        mContextMenu->setAttribute(Qt::WA_DeleteOnClose);
-        mContextMenu->open(this, SLOT(contextMenuAction(HbAction*)));
-    }
-
-
-    HSMENUTEST_FUNC_EXIT("HsAllAppsState::listItemLongPressed");
-}
 
 /*!
  Handles context menu actions
  */
 void HsAllAppsState::contextMenuAction(HbAction *action)
 {
-    HsContextAction command = 
+    HsContextAction command =
         static_cast<HsContextAction>(action->data().toInt());
 
     const int itemId = mContextModelIndex.data(CaItemModel::IdRole).toInt();
@@ -429,25 +232,27 @@
             // an existing collection via item specific menu.
             machine()->postEvent(
                 HsMenuEventFactory::createAddAppsFromApplicationsViewEvent(
-                    mSortAttribute, mCollectionsSortAttribute, itemId));
+                    mSortAttribute, itemId));
             break;
         case UninstallContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createUninstallApplicationEvent(itemId));
             break;
-        case AppSettingContextAction: 
+        case AppSettingContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createAppSettingsViewEvent(itemId));
             break;
-        case AppDetailsContextAction: 
+        case AppDetailsContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createAppDetailsViewEvent(itemId));
-            break;            
+            break;
+        case OpenContextAction:
+            launchItem(mContextModelIndex);
+            break;
         default:
             break;
     }
-                                    
-    mMenuView.setSearchPanelVisible(false);
+    mMenuView->hideSearchPanel();
 }
 
 /*!
@@ -460,6 +265,7 @@
                                     const QPointF &coords)
 {
     Q_UNUSED(coords);
+    mMenuView->disconnect(this);
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::addLongPressed");
     addToHomeScreen(item->modelIndex());
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::addLongPressed");
@@ -475,7 +281,7 @@
     // a new/an existing collection via the All view
     machine()->postEvent(
         HsMenuEventFactory::createAddAppsFromApplicationsViewEvent(
-            mSortAttribute, mCollectionsSortAttribute));
+            mSortAttribute));
 }
 
 /*!
@@ -495,50 +301,86 @@
 
 /*!
  Triggers event so that a state adding to Home Screen is reached
- \param index of an item to be added to homescreen
+ \param index of an item to be added to homescreen.
  \retval void
  */
 void HsAllAppsState::addToHomeScreen(const QModelIndex &index)
 {
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::addToHomeScreen");
-    QSharedPointer<const CaEntry> entry = mAllAppsModel->entry(index);
+    QSharedPointer<const CaEntry> entry = mModel->entry(index);
 
     machine()-> postEvent(HsMenuEventFactory::createAddToHomeScreenEvent(
-                              entry->id(), mMenuMode.getHsMenuMode(), 
-                              mMenuMode.getHsToken()));
+                              entry->id(), mMenuMode->getHsMenuMode(),
+                              mMenuMode->getHsToken()));
 
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::addToHomeScreen");
 }
 
 /*!
+ Method seting context menu options.
+ */
+void HsAllAppsState::setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags)
+{
+    HbAction *openAction = mContextMenu->addAction(hbTrId(
+        "txt_common_menu_open"));
+    openAction->setData(OpenContextAction);
+
+    HbAction *addToHomeScreenAction = mContextMenu->addAction(
+        hbTrId("txt_applib_menu_add_to_home_screen"));
+    addToHomeScreenAction->setData(AddToHomeScreenContextAction);
+
+    HbAction *addToCollectionAction = mContextMenu->addAction(
+        hbTrId("txt_applib_menu_add_to_collection"));
+    addToCollectionAction->setData(AddToCollectionContextAction);
+
+    HbAction *uninstallAction = mContextMenu->addAction(
+        hbTrId("txt_common_menu_delete"));
+    uninstallAction->setData(UninstallContextAction);
+    HbAction *appSettingsAction(NULL);
+    HbAction *appDetailsAction(NULL);
+
+    // check conditions and hide irrelevant menu items
+    QSharedPointer<const CaEntry> entry = mModel->entry(item->modelIndex());
+
+    if (!(entry->attribute(appSettingsPlugin()).isEmpty())) {
+        appSettingsAction = mContextMenu->addAction(
+            hbTrId("txt_common_menu_settings"));
+        appSettingsAction->setData(AppSettingContextAction);
+    }
+    if (!(entry->attribute(componentIdAttributeName()).isEmpty()) &&
+            (flags & RemovableEntryFlag) ) {
+        appDetailsAction = mContextMenu->addAction(
+            hbTrId("txt_common_menu_details"));
+        appDetailsAction->setData(AppDetailsContextAction);
+    }
+
+    if (!(flags & RemovableEntryFlag)) {
+        uninstallAction->setVisible(false);
+    }
+
+    addToHomeScreenAction->setVisible(
+        !HsAppLibStateUtils::isCWRTWidgetOnHomeScreen(entry.data()));
+}
+
+/*!
   Menu ascending sort action slot.
  */
 void HsAllAppsState::ascendingMenuAction()
 {
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::ascendingMenuAction");
     mSortAttribute = AscendingNameHsSortAttribute;
-    mAllAppsModel->setSort(mSortAttribute);
+    mModel->setSort(mSortAttribute);
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::ascendingMenuAction");
 }
 
 /*!
- Sets collections sort order
- /param sortOrder sort order.
- */
-void HsAllAppsState::collectionsSortOrder(
-    HsSortAttribute sortOrder)
-{
-    mCollectionsSortAttribute = sortOrder;
-}
-
-/*!
  Menu descending sort action slot.
  */
 void HsAllAppsState::descendingMenuAction()
 {
     HSMENUTEST_FUNC_ENTRY("HsAllAppsState::descendingMenuAction");
     mSortAttribute = DescendingNameHsSortAttribute;
-    mAllAppsModel->setSort(mSortAttribute);
+    mModel->setSort(mSortAttribute);
     HSMENUTEST_FUNC_EXIT("HsAllAppsState::descendingMenuAction");
 
 }
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallcollectionsstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsallcollectionsstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -14,25 +14,23 @@
  * Description: Menu All Collections state.
  *
  */
+#include <QPointF>
 #include <QScopedPointer>
 #include <QStateMachine>
 #include <HbView>
 #include <HbListView>
-#include <HbMainWindow>
 #include <HbMenu>
 #include <HbAction>
 #include <HbAbstractViewItem>
-#include <HbInstance>
-#include <HbSearchPanel>
+
+#include <cadefs.h>
 
-#include <hsmenueventfactory.h>
 #include "hsmenumodewrapper.h"
-#include "hsmenuviewbuilder.h"
+#include "hsmenueventfactory.h"
+#include "hsmenumodewrapper.h"
 #include "hsmenuitemmodel.h"
-#include "cadefs.h"
 #include "hsallcollectionsstate.h"
 #include "hsaddappstocollectionstate.h"
-#include "hsmenumodetransition.h"
 #include "hsmainwindow.h"
 
 /*!
@@ -45,28 +43,6 @@
  */
 
 /*!
- \var HsAllCollectionsState::mSortAttribute
- Sort order
- */
-
-/*!
- \var HsAllCollectionsState::mMenuView
- Wrapper for All Collections View.
- */
-
-/*!
- \var HsAllCollectionsState::mAllCollectionsModel
- Item Model for the List.
- Own.
- */
-
-/*!
- \fn void HsAllCollectionsState::sortOrderChanged(HsSortAttribute sortAttribute);
- Signal emitted when sort order is changed.
- \param sortOrder new sort order.
- */
-
-/*!
  Constructor.
  \param menuViewBuilder Menu view builder.
  \param menuMode reference to object representing menu mode (add mode on/add mode off).
@@ -77,14 +53,9 @@
     HsMenuModeWrapper &menuMode,
     HsMainWindow &mainWindow,
     QState *parent):
-    HsBaseViewState(parent),
-    mSortAttribute(CustomHsSortAttribute),
-    mMenuView(menuViewBuilder, HsAllCollectionsContext),
-    mMenuMode(menuMode),
-    mAllCollectionsModel(0),
-    mMainWindow(mainWindow),
-    mContextModelIndex(), mContextMenu(0)
+    HsBaseViewState(mainWindow, menuMode, parent)
 {
+    initialize(menuViewBuilder, HsAllCollectionsContext);
     construct();
 }
 
@@ -94,134 +65,73 @@
 void HsAllCollectionsState::construct()
 {
     HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::construct");
-
-    QState *initialState = new QState(this);
-    setInitialState(initialState);
-
-    QState *addModeState = new QState(this);
-    connect(addModeState, SIGNAL(entered()),SLOT(addModeEntered()));
-
-    QState *normalModeState = new QState(this);
-    connect(normalModeState, SIGNAL(entered()),SLOT(normalModeEntered()));
-    connect(normalModeState, SIGNAL(exited()),SLOT(normalModeExited()));
-
-    initialState->addTransition(new HsMenuModeTransition(
-                                    mMenuMode, NormalHsMenuMode, normalModeState));
-    initialState->addTransition(new HsMenuModeTransition(
-                                    mMenuMode, AddHsMenuMode, addModeState));
-
+    defineTransitions();
     const QString parentName =
         parent() != 0 ? parent()->objectName() : QString("");
     setObjectName(parentName + "/allcollectionsstate");
-    connect(this, SIGNAL(entered()),SLOT(stateEntered()));
-    connect(this, SIGNAL(exited()),SLOT(stateExited()));
 
-    mSecondarySoftkeyAction = new HbAction(Hb::BackNaviAction, this);
-
-    mMenuView.view()->setNavigationAction(
-        mSecondarySoftkeyAction);
+    connect(mBackKeyAction, SIGNAL(triggered()), SIGNAL(toAppLibraryState()));
 
-    connect(mSecondarySoftkeyAction, SIGNAL(triggered()),
-            SIGNAL(toAppLibraryState()));
-
-    mAllCollectionsModel = HsMenuService::getAllCollectionsModel(
-                               mSortAttribute);
-
-    mMenuView.setModel(mAllCollectionsModel);
+    mModel = HsMenuService::getAllCollectionsModel();
+    mMenuView->setModel(mModel);
 
     HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::construct");
 }
 
 /*!
- Creates and installs menu options for the view
+ Creates and installs menu options for the view.
  */
 void HsAllCollectionsState::setMenuOptions()
 {
     HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::setMenuOptions");
 
-    QScopedPointer<HbMenu> viewOptions(new HbMenu);
-
-    viewOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
-                           this,
+    mViewOptions->clearActions();
+    mViewOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
+                           static_cast<HsBaseViewState*>(this),
                            SLOT(openTaskSwitcher()));
-    viewOptions->addAction(hbTrId("txt_applib_opt_new_collection"),
+    mViewOptions->addAction(hbTrId("txt_applib_opt_new_collection"),
                            this, SLOT(createNewCollection()));
 
-    HbMenu *const sortMenu = viewOptions->addMenu(
-                                 hbTrId("txt_applib_opt_sort_by"));
-
-    //Grouped options are exclusive by default.
-    QActionGroup *sortGroup = new QActionGroup(viewOptions.data());
-    sortGroup->addAction(sortMenu->addAction(
-                             hbTrId("txt_applib_opt_sub_custom"),
-                             this, SLOT(customMenuAction())));
-    sortGroup->addAction(sortMenu->addAction(
-                             hbTrId("txt_applib_opt_sub_ascending"),
-                             this, SLOT(ascendingMenuAction())));
-    sortGroup->addAction(sortMenu->addAction(
-                             hbTrId("txt_applib_opt_sub_descending"),
-                             this, SLOT(descendingMenuAction())));
-
-    if (mSortAttribute == CustomHsSortAttribute) {
-        viewOptions->addAction(hbTrId("txt_applib_opt_arrange"),
-                               this, SLOT(createArrangeCollection()));
-    }
-
-    foreach(QAction *action, sortMenu->actions()) {
-        action->setCheckable(true);
-    }
-
-    switch (mSortAttribute) {
-    case AscendingNameHsSortAttribute:
-        sortGroup->actions().at(1)->setChecked(true);
-        break;
-    case DescendingNameHsSortAttribute:
-        sortGroup->actions().at(2)->setChecked(true);
-        break;
-    case CustomHsSortAttribute:
-    default:
-        sortGroup->actions().at(0)->setChecked(true);
-        break;
-    }
-
-    mMenuView.view()->setMenu(viewOptions.take());
+    mViewOptions->addAction(hbTrId("txt_applib_opt_arrange"),
+        this, SLOT(createArrangeCollection()));
 
     HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::setMenuOptions");
 }
 
 /*!
+ Method seting context menu options.
+ \param item the context menu is requested for.
+ \param flags related to \a item.
+ */
+void HsAllCollectionsState::setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags)
+{
+    Q_UNUSED(item)
+
+    HbAction *openAction = mContextMenu->addAction(hbTrId(
+        "txt_common_menu_open"));
+    openAction->setData(OpenContextAction);
+
+    // create context menu
+    HbAction *addShortcutAction = mContextMenu->addAction(hbTrId(
+                                      "txt_applib_menu_add_to_home_screen"));
+    addShortcutAction->setData(AddToHomeScreenContextAction);
+    HbAction *renameAction = NULL;
+    HbAction *deleteAction = NULL;
+
+    if ((flags & RemovableEntryFlag)) {
+        renameAction = mContextMenu->addAction(
+                           hbTrId("txt_common_menu_rename_item"));
+        renameAction->setData(RenameContextAction);
+        deleteAction = mContextMenu->addAction(hbTrId("txt_common_menu_delete"));
+        deleteAction->setData(DeleteContextAction);
+    }
+}
+
+/*!
  Destructor.
  */
 HsAllCollectionsState::~HsAllCollectionsState()
 {
-    mMenuView.setModel(NULL);
-    delete mAllCollectionsModel;
-}
-
-/*!
- Populates all folders
- */
-void HsAllCollectionsState::scrollToBeginning()
-{
-
-    mMenuView.listView()->scrollTo(
-        mAllCollectionsModel->index(0), HbAbstractItemView::PositionAtTop);
-}
-
-/*!
- Slot invoked when a state is entered.
- */
-
-
-void HsAllCollectionsState::stateEntered()
-{
-    qDebug("AllCollectionsState::stateEntered()");
-    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::stateEntered");
-
-    mMainWindow.setCurrentView(mMenuView);
-    mMenuView.activate();
-
-    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::stateExited");
 }
 
 /*!
@@ -229,16 +139,11 @@
 */
 void HsAllCollectionsState::normalModeEntered()
 {
-    setMenuOptions();
-    connect(&mMainWindow, SIGNAL(viewIsReady()),
-        &mMainWindow, SLOT(saveActivity()),
-        Qt::UniqueConnection);
-    connect(&mMenuView,
+    HsBaseViewState::normalModeEntered();
+    connect(mMenuView.data(),
             SIGNAL(activated(QModelIndex)),
-            SLOT(listItemActivated(QModelIndex)));
-    connect(&mMenuView,
-            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF)));
+            static_cast<HsBaseViewState*>(this),
+            SLOT(openCollection(QModelIndex)));
 }
 
 /*!
@@ -246,21 +151,9 @@
 */
 void HsAllCollectionsState::normalModeExited()
 {
-    mMenuView.view()->setMenu(NULL);
+
 }
 
-/*!
- Slot invoked when add mode is entered.
- */
-void HsAllCollectionsState::addModeEntered()
-{
-    connect(&mMenuView,
-            SIGNAL(activated(QModelIndex)),
-            SLOT(addActivated(QModelIndex)));
-    connect(&mMenuView,
-            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            SLOT(addLongPressed(HbAbstractViewItem *, QPointF)));
-}
 
 /*!
  Slot invoked when a state is exited.
@@ -268,19 +161,7 @@
 void HsAllCollectionsState::stateExited()
 {
     HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::stateExited");
-    
-    disconnect(&mMainWindow, SIGNAL(viewIsReady()),
-               &mMainWindow, SLOT(saveActivity()));
-    
-    mMenuView.setSearchPanelVisible(false);
 
-    mMenuView.disconnect(this);
-
-    mMenuView.inactivate();
-
-    if (mContextMenu)
-        mContextMenu->close();
-    
     HsBaseViewState::stateExited();
 
     HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::stateExited");
@@ -288,45 +169,16 @@
 }
 
 /*!
- Open task switcher.
- \retval true if operation is successful.
- */
-bool HsAllCollectionsState::openTaskSwitcher()
-{
-    return HsMenuService::launchTaskSwitcher();
-}
-
-/*!
- Slot connected to List widget in normal mode.
- \param index Model index of the activated item.
- */
-void HsAllCollectionsState::listItemActivated(const QModelIndex &index)
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::listItemActivated");
-    QVariant data = mAllCollectionsModel->data(index, CaItemModel::IdRole);
-    int id = data.toInt();
-    QString collectionType =
-        mAllCollectionsModel->data(index, CaItemModel::TypeRole).toString();
-    qDebug("AllCollectionsState::listItemActivated - MCS ID: %d",
-           data.toInt());
-
-    mMenuView.setSearchPanelVisible(false);
-
-    machine()->postEvent(HsMenuEventFactory::createOpenCollectionFromAppLibraryEvent(id,
-                         collectionType));
-    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::listItemActivated");
-}
-
-/*!
  Slot connected to List widget in add mode.
  \param index Model index of the activated item.
  */
 void HsAllCollectionsState::addActivated(const QModelIndex &index)
 {
+    mMenuView->disconnect(this);
     const int itemId = index.data(CaItemModel::IdRole).toInt();
     machine()->postEvent(
         HsMenuEventFactory::createAddToHomeScreenEvent(
-            itemId, mMenuMode.getHsMenuMode(), mMenuMode.getHsToken()));
+            itemId, mMenuMode->getHsMenuMode(), mMenuMode->getHsToken()));
 }
 
 /*!
@@ -339,57 +191,20 @@
         const QPointF &coords)
 {
     Q_UNUSED(coords);
+    mMenuView->disconnect(this);
     const int itemId = item->modelIndex().data(CaItemModel::IdRole).toInt();
     machine()->postEvent(
         HsMenuEventFactory::createAddToHomeScreenEvent(itemId,
-                mMenuMode.getHsMenuMode(), mMenuMode.getHsToken()));
+                mMenuMode->getHsMenuMode(), mMenuMode->getHsToken()));
 }
 
 /*!
- Slot connected to List widget in normal mode.
- Called when item long pressed.
- \param item View item.
- \param coords Press point coordinates.
- */
-void HsAllCollectionsState::listItemLongPressed(HbAbstractViewItem *item,
-        const QPointF &coords)
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::listItemLongPressed");
-
-    mContextMenu = new HbMenu;
-
-    // create context menu
-    HbAction *addShortcutAction = mContextMenu->addAction(hbTrId(
-                                      "txt_applib_menu_add_to_home_screen"));
-    addShortcutAction->setData(AddToHomeScreenContextAction);
-    HbAction *renameAction = NULL;
-    HbAction *deleteAction = NULL;
-
-    EntryFlags flags = item->modelIndex().data(CaItemModel::FlagsRole).value<
-                       EntryFlags> ();
-
-    if ((flags & RemovableEntryFlag)) {
-        renameAction = mContextMenu->addAction(
-                           hbTrId("txt_common_menu_rename_item"));
-        renameAction->setData(RenameContextAction);
-        deleteAction = mContextMenu->addAction(hbTrId("txt_common_menu_delete"));
-        deleteAction->setData(DeleteContextAction);
-    }
-
-    mContextModelIndex = item->modelIndex();
-    mContextMenu->setPreferredPos(coords);
-    mContextMenu->setAttribute(Qt::WA_DeleteOnClose);
-    mContextMenu->open(this, SLOT(contextMenuAction(HbAction*)));
-
-    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::listItemLongPressed");
-}
-
-/*!
- Handles context menu actions
+ Handles context menu actions.
+ \param action to be handled.
  */
 void HsAllCollectionsState::contextMenuAction(HbAction *action)
 {
-    HsContextAction command = 
+    HsContextAction command =
         static_cast<HsContextAction>(action->data().toInt());
 
     const int itemId = mContextModelIndex.data(CaItemModel::IdRole).toInt();
@@ -398,7 +213,9 @@
         case AddToHomeScreenContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createAddToHomeScreenEvent(
-                    itemId, mMenuMode.getHsMenuMode(), mMenuMode.getHsToken()));
+                    itemId,
+                    mMenuMode->getHsMenuMode(),
+                    mMenuMode->getHsToken()));
             break;
         case RenameContextAction:
             machine()->postEvent(
@@ -407,12 +224,15 @@
         case DeleteContextAction:
              machine()->postEvent(
                 HsMenuEventFactory::createDeleteCollectionEvent(itemId));
-            break;      
+            break;
+        case OpenContextAction:
+            openCollection(mContextModelIndex);
+            break;
         default:
             break;
     }
-                                    
-    mMenuView.setSearchPanelVisible(false);
+
+    mMenuView->hideSearchPanel();
 }
 
 /*!
@@ -433,7 +253,7 @@
     int topItemId(0);
 
     const QList<HbAbstractViewItem *> array =
-        mMenuView.listView()->visibleItems();
+        mMenuView->listView()->visibleItems();
 
     if (array.count() >= 1) {
         QModelIndex idx = array[0]->modelIndex();
@@ -441,45 +261,5 @@
     }
 
     machine()->postEvent(
-        HsMenuEventFactory::createArrangeCollectionEvent(topItemId));
-}
-
-/*!
- Menu custom sort action slot.
- */
-void HsAllCollectionsState::customMenuAction()
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::customMenuAction");
-    mSortAttribute = CustomHsSortAttribute;
-    setMenuOptions();
-    mAllCollectionsModel->setSort(mSortAttribute);
-    emit sortOrderChanged(mSortAttribute);
-    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::customMenuAction");
+        HsMenuEventFactory::createArrangeAllCollectionsEvent(topItemId));
 }
-
-/*!
- Menu ascending sort action slot.
- */
-void HsAllCollectionsState::ascendingMenuAction()
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::ascendingMenuAction");
-    mSortAttribute = AscendingNameHsSortAttribute;
-    setMenuOptions();
-    mAllCollectionsModel->setSort(mSortAttribute);
-    emit sortOrderChanged(mSortAttribute);
-    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::ascendingMenuAction");
-}
-
-/*!
- Menu descending sort action slot.
- */
-void HsAllCollectionsState::descendingMenuAction()
-{
-    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::descendingMenuAction");
-    mSortAttribute = DescendingNameHsSortAttribute;
-    setMenuOptions();
-    mAllCollectionsModel->setSort(mSortAttribute);
-    emit sortOrderChanged(mSortAttribute);
-    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::descendingMenuAction");
-}
-
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibrarystate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -14,18 +14,11 @@
  * Description: Menu Application Library state.
  *
  */
-#include <hbmainwindow.h>
-#include <hbview.h>
-#include <hbaction.h>
+
+#include <HbAction>
 #include <HbToolBar>
-#include <HbIcon>
-#include <hbinstance.h>
-#include <hblistview.h>
-#include <hbsearchpanel.h>
 #include <HbToolBarExtension>
 #include <HbStyleLoader>
-#include <hsmenueventtransition.h>
-
 
 #include "hstest_global.h"
 #include "hsapplibrarystate.h"
@@ -34,7 +27,7 @@
 #include "hscollectionstate.h"
 #include "hsinstalledappsstate.h"
 #include "hsoperatorhandler.h"
-#include "hsmenuview.h"
+#include "hsmenueventtransition.h"
 #include "hsmenumodetransition.h"
 
 
@@ -125,7 +118,7 @@
 
     mAllCollectionsState = new HsAllCollectionsState(mMenuViewBuilder, mMenuMode,
             mMainWindow, this);
-            
+
     QState *initialState = new QState(this);
     setInitialState(initialState);
 
@@ -142,12 +135,12 @@
             this);
 
     connect(mCollectionState, SIGNAL(entered()),SLOT(clearToolbarLatch()));
-    
+
     HsMenuEventTransition *openCollectionFromAppLibTransition =
         new HsMenuEventTransition(HsMenuEvent::OpenCollectionFromAppLibrary,
                                   this, mCollectionState);
     this->addTransition(openCollectionFromAppLibTransition);
-    
+
     //It is called from: HsDefaultRuntime::activityRequested(const QString &name)
     HsMenuEventTransition *openCollectionAfterActivityRequest =
             new HsMenuEventTransition(HsMenuEvent::OpenCollection,
@@ -180,11 +173,6 @@
 
     constructToolbar();
 
-    connect(mAllCollectionsState, SIGNAL(sortOrderChanged(HsSortAttribute)),
-            mAllAppsState, SLOT(collectionsSortOrder(HsSortAttribute)));
-    connect(mAllCollectionsState, SIGNAL(sortOrderChanged(HsSortAttribute)),
-            mCollectionState, SLOT(collectionsSortOrder(HsSortAttribute)));
-
     connect(mAllAppsState, SIGNAL(entered()),
             this, SLOT(allAppsStateEntered()));
 
@@ -195,7 +183,7 @@
 
     connect(mAllCollectionsState, SIGNAL(entered()),
             this, SLOT(allCollectionsStateEntered()));
-  
+
     HSMENUTEST_FUNC_EXIT("HsAppLibraryState::construct");
 }
 
@@ -209,19 +197,19 @@
     HSMENUTEST_FUNC_ENTRY("HsAppLibraryState::onEntry");
     QState::onEntry(event);
 
-    if (static_cast<HsMenuEvent *>(event)->operation() != 
+    if (static_cast<HsMenuEvent *>(event)->operation() !=
             HsMenuEvent::OpenCollectionFromAppLibrary)
         {
     // we are back from HS, scroll those views to top
         mAllAppsState->scrollToBeginning();
-        mAllCollectionsState->scrollToBeginning();        
+        mAllCollectionsState->scrollToBeginning();
         }
-    
+
     if (event->type() == HsMenuEvent::eventType()) {
         HsMenuEvent *menuEvent = static_cast<HsMenuEvent *>(event);
         QVariantMap data = menuEvent->data();
         mMenuMode.setHsMenuMode(
-            static_cast<HsMenuMode>(data.value(menuModeType()).toInt()), 
+            static_cast<HsMenuMode>(data.value(menuModeType()).toInt()),
             data.value(HOMESCREENDATA));
     } else {
         mMenuMode.setHsMenuMode(NormalHsMenuMode);
@@ -242,16 +230,14 @@
 
     HsOperatorHandler *const operatorHandler = new HsOperatorHandler(this);
 
-    const bool operatorActionAvailable = !operatorHandler->icon().isNull();
-
-    if (operatorActionAvailable) {
+    if (operatorHandler->oviStorePresent()
+            && operatorHandler->operatorStorePresent()) {
 
         //TODO HbToolBarExtension is not supported in docml currently
         //should be changed in future
         bool loaded = HbStyleLoader::registerFilePath(
                      ":/css/hsapplibrarystateplugin.css");
         Q_ASSERT(loaded);
-        HbAction *const operatorAction(mMenuViewBuilder.operatorAction());
 
         HbToolBarExtension *const extension(
             mMenuViewBuilder.toolBarExtension());
@@ -260,25 +246,31 @@
 
         extensionAction->setIcon(HbIcon("qtg_mono_store"));
 
-        operatorAction->setIcon(operatorHandler->icon());
+        HbAction *const operatorAction(
+                operatorHandler->prepareOperatorStoreAction(
+                        mMenuViewBuilder.operatorAction()));
         operatorAction->setText(hbTrId(operatorHandler->text().toLatin1()));
 
         //TODO: no locstring for ovi store currently
         mMenuViewBuilder.oviStoreAction()->setText("Ovi Store");
-
-        connect(mMenuViewBuilder.operatorAction(), SIGNAL(triggered()),
-                operatorHandler, SLOT(action()));
-
-        extension->addAction(mMenuViewBuilder.oviStoreAction());
-        extension->addAction(operatorAction);
-
-    } else {
+        if (operatorHandler->operatorStoreFirst()) {
+            extension->addAction(operatorAction);
+            extension->addAction(mMenuViewBuilder.oviStoreAction());
+        } else {
+            extension->addAction(mMenuViewBuilder.oviStoreAction());
+            extension->addAction(operatorAction);
+        }
+    } else if (operatorHandler->oviStorePresent()) {
         mMenuViewBuilder.toolBar()->addAction(
             mMenuViewBuilder.oviStoreAction());
+    } else if (operatorHandler->operatorStorePresent()) {
+        mMenuViewBuilder.toolBar()->addAction(
+            operatorHandler->prepareOperatorStoreAction(
+                    mMenuViewBuilder.operatorAction()));
     }
 
-
-    HbAction *const allCollectionsAction(mMenuViewBuilder.allCollectionsAction());
+    HbAction *const allCollectionsAction(
+            mMenuViewBuilder.allCollectionsAction());
 
     mAllAppsState->addTransition(
         allCollectionsAction, SIGNAL(triggered()), mAllCollectionsState);
@@ -320,12 +312,12 @@
 int HsAppLibraryState::oviStoreAction()
 {
     HSMENUTEST_FUNC_ENTRY("HsAppLibraryState::oviStoreAction");
-    
+
     CaEntry oviEntry;
     oviEntry.setEntryTypeName(applicationTypeName());
-    oviEntry.setAttribute( applicationUidEntryKey(), 
+    oviEntry.setAttribute( applicationUidEntryKey(),
                     QString::number(oviLauncherApplicationUid));
-    
+
     int result = CaService::instance()->executeCommand(oviEntry);
     if (result) {
         oviEntry.setEntryTypeName(urlTypeName());
@@ -333,7 +325,7 @@
                           QString("https://store.ovi.com/applications/"));
         result = CaService::instance()->executeCommand(oviEntry);
     }
-    
+
     HSMENUTEST_FUNC_EXIT("HsAppLibraryState::oviStoreAction");
     return result;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsapplibstateutils.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,57 @@
+/*
+ * 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: Utils for application library state plugin.
+ *
+ */
+
+#include <caentry.h>
+
+#include "hsapplibstateutils.h"
+#include "hscontentservice.h"
+#include "hsapp_defs.h"
+
+/*!
+ \class HsAppLibStateUtils
+ \ingroup group_hsmenustateplugin
+ \brief Utils.
+ Utils for application library state plugin.
+ */
+
+/*!
+ Return true if given entry is cwrt widget and already on homescreen
+ */
+bool HsAppLibStateUtils::isCWRTWidgetOnHomeScreen(const CaEntry *entry)
+{
+    bool result = false;
+    if (entry->entryTypeName() == applicationTypeName() && 
+        entry->attribute(swTypeKey()) == HS_CWRT_APP_TYPE &&
+        entry->attribute(widgetUriAttributeName()) ==
+                HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE) {
+        QVariantHash preferences;
+        QMap<QString, QString> attributes = entry->attributes();
+        QMapIterator<QString, QString> i(attributes);
+        while (i.hasNext()) {
+            i.next();
+            QString key(i.key());
+            QString value(i.value());
+            if (key.contains(widgetParam())) {
+                preferences.insert(key.remove(widgetParam()),value);
+            }
+        }
+        int count(0);
+        HsContentService::instance()->widgets(HS_WIDGET_URI_ATTRIBUTE_CWRT_VALUE,preferences,count);
+        result = count > 0;
+    }
+    return result;
+}
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsbaseviewstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsbaseviewstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,104 +15,122 @@
  *
  */
 
-#include <hbmessagebox.h>
+#include <QScopedPointer>
+#include <QStateMachine>
+#include <HbMessageBox>
 #include <HbParameterLengthLimiter>
-#include <hbaction.h>
+#include <HbAction>
+#include <HbMenu>
+#include <HbAbstractViewItem>
+#include <HbView>
+#include <HbListView>
+
 #include <canotifier.h>
 
 #include "hsbaseviewstate.h"
+#include "hsmenueventfactory.h"
+#include "hsmenudialogfactory.h"
+#include "hsmenuitemmodel.h"
+#include "hsmenumodetransition.h"
+#include "hsmenuentryremovedhandler.h"
+#include "hsmainwindow.h"
+
 
 /*!
  Constructor.
+ \param mainWindow main window wrapper object.
+ \param parent Owner.
  */
-HsBaseViewState::HsBaseViewState(
-    QState *parent):
+HsBaseViewState::HsBaseViewState(HsMainWindow &mainWindow, QState *parent):
     QState(parent),
-    mNotifier(0),
-    mMessageRelatedItemId(0),
-    mApplicationLaunchFailMessage(0)    
+    mApplicationLaunchFailMessage(0),
+    mModel(0),
+    mContextMenu(0),
+    mContextModelIndex(),
+    mBackKeyAction(0),
+    mMenuView(0),
+    mMenuMode(0),
+    mMainWindow(mainWindow)
 {
-    construct();
+    mBackKeyAction = new HbAction(Hb::BackNaviAction, this);
+    mViewOptions = new HbMenu;
 }
 
 /*!
- Constructs contained objects.
+ Constructor.
+ \param mainWindow main window wrapper object.
+ \param menuMode menu mode object.
+ \param parent Owner.
  */
-void HsBaseViewState::construct()
+HsBaseViewState::HsBaseViewState(HsMainWindow &mainWindow,
+    HsMenuModeWrapper& menuMode,
+    QState *parent):
+    QState(parent),
+    mApplicationLaunchFailMessage(0),
+    mModel(0),
+    mContextMenu(0),
+    mContextModelIndex(),
+    mBackKeyAction(0),
+    mMenuView(0),
+    mMenuMode(&menuMode),
+    mMainWindow(mainWindow)
 {
+    mBackKeyAction = new HbAction(Hb::BackNaviAction, this);
+    mViewOptions = new HbMenu;
+}
+/*!
+ Initialize contained objects.
+ \param menuViewBuilder object providing widgets for menu view.
+ \param stateContext state context of the view the builder
+     is to provide widgets for.
+ */
+void HsBaseViewState::initialize(HsMenuViewBuilder &menuViewBuilder,
+    HsStateContext stateContext)
+{
+    mMenuView.reset(new HsMenuView(menuViewBuilder, stateContext, mMainWindow));
+    mMenuView->view()->setNavigationAction(mBackKeyAction);
+    mMenuView->view()->setMenu(mViewOptions);
+
+    connect(this, SIGNAL(entered()),SLOT(stateEntered()));
+    connect(this, SIGNAL(exited()),SLOT(stateExited()));
 }
 
 /*!
  Creates and open application launch fail message.
  \param errorCode eroor code to display.
+ \param itemId id of the launched item.
  */
-void HsBaseViewState::createApplicationLaunchFailMessage(int errorCode,int itemId)
+void HsBaseViewState::createApplicationLaunchFailMessage(int errorCode,
+    int itemId)
 {
     QString message;
     message.append(
         HbParameterLengthLimiter("txt_applib_info_launching_the_application_failed").arg(
             errorCode));
-    
-    mMessageRelatedItemId = itemId;
 
     // create and show message box
-    mApplicationLaunchFailMessage = new HbMessageBox(HbMessageBox::MessageTypeInformation);
-    mApplicationLaunchFailMessage->setAttribute(Qt::WA_DeleteOnClose);
-
-    mApplicationLaunchFailMessage->setText(message);
+    mApplicationLaunchFailMessage = HsMenuDialogFactory().create(
+            message, HsMenuDialogFactory::Close);
 
-    mApplicationLaunchFailMessage->clearActions();
-    HbAction *mClosemAction = new HbAction(hbTrId("txt_common_button_close"),
-        mApplicationLaunchFailMessage);
-    mApplicationLaunchFailMessage->addAction(mClosemAction);
+    QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+        new HsMenuEntryRemovedHandler(itemId, mApplicationLaunchFailMessage.data(), SLOT(close())));
 
-    mApplicationLaunchFailMessage->open(this, SLOT(applicationLaunchFailMessageFinished(HbAction*)));
-    
-    subscribeForMemoryCardRemove();
+    entryObserver.take()->setParent(mApplicationLaunchFailMessage.data());
+
+    mApplicationLaunchFailMessage->open();
 }
 
 /*!
- Subscribe for memory card remove.
+ Slot invoked when a state is entered.
  */
-void HsBaseViewState::subscribeForMemoryCardRemove()
-{
-    if (mMessageRelatedItemId !=0 ) {
-        CaNotifierFilter filter;
-        filter.setIds(QList<int>() << mMessageRelatedItemId);
-        mNotifier = CaService::instance()->createNotifier(filter);
-        mNotifier->setParent(this);
-        connect(mNotifier,
-            SIGNAL(entryChanged(CaEntry,ChangeType)),
-            SLOT(cleanUpApplicationLaunchFailMessage()));
-    }
-}
-
-/*!
- Clean up application launch fail message box.
- \retval void
- */
-void HsBaseViewState::cleanUpApplicationLaunchFailMessage()
+void HsBaseViewState::stateEntered()
 {
-    if (mApplicationLaunchFailMessage) {
-        mApplicationLaunchFailMessage->close();
-        mApplicationLaunchFailMessage = NULL;
-    }
-    if (mNotifier) {
-        delete mNotifier;
-        mNotifier = NULL;
-    }
-    mMessageRelatedItemId = 0;
-}
-
-/*!
- Action after closed application launch fail dialog.
- \param finishedAction chosen action.
- \retval void
- */
-void HsBaseViewState::applicationLaunchFailMessageFinished(HbAction*)
-{
-    mApplicationLaunchFailMessage = NULL;
-    cleanUpApplicationLaunchFailMessage();
+    qDebug("HsBaseViewState::stateEntered()");
+    HSMENUTEST_FUNC_ENTRY("HsBaseViewState::stateEntered");
+    mMenuView->activate();
+    connect(mMenuView.data(), SIGNAL(listViewChange()),
+            this, SLOT(closeContextMenu()));
+    HSMENUTEST_FUNC_EXIT("HsBaseViewState::stateEntered");
 }
 
 /*!
@@ -121,13 +139,206 @@
 void HsBaseViewState::stateExited()
 {
     HSMENUTEST_FUNC_ENTRY("HsBaseViewState::stateExited");
-    cleanUpApplicationLaunchFailMessage();
+
+    mMenuView->hideSearchPanel();
+    mMenuView->disconnect(this);
+
+    mMenuView->inactivate();
+    if (!mApplicationLaunchFailMessage.isNull()) {
+        mApplicationLaunchFailMessage->close();
+    }
+    closeContextMenu();
     HSMENUTEST_FUNC_EXIT("HsBaseViewState::stateExited");
 }
 
 /*!
+ Add mode entered.
+ */
+void HsBaseViewState::addModeEntered()
+{
+    mViewOptions = mMenuView->view()->takeMenu();
+    connect(mMenuView.data(),
+            SIGNAL(activated(QModelIndex)),
+            SLOT(addActivated(QModelIndex)));
+    connect(mMenuView.data(),
+            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
+            SLOT(addLongPressed(HbAbstractViewItem *, QPointF)));
+}
+
+/*!
+ Add mode exited.
+ */
+void HsBaseViewState::addModeExited()
+{
+    mMenuView->view()->setMenu(mViewOptions);
+}
+
+/*!
+ Slot invoked when normal mode entered.
+ */
+void HsBaseViewState::normalModeEntered()
+{
+    setMenuOptions();
+    connect(mMenuView.data(),
+            SIGNAL(activated(QModelIndex)),
+            mMenuView.data(),
+            SLOT(hideSearchPanel()));
+    connect(mMenuView.data(),
+            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
+            SLOT(showContextMenu(HbAbstractViewItem *, QPointF)));
+}
+
+/*!
  Destructor.
  */
 HsBaseViewState::~HsBaseViewState()
 {
+    delete mModel;
+	mViewOptions = mMenuView->view()->takeMenu();
+	delete mViewOptions;
 }
+
+/*!
+ Slot connected to List widget in normal mode.
+ \param index Model index of the activated item.
+ */
+void HsBaseViewState::launchItem(const QModelIndex &index)
+{
+    HSMENUTEST_FUNC_ENTRY("HsBaseViewState::launchItem");
+
+    QSharedPointer<const CaEntry> entry = mModel->entry(index);
+    if (!entry.isNull() && !(entry->flags() & UninstallEntryFlag)) {
+        if (entry->entryTypeName() == widgetTypeName()) {
+            machine()->postEvent(HsMenuEventFactory::createPreviewHSWidgetEvent(entry->id(),
+                entry->entryTypeName(), entry->attribute(widgetUriAttributeName()),
+                entry->attribute(widgetLibraryAttributeName())));
+            HsMenuService::touch(entry->id());
+        }
+        else {
+            int errCode = HsMenuService::executeAction(entry->id());
+            if (errCode != 0) {
+                createApplicationLaunchFailMessage(errCode, entry->id());
+            }
+        }
+    }
+    HSMENUTEST_FUNC_EXIT("HsBaseViewState::launchItem");
+}
+
+/*!
+ Slot connected to List widget in normal mode.
+ \param index Model index of the activated item.
+ */
+void HsBaseViewState::openCollection(const QModelIndex &index)
+{
+    HSMENUTEST_FUNC_ENTRY("HsBaseViewState::openCollection");
+    QVariant data = mModel->data(index, CaItemModel::IdRole);
+    int id = data.toInt();
+    QString collectionType = mModel->data(
+            index, CaItemModel::TypeRole).toString();
+    qDebug("HsBaseViewState::openCollection - MCS ID: %d", data.toInt());
+
+    machine()->postEvent(
+            HsMenuEventFactory::createOpenCollectionFromAppLibraryEvent(
+                    id, collectionType));
+    HSMENUTEST_FUNC_EXIT("HsBaseViewState::openCollection");
+}
+
+/*!
+ Slot connected to List widget in normal mode.
+ \param index Model index of the activated item.
+ */
+void HsBaseViewState::showContextMenu(HbAbstractViewItem *item, const QPointF &coords)
+{
+    HSMENUTEST_FUNC_ENTRY("HsBaseViewState::showContextMenu");
+
+    EntryFlags flags = item->modelIndex().data(
+            CaItemModel::FlagsRole).value<EntryFlags> ();
+
+    if (!(flags & UninstallEntryFlag)) {
+        mContextMenu = new HbMenu;
+        setContextMenuOptions(item,flags);
+        mContextModelIndex = item->modelIndex();
+        mContextMenu->setPreferredPos(coords);
+        mContextMenu->setAttribute(Qt::WA_DeleteOnClose);
+        mContextMenu->open(this, SLOT(contextMenuAction(HbAction*)));
+    }
+    HSMENUTEST_FUNC_EXIT("HsBaseViewState::showContextMenu");
+
+}
+
+/*!
+ Open task switcher.
+ \retval true if operation is successful.
+ */
+bool HsBaseViewState::openTaskSwitcher()
+{
+    return HsMenuService::launchTaskSwitcher();
+}
+
+/*!
+ Menu softkey back action slot
+ */
+void HsBaseViewState::openAppLibrary()
+{
+    machine()->postEvent(HsMenuEventFactory::createOpenAppLibraryEvent());
+}
+
+/*!
+ Check software updates.
+ \retval 0 if operation is successful.
+ */
+int HsBaseViewState::checkSoftwareUpdates()
+{
+    int errCode = HsMenuService::launchSoftwareUpdate();
+    if (errCode != 0){
+        createApplicationLaunchFailMessage(errCode,0);
+    }
+    return errCode;
+}
+
+/*!
+ close context menu
+ */
+void HsBaseViewState::closeContextMenu()
+{
+    if (mContextMenu) {
+        mContextMenu->close();
+    }    
+}
+/*!
+ Scrolls view to first item at top
+ */
+void HsBaseViewState::scrollToBeginning()
+{
+    mMenuView->listView()->scrollTo(
+            mModel->index(0), HbAbstractItemView::PositionAtTop);
+}
+
+/*!
+ Normal mode exited dummy implementation.
+ */
+void HsBaseViewState::normalModeExited()
+{
+}
+
+/*!
+ Defines transitions
+ */
+void HsBaseViewState::defineTransitions()
+{
+    QState *initialState = new QState(this);
+    setInitialState(initialState);
+
+    QState *addModeState = new QState(this);
+    connect(addModeState, SIGNAL(entered()),SLOT(addModeEntered()));
+    connect(addModeState, SIGNAL(exited()),SLOT(addModeExited()));
+
+    QState *normalModeState = new QState(this);
+    connect(normalModeState, SIGNAL(entered()),SLOT(normalModeEntered()));
+    connect(normalModeState, SIGNAL(exited()),SLOT(normalModeExited()));
+
+    initialState->addTransition(new HsMenuModeTransition(
+            *mMenuMode, NormalHsMenuMode, normalModeState));
+    initialState->addTransition(new HsMenuModeTransition(
+            *mMenuMode, AddHsMenuMode, addModeState));
+}
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hscollectionstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,30 +15,28 @@
  *
  */
 
-#include <qstatemachine.h>
-
+#include <QStateMachine>
+#include <HbAction>
+#include <HbView>
 #include <HbGroupBox>
 #include <HbListView>
 #include <HbPushButton>
-#include <hbview.h>
-#include <hbaction.h>
-#include <hbabstractviewitem.h>
-#include <hsmenueventfactory.h>
-#include <hbmenu.h>
-#include <hbinstance.h>
-#include <hbsearchpanel.h>
+#include <HbAbstractViewItem>
+#include <HbMenu>
 
+#include <cadefs.h>
+#include <caentry.h>
+#include <caitemmodel.h>
+
+#include "hsapp_defs.h"
 #include "hsmenuevent.h"
+#include "hsmenueventfactory.h"
 #include "hsmenuservice.h"
 #include "hsmenumodewrapper.h"
 #include "hsmenuitemmodel.h"
-#include "hsmenuviewbuilder.h"
-#include "cadefs.h"
-#include "caentry.h"
 #include "hscollectionstate.h"
 #include "hsaddappstocollectionstate.h"
-#include "hsapp_defs.h"
-#include "hsmainwindow.h"
+#include "hsapplibstateutils.h"
 
 /*!
  \class HsCollectionState
@@ -55,11 +53,6 @@
  */
 
 /*!
- \var HsCollectionState::mCollectionsSortAttribute
- All collections sort order.
- */
-
-/*!
  \var HsCollectionState::mCollectionId
  The id of the current collection.
  */
@@ -69,35 +62,6 @@
  The type of the current collection.
  */
 
-/*!
- \var HsCollectionState::mMenuView
- The List View widget.
- */
-
-/*!
- \var HsCollectionState::mSecondarySoftkeyAction
- Secondary Softkey action.
- Backstepping functionality.
- Own.
- */
-
-/*!
- \var HsCollectionState::mOldNavigationAction
- Old navigation icon.
- Not own.
- */
-
-/*!
- \var HsCollectionState::mCollectionModel
- Item Model for the List.
- Own.
- */
-
-/*!
- \var HsCollectionState::mOptions
- Options menu.
- Own.
- */
 
 /*!
   \fn void HsCollectionState::sortOrderChanged(SHsSortAttribute sortOrder);
@@ -114,24 +78,19 @@
 /*!
  Constructor.
  \param menuViewBuilder Menu view builder.
- \param menuMode reference to object representing menu mode (add mode on/add mode off).
+ \param menuMode menu mode object (add mode on/add mode off).
+ \param mainWindow main window wrapper.
  \param parent Owner.
 */
 HsCollectionState::HsCollectionState(HsMenuViewBuilder &menuViewBuilder,
                                      HsMenuModeWrapper &menuMode,
                                      HsMainWindow &mainWindow,
                                      QState *parent) :
-    HsBaseViewState(parent),
+    HsBaseViewState(mainWindow, menuMode, parent),
     mSortAttribute(LatestOnTopHsSortAttribute),
-    mCollectionsSortAttribute(CustomHsSortAttribute),
-    mCollectionId(-1),
-    mMenuView(menuViewBuilder, HsCollectionContext),
-    mMenuMode(menuMode),
-    mSecondarySoftkeyAction(new HbAction(Hb::BackNaviAction, this)),
-    mCollectionModel(0),
-    mOptions(0), mContextModelIndex(), mContextMenu(0),
-    mMainWindow(mainWindow)
+    mCollectionId(-1)
 {
+    initialize(menuViewBuilder, HsCollectionContext);
     construct();
 }
 
@@ -146,13 +105,6 @@
         parent() != 0 ? parent()->objectName() : QString("");
     setObjectName(parentName + "/collectionstate");
 
-    connect(this, SIGNAL(entered()),SLOT(stateEntered()));
-    connect(this, SIGNAL(exited()),SLOT(stateExited()));
-    
-    mMenuView.collectionButton()->setCheckable(true);   
-    makeConnect();
-    mMenuView.view()->setNavigationAction(mSecondarySoftkeyAction);
-
     HSMENUTEST_FUNC_EXIT("HsCollectionState::construct");
 }
 
@@ -161,11 +113,8 @@
  */
 HsCollectionState::~HsCollectionState()
 {
-    makeDisconnect();
-    mMenuView.inactivate();
-    mMenuView.setModel(NULL);
-    mMenuView.view()->setNavigationAction(NULL);
-    delete mCollectionModel;
+    mMenuView->inactivate();
+    mMenuView->view()->setNavigationAction(NULL);
 }
 
 
@@ -192,101 +141,89 @@
 /*!
  Slot invoked when a state is entered.
  */
-
-
 void HsCollectionState::stateEntered()
 {
     HSMENUTEST_FUNC_ENTRY("HsCollectionState::stateEntered");
-
-    mMainWindow.setCurrentView(mMenuView);
-    mMenuView.activate();
-
-    if (!mCollectionModel) {
-        mCollectionModel =
+    if (!mModel) {
+        mModel =
             HsMenuService::getCollectionModel(
                 mCollectionId, mSortAttribute, mCollectionType);
     }
-    
-    EntryFlags flags =
-        mCollectionModel->root().data(CaItemModel::FlagsRole).value<
-        EntryFlags> ();
+
+    handleEmptyChange(mModel->rowCount() == 0);
 
-    if (mCollectionModel->rowCount() == 0){
-        if (flags & RemovableEntryFlag){
-            mMenuView.setContext(HsCollectionContext,HsButtonContext);
-        } else {
-            mMenuView.setContext(HsCollectionContext,HsEmptyLabelContext);
-        }
-        mMenuView.disableSearch(true);
-    } else {
-        mMenuView.setContext(HsCollectionContext,HsItemViewContext);
-        mMenuView.disableSearch(false);
-    }
+    makeConnect();
+    
+    mMenuView->viewLabel()->setHeading(
+        mModel->root().data(CaItemModel::CollectionTitleRole).toString());
+
+    HsBaseViewState::stateEntered();
+    HSMENUTEST_FUNC_EXIT("HsCollectionState::stateEntered");
+}
 
-    connect(mCollectionModel, SIGNAL(modelReset()), SLOT(updateLabel()));
-    connect(mCollectionModel, SIGNAL(empty(bool)),this,
-            SLOT(handleEmptyChange(bool)));
-    connect(mCollectionModel, SIGNAL(empty(bool)),this,
-            SLOT(lockSearchButton(bool)));
-
-    mMenuView.setModel(mCollectionModel);
+/*!
+ Creates and installs menu options for the view
+ */
+void HsCollectionState::setMenuOptions()
+{
+    HSMENUTEST_FUNC_ENTRY("HsAllCollectionsState::setMenuOptions");
 
-    mMenuView.listView()->scrollTo(
-        mCollectionModel->index(0), HbAbstractItemView::PositionAtTop);
+    EntryFlags flags =
+        mModel->root().data(CaItemModel::FlagsRole).value<EntryFlags> ();
 
-    mMenuView.viewLabel()->setHeading(
-        mCollectionModel->root().data(Qt::DisplayRole).toString());
+    mViewOptions->clearActions();
 
-    if (!mOptions) {
-        mOptions = new HbMenu();
-        mOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
-                            this,
+    mViewOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
+                            static_cast<HsBaseViewState*>(this),
                             SLOT(openTaskSwitcher()));
 
-        if (flags & RemovableEntryFlag) {
-            mOptions->addAction(hbTrId("txt_applib_opt_add_content"), this,
-                                SLOT(addAppsAction()));
-        }
-
-        mOptions->addAction(hbTrId("txt_applib_opt_add_to_home_screen"),
-                            this, SLOT(addCollectionShortcutToHomeScreenAction()));
+    if (flags & RemovableEntryFlag) {
+        mViewOptions->addAction(hbTrId("txt_applib_opt_add_content"), this,
+                            SLOT(addAppsAction()));
+    }
 
-        if (flags & RemovableEntryFlag) {
-            mOptions->addAction(
-                hbTrId("txt_common_opt_rename_item"),
+    mViewOptions->addAction(hbTrId("txt_applib_opt_add_to_home_screen"),
+                        this, SLOT(addCollectionShortcutToHomeScreenAction()));
+
+    if (flags & RemovableEntryFlag) {
+        if (mModel->rowCount() > 0) {
+            mViewOptions->addAction(
+                hbTrId("txt_applib_opt_arrange"),
                 this,
-                SLOT(renameAction()));
-            mOptions->addAction(
-                hbTrId("txt_common_opt_delete"),
-                this,
-                SLOT(deleteAction()));
+                SLOT(createArrangeCollection()));
         }
-        if (mCollectionType == collectionDownloadedTypeName()) {
-            HbMenu *sortMenu = mOptions->addMenu(
-                                   hbTrId("txt_applib_opt_sort_by"));
-            //Grouped options are exclusive by default.
-            QActionGroup *sortGroup = new QActionGroup(mOptions);
-            sortGroup->addAction(
-                sortMenu->addAction(
-                    hbTrId("txt_applib_opt_sort_by_sub_latest_on_top"),
-                    this,
-                    SLOT(latestOnTopMenuAction())));
-            sortGroup->addAction(
-                sortMenu->addAction(
-                    hbTrId("txt_applib_opt_sort_by_sub_oldest_on_top"),
-                    this,
-                    SLOT(oldestOnTopMenuAction())));
-            foreach(QAction *action, sortMenu->actions()) {
-                action->setCheckable(true);
-            }
-            static const int defaultSortingPosition = 0;
-            sortGroup->actions().at(defaultSortingPosition)->setChecked(true);
+        mViewOptions->addAction(
+            hbTrId("txt_common_opt_rename_item"),
+            this,
+            SLOT(renameAction()));
+        mViewOptions->addAction(
+            hbTrId("txt_common_opt_delete"),
+            this,
+            SLOT(deleteAction()));
+    }
+    if (mCollectionType == collectionDownloadedTypeName()) {
+        HbMenu *sortMenu = mViewOptions->addMenu(
+                               hbTrId("txt_applib_opt_sort_by"));
+        //Grouped options are exclusive by default.
+        QActionGroup *sortGroup = new QActionGroup(this);
+        sortGroup->addAction(
+            sortMenu->addAction(
+                hbTrId("txt_applib_opt_sort_by_sub_latest_on_top"),
+                this,
+                SLOT(latestOnTopMenuAction())));
+        sortGroup->addAction(
+            sortMenu->addAction(
+                hbTrId("txt_applib_opt_sort_by_sub_oldest_on_top"),
+                this,
+                SLOT(oldestOnTopMenuAction())));
+        foreach(QAction *action, sortMenu->actions()) {
+            action->setCheckable(true);
         }
-
-        mOptions->setParent(this);
-        mMenuView.view()->setMenu(mOptions);
+        static const int defaultSortingPosition = 0;
+        sortGroup->actions().at(defaultSortingPosition)->setChecked(true);
     }
-    HSMENUTEST_FUNC_EXIT("HsCollectionState::stateEntered");
+    mMenuView->view()->setMenu(mViewOptions);
+    HSMENUTEST_FUNC_EXIT("HsAllCollectionsState::setMenuOptions");
 }
 
 /*!
@@ -295,29 +232,15 @@
 void HsCollectionState::stateExited()
 {
     HSMENUTEST_FUNC_ENTRY("HsCollectionState::stateExited");
-
-    mMenuView.inactivate();
-    mMenuView.setSearchPanelVisible(false);
-    mMenuView.disableSearch(false);
-    disconnect(mCollectionModel, SIGNAL(empty(bool)),this,
-               SLOT(handleEmptyChange(bool)));
-
-    disconnect(mCollectionModel, SIGNAL(empty(bool)),this,
-               SLOT(lockSearchButton(bool)));
+    mMenuView->disableSearch(false);
+    makeDisconnect();
 
-    disconnect(mCollectionModel, SIGNAL(modelReset()),
-                   this, SLOT(updateLabel()));
-    delete mCollectionModel;
-    mCollectionModel = NULL;
-    mOptions->close();
-    delete mOptions;
-    mOptions = NULL;
-    if (mContextMenu)
-        mContextMenu->close();
+    delete mModel;
+    mModel = NULL;
     this->mSortAttribute = NoHsSortAttribute;
-    
+
     HsBaseViewState::stateExited();
-    
+
     HSMENUTEST_FUNC_EXIT("HsCollectionState::stateExited");
     qDebug("CollectionState::stateExited()");
 }
@@ -327,16 +250,25 @@
  */
 void HsCollectionState::makeConnect()
 {
-    connect(mSecondarySoftkeyAction, SIGNAL(triggered()),
-            SLOT(backSteppingAction()));
-    connect(&mMenuView,
+    connect(mBackKeyAction, SIGNAL(triggered()),
+            static_cast<HsBaseViewState*>(this), SLOT(openAppLibrary()));
+    connect(mMenuView.data(),
+            SIGNAL(activated(QModelIndex)),
+            static_cast<HsBaseViewState*>(this),
+            SLOT(launchItem(QModelIndex)));
+    connect(mMenuView.data(),
             SIGNAL(activated(QModelIndex)),
-            SLOT(listItemActivated(QModelIndex)));
-    connect(&mMenuView,
+            mMenuView.data(),
+            SLOT(hideSearchPanel()));
+    connect(mMenuView.data(),
             SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF)));
-    connect(mMenuView.collectionButton(),
-            SIGNAL(toggled(bool)), this, SLOT(addAppsAction(bool)));
+            static_cast<HsBaseViewState*>(this),
+            SLOT(showContextMenu(HbAbstractViewItem *, QPointF)));
+    connect(mModel, SIGNAL(modelReset()), SLOT(updateLabel()));
+    connect(mModel, SIGNAL(empty(bool)),this,
+            SLOT(handleEmptyChange(bool)));
+    connect(mModel, SIGNAL(empty(bool)),this,
+            SLOT(lockSearchButton(bool)));
 }
 
 /*!
@@ -344,130 +276,29 @@
  */
 void HsCollectionState::makeDisconnect()
 {
-    disconnect(mMenuView.collectionButton(),
-            SIGNAL(toggled(bool)), this, SLOT(addAppsAction(bool)));
-
-    disconnect(mSecondarySoftkeyAction, SIGNAL(triggered()),
-               this, SLOT(backSteppingAction()));
-
-    disconnect(&mMenuView,
-               SIGNAL(activated(QModelIndex)),
-               this, SLOT(listItemActivated(QModelIndex)));
-
-    disconnect(&mMenuView,
-               SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-               this, SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF)));
-}
-
-/*!
- Open task switcher.
- \retval true if operation is successful.
- */
-bool HsCollectionState::openTaskSwitcher()
-{
-    return HsMenuService::launchTaskSwitcher();
-}
-
-/*!
- Slot connected to List widget.
- \param index Model index of the activated item.
- */
-void HsCollectionState::listItemActivated(const QModelIndex &index)
-{
-    HSMENUTEST_FUNC_ENTRY("HsCollectionState::listItemActivated");
-
-    QSharedPointer<const CaEntry> entry = mCollectionModel->entry(index);
-
-    if (entry->entryTypeName() == widgetTypeName()) {
-        EntryFlags flags = index.data(CaItemModel::FlagsRole).value<
-                               EntryFlags> ();
-        if (!(flags & UninstallEntryFlag)) {
-            machine()->postEvent(
-                HsMenuEventFactory::createPreviewHSWidgetEvent(
-                    entry->id(), entry->entryTypeName(), entry->attribute(
-                        widgetUriAttributeName()), entry->attribute(
-                        widgetLibraryAttributeName())));
-
-            const int itemId = index.data(CaItemModel::IdRole).toInt();
-            HsMenuService::touch(itemId);
-        }
-    } else {
-        QVariant data = mCollectionModel->data(index, CaItemModel::IdRole);
-        int errCode = HsMenuService::executeAction(data.toInt());
-        if (errCode != 0) {
-            createApplicationLaunchFailMessage(errCode,index.data(CaItemModel::IdRole).toInt());
-        }
-    }
-
-    mMenuView.setSearchPanelVisible(false);
-    HSMENUTEST_FUNC_EXIT("HsCollectionState::listItemActivated");
-}
+    disconnect(mBackKeyAction, SIGNAL(triggered()),
+               static_cast<HsBaseViewState*>(this), SLOT(openAppLibrary()));
 
-/*!
- Handles long-item-pressed event in all apps view by showing context menu
- \param item the event pertains to
- \param coords press point coordinates.
- \retval void
- */
-void HsCollectionState::listItemLongPressed(HbAbstractViewItem *item,
-        const QPointF &coords)
-{
-    HSMENUTEST_FUNC_ENTRY("HsCollectionState::listItemLongPressed");
-
-    EntryFlags flags = item->modelIndex().data(CaItemModel::FlagsRole).value<
-                       EntryFlags> ();
-
-    if (!(flags & UninstallEntryFlag)) {
-        // create context menu
-        mContextMenu = new HbMenu();
+    disconnect(mMenuView.data(),
+               SIGNAL(activated(QModelIndex)),
+               static_cast<HsBaseViewState*>(this),
+               SLOT(launchItem(QModelIndex)));
+    disconnect(mMenuView.data(),
+            SIGNAL(activated(QModelIndex)),
+            mMenuView.data(),
+            SLOT(hideSearchPanel()));
+    disconnect(mMenuView.data(),
+               SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
+               static_cast<HsBaseViewState*>(this),
+               SLOT(showContextMenu(HbAbstractViewItem *, QPointF)));
+    disconnect(mModel, SIGNAL(empty(bool)),this,
+               SLOT(handleEmptyChange(bool)));
 
-        HbAction *addShortcutAction = mContextMenu->addAction(hbTrId(
-                                          "txt_applib_menu_add_to_home_screen"));
-        addShortcutAction->setData(AddToHomeScreenContextAction);
-        HbAction *addToCollection = mContextMenu->addAction(hbTrId(
-                                        "txt_applib_menu_add_to_collection"));
-        addToCollection->setData(AddToCollectionContextAction);
-        HbAction *removeAction(NULL);
-        HbAction *uninstallAction(NULL);
-        HbAction *appSettingsAction(NULL);
-        HbAction *appDetailsAction(NULL);
-        // we do not add remove option in locked collection
-        // check conditions and hide irrelevant menu items
-        EntryFlags rootFlags =
-            mCollectionModel->root().data(CaItemModel::FlagsRole).value<
-            EntryFlags> ();
-
-        if (rootFlags & RemovableEntryFlag) {
-            removeAction = mContextMenu->addAction(
-                               hbTrId("txt_applib_menu_remove_from_collection"));
-            removeAction->setData(RemoveFromCollectionContextAction);
-        }
+    disconnect(mModel, SIGNAL(empty(bool)),this,
+               SLOT(lockSearchButton(bool)));
 
-        if ((flags & RemovableEntryFlag)) {
-            uninstallAction = mContextMenu->addAction(hbTrId("txt_common_menu_delete"));
-            uninstallAction->setData(UninstallContextAction);
-        }
-        QSharedPointer<const CaEntry> entry = mCollectionModel->entry(item->modelIndex());
-
-        if (!(entry->attribute(appSettingsPlugin()).isEmpty())) {
-            appSettingsAction = mContextMenu->addAction(hbTrId(
-                                                    "txt_common_menu_settings"));
-            appSettingsAction->setData(AppSettingContextAction);
-        }
-    
-        if (!(entry->attribute(componentIdAttributeName()).isEmpty()) &&
-                (flags & RemovableEntryFlag) ) {
-            appDetailsAction = mContextMenu->addAction(hbTrId(
-                                                    "txt_common_menu_details"));
-            appDetailsAction->setData(AppDetailsContextAction);
-        }
-        mContextModelIndex = item->modelIndex();
-        mContextMenu->setPreferredPos(coords);
-        mContextMenu->setAttribute(Qt::WA_DeleteOnClose);
-        mContextMenu->open(this, SLOT(contextMenuAction(HbAction*)));
-    }
-
-    HSMENUTEST_FUNC_EXIT("HsCollectionState::listItemLongPressed");
+    disconnect(mModel, SIGNAL(modelReset()),
+                   this, SLOT(updateLabel()));
 }
 
 /*!
@@ -475,7 +306,7 @@
  */
 void HsCollectionState::contextMenuAction(HbAction *action)
 {
-    HsContextAction command = 
+    HsContextAction command =
         static_cast<HsContextAction>(action->data().toInt());
 
     const int itemId = mContextModelIndex.data(CaItemModel::IdRole).toInt();
@@ -486,8 +317,8 @@
             break;
         case AddToCollectionContextAction:
             machine()->postEvent(
-                HsMenuEventFactory::createAddAppsFromCallectionViewEvent(
-                    mCollectionId, itemId, mCollectionsSortAttribute));
+                HsMenuEventFactory::createAddAppsFromCollectionViewEvent(
+                    mCollectionId, itemId));
             break;
         case UninstallContextAction:
             machine()->postEvent(
@@ -499,66 +330,88 @@
                 HsMenuEventFactory::createRemoveAppFromCollectionEvent(
                     itemId, mCollectionId));
             break;
-        case AppSettingContextAction: 
+        case AppSettingContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createAppSettingsViewEvent(itemId));
             break;
-        case AppDetailsContextAction: 
+        case AppDetailsContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createAppDetailsViewEvent(itemId));
-            break;                 
+            break;
+        case OpenContextAction:
+            launchItem(mContextModelIndex);
+            break;
         default:
             break;
     }
-                                    
-    mMenuView.setSearchPanelVisible(false);
+
+    mMenuView->hideSearchPanel();
 }
 
 /*!
- Handles button visibility
-  \param empty if true set empty text label or button to add entries to collection
+ Handler to be called when model becomes not empty or model becomes empty.
+  \param empty \a true when model becomes empty \a false otherwise.
  */
 void HsCollectionState::handleEmptyChange(bool empty)
 {
+
     EntryFlags flags =
-        mCollectionModel->root().data(CaItemModel::FlagsRole).value<
+        mModel->root().data(CaItemModel::FlagsRole).value<
         EntryFlags> ();
 
     if (empty){
         if (flags & RemovableEntryFlag){
-            mMenuView.setContext(HsCollectionContext,HsButtonContext);
+            mMenuView->reset(HsButtonContext);
+            connect(mMenuView->contentButton(),
+                    SIGNAL(toggled(bool)), this, SLOT(addAppsAction(bool)),
+                    Qt::UniqueConnection);
         } else {
-            mMenuView.setContext(HsCollectionContext,HsEmptyLabelContext);
+            mMenuView->reset(HsEmptyLabelContext);
         }
+
     } else {
-        mMenuView.setContext(HsCollectionContext,HsItemViewContext);
+        mMenuView->reset(HsItemViewContext);
+        mMenuView->setModel(mModel);
+        mMenuView->listView()->scrollTo(
+            mModel->index(0), HbAbstractItemView::PositionAtTop);
     }
+	
+    mMenuView->disableSearch(empty);
+    
+    mMenuView->activate();
+
+    setMenuOptions();
 }
 
 
 /*!
- Handles lock serch button
-  \param lock if true lock search button
+ Handles lock search button
+  \param lock if true lock search button.
  */
 void HsCollectionState::lockSearchButton(bool lock)
 {
-    mMenuView.disableSearch(lock);
+    mMenuView->disableSearch(lock);
 }
 
 
 /*!
  Menu add applications action slot
-   \param addApps if true create event for add enties to collection. Parametr use by toggled from HbPushButton
+   \param addApps if true create event for add enties to collection.
+   Parametr use by toggled from HbPushButton
  */
 void HsCollectionState::addAppsAction(bool addApps)
 {
     // Add applications
     if (addApps) {
-        mMenuView.collectionButton()->setChecked(false);
+
+        if (mMenuView->contentButton()) {
+            mMenuView->contentButton()->setChecked(false);
+        }
+
         machine()->postEvent(
-            HsMenuEventFactory::createAddAppsFromCallectionViewEvent(
+            HsMenuEventFactory::createAddAppsFromCollectionViewEvent(
                 mCollectionId));
-    }    
+    }
 }
 
 /*!
@@ -567,8 +420,8 @@
 void HsCollectionState::addCollectionShortcutToHomeScreenAction()
 {
     machine()->postEvent(HsMenuEventFactory::createAddToHomeScreenEvent(
-                             mCollectionId, mMenuMode.getHsMenuMode(), 
-                             mMenuMode.getHsToken()));
+                             mCollectionId, mMenuMode->getHsMenuMode(),
+                             mMenuMode->getHsToken()));
 }
 
 /*!
@@ -590,40 +443,85 @@
 }
 
 /*!
- Menu softkey back action slot
- */
-void HsCollectionState::backSteppingAction()
-{
-    machine()->postEvent(HsMenuEventFactory::createOpenAppLibraryEvent());
-}
-
-/*!
  Updates label
  */
 void HsCollectionState::updateLabel()
 {
     HSMENUTEST_FUNC_ENTRY("HsCollectionState::updateLabel");
-    if (mCollectionModel) {
-        mMenuView.viewLabel()->setHeading(
-            mCollectionModel->root().data(Qt::DisplayRole).toString());
+    if (mModel) {
+        mMenuView->viewLabel()->setHeading(
+            mModel->root().data(Qt::DisplayRole).toString());
     }
     HSMENUTEST_FUNC_EXIT("HsCollectionState::updateLabel");
 }
 
 /*!
   Triggers event so that a state adding to Home Screen is reached
-  \param index of an item to be added to homescreen
+  \param index of an item to be added to homescreen.
   \retval void
  */
 void HsCollectionState::addElementToHomeScreen(const QModelIndex &index)
 {
-    QSharedPointer<const CaEntry> entry = mCollectionModel->entry(index);
+    QSharedPointer<const CaEntry> entry = mModel->entry(index);
 
     QMap<QString, QString> attributes = entry->attributes();
 
     machine()->postEvent(
         HsMenuEventFactory::createAddToHomeScreenEvent(
-            entry->id(), mMenuMode.getHsMenuMode(), mMenuMode.getHsToken()));
+            entry->id(), mMenuMode->getHsMenuMode(), mMenuMode->getHsToken()));
+}
+
+/*!
+ Method setting context menu options.
+ */
+void HsCollectionState::setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags)
+{
+    HbAction *openAction = mContextMenu->addAction(hbTrId(
+        "txt_common_menu_open"));
+    openAction->setData(OpenContextAction);
+    HbAction *addToHomeScreenAction = mContextMenu->addAction(hbTrId(
+        "txt_applib_menu_add_to_home_screen"));
+    addToHomeScreenAction->setData(AddToHomeScreenContextAction);
+    HbAction *addToCollection = mContextMenu->addAction(hbTrId(
+        "txt_applib_menu_add_to_collection"));
+    addToCollection->setData(AddToCollectionContextAction);
+    HbAction *removeAction(NULL);
+    HbAction *uninstallAction(NULL);
+    HbAction *appSettingsAction(NULL);
+    HbAction *appDetailsAction(NULL);
+    // we do not add remove option in locked collection
+    // check conditions and hide irrelevant menu items
+    EntryFlags rootFlags =
+        mModel->root().data(CaItemModel::FlagsRole).value<
+        EntryFlags> ();
+
+    if (rootFlags & RemovableEntryFlag) {
+        removeAction = mContextMenu->addAction(
+                           hbTrId("txt_applib_menu_remove_from_collection"));
+        removeAction->setData(RemoveFromCollectionContextAction);
+    }
+
+    if ((flags & RemovableEntryFlag)) {
+        uninstallAction = mContextMenu->addAction(hbTrId("txt_common_menu_delete"));
+        uninstallAction->setData(UninstallContextAction);
+    }
+    QSharedPointer<const CaEntry> entry = mModel->entry(item->modelIndex());
+
+    if (!(entry->attribute(appSettingsPlugin()).isEmpty())) {
+        appSettingsAction = mContextMenu->addAction(hbTrId(
+                                                "txt_common_menu_settings"));
+        appSettingsAction->setData(AppSettingContextAction);
+    }
+
+    if (!(entry->attribute(componentIdAttributeName()).isEmpty()) &&
+            (flags & RemovableEntryFlag) ) {
+        appDetailsAction = mContextMenu->addAction(hbTrId(
+                                                "txt_common_menu_details"));
+        appDetailsAction->setData(AppDetailsContextAction);
+    }
+    
+    addToHomeScreenAction->setVisible(
+        !HsAppLibStateUtils::isCWRTWidgetOnHomeScreen(entry.data()));
 }
 
 /*!
@@ -633,7 +531,7 @@
 void HsCollectionState::latestOnTopMenuAction()
 {
     mSortAttribute = LatestOnTopHsSortAttribute;
-    mCollectionModel->setSort(mSortAttribute);
+    mModel->setSort(mSortAttribute);
     emit sortOrderChanged(mSortAttribute);
 }
 
@@ -644,16 +542,31 @@
 void HsCollectionState::oldestOnTopMenuAction()
 {
     mSortAttribute = OldestOnTopHsSortAttribute;
-    mCollectionModel->setSort(mSortAttribute);
+    mModel->setSort(mSortAttribute);
     emit sortOrderChanged(mSortAttribute);
 }
 
 /*!
-  Slot for setting all collections sort order
-  \param sortOrder all collections sort order
+  A Slot called when an arrange operation
+  is invoked for a static collection.
  */
-void HsCollectionState::collectionsSortOrder(
-    HsSortAttribute sortOrder)
+void HsCollectionState::createArrangeCollection()
 {
-    mCollectionsSortAttribute = sortOrder;
+    // Arrange collection via the Arrange view
+    int topItemId(0);
+
+    if (mMenuView->listView() != NULL) {
+        const QList<HbAbstractViewItem *> array =
+            mMenuView->listView()->visibleItems();
+
+        if (array.count() >= 1) {
+            QModelIndex idx = array[0]->modelIndex();
+            topItemId = idx.data(CaItemModel::IdRole).toInt();
+        }
+    }
+
+    machine()->postEvent(
+        HsMenuEventFactory::createArrangeCollectionEvent(
+            topItemId,
+            mCollectionId));
 }
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsinstalledappsstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsinstalledappsstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,26 +15,23 @@
  *
  */
 
-#include <qstatemachine.h>
+#include <QStateMachine>
+#include <HbView>
 #include <HbGroupBox>
-#include <hbview.h>
-#include <hblistview.h>
-#include <hbaction.h>
-#include <hbmenu.h>
-#include <hbabstractviewitem.h>
-#include <hsmenueventfactory.h>
-#include <hbinstance.h>
+#include <HbListView>
+#include <HbAction>
+#include <HbMenu>
+#include <HbAbstractViewItem>
+
+#include <cadefs.h>
 #include <caentry.h>
-#include <hbsearchpanel.h>
 
+#include "hsapp_defs.h"
+#include "hsmenueventfactory.h"
 #include "hsmenuitemmodel.h"
-#include "hsmenuviewbuilder.h"
-#include "cadefs.h"
 #include "hsinstalledappsstate.h"
 #include "hsaddappstocollectionstate.h"
-#include "hsapp_defs.h"
 #include "hsmenumodetransition.h"
-#include "hsmainwindow.h"
 
 /*!
  \class HsInstalledAppsState
@@ -46,45 +43,17 @@
  */
 
 /*!
- \var HsInstalledAppsState::mMenuView
- The View widget.
- Own.
- */
-
-/*!
- \var HsInstalledAppsState::mInstalledAppsModel
- Item Model for the List.
- Own.
- */
-
-/*!
- \var HsInstalledAppsState::mSecondarySoftkeyAction
- Secondary Softkey action.
- Backstepping functionality.
- Own.
- */
-
-/*!
- \var HsInstalledAppsState::mOldNavigationAction
- Old navigation icon.
- Not own.
- */
-
-/*!
  Constructor.
  \param menuViewBuilder Menu view builder.
+ \param mainWindow main window wrapper.
  \param parent Owner.
  */
 HsInstalledAppsState::HsInstalledAppsState(HsMenuViewBuilder &menuViewBuilder,
         HsMainWindow &mainWindow,
         QState *parent):
-    HsBaseViewState(parent),
-    mMenuView(menuViewBuilder, HsInstalledAppsContext),
-    mInstalledAppsModel(0),
-    mSecondarySoftkeyAction(new HbAction(Hb::BackNaviAction, this)),
-    mMainWindow(mainWindow),
-    mContextModelIndex(),mContextMenu(0)
+    HsBaseViewState(mainWindow, parent)
 {
+    initialize(menuViewBuilder, HsInstalledAppsContext);
     construct();
 }
 
@@ -98,16 +67,8 @@
     const QString parentName =
         parent() != 0 ? parent()->objectName() : QString("");
     setObjectName(parentName + "/installedappsstate");
-    connect(this, SIGNAL(entered()),SLOT(stateEntered()));
-    connect(this, SIGNAL(exited()),SLOT(stateExited()));
 
-    connect(mSecondarySoftkeyAction, SIGNAL(triggered()),
-            SLOT(backAction()));
-    mMenuView.view()->
-    setNavigationAction(mSecondarySoftkeyAction);
-
-
-    setMenuOptions();
+    connect(mBackKeyAction, SIGNAL(triggered()), SLOT(openAppLibrary()));
 
     HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::construct");
 }
@@ -118,26 +79,48 @@
 void HsInstalledAppsState::setMenuOptions()
 {
     HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::setMenuOptions");
-    HbMenu *const mOptions = new HbMenu();
-    mOptions->setParent(this);
+
+    mViewOptions->clearActions();
 
-    mOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
+    mViewOptions->addAction(hbTrId("txt_applib_opt_task_switcher"),
                         this, SLOT(openTaskSwitcher()));
+    mViewOptions->addAction(hbTrId("txt_applib_opt_installation_log"),
+                        this, SLOT(openInstallationLog()));
 
-    mMenuView.view()->setMenu(mOptions);
+    mMenuView->view()->setMenu(mViewOptions);
     HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::setMenuOptions");
 }
 
 /*!
+ Method seting context menu options.
+ \param item the context menu is built for.
+ \param flags of the \item.
+ */
+void HsInstalledAppsState::setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags)
+{
+    HbAction *uninstallAction = mContextMenu->addAction(
+                                hbTrId("txt_common_menu_delete"));
+    HbAction *appDetailsAction(NULL);
+    uninstallAction->setData(UninstallContextAction);
+
+    QSharedPointer<const CaEntry> entry = mModel->entry(item->modelIndex());
+
+    if (!(entry->attribute(componentIdAttributeName()).isEmpty()) &&
+            (flags & RemovableEntryFlag) ) {
+        appDetailsAction = mContextMenu->addAction(hbTrId(
+                                                "txt_common_menu_details"));
+        appDetailsAction->setData(AppDetailsContextAction);
+    }
+}
+
+
+/*!
  Destructor.
  */
 HsInstalledAppsState::~HsInstalledAppsState()
 {
-    mMenuView.inactivate();
-    mMenuView.setModel(NULL);
-    mMenuView.view()->setNavigationAction(NULL);
-
-    delete mInstalledAppsModel;
+    mMenuView->inactivate();
+    mMenuView->view()->setNavigationAction(NULL);
 }
 
 /*!
@@ -149,32 +132,35 @@
     qDebug("AllAppsState::stateEntered()");
     HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::stateEntered");
 
-    mMainWindow.setCurrentView(mMenuView);
-    mMenuView.activate();
+    mMenuView->viewLabel()->setHeading(
+            hbTrId("txt_applib_subtitle_installed"));
 
-    if (!mInstalledAppsModel) {
-        mInstalledAppsModel
-        = HsMenuService::getInstalledModel(AscendingNameHsSortAttribute);
-        mMenuView.setModel(mInstalledAppsModel);
+    if (!mModel) {
+        mModel
+            = HsMenuService::getInstalledModel(AscendingNameHsSortAttribute);
     }
 
-    if (mInstalledAppsModel->rowCount() == 0){
-        mMenuView.setContext(HsInstalledAppsContext,HsEmptyLabelContext);
-        }
-
-    mMenuView.listView()->scrollTo(
-        mInstalledAppsModel->index(0));
+    if (mModel->rowCount() == 0) {
+        mMenuView->reset(HsEmptyLabelContext);
+    }
+    else {
+		mMenuView->reset(HsItemViewContext);
+        mMenuView->setModel(mModel);
+        mMenuView->listView()->scrollTo(
+            mModel->index(0));
+    }
+    
+    setMenuOptions();
 
-    connect(&mMenuView,
-            SIGNAL(activated(QModelIndex)),
-            SLOT(listItemActivated(QModelIndex)));
-    connect(&mMenuView,
+    connect(mMenuView.data(),
             SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF)));
+            SLOT(showContextMenu(HbAbstractViewItem *, QPointF)));
 
-    connect(mInstalledAppsModel, SIGNAL(empty(bool)),this,
+    connect(mModel, SIGNAL(empty(bool)),this,
             SLOT(setEmptyLabelVisibility(bool)));
 
+    HsBaseViewState::stateEntered();
+
     HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::stateEntered");
 }
 
@@ -185,147 +171,66 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::stateExited");
 
-    disconnect(mInstalledAppsModel, SIGNAL(empty(bool)),this,
+    disconnect(mModel, SIGNAL(empty(bool)),this,
                SLOT(setEmptyLabelVisibility(bool)));
 
-    mMenuView.setSearchPanelVisible(false);
-
-    disconnect(&mMenuView,
-            SIGNAL(activated(QModelIndex)), this,
-            SLOT(listItemActivated(QModelIndex)));
-    disconnect(&mMenuView,
+    disconnect(mMenuView.data(),
             SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), this,
-            SLOT(listItemLongPressed(HbAbstractViewItem *, QPointF)));
-
-    mMenuView.inactivate();
+            SLOT(showContextMenu(HbAbstractViewItem *, QPointF)));
 
-    if (mContextMenu)
-        mContextMenu->close();
-    
     HsBaseViewState::stateExited();
-    
+
     HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::stateExited");
     qDebug("AllAppsState::stateExited()");
 }
 
 /*!
- Handles button visibility
+ Handles button visibility.
+ \param visibility indicates whether show or not to show 'empty' label.
  */
 void HsInstalledAppsState::setEmptyLabelVisibility(bool visibility)
 {
     if(visibility){
-        mMenuView.setContext(HsInstalledAppsContext,HsEmptyLabelContext);
+        mMenuView->reset(HsEmptyLabelContext);
     } else {
-        mMenuView.setContext(HsInstalledAppsContext,HsItemViewContext);
+        mMenuView->reset(HsItemViewContext);
+        mMenuView->setModel(mModel);
     }
-}
-
-/*!
- Open task switcher.
- \retval true if operation is successful.
- */
-bool HsInstalledAppsState::openTaskSwitcher()
-{
-    return HsMenuService::launchTaskSwitcher();
+    mMenuView->activate();
 }
 
 /*!
- Method invoked when a list item is activated.
- \param index indec of activated item.
+ Open installation log.
  */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
-void HsInstalledAppsState::listItemActivated(const QModelIndex &/*index*/)
+void HsInstalledAppsState::openInstallationLog()
 {
-    //no implementation yet
+    machine()->postEvent(
+        HsMenuEventFactory::createInstallationLogEvent());
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
 
 /*!
- Handles long-item-pressed event in all apps view by showing context menu
- \param item the event pertains to
- \param coords press point coordinates.
- */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
-void HsInstalledAppsState::listItemLongPressed(HbAbstractViewItem *item,
-        const QPointF &coords)
-{
-    HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::listItemLongPressed");
-
-    EntryFlags flags = item->modelIndex().data(
-                           CaItemModel::FlagsRole).value<EntryFlags> ();
-    if (!(flags & UninstallEntryFlag)) {
-        // create context menu
-        mContextMenu = new HbMenu();
-
-        HbAction *uninstallAction = mContextMenu->addAction(
-                                    hbTrId("txt_common_menu_delete"));
-        HbAction *appDetailsAction(NULL);
-        uninstallAction->setData(UninstallContextAction);
-    
-        QSharedPointer<const CaEntry> entry = mInstalledAppsModel->entry(item->modelIndex());
-    
-        if (!(entry->attribute(componentIdAttributeName()).isEmpty()) &&
-                (flags & RemovableEntryFlag) ) {
-            appDetailsAction = mContextMenu->addAction(hbTrId(
-                                                    "txt_common_menu_details"));
-            appDetailsAction->setData(AppDetailsContextAction);
-        }
-
-        mContextModelIndex = item->modelIndex();
-        mContextMenu->setPreferredPos(coords);
-        mContextMenu->setAttribute(Qt::WA_DeleteOnClose);
-        mContextMenu->open(this, SLOT(contextMenuAction(HbAction*)));
-    }
-    
-    
-    HSMENUTEST_FUNC_EXIT("HsInstalledAppsState::listItemLongPressed");
-}
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
-
-/*!
- Handles context menu actions
+ Handles context menu actions.
+ \param action to handle.
  */
 void HsInstalledAppsState::contextMenuAction(HbAction *action)
-{    
-    HsContextAction command = 
+{
+    HsContextAction command =
             static_cast<HsContextAction>(action->data().toInt());
-    
+
     const int itemId = mContextModelIndex.data(CaItemModel::IdRole).toInt();
-    
+
     switch (command) {
         case UninstallContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createUninstallApplicationEvent(
                     itemId));
             break;
-        case AppDetailsContextAction: 
+        case AppDetailsContextAction:
             machine()->postEvent(
                 HsMenuEventFactory::createAppDetailsViewEvent(itemId));
-            break;            
+            break;
         default:
-            break;            
+            break;
     }
-    mMenuView.setSearchPanelVisible(false);
+    mMenuView->hideSearchPanel();
 }
-
-/*!
- Slot invoked when a back action is triggered.
- */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
-void HsInstalledAppsState::backAction()
-{
-    machine()->postEvent(HsMenuEventFactory::createOpenAppLibraryEvent());
-}
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hslistviewitem.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hslistviewitem.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -16,20 +16,58 @@
  */
 
 #include <hbnamespace.h>
-#include <HbProgressBar>
-
+#include <HbAbstractItemView>
 #include <HbStyleLoader>
+#include <QPainter>
 #include <caitemmodel.h>
 #include "hsmenuitemmodel.h"
 
 #include "hslistviewitem.h"
 
+
+// TODO: this is only temporary class for show progress bar.
+// It should be remove when fix from orbit will be in official platfrom.
+// Remove it from header too.
+
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif //COVERAGE_MEASUREMENT
+void HsProgressBar::paint(QPainter * painter, 
+        const QStyleOptionGraphicsItem * option, 
+        QWidget * widget)
+{
+    Q_UNUSED(widget)
+    QStyleOptionGraphicsItem pixmapOption(*option);
+    foreach (QGraphicsItem *child, childItems()) {
+        painter->save();            
+        painter->translate(child->pos());
+        pixmapOption.exposedRect = child->boundingRect();
+        child->paint(painter, &pixmapOption, 0);
+        
+        foreach (QGraphicsItem *child2, child->childItems()) {
+            if (child2->isVisible()) {
+                painter->save();            
+                painter->translate(child2->pos());
+                pixmapOption.exposedRect = child2->boundingRect();
+                child2->paint(painter, &pixmapOption, 0);
+                painter->restore(); 
+            }
+        }
+        painter->restore();
+    }
+}    
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
+
+
 HsListViewItem::HsListViewItem(QGraphicsItem* parent) : 
     HbListViewItem(parent), progress(0), isProgress(false)
 {   
     setGraphicsSize(LargeIcon);
-    HbStyleLoader::registerFilePath(":/layout/hslistviewitem.css");
-    HbStyleLoader::registerFilePath(":/layout/hslistviewitem.widgetml");
+    if (this == prototype()) {
+        HbStyleLoader::registerFilePath(":/layout/hslistviewitem.css");        
+    }
 }
 
 HsListViewItem::~HsListViewItem()
@@ -44,32 +82,22 @@
 {
     HbListViewItem::updateChildItems();
 
-    // DisplayRoles
-    QVariant displayRole = modelIndex().data(Qt::DisplayRole);
-    QStringList stringList;
-    if (displayRole.isValid()) {
-        if (displayRole.canConvert<QString>()) {
-            stringList.append(displayRole.toString());
-        } else if (displayRole.canConvert<QStringList>()) {
-            stringList = displayRole.toStringList();
-        }
-    }
     EntryFlags flags = modelIndex().data(
         CaItemModel::FlagsRole).value<EntryFlags> ();
     isProgress = false;
     if (flags & UninstallEntryFlag) {
         isProgress = true;
         if (!progress) {
-            progress = new HbProgressBar(this);
+            progress = new HsProgressBar(this);
+            HbStyle::setItemName(progress, "progress"); 
             progress->setRange(0, 100);
+            HbEffect::disable(progress);  
             repolish();
         }
         int progresVal = modelIndex().data(
                 CaItemModel::UninstalRole).toInt();
         progress->setProgressValue(progresVal);
-        HbStyle::setItemName(progress, "progress");         
     } else if (progress) {       
-        HbStyle::setItemName(progress, "");
         delete progress;
         progress = 0;
         repolish();
@@ -91,6 +119,13 @@
 
 void HsListViewItem::polish(HbStyleParameters& params)
 {       
+    if (isProgress) {
+        HbStyleLoader::registerFilePath(":/layout/hslistviewitem.widgetml");
+    }
     HbListViewItem::setProperty("progress", isProgress);
     HbListViewItem::polish(params);   
+    if (isProgress) {
+        HbStyleLoader::unregisterFilePath(":/layout/hslistviewitem.widgetml");
+    }
 }
+
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmainwindow.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmainwindow.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -21,11 +21,11 @@
 #include "hsmainwindow.h"
 #include "hsmenuview.h"
 
-#include <qservicemanager.h>
+
 /*!
  Constructor
  */
-QTM_USE_NAMESPACE
+
 
 
 /*
@@ -36,7 +36,7 @@
  */
 
 
-HsMainWindow::HsMainWindow() : mActivityClient(NULL)
+HsMainWindow::HsMainWindow() 
 {
 }
 
@@ -51,68 +51,14 @@
  Add the \menuView to first instance of HbMainWindow registered in HbInstance.
  \param view View to be added to HbMainWindow.
 */
-void HsMainWindow::setCurrentView(const HsMenuView &menuView)
+void HsMainWindow::setCurrentView(HbView *view)
 {
     HbMainWindow *const hbW(
         HbInstance::instance()->allMainWindows().value(0));
     
-    connect( hbW, SIGNAL(viewReady()), SIGNAL(viewIsReady()),
-        Qt::UniqueConnection );
-
-    HbView *const view = menuView.view();
-    
     if (!hbW->views().contains(view)) {
         hbW->addView(view);
     }
-    hbW->setCurrentView(view);
+    bool animate  = !hbW->isObscured();       
+    hbW->setCurrentView(view, animate);
 }
-
-
-/*!
- Grabs screenshot from actual main window
- \retval QPixmap& containing screenshot
-*/
-QPixmap HsMainWindow::grabScreenshot()
-	{
-	HbMainWindow *const hbW(
-	    HbInstance::instance()->allMainWindows().value(0));
-	return QPixmap::grabWidget(hbW, hbW->rect()); 
-	}
-
-/*!
- Saves applib activity with current view screenshot
-*/
-void HsMainWindow::saveActivity()
-{
-#ifdef Q_OS_SYMBIAN
-
-    if (!mActivityClient) {
-        QServiceManager serviceManager;
-        mActivityClient = serviceManager.loadInterface("com.nokia.qt.activities.ActivityClient");
-        if (!mActivityClient) {
-            qWarning("Cannot initialize critical com.nokia.qt.activities.ActivityClient service.");
-        }
-    }
-
-    if (mActivityClient) {
-        bool retok;
-        bool ok = QMetaObject::invokeMethod(mActivityClient, "removeActivity",
-            Q_RETURN_ARG(bool, retok), Q_ARG(QString, appLibActivity()));
-        if (!ok) {
-            qWarning("remove appLibActivity failed");
-        }
-
-        QVariant variant;
-        QVariantHash metadata;
-        metadata.insert("screenshot", grabScreenshot());
-
-        ok = QMetaObject::invokeMethod(mActivityClient, "addActivity", Q_RETURN_ARG(bool, retok),
-            Q_ARG(QString, appLibActivity() ), Q_ARG(QVariant, QVariant(variant)),
-            Q_ARG(QVariantHash, metadata));
-        if (!ok) {
-            qWarning("add appLibActivity failed");
-        }
-    }
-#endif//Q_OS_SYMBIAN   
-}
-
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuview.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuview.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -28,14 +28,16 @@
 #include <HbToolBar>
 #include <HbView>
 #include <HbToolBarExtension>
-#include <HbStaticVkbHost>
+#include <HbShrinkingVkbHost>
 
 #include "hsallappsstate.h"
 #include "hsallcollectionsstate.h"
 #include "hscollectionstate.h"
+#include "hsmainwindow.h"
 #include "hsmenuitemmodel.h"
 #include "hsmenuview.h"
 #include "hslistviewitem.h"
+#include "hssearchview.h"
 
 /*!
     \class HsMenuView
@@ -49,43 +51,24 @@
 */
 
 /*!
- Constructor
 
- Builds UI objects
- Sets up signals connections.
+ Retrieves UI objects for a requested context and sets up signals' connections.
 
  \param builder Menu View builder.
- \param viewContext variable representing view context the view is to be prepared for.
+ \param stateContext Variable representing view context the view is to be prepared for.
+ \param mainWindow Object responsible for making a given view
+    a currently displayed view.
  */
-HsMenuView::HsMenuView(HsMenuViewBuilder &builder, HsViewContext viewContext):
-    mViewContext(viewContext),
+HsMenuView::HsMenuView(HsMenuViewBuilder &builder,
+                       HsStateContext stateContext,
+                       HsMainWindow &mainWindow):
     mBuilder(builder),
-    mProxyModel(new QSortFilterProxyModel(this)),
-    mView(NULL),
-    mListView(NULL),
-    mViewLabel(NULL),
-    mSearchListView(NULL),
-    mSearchPanel(NULL), 
-    mVkbHost(NULL)
+    mStateContext(stateContext),
+    mOperationalContext(HsItemViewContext),
+    mMainWindow(mainWindow),
+    mHsSearchView(new HsSearchView(mBuilder, mStateContext, mMainWindow))
 {
-    mBuilder.setOperationalContext(HsItemViewContext);
-    mBuilder.setViewContext(mViewContext);
-    mBuilder.build();
-
-    mView = mBuilder.currentView();
-    mListView = mBuilder.currentListView();
-
-    mViewLabel= mBuilder.currentViewLabel();
-
-    mCollectionButton = mBuilder.collectionButton();
-
-    mProxyModel->setFilterRole(CaItemModel::TextRole);
-    mProxyModel->setFilterKeyColumn(1);
-    mProxyModel->setSortRole(CaItemModel::TextRole);
-
-    mVkbHost = new HbStaticVkbHost(mView);
-    connect(mVkbHost, SIGNAL(keypadOpened()), this, SLOT(vkbOpened()));
-    connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(vkbClosed()));
+    synchronizeCache();
 
     connect(mListView,
             SIGNAL(activated(QModelIndex)),
@@ -93,12 +76,16 @@
     connect(mListView,
             SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
             this, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)));
+
+    connect(mHsSearchView.data(), SIGNAL(activated(QModelIndex)),
+            this, SIGNAL(activated(QModelIndex)));
+    connect(mHsSearchView.data(),
+            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
+                        this, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)));
 }
 
 /*!
- Destructor
-
- Disconnects signals.
+    Empty.
  */
 HsMenuView::~HsMenuView()
 {
@@ -106,105 +93,52 @@
 
 
 /*!
- Sets model for item view.
+ Sets model for list item view if available in current context otherwise
+ ingores the request.
 
  \param model Model the view is to represent in HsItemViewMode.
  */
-void HsMenuView::setModel(HsMenuItemModel *model)
+void HsMenuView::setModel(QAbstractItemModel *model)
 {
     HSMENUTEST_FUNC_ENTRY("HsMenuView::setModel");
 
-    if (mListView->model()) {
-        disconnect(mListView->model(),
-                   SIGNAL(scrollTo(int, QAbstractItemView::ScrollHint)),
-                   this,
-                   SLOT(scrollToRow(int, QAbstractItemView::ScrollHint)));
+    if (mListView != NULL) {
+        if (mListView->model()) {
+            disconnect(mListView->model(),
+                       SIGNAL(scrollTo(int, QAbstractItemView::ScrollHint)),
+                       this,
+                       SLOT(scrollToRow(int, QAbstractItemView::ScrollHint)));
+            disconnect(mListView->model(), SIGNAL(countChange()),
+                       this,
+                        SIGNAL(listViewChange()));
+        }
+
+        mListView->setItemPixmapCacheEnabled(true); // TODO: remove when enabled from default
+        mListView->setModel(model, new HsListViewItem());
+
+        if (mListView->model()) {
+            connect(mListView->model(),
+                    SIGNAL(scrollTo(int, QAbstractItemView::ScrollHint)),
+                    this,
+                    SLOT(scrollToRow(int, QAbstractItemView::ScrollHint)));
+            connect(mListView->model(), SIGNAL(countChange()),
+                    this,
+                    SIGNAL(listViewChange()));
+        }
     }
-    mListView->setModel(model);
-    mListView->setItemPrototype(new HsListViewItem());
-    if (mListView->model()) {
-        connect(mListView->model(),
-                SIGNAL(scrollTo(int, QAbstractItemView::ScrollHint)),
-                this,
-                SLOT(scrollToRow(int, QAbstractItemView::ScrollHint)));
-    }
+
     HSMENUTEST_FUNC_EXIT("HsMenuView::setModel");
 }
 
-
-/*!
-    Returns label appropriate for the view.
-    \return pointer to the label or NULL if the view has no label.
- */
-HbGroupBox *HsMenuView::viewLabel() const
-{
-    return mViewLabel;
-}
-
 /*!
-    \return first visible item index if any or default QModelIndex otherwise.
+ Returns model for list item view.
  */
-QModelIndex HsMenuView::firstVisibleItemIndex(const HbListView *view) const
-{
-    QModelIndex result;
-
-    const QList<HbAbstractViewItem *> array =
-        view->visibleItems();
-
-    if (array.count() >= 1) {
-        result = array[0]->modelIndex();
-    }
-    return result;
-}
-
-/*!
-    Makes the UI to show or hide view search panel.
-    When search panel is shown the view toolbar and status pane
-    are hidden until search panel is hidden.
-    \param visible When true search panel will be shown,
-     otherwise it will be hidden.
- */
-void HsMenuView::setSearchPanelVisible(bool visible)
+QAbstractItemModel *HsMenuView::model() const
 {
-    HSMENUTEST_FUNC_ENTRY("HsMenuView::setSearchPanelVisible");
-
-    if (visible) {
-
-        mSearchViewInitialIndex = firstVisibleItemIndex(mListView);
-
-        searchBegins();
-
-        connectSearchItemViewsSignals();
-        connectSearchPanelSignals();
-        
-    } else if (mSearchListView != NULL) {
-
-        mIndexToScrollAfterSearchDone =
-            firstVisibleItemIndex(mSearchListView);
-
-        disconnectSearchPanelSignals();
-        disconnectSearchItemViewsSignals();
-
-        searchFinished();
-    }
-    HSMENUTEST_FUNC_EXIT("HsMenuView::setSearchPanelVisible");
+    return mListView->model();
 }
 
 /*!
-    Makes the UI to show or hide view add collection button
-    \param visibility When true button will be shown,
-     otherwise it will be hidden.
- */
-void HsMenuView::setContext(HsViewContext viewContext,
-                            HsOperationalContext context)
-{
-    mBuilder.setViewContext(viewContext);
-    mBuilder.setOperationalContext(context);
-    mBuilder.build();
-}
-
-
-/*!
 \return View widget of the menu view.
  */
 HbView *HsMenuView::view() const
@@ -213,7 +147,8 @@
 }
 
 /*!
-\return List view widget of the menu view.
+\return List view widget of the menu view
+ if available in the context or NULL otherwise.
  */
 HbListView *HsMenuView::listView() const
 {
@@ -221,11 +156,22 @@
 }
 
 /*!
-\return Collection button
+    Returns label appropriate for the view.
+    \return Pointer to the label
+    if available in the context or NULL otherwise.
  */
-HbPushButton *HsMenuView::collectionButton() const
+HbGroupBox *HsMenuView::viewLabel() const
 {
-    return mCollectionButton;
+    return mViewLabel;
+}
+
+/*!
+\return Collection button
+ if available in the context or NULL otherwise.
+ */
+HbPushButton *HsMenuView::contentButton() const
+{
+    return mAddContentButton;
 }
 
 /*!
@@ -236,13 +182,10 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsMenuView::showSearchPanel");
 
-    setSearchPanelVisible(true);
+    mHsSearchView->setSearchPanelVisible(true);
 
     HSMENUTEST_FUNC_EXIT("HsMenuView::showSearchPanel");
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT skipped: it doubles other method
 
 /*!
  Makes search panel invisible.
@@ -251,16 +194,15 @@
 void HsMenuView::hideSearchPanel()
 {
     HSMENUTEST_FUNC_ENTRY("HsMenuView::hideSearchPanel");
-    setSearchPanelVisible(false);
+
+    mHsSearchView->setSearchPanelVisible(false);
+
     HSMENUTEST_FUNC_EXIT("HsMenuView::hideSearchPanel");
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
 
 /*!
  Disable or enable search action button.
- \param disable If true action is disabled.
+ \param disable If true action gets disabled.
  */
 void HsMenuView::disableSearch(bool disable)
 {
@@ -268,7 +210,7 @@
 }
 
 /*!
- Scrolls item view to requested row.
+ Scrolls list item view to requested row.
  \param row The row which is to get at the position pointed by \a hint.
  \param hint Position in the view the row should be scrolled to.
   */
@@ -276,8 +218,10 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsMenuView::scrollToRow");
 
-    mListView->scrollTo(mListView->model()->index(row, 0),
-                        convertScrollHint(hint));
+    if (mListView != NULL) {
+        mListView->scrollTo(
+            mListView->model()->index(row, 0), convertScrollHint(hint));
+    }
 
     HSMENUTEST_FUNC_EXIT("HsMenuView::scrollToRow");
 }
@@ -303,187 +247,19 @@
     }
 }
 
-/*
- Connects \a activated and \a longPressed signals coming from search list
- view to emit corresponding signal of this object with translated model index
-*/
-void HsMenuView::connectSearchItemViewsSignals()
-{
-    connect(mSearchListView, SIGNAL(activated(QModelIndex)),
-            this, SLOT(activatedProxySlot(QModelIndex)));
-    connect(mSearchListView, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-            this, SLOT(longPressedProxySlot(HbAbstractViewItem *, QPointF)));
-
-}
-
 /*!
- Disconnects \a activated and \a longPressed signals coming from list
- view from to emit corresponding signal
- of this object with translated model index.
-*/
-void HsMenuView::disconnectSearchItemViewsSignals()
-{
-    disconnect(mSearchListView, SIGNAL(activated(QModelIndex)),
-               this, SLOT(activatedProxySlot(QModelIndex)));
-    disconnect(mSearchListView, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
-               this,
-               SLOT(longPressedProxySlot(HbAbstractViewItem *, QPointF)));
-}
-
-
-/*!
- Connects signals \a exitClicked and \a criteriaChanged emitted
- by search panel with handling slots of the object or its members.
-*/
-void HsMenuView::connectSearchPanelSignals()
-{
-    connect(mSearchPanel, SIGNAL(exitClicked()),
-            this, SLOT(hideSearchPanel()));
-    connect(mSearchPanel, SIGNAL(criteriaChanged(QString)),
-            this, SLOT(findItem(QString)));
-
-
-}
-
-/*!
- Disconnects signals \a exitClicked and \a criteriaChanged emitted
- by search panel from handling slots of the object or its members
- Scrolls view to state before connections.
-*/
-void HsMenuView::disconnectSearchPanelSignals()
-{
-    disconnect(mSearchPanel, SIGNAL(exitClicked()),
-               this, SLOT(hideSearchPanel()));
-
-    disconnect(mSearchPanel, SIGNAL(criteriaChanged(QString)),
-               this, SLOT(findItem(QString)));
-
-}
-
-
-/*!
- Looks up for item and if found scrolls to it.
- \param criteriaStr The item name to find.
- */
-void HsMenuView::findItem(QString criteriaStr)
-{
-    qDebug
-    () << QString("hsmenuview::findItem: %1").arg(criteriaStr);
-    HSMENUTEST_FUNC_ENTRY("hsmenuview::findItem");
-
-    if ("" != criteriaStr) {
-        mProxyModel->invalidate();
-        mProxyModel->setSourceModel(mListView->model());
-        mProxyModel->setFilterRegExp(QRegExp(
-                QString("(^|\\b)%1").arg(criteriaStr), Qt::CaseInsensitive));
-        mSearchListView->scrollTo(mProxyModel->index(0,0),
-                                  HbAbstractItemView::PositionAtTop);
-    } else {
-        mProxyModel->setFilterRegExp(QRegExp(QString(".*"),
-                                             Qt::CaseInsensitive, QRegExp::RegExp));
-
-        // scroll to first item in model
-        mSearchListView->scrollTo(
-            mProxyModel->index(0, 0),
-
-            HbAbstractItemView::PositionAtTop);
-    }
-    HSMENUTEST_FUNC_EXIT("hsmenuview::findItem");
-}
-
-/*!
- Makes the view display search panel with view representing search results.
- */
-void HsMenuView::searchBegins()
-{
-    HSMENUTEST_FUNC_ENTRY("hsmenuview::searchBegins");
-
-
-    mBuilder.setViewContext(mViewContext);
-    mBuilder.setOperationalContext(HsSearchContext);
-    mBuilder.build();
-    mSearchListView = mBuilder.currentListView();
-    mSearchPanel = mBuilder.currentSearchPanel();
-
-    mView->hideItems(Hb::AllItems);
-
-    mProxyModel->invalidate();
-    mProxyModel->setSourceModel(mListView->model());
-    mProxyModel->setFilterRegExp(QRegExp(QString(".*"), Qt::CaseInsensitive,
-                                         QRegExp::RegExp));
-    mSearchListView->setModel(mProxyModel);
-    mSearchListView->setItemPrototype(new HsListViewItem());
-    
-    mSearchListView->scrollTo(
-        mProxyModel->mapFromSource(mSearchViewInitialIndex),
-        HbAbstractItemView::PositionAtTop);
-    HSMENUTEST_FUNC_EXIT("hsmenuview::searchBegins");
-}
-
-/*!
-  Ensures view does not contain search related elements and is scrolled
-  to item chosen in search mode.
- */
-void HsMenuView::searchFinished()
-{
-    HSMENUTEST_FUNC_ENTRY("hsmenuview::searchFinished");
-    
-    mBuilder.setViewContext(mViewContext);
-    mBuilder.setOperationalContext(HsItemViewContext);
-    mBuilder.build();
-    mView->showItems(Hb::AllItems);
-
-    const QModelIndex indexToScroll =
-        mProxyModel->mapToSource(mIndexToScrollAfterSearchDone);
-
-    mListView->scrollTo(indexToScroll, HbAbstractItemView::PositionAtTop);
-
-    mSearchListView = NULL;
-    mSearchPanel = NULL;
-    vkbClosed();
-    HSMENUTEST_FUNC_EXIT("hsmenuview::searchFinished");
-}
-
-/*!
- Slot used to translate activated signal from proxy model to normal model.
- \param index representing an item activated in search list view.
- */
-void HsMenuView::activatedProxySlot(const QModelIndex &index)
-{
-    emit activated(mProxyModel->mapToSource(index));
-}
-
-/*!
- Slot used to forward 'long pressed' signal with item description transladed 
- from search view context to context of the view search was requested from. 
- */
-void HsMenuView::longPressedProxySlot(HbAbstractViewItem *item,
-                                      const QPointF &coords)
-{
-    /*
-      this is a kind of hack, introduced for reasons:
-      item object should be reusable later, but orbit (or qt) prevents setting
-      its index model to previous state
-      */
-    mSearchViewLongPressedIndex =
-        mProxyModel->mapToSource(item->modelIndex());
-    QScopedPointer<HbAbstractViewItem> itemNew(item->createItem());
-    itemNew->setModelIndex(mSearchViewLongPressedIndex);
-    emit longPressed(itemNew.data(), coords);
-}
-
-/*!
- Add the view to main window and search action with \a showSearchPanel
+ Add the view to main window and connect search action with \a showSearchPanel
  slot of the window.
  */
 void HsMenuView::activate()
 {
+    mMainWindow.setCurrentView(mView);
     connect(mBuilder.searchAction(), SIGNAL(triggered()),
-            this, SLOT(showSearchPanel()));
+            this, SLOT(showSearchPanel()), Qt::UniqueConnection);
 }
 
 /*!
- Disconnecs search action and \a showSearchPanel slot of the window.
+ Disconnects search action and disconnects \a showSearchPanel slot from the window.
  */
 void HsMenuView::inactivate()
 {
@@ -494,20 +270,55 @@
                this, SLOT(showSearchPanel()));
 }
 
-
 /*!
- change size of view when VKB is opened
+  Makes a new view to be activated. Ensure navigation action and view label
+  heading are preserved after reset.
+  \param operationalContext Context indicating which view to activate.
  */
-void HsMenuView::vkbOpened()
+void HsMenuView::reset(HsOperationalContext operationalContext)
 {
-    mView->setMaximumHeight(mVkbHost->applicationArea().height());   
+    QString viewLabelHeading;
+
+    // before changing context read current view label heading ...
+    synchronizeCache();
+
+    if (mBuilder.currentViewLabel() != 0) {
+        viewLabelHeading = mBuilder.currentViewLabel()->heading();
+    }
+    // ... and back-key action
+    HbAction *const backKeyAction(mView->navigationAction());
+
+    // now we can switch the context
+    mOperationalContext = operationalContext;
+    synchronizeCache();
+
+    if (mBuilder.currentViewLabel() != 0) {
+        mBuilder.currentViewLabel()->setHeading(viewLabelHeading);
+    }
+    mView->setNavigationAction(backKeyAction);
 }
 
 /*!
- change size of view when VKB is closed
+ Builder can be shared between many instances of HsMenuView
+ being in different contexts. Before using builder make sure
+ it is in context matching the current HsMenuView.
  */
-void HsMenuView::vkbClosed()
+
+void HsMenuView::switchBuilderContext()
 {
-     mView->setMaximumHeight(-1);   
+    mBuilder.setStateContext(mStateContext);
+    mBuilder.setOperationalContext(mOperationalContext);
 }
 
+/*!
+ Updates internal data references to widgets.
+ */
+void HsMenuView::synchronizeCache()
+{
+    switchBuilderContext();
+
+    mView = mBuilder.currentView();
+    mListView = mBuilder.currentListView();
+    mViewLabel = mBuilder.currentViewLabel();
+    mAddContentButton = mBuilder.currentAddContentButton();
+}
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuviewbuilder.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsmenuviewbuilder.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -21,8 +21,6 @@
 #include <HbAction>
 #include <HbGroupBox>
 #include <HbListView>
-#include <HbLineEdit>
-#include <HbSearchPanel>
 #include <HbPushButton>
 #include <HbToolBar>
 #include <HbView>
@@ -35,6 +33,26 @@
 #include "hsmenuviewbuilder.h"
 #include "hsmenustates_global.h"
 
+static const char* DOCUMENT_BASE_NAME_MAP
+        [InvalidStateContext][InvalidOperationalContext] =
+    /*HsItemViewContext,    HsButtonContext,    HsEmptyLabelContext*/
+{
+/*HsAllAppsContext*/        {"listview", "listview", "listview"},
+/*HsAllCollectionsContext*/ {"listview", "listview", "listview"},
+/*HsInstalledAppsContext*/  {"labeledlistview", "labeledlistview",
+        "emptylabeledview"},
+/*HsCollectionContext*/     {"labeledlistview", "addcontentlabeledview",
+        "emptylabeledview"}
+};
+
+static const QString DOCUMENT_NAME_PREFIX(QLatin1String(":/xml/"));
+static const QString DOCUMENT_NAME_EXT(QLatin1String(".docml"));
+static const QString COMMON_OBJECTS_DOCUMENT_BASE_NAME(
+        QLatin1String("common_objects"));
+static const QString VIEW_NAME(QLatin1String("view"));
+static const QString LIST_VIEW_NAME(QLatin1String("listView"));
+static const QString VIEW_LABEL_NAME(QLatin1String("label"));
+static const QString ADD_CONTENT_BUTTON_NAME(QLatin1String("addContentButton"));
 
 /*!
     \class HsMenuViewBuilder
@@ -48,158 +66,128 @@
 */
 
 
-/*!
-  Cleanup search text on showing search panel. Ensures vkb host instance
-  is appears on show and disappears on hide search panel.
-  
-  \param visible When true search panel is to show up,
-  hide otherwise.
- */
-void HsMenuViewBuilder::searchPanelVisibilityChange(bool visible)
-{
-    if (visible) {
 
-        HbLineEdit *const lineEdit(searchPanelLineEdit());
-
-        lineEdit->setText("");
-        lineEdit->setFocus();
-    } 
-
-}
 
 /*!
- \return pointer to the view resulting from last \a build call or NULL if 
+ \return Pointer to the view resulting from last \a build call or NULL if
  the \a build has not yet been called.
  Memory ownership is not changed.
  */
-HbView *HsMenuViewBuilder::currentView() const
+HbView *HsMenuViewBuilder::currentView()
 {
-    const QString VIEW_NAME =
-        mViewContextToStringMap[mViewContext]
-        + "View";
+    HbView *const view =
+        qobject_cast<HbView *>(currentLoader()->findWidget(VIEW_NAME));
 
-    HbView *const view =
-        qobject_cast<HbView *>(mDocumentLoader.findWidget(VIEW_NAME));
-
-    if (view != NULL && mViewContext != HsInstalledAppsContext) {
+    if (view != NULL && mStateContext != HsInstalledAppsContext) {
         view->setToolBar(mToolBar);
     }
     return view;
 }
 
 /*!
- \return pointer to list view resulting from last \a build call or NULL if 
+ \return Pointer to list view resulting from last \a build call or NULL if
  the \a build has not yet been called.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
-HbListView *HsMenuViewBuilder::currentListView() const
+HbListView *HsMenuViewBuilder::currentListView()
 {
-    QString LIST_VIEW_NAME = mViewContextToStringMap[mViewContext];
-    if (mOperationalContext == HsSearchContext) {
-        LIST_VIEW_NAME.append(mOperationalContextToStringMap[mOperationalContext]);
-    }
-    LIST_VIEW_NAME.append("ListView");
+    HbListView *const listView =
+        qobject_cast<HbListView *>(
+                currentLoader()->findWidget(LIST_VIEW_NAME));
 
-    return qobject_cast<HbListView *>(
-               mDocumentLoader.findWidget(LIST_VIEW_NAME));
+    return listView;
 }
 
 /*!
- \return pointer to the view label resulting from last \a build call. It is 
+ \return Pointer to the view label resulting from last \a build call. It is
+ guaranteed to be not NULL if the \a build was called for the context
+ related to view including label.
+ The pointer is valid until the HsMenuViewBuilder instance is destroyed.
+ Memory ownership is not changed.
+ */
+HbGroupBox *HsMenuViewBuilder::currentViewLabel()
+{
+    HbGroupBox *viewLabel =
+            qobject_cast<HbGroupBox *>(
+                    currentLoader()->findWidget(VIEW_LABEL_NAME));
+
+    return viewLabel;
+}
+
+/*!
+ \return Pointer to the 'Add content' button resulting from last
+ \a build call. It is
  guaranteed to be not NULL if the \a build was called for the context
  related to view including label.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
-HbGroupBox *HsMenuViewBuilder::currentViewLabel() const
+HbPushButton *HsMenuViewBuilder::currentAddContentButton()
 {
-    const QString LABEL_NAME = mViewContextToStringMap[mViewContext]
-                               + "Label";
-
-    return qobject_cast<HbGroupBox *>(
-               mDocumentLoader.findWidget(LABEL_NAME));
+    HbPushButton *pushButton =
+            qobject_cast<HbPushButton *>(currentLoader()->findWidget(
+                        ADD_CONTENT_BUTTON_NAME));
+    return pushButton;
 }
 
 /*!
- \return pointer to search panel.
- The pointer is valid until the HsMenuViewBuilder instance is destroyed.
- Memory ownership is not changed.
- */
-HbSearchPanel *HsMenuViewBuilder::currentSearchPanel() const
-{
-    return qobject_cast<HbSearchPanel *>(mDocumentLoader.findWidget(
-            SEARCH_PANEL_NAME));
-}
-
-/*!
- \return pointer to a button
- The pointer is valid until the HsMenuViewBuilder instance is destroyed.
- Memory ownership is not changed.
- */
-HbPushButton *HsMenuViewBuilder::collectionButton() const
-{
-    return qobject_cast<HbPushButton *>(mDocumentLoader.findWidget(
-            BUTTON_NAME));
-}
-
-/*!
- \return pointer to All Applications Action. Guaranteed to be not NULL.
+ \return Pointer to All Applications Action. Guaranteed to be not NULL.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
 HbAction *HsMenuViewBuilder::allAppsAction() const
 {
-    return qobject_cast<HbAction *>(mDocumentLoader.findObject(
+    return qobject_cast<HbAction *>(mCommonObjectsLoader->findObject(
                                         ALL_APPS_ACTION_NAME));
 }
 
 /*!
- \return pointer to All Collections Action. Guaranteed to be not NULL.
+ \return Pointer to All Collections Action. Guaranteed to be not NULL.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
 HbAction *HsMenuViewBuilder::allCollectionsAction() const
 {
-    return qobject_cast<HbAction *>(mDocumentLoader.findObject(
+    return qobject_cast<HbAction *>(mCommonObjectsLoader->findObject(
                                         ALL_COLLECTIONS_ACTION_NAME));
 }
 
 /*!
- \return pointer to Search Action. Guaranteed to be not NULL.
+ \return Pointer to Search Action. Guaranteed to be not NULL.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
 HbAction *HsMenuViewBuilder::searchAction() const
 {
-    return qobject_cast<HbAction *>(mDocumentLoader.findObject(
+    return qobject_cast<HbAction *>(mCommonObjectsLoader->findObject(
                                         SEARCH_ACTION_NAME));
 }
 
 /*!
- \return pointer to Ovi Store Action. Guaranteed to be not NULL.
+ \return Pointer to Ovi Store Action. Guaranteed to be not NULL.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
 HbAction *HsMenuViewBuilder::oviStoreAction() const
 {
-    return qobject_cast<HbAction *>(mDocumentLoader.findObject(
+    return qobject_cast<HbAction *>(mCommonObjectsLoader->findObject(
                                         OVI_STORE_ACTION_NAME));
 }
 
 /*!
- \return pointer to Operator Action. Guaranteed to be not NULL.
+ \return Pointer to Operator Action. Guaranteed to be not NULL.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
 HbAction *HsMenuViewBuilder::operatorAction() const
 {
-    return qobject_cast<HbAction *>(mDocumentLoader.findObject(
+    return qobject_cast<HbAction *>(mCommonObjectsLoader->findObject(
                                         OPERATOR_ACTION_NAME));
 }
 
 /*!
- \return pointer to the main view toolbar.
+ \return Pointer to the main view toolbar.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
@@ -209,7 +197,7 @@
 }
 
 /*!
- \return pointer to the toolbar extension.
+ \return Pointer to the toolbar extension.
  The pointer is valid until the HsMenuViewBuilder instance is destroyed.
  Memory ownership is not changed.
  */
@@ -219,7 +207,7 @@
 }
 
 /*!
- \return action group for \a allAppsState and \a allCollectionsState action.
+ \return Action group for \a allAppsState and \a allCollectionsState action.
  */
 QActionGroup *HsMenuViewBuilder::toolBarActionGroup() const
 {
@@ -228,42 +216,35 @@
 
 /*!
  Reads docml configuration corresponding to current context.
+ \return Shared pointer to loader serving current context.
  */
-bool HsMenuViewBuilder::build()
+QSharedPointer<HbDocumentLoader> HsMenuViewBuilder::currentLoader()
 {
-    return readContextConfiguration(mViewContext, mOperationalContext);
+    if (!mLoaderMap.contains(context())) {
+        QSharedPointer<HbDocumentLoader> loader =
+                readContextConfiguration();
+        mLoaderMap.insert(context(), loader);
+    }
+
+    return mLoaderMap[context()];
 }
 
 
-
 /*!
- Constructor.
- Makes object be initialized with with hidden but existing
- search panel and view label.
+  Loads non-context sensitive objects.
  */
 HsMenuViewBuilder::HsMenuViewBuilder():
-    DOCUMENT_FILE_NAME(":/xml/applibrary.docml"),
     ALL_APPS_ACTION_NAME("allAppsAction"),
     ALL_COLLECTIONS_ACTION_NAME("allCollectionsAction"),
     SEARCH_ACTION_NAME("searchAction"),
     OVI_STORE_ACTION_NAME("oviStoreAction"),
     OPERATOR_ACTION_NAME("operatorAction"),
-    SEARCH_PANEL_NAME("searchPanel"),
-    BUTTON_NAME("collectionButton"),
-    TOOL_BAR_NAME("toolBar"),
     mToolBar(new HbToolBar),
     mToolBarExtension(new HbToolBarExtension),
-    mViewContext(HsAllAppsContext),
+    mStateContext(HsAllAppsContext),
     mOperationalContext(HsItemViewContext)
 {
-    init();
-
-    // parse common section and the one specified by view options
-    const bool result = parseSection();
-
-    Q_ASSERT_X(result,
-               "HsMenuViewBuilder::HsMenuViewBuilder()",
-               "construction failed");
+    mCommonObjectsLoader = parseDocument(COMMON_OBJECTS_DOCUMENT_BASE_NAME);
 
     mToolBar->addAction(allAppsAction());
     mToolBar->addAction(allCollectionsAction());
@@ -276,8 +257,7 @@
 }
 
 /*!
- Destructor.
- Deletes widgets owned by the Menu View Builder.
+ Deletes loaded objects.
  */
 HsMenuViewBuilder::~HsMenuViewBuilder()
 {
@@ -289,81 +269,43 @@
 /*!
  Parses requested docml file section and reflects its contents in the
  object state.
- \param sectionName Name of the section to parse.
- \retval \a true on success, \a false otherwise.
+ \param documentName Identifies document to parse.
+ \return Document loader instance containing parsed
+    objects for requested \documentName.
  */
-bool HsMenuViewBuilder::parseSection(const QString &sectionName)
+QSharedPointer<HbDocumentLoader> HsMenuViewBuilder::parseDocument(
+        const QString &documentBaseName)
 {
-    HSMENUTEST_FUNC_ENTRY("HsMenuViewBuilder::parseSection");
+    HSMENUTEST_FUNC_ENTRY("HsMenuViewBuilder::parseDocument");
 
     bool loadStatusOk = false;
+
+    QSharedPointer<HbDocumentLoader> loader(new HbDocumentLoader());
+
+    const QString documentFullName = DOCUMENT_NAME_PREFIX +
+                                     documentBaseName +
+                                     DOCUMENT_NAME_EXT;
     const QObjectList loadedObjects =
-        mDocumentLoader.load(DOCUMENT_FILE_NAME,
-                             sectionName,
-                             &loadStatusOk); 
+            loader->load(documentFullName, &loadStatusOk);
+
     mLoadedObjects |= loadedObjects.toSet();
 
     Q_ASSERT_X(loadStatusOk,
-               DOCUMENT_FILE_NAME.toLatin1().data(),
+               documentFullName.toLatin1().data(),
                "Error while loading docml file.");
 
-    HSMENUTEST_FUNC_EXIT("HsMenuViewBuilder::parseSection");
-
-    return loadStatusOk;
-}
-
-
-/*!
- \return Line edit of the searchPanel on success, NULL otherwise.
- */
-HbLineEdit *HsMenuViewBuilder::searchPanelLineEdit() const
-{
-    HSMENUTEST_FUNC_ENTRY("HsMenuViewBuilder::searchPanelLineEdit");
-
-    HbLineEdit *result(0);
-
-    foreach(QGraphicsItem *obj, currentSearchPanel()->childItems()) {
-
-        QGraphicsWidget *const widget = static_cast<QGraphicsWidget *>(obj);
-
-        if (widget != NULL) {
-
-            HbLineEdit *const lineEdit = qobject_cast<HbLineEdit *>(widget);
+    HSMENUTEST_FUNC_EXIT("HsMenuViewBuilder::parseDocument");
 
-            if (lineEdit != NULL) {
-                result = lineEdit;
-                break;
-            }
-        }
-    }
-    HSMENUTEST_FUNC_EXIT("HsMenuViewBuilder::searchPanelLineEdit");
-
-    return result;
-}
-
-/*!
-    Builds mapping between context and docml name buidling blocks.
- */
-void HsMenuViewBuilder::init()
-{
-    mViewContextToStringMap[HsAllAppsContext] = "allApps";
-    mViewContextToStringMap[HsAllCollectionsContext] = "allCollections";
-    mViewContextToStringMap[HsInstalledAppsContext] = "installedApps";
-    mViewContextToStringMap[HsCollectionContext] = "collection";
-    mOperationalContextToStringMap[HsItemViewContext] = "";
-    mOperationalContextToStringMap[HsSearchContext] = "Search";
-    mOperationalContextToStringMap[HsButtonContext] = "Button";
-    mOperationalContextToStringMap[HsEmptyLabelContext] = "EmptyLabel";
-
+    return loader;
 }
 
 /*!
  Sets view context. Not reflected in widgets returned by the builder
  until \a build is not run.
  */
-void HsMenuViewBuilder::setViewContext(HsViewContext viewContext)
+void HsMenuViewBuilder::setStateContext(HsStateContext stateContext)
 {
-    mViewContext = viewContext;
+    mStateContext = stateContext;
 }
 
 /*!
@@ -379,20 +321,23 @@
 /*!
  Reads configuration for requested context and ensures search panel and corresponding
  vkb host are managed properly.
+ \return Document loader with objects for current context.
  */
-bool HsMenuViewBuilder::readContextConfiguration(HsViewContext viewContext,
-        HsOperationalContext operationalContext)
+QSharedPointer<HbDocumentLoader> HsMenuViewBuilder::readContextConfiguration()
 {
-    const QString sectionName = mViewContextToStringMap[viewContext]
-        + mOperationalContextToStringMap[operationalContext] 
-        + "ViewDefinition";
+    const QLatin1String documentName(
+            DOCUMENT_BASE_NAME_MAP[mStateContext][mOperationalContext]);
 
-    const bool result = parseSection(sectionName);
+    QSharedPointer<HbDocumentLoader> loader =
+            parseDocument(QString(documentName));
 
-    if (currentSearchPanel()) {
-        searchPanelVisibilityChange(mOperationalContext == HsSearchContext);
-    }
-
-    return result;
+    return loader;
 }
 
+/*!
+ \return Current context.
+ */
+HsMenuViewBuilder::Context HsMenuViewBuilder::context() const
+{
+    return Context(mStateContext, mOperationalContext);
+}
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsoperatorhandler.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsoperatorhandler.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -16,12 +16,18 @@
  */
 
 #include "hsoperatorhandler.h"
-#ifndef NO_QT_EXTENSIONS
-#include "hsoperatorhandler_p.h"
+
+#include <HbAction>
+
+#ifdef QT_EXTENSIONS
+    #include "hsoperatorhandler_p.h"
 #else
-#include <HbIcon>
+    #include <HbIcon>
 #endif
 
+
+
+
 /*!
     \class HsOperatorHandler
     \ingroup group_hsmenustateplugin
@@ -37,7 +43,7 @@
  */
 HsOperatorHandler::HsOperatorHandler(QObject *parent):
     QObject(parent),
-#ifndef NO_QT_EXTENSIONS
+#ifdef QT_EXTENSIONS
     m_q(new HsOperatorHandlerPrivate(this))
 #else
     m_q(0)
@@ -58,7 +64,7 @@
  */
 HbIcon HsOperatorHandler::icon()
 {
-#ifndef NO_QT_EXTENSIONS
+#ifdef QT_EXTENSIONS
     return m_q->icon();
 #else
     return HbIcon();
@@ -71,7 +77,7 @@
  */
 QString HsOperatorHandler::text()
 {
-#ifndef NO_QT_EXTENSIONS
+#ifdef QT_EXTENSIONS
     return m_q->text();
 #else
     return QString();
@@ -80,13 +86,64 @@
 
 
 /*!
- Open Operator application or related url
+ Open Operator application or related url action
  */
 void HsOperatorHandler::action()
 {
-#ifndef NO_QT_EXTENSIONS
+#ifdef QT_EXTENSIONS
     m_q->action();
 #endif
 }
 
+/*!
+ Returns Operator Store presence value predefined in Central Repositoryicon
+ \retval true if Operator Store should be present in toolbar
+ */
+bool HsOperatorHandler::operatorStorePresent()
+{
+#ifdef QT_EXTENSIONS
+    return m_q->operatorStorePresent();
+#else
+    return false;
+#endif
+}
 
+/*!
+ Returns Ovi Store presence value predefined in Central Repositoryicon
+ \retval true if Ovi Store should be present in toolbar
+ */
+bool HsOperatorHandler::oviStorePresent()
+{
+#ifdef QT_EXTENSIONS
+    return m_q->oviStorePresent();
+#else
+    return false;
+#endif
+}
+
+/*!
+ Returns if Operator Store should first in toolbar
+ \retval true if Operator Store should first in toolbar
+ */
+bool HsOperatorHandler::operatorStoreFirst()
+{
+#ifdef QT_EXTENSIONS
+    return m_q->operatorStoreFirst();
+#else
+    return false;
+#endif
+}
+
+/*!
+ Prepares HbAction for Operator Store
+ \param HbAction to prepare
+ \retval HbAction prepared action
+ */
+HbAction *HsOperatorHandler::prepareOperatorStoreAction(
+        HbAction *const operatorAction)
+{
+    operatorAction->setIcon(icon());
+    connect(operatorAction, SIGNAL(triggered()), this, SLOT(action()));
+    return operatorAction;
+}
+
--- a/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsoperatorhandler_p.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsoperatorhandler_p.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -14,21 +14,27 @@
  * Description: hsoperatorhandler_p.cpp
  *
  */
-#ifndef NO_QT_EXTENSIONS
+#ifdef QT_EXTENSIONS
 
 #include <QDebug>
-#include <XQSettingsManager>
 #include <XQSettingsKey>
 #include "hsoperatorhandler_p.h"
 #include "hsmenuservice.h"
 #include "caentry.h"
 #include "caservice.h"
 
-const int AppLibUid         = 0x20022F97;
-const int IconId            = 0x00000001;
-const int OperatorAppUid    = 0x00000002;
-const int OperatorUrl       = 0x00000003;
-const int OperatorText      = 0x00000004;
+const int AppLibUid                 = 0x20022F97;
+const int IncludeOperatorStore      = 0x00000001;
+const int OperatorStoreType         = 0x00000002;
+const int OperatorStoreTitle        = 0x00000003;
+const int OperatorStoreURL          = 0x00000004;
+const int OperatorStoreIconSkinID   = 0x00000005;
+const int OperatorStoreApplication  = 0x00000006;
+const int OperatorStore1stPopUp     = 0x00000007;
+const int RemoveOviStore            = 0x00000008;
+const char *operatorStoreIconPath
+        = "z:/private/20022F35/customsvg/operatorstore.svg";
+
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -38,9 +44,13 @@
  */
 HsOperatorHandlerPrivate::HsOperatorHandlerPrivate(QObject *parent):
     QObject(parent),
+    mOviStorePresent(false),
+    mOperatorStorePresent(false),
+    mStoreType(NoneType),
     mOperatorEntry(0),
     mIcon(),
-    mText()
+    mOperatorStoreTitle(),
+    mOperatorStoreFirst(false)
 {
     readCentralRepository();
 }
@@ -72,12 +82,39 @@
 }
 
 /*!
- Returns Operator icon predefined in Central Repositoryicon
- \retval icon
+ Returns Operator title text predefined in Central Repositoryicon
+ \retval text
  */
 QString HsOperatorHandlerPrivate::text()
 {
-    return mText;
+    return mOperatorStoreTitle;
+}
+
+/*!
+ Returns Ovi Store presence value predefined in Central Repositoryicon
+ \retval true if Ovi Store should be present in toolbar
+ */
+bool HsOperatorHandlerPrivate::oviStorePresent()
+{
+    return mOviStorePresent;
+}
+
+/*!
+ Returns Operator Store presence value predefined in Central Repositoryicon
+ \retval true if Operator Store should be present in toolbar
+ */
+bool HsOperatorHandlerPrivate::operatorStorePresent()
+{
+    return mOperatorStorePresent;
+}
+
+/*!
+ Returns if Operator Store should first in toolbar
+ \retval true if Operator Store should first in toolbar
+ */
+bool HsOperatorHandlerPrivate::operatorStoreFirst()
+{
+    return mOperatorStoreFirst;
 }
 
 /*!
@@ -87,41 +124,15 @@
  */
 HbIcon HsOperatorHandlerPrivate::createIcon(XQSettingsManager *crManager)
 {
-    qDebug("HsOperatorHandlerPrivate::createIcon");
-    HbIcon icon;
-
-    XQCentralRepositorySettingsKey iconKey(AppLibUid, IconId);
-    QVariant iconVarian = crManager->readItemValue(
-                              iconKey, XQSettingsManager::TypeString);
-
-    if (!iconVarian.isNull() && !iconVarian.toString().isEmpty()) {
-        qDebug() << "HsOperatorHandlerPrivate::createIcon"
-                 << iconVarian.toString();
-        icon = HbIcon(iconVarian.toString());
+    QVariant variant = getVariantFromKey(
+            crManager,
+            OperatorStoreIconSkinID,
+            XQSettingsManager::TypeString);
+    if (!variant.isNull() && !variant.toString().isEmpty()) {
+        return HbIcon(variant.toString());
+    } else {
+        return HbIcon(operatorStoreIconPath);
     }
-    return icon;
-}
-
-/*!
- Creates text based on Central Repository
- \param crManager settings manager
- \retval icon
- */
-QString HsOperatorHandlerPrivate::readText(XQSettingsManager *crManager)
-{
-    qDebug("HsOperatorHandlerPrivate::readText");
-    QString text;
-
-    XQCentralRepositorySettingsKey textKey(AppLibUid, OperatorText);
-    QVariant textVariant = crManager->readItemValue(
-                               textKey, XQSettingsManager::TypeString);
-
-    if (!textVariant.isNull() && textVariant.isValid()) {
-        qDebug() << "HsOperatorHandlerPrivate::createIcon"
-                 << textVariant.toString();
-        text = textVariant.toString();
-    }
-    return text;
 }
 
 /*!
@@ -132,19 +143,14 @@
 CaEntry *HsOperatorHandlerPrivate::createAppEntry(
     XQSettingsManager *crManager)
 {
-    qDebug("HsOperatorHandlerPrivate::createAppEntry");
-    XQCentralRepositorySettingsKey appUidKey(AppLibUid, OperatorAppUid);
-    QVariant appUidVariant = crManager->readItemValue(
-                                 appUidKey, XQSettingsManager::TypeString);
-
-    if (!appUidVariant.isNull() && !appUidVariant.toString().isEmpty()) {
-        qDebug() << "HsOperatorHandlerPrivate::createAppEntry"
-                 << appUidVariant.toString();
-
+    QVariant variant = getVariantFromKey(
+            crManager, OperatorStoreApplication, XQSettingsManager::TypeString);
+    if (!variant.isNull()) {
         CaEntry *operatorEntry = new CaEntry;
         operatorEntry->setEntryTypeName(applicationTypeName());
         operatorEntry->setAttribute(
-            applicationUidEntryKey(), appUidVariant.toString());
+            applicationUidEntryKey(), variant.toString());
+
         return operatorEntry;
     }
     return NULL;
@@ -158,20 +164,104 @@
 CaEntry *HsOperatorHandlerPrivate::createUrlEntry(
     XQSettingsManager *crManager)
 {
-    qDebug("HsOperatorHandlerPrivate::createUrlEntry");
-    CaEntry *operatorEntry = new CaEntry;
+    QVariant variant = getVariantFromKey(
+            crManager, OperatorStoreURL, XQSettingsManager::TypeString);
+    if (!variant.isNull()) {
+        CaEntry *operatorEntry = new CaEntry;
+        operatorEntry->setEntryTypeName(urlTypeName());
+        operatorEntry->setAttribute(urlEntryKey(), variant.toString());
+
+        return operatorEntry;
+    }
+    return NULL;
+}
+
 
-    XQCentralRepositorySettingsKey urlKey(AppLibUid, OperatorUrl);
-    QVariant urlVariant = crManager->readItemValue(
-                              urlKey, XQSettingsManager::TypeString);
+/*!
+ Generic function to get stores presence values
+ \param crManager settings manager
+ \param storePresenceKey store key(Ovi or Operator)
+ \retval entry
+ */
+bool HsOperatorHandlerPrivate::storeValue(
+        XQSettingsManager *crManager, int storePresenceKey)
+{
+    QVariant variant = getVariantFromKey(
+            crManager, storePresenceKey, XQSettingsManager::TypeInt);
+    if (!variant.isNull()) {
+        return bool(variant.toInt());
+    }
+    return false;
+}
+
+/*!
+ Generic function to get QVariant for CR key
+ \param crManager settings manager
+ \param crKey CR key
+ \param type type of QVariant to be returned
+ \retval QVariant
+ */
+QVariant HsOperatorHandlerPrivate::getVariantFromKey(
+        XQSettingsManager *crManager, int crKey, XQSettingsManager::Type type)
+{
+    XQCentralRepositorySettingsKey presenceKey(AppLibUid, crKey);
+    QVariant presenceVariant = crManager->readItemValue(
+            presenceKey, type);
 
-    if (!urlVariant.isNull() && !urlVariant.toString().isEmpty()) {
-        operatorEntry->setEntryTypeName(urlTypeName());
-        operatorEntry->setAttribute(urlEntryKey(), urlVariant.toString());
-        qDebug() << "HsOperatorHandlerPrivate::createUrlEntry"
-                 << urlVariant.toString();
+    if (presenceVariant.isValid()) {
+        qDebug() << "HsOperatorHandlerPrivate::storePresent"
+                 << presenceVariant.toInt();
+        return presenceVariant;
+    }
+    return QVariant();
+}
+
+/*!
+ Generic function to get store type(Url/App)
+ \param crManager settings manager
+ \retval HsStoreType store type
+ */
+HsOperatorHandlerPrivate::HsStoreType
+        HsOperatorHandlerPrivate::operatorStoreType(
+                XQSettingsManager *crManager)
+{
+    QVariant variant = getVariantFromKey(
+            crManager, OperatorStoreType, XQSettingsManager::TypeInt);
+    if (!variant.isNull()) {
+        return HsOperatorHandlerPrivate::HsStoreType(variant.toInt());
     }
-    return operatorEntry;
+    return NoneType;
+}
+
+/*!
+ Creates text based on Central Repository
+ \param crManager settings manager
+ \retval icon
+ */
+QString HsOperatorHandlerPrivate::operatorStoreTitle(XQSettingsManager *crManager)
+{
+    QVariant variant = getVariantFromKey(
+            crManager, OperatorStoreTitle, XQSettingsManager::TypeString);
+    if (!variant.isNull()) {
+        return variant.toString();
+    }
+    return QString();
+}
+
+/*!
+ Retrives information if Operator Store should first in toolbarbased
+ (from Central Repository)
+ \param crManager settings manager
+ \retval true if Operator Store should be first
+ */
+bool HsOperatorHandlerPrivate::operatorStoreFirst(XQSettingsManager *crManager)
+{
+    QVariant variant = getVariantFromKey(
+            crManager, OperatorStore1stPopUp, XQSettingsManager::TypeInt);
+    if (!variant.isNull()) {
+        return bool(variant.toInt());
+    }
+    return false;
 }
 
 /*!
@@ -180,12 +270,21 @@
 void HsOperatorHandlerPrivate::readCentralRepository()
 {
     XQSettingsManager *crManager = new XQSettingsManager;
+    //this key indicates that ovi store should be removed
+    mOviStorePresent = !storeValue(crManager, RemoveOviStore);
+    //this key indicates that operator store should be added
+    mOperatorStorePresent = storeValue(crManager, IncludeOperatorStore);
 
-    mIcon = createIcon(crManager);
-    mText = readText(crManager);
-    mOperatorEntry = createAppEntry(crManager);
-    if (!mOperatorEntry) {
-        mOperatorEntry = createUrlEntry(crManager);
+    if (mOperatorStorePresent) {
+        mStoreType = operatorStoreType(crManager);
+        if (mStoreType == ApplicationType) {
+            mOperatorEntry = createAppEntry(crManager);
+        } else {
+            mOperatorEntry = createUrlEntry(crManager);
+        }
+        mOperatorStoreTitle = operatorStoreTitle(crManager);
+        mOperatorStoreFirst = operatorStoreFirst(crManager);
+        mIcon = createIcon(crManager);
     }
     delete crManager;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hssearchview.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,349 @@
+/*
+ * 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: hssearchview.cpp
+ *
+ */
+
+#include <QApplication>
+#include <QInputContext>
+#include <QSortFilterProxyModel>
+
+#include <HbGroupBox>
+#include <HbLineEdit>
+#include <HbListView>
+#include <HbAbstractViewItem>
+#include <HbView>
+#include <HbSearchPanel>
+
+#include <caitemmodel.h>
+
+#include "hslistviewitem.h"
+#include "hsmainwindow.h"
+#include "hssearchview.h"
+
+/*!
+  Set up proxy model for search.
+  \param builder Retrieves UI widgets.
+  \param stateContext Identifies the state where search starts from.
+  \param mainWindow Enables switching between originating and search view.
+ */
+HsSearchView::HsSearchView(HsMenuViewBuilder &builder,
+        HsStateContext stateContext, HsMainWindow &mainWindow) :
+    mProxyModel(new QSortFilterProxyModel(this)), mSearchView(NULL),
+    mSearchListView(NULL), mSearchPanel(NULL), mStateContext(stateContext),
+    mBuilder(builder), mMainWindow(mainWindow), mListView(NULL),
+    mVkbHost(NULL), mSearchViewBuilder(), mEmptyResultText(true)
+{
+    mProxyModel->setFilterRole(CaItemModel::TextRole);
+    mProxyModel->setFilterKeyColumn(1);
+    mProxyModel->setSortRole(CaItemModel::TextRole);
+}
+
+/*!
+  Empty.
+ */
+HsSearchView::~HsSearchView()
+{
+}
+
+/*!
+    Makes the UI to show or hide view search panel.
+    When search panel is shown the view toolbar and status pane
+    are hidden until search panel is hidden.
+    \param visible When true search panel will be shown,
+     otherwise it will be hidden.
+ */
+void HsSearchView::setSearchPanelVisible(bool visible)
+{
+    HSMENUTEST_FUNC_ENTRY("HsMenuView::setSearchPanelVisible");
+
+    if (visible && !isActive()) {
+        searchBegins();
+        connectSearchItemViewsSignals();
+        connectSearchPanelSignals();
+    } else if (isActive()) {
+        disconnectSearchPanelSignals();
+        disconnectSearchItemViewsSignals();
+        searchFinished();
+    }
+    HSMENUTEST_FUNC_EXIT("HsMenuView::setSearchPanelVisible");
+}
+
+/*!
+    \param view List view to operate on.
+    \return Index of F=first visible item of \a view if any
+    or default QModelIndex otherwise.
+ */
+QModelIndex HsSearchView::firstVisibleItemIndex(const HbListView *view) const
+{
+    const QList<HbAbstractViewItem *> array = view->visibleItems();
+    if (array.count()) {
+        return array[0]->modelIndex();
+    }
+    return QModelIndex();
+}
+
+/*!
+ Displays search panel with view representing search results.
+ */
+void HsSearchView::searchBegins()
+{
+    HSMENUTEST_FUNC_ENTRY("HsSearchView::searchBegins");
+
+    setOriginatingContext();
+
+    mListView = mBuilder.currentListView();
+    mSearchViewInitialIndex = firstVisibleItemIndex(mListView);
+
+    mProxyModel->invalidate();
+    mProxyModel->setSourceModel(mListView->model());
+    mProxyModel->setFilterRegExp(
+            QRegExp(QString(".*"), Qt::CaseInsensitive, QRegExp::RegExp));
+
+    mSearchView = mSearchViewBuilder.searchView();
+    mSearchListView = mSearchViewBuilder.searchListView();
+    mSearchPanel = mSearchViewBuilder.searchPanel();
+    initSearchPanel(*mSearchPanel);
+    mVkbHost.reset(new HbShrinkingVkbHost(mSearchView));
+
+    if (mBuilder.currentViewLabel()) {
+        mSearchViewBuilder.searchViewLabel()->setHeading(
+                mBuilder.currentViewLabel()->heading());
+        mSearchViewBuilder.setSearchLabledContext();
+    }
+
+    mSearchView->hideItems(Hb::AllItems);
+    mSearchListView->setModel(mProxyModel, new HsListViewItem());
+
+    mMainWindow.setCurrentView(mSearchView);
+
+    mSearchListView->scrollTo(
+        mProxyModel->mapFromSource(mSearchViewInitialIndex),
+        HbAbstractItemView::PositionAtTop);
+
+    setNoResultsVisibility();
+    HSMENUTEST_FUNC_EXIT("HsSearchView::searchBegins");
+}
+
+/*!
+ Handles button visibility.
+ \param visibility indicates whether show or not to show 'empty' label.
+ */
+void HsSearchView::setNoResultsVisibility()
+{
+    if (mProxyModel->rowCount() && mEmptyResultText) {
+        mSearchViewBuilder.loadViewListSection();
+        mEmptyResultText = false;
+    } else if (!mProxyModel->rowCount() && !mEmptyResultText) {
+        mSearchViewBuilder.loadViewEmptySection();
+        mEmptyResultText = true;
+    }
+}
+
+/*
+ Connects \a activated and \a longPressed signals coming from search list
+ view to emit corresponding signal of this object with translated model index.
+*/
+void HsSearchView::connectSearchItemViewsSignals()
+{
+    connect(mSearchListView, SIGNAL(activated(QModelIndex)),
+            this, SLOT(activatedProxySlot(QModelIndex)));
+    connect(mSearchListView, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
+            this, SLOT(longPressedProxySlot(HbAbstractViewItem *, QPointF)));
+}
+
+/*!
+ Disconnects \a activated and \a longPressed signals coming from list
+ view from to emit corresponding signal
+ of this object with translated model index.
+*/
+void HsSearchView::disconnectSearchItemViewsSignals()
+{
+    disconnect(mSearchListView, SIGNAL(activated(QModelIndex)),
+            this, SLOT(activatedProxySlot(QModelIndex)));
+    disconnect(mSearchListView,
+            SIGNAL(longPressed(HbAbstractViewItem *, QPointF)),
+            this, SLOT(longPressedProxySlot(HbAbstractViewItem *, QPointF)));
+}
+
+
+/*!
+ Makes search panel invisible.
+ Equivalent to \a setSearchPanelVisible(false).
+ */
+void HsSearchView::hideSearchPanel()
+{
+    HSMENUTEST_FUNC_ENTRY("HsMenuView::hideSearchPanel");
+    setSearchPanelVisible(false);
+    HSMENUTEST_FUNC_EXIT("HsMenuView::hideSearchPanel");
+}
+
+/*!
+ Connects signals \a exitClicked and \a criteriaChanged emitted
+ by search panel with handling slots of the object or its members.
+*/
+void HsSearchView::connectSearchPanelSignals()
+{
+    connect(mProxyModel, SIGNAL(rowsInserted(QModelIndex, int, int)),
+            this, SLOT(setNoResultsVisibility()));
+    connect(mProxyModel, SIGNAL(rowsRemoved(QModelIndex, int, int)),
+            this, SLOT(setNoResultsVisibility()));
+    connect(mSearchPanel, SIGNAL(exitClicked()),
+            this, SLOT(hideSearchPanel()));
+    connect(mSearchPanel, SIGNAL(criteriaChanged(QString)),
+            this, SLOT(findItem(QString)));
+}
+
+/*!
+ Disconnects signals \a exitClicked and \a criteriaChanged emitted
+ by search panel from handling slots of the object or its members
+ Scrolls view to state before connections.
+*/
+void HsSearchView::disconnectSearchPanelSignals()
+{
+    mProxyModel->disconnect(this);
+    mSearchPanel->disconnect(this);
+}
+
+/*!
+  Scrolls originating view to first item matching search criteria.
+ */
+void HsSearchView::searchFinished()
+{
+    HSMENUTEST_FUNC_ENTRY("HsSearchView::searchFinished");
+
+    mIndexToScrollAfterSearchDone = firstVisibleItemIndex(mSearchListView);
+
+    setOriginatingContext();
+
+    mMainWindow.setCurrentView(mBuilder.currentView());
+
+    mListView->scrollTo(mProxyModel->mapToSource(
+            mIndexToScrollAfterSearchDone),
+            HbAbstractItemView::PositionAtTop);
+
+    HbVkbHost::detachHost(mSearchView);
+    mVkbHost.reset(NULL);
+    mSearchListView = NULL;
+    mSearchPanel = NULL;
+    mProxyModel->setSourceModel(NULL);
+    HSMENUTEST_FUNC_EXIT("HsSearchView::searchFinished");
+}
+
+/*!
+ Looks up for item and if found scrolls to it.
+ \param criteriaStr The item name to find.
+ */
+void HsSearchView::findItem(QString criteriaStr)
+{
+    qDebug() << "HsSearchView::findItem: " + criteriaStr;
+    HSMENUTEST_FUNC_ENTRY("HsSearchView::findItem");
+
+    mProxyModel->setFilterRegExp(
+            QRegExp("(^|\\b)" + criteriaStr, Qt::CaseInsensitive));
+
+    mSearchListView->scrollTo(
+            mProxyModel->index(0,0), HbAbstractItemView::PositionAtTop);
+
+    HSMENUTEST_FUNC_EXIT("HsSearchView::findItem");
+}
+
+/*!
+ Slot used to translate activated signal from proxy model to normal model.
+ \param index Represents an item activated in search list view.
+ */
+void HsSearchView::activatedProxySlot(const QModelIndex &index)
+{
+    emit activated(mProxyModel->mapToSource(index));
+}
+
+/*!
+ Slot used to forward 'long pressed' signal with item description transladed
+ from search view context to context of the view search was requested from.
+  \param item Long pressed item.
+  \param coords Coordinates of the long press action.
+ */
+void HsSearchView::longPressedProxySlot(
+        HbAbstractViewItem *item, const QPointF &coords)
+{
+    /*
+    this is a kind of hack, introduced for reasons:
+    item object should be reusable later, but orbit (or qt) prevents setting
+    its index model to previous state
+    */
+    mSearchViewLongPressedIndex = mProxyModel->mapToSource(
+            item->modelIndex());
+    QScopedPointer<HbAbstractViewItem> itemNew(item->createItem());
+    itemNew->setModelIndex(mSearchViewLongPressedIndex);
+    emit longPressed(itemNew.data(), coords);
+}
+
+/*!
+  Sets up search panel.
+
+ \param searchPanel Search panel to initialize.
+ */
+void HsSearchView::initSearchPanel(HbSearchPanel &searchPanel)
+{
+    HbLineEdit *const lineEdit(searchPanelLineEdit(searchPanel));
+
+    lineEdit->setText("");
+    lineEdit->setFocus();
+    lineEdit->setInputMethodHints(
+            Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase);
+}
+
+/*!
+ \param searchPanel Search panel to operate on.
+ \return Line edit of the searchPanel on success, NULL otherwise.
+ */
+HbLineEdit *HsSearchView::searchPanelLineEdit(
+        HbSearchPanel &searchPanel) const
+{
+    HSMENUTEST_FUNC_ENTRY("HsSearchView::searchPanelLineEdit");
+
+    HbLineEdit *result(0);
+    foreach(QGraphicsItem *obj, searchPanel.childItems()) {
+        QGraphicsWidget *const widget = static_cast<QGraphicsWidget *>(obj);
+        if (widget != NULL) {
+            HbLineEdit *const lineEdit = qobject_cast<HbLineEdit *>(widget);
+            if (lineEdit != NULL) {
+                result = lineEdit;
+                break;
+            }
+        }
+    }
+    HSMENUTEST_FUNC_EXIT("HsSearchView::searchPanelLineEdit");
+
+    return result;
+}
+
+/*!
+  Sets the builder context to the one determined by \a mStateContext and
+  \a HsItemViewContext.
+ */
+void HsSearchView::setOriginatingContext()
+{
+    mBuilder.setStateContext(mStateContext);
+    mBuilder.setOperationalContext(HsItemViewContext);
+}
+
+/*!
+  \retval true when search view is already invoked, \a false otherwise.
+ */
+bool HsSearchView::isActive() const
+{
+    return mSearchListView != NULL;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsapplibrarystateplugin/src/hssearchviewbuilder.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,151 @@
+/*
+ * 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: Search View Builder
+ *
+ */
+
+#include <HbSearchPanel>
+#include <HbView>
+#include <HbListView>
+#include <HbGroupBox>
+#include "hssearchviewbuilder.h"
+
+const char *searchDocmlFile           = ":/xml/searchview.docml";
+const char *searchViewLabeledList     = "searchViewLabeledList";
+const char *searchViewList            = "searchViewList";
+const char *searchViewLabeledEmpty    = "searchViewLabeledEmpty";
+const char *searchViewEmpty           = "searchViewEmpty";
+
+
+/*!
+    \class HsSearchViewBuilder
+    \ingroup group_hsmenustateplugin
+
+    \brief Search View Builder
+
+    Reads UI object from Application Library Search docml
+
+    \sa HsMenuView
+*/
+
+/*!
+ Constructor. Loads UI objects from docml.
+ */
+HsSearchViewBuilder::HsSearchViewBuilder() : mLoader(new HbDocumentLoader()),
+    mLabledContext(false)
+{
+    bool loadStatusOk(false);
+    mLoadedObjects =
+            mLoader->load(searchDocmlFile, &loadStatusOk).toSet();
+    Q_ASSERT(loadStatusOk);
+}
+
+/*!
+ Destructor. Deletes seto of loaded objects.
+ */
+HsSearchViewBuilder::~HsSearchViewBuilder()
+{
+    qDeleteAll(mLoadedObjects);
+}
+
+/*!
+ \return Pointer to the view.
+ Memory ownership is not changed.
+ */
+HbView *HsSearchViewBuilder::searchView()
+{
+    return qobject_cast<HbView *>(mLoader->findWidget("view"));
+}
+
+/*!
+ \return Pointer to list view.
+ The pointer is valid until the HsSearchViewBuilder instance is destroyed.
+ Memory ownership is not changed.
+ */
+HbListView *HsSearchViewBuilder::searchListView()
+{
+    return qobject_cast<HbListView *>(mLoader->findWidget("listView"));
+}
+
+/*!
+ \return Pointer to search panel.
+ The pointer is valid until the HsSearchViewBuilder instance is destroyed.
+ Memory ownership is not changed.
+ */
+HbSearchPanel *HsSearchViewBuilder::searchPanel()
+{
+    return qobject_cast<HbSearchPanel *>(mLoader->findWidget("searchPanel"));
+}
+
+/*!
+ \return Pointer to the view label.
+ The pointer is valid until the HsSearchViewBuilder instance is destroyed.
+ Memory ownership is not changed.
+ */
+HbGroupBox *HsSearchViewBuilder::searchViewLabel()
+{
+    return qobject_cast<HbGroupBox *>(mLoader->findWidget("label"));
+}
+
+/*!
+ Switches HsSearchViewBuilder to labeled view layout.
+ */
+void HsSearchViewBuilder::setSearchLabledContext()
+{
+    mLabledContext = true;
+}
+
+/*!
+ \return true if section was succesfull loaded.
+ Loads proper empty docml section.
+ */
+bool HsSearchViewBuilder::loadViewEmptySection()
+{
+    bool loadStatusOk(false);
+    if(mLabledContext) {
+        mLoadedObjects |= mLoader->load(
+                searchDocmlFile,
+                searchViewLabeledEmpty,
+                &loadStatusOk).toSet();
+    } else {
+        mLoadedObjects |= mLoader->load(
+                searchDocmlFile,
+                searchViewEmpty,
+                &loadStatusOk).toSet();
+    }
+    Q_ASSERT(loadStatusOk);
+    return loadStatusOk;
+}
+
+/*!
+ \return true if section was succesfull loaded.
+ Loads proper list docml section.
+ */
+bool HsSearchViewBuilder::loadViewListSection()
+{
+    bool loadStatusOk(false);
+    if(mLabledContext) {
+        mLoadedObjects |= mLoader->load(
+                searchDocmlFile,
+                searchViewLabeledList,
+                &loadStatusOk).toSet();
+    } else {
+        mLoadedObjects |= mLoader->load(
+                searchDocmlFile,
+                searchViewList,
+                &loadStatusOk).toSet();
+    }
+    Q_ASSERT(loadStatusOk);
+    return loadStatusOk;
+}
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -29,7 +29,7 @@
 HB += hbfeedback
 
 CONFIG += plugin hb mobility
-MOBILITY = serviceframework
+MOBILITY = serviceframework systeminfo
 
 PLUGIN_SUBDIR = /private/20022F35/plugins/stateplugins
 
@@ -39,7 +39,6 @@
         -lhsdomainmodel \
         -lhsmenuserviceprovider
 
-RESOURCES += hshomescreenstateplugin.qrc
 
 symbian: {
     TARGET.UID3 = 0x20022F41
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/hshomescreenstateplugin.qrc	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/" >           
-        <file alias="controllayer.docml">resource/controllayer.docml</file>
-    </qresource>    
-</RCC>
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsdocumentloader.h	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* 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:  Homescreen document loader class.
-*
-*/
-
-#ifndef HSDOCUMENTLOADER_H
-#define HSDOCUMENTLOADER_H
-
-#include <hbdocumentloader.h>
-#include "hstest_global.h"
-
-HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
-
-class HsDocumentLoader : public HbDocumentLoader
-{
-public:
-    HsDocumentLoader();
-    virtual ~HsDocumentLoader();
-
-public:
-    QObject *createObject(const QString &type, const QString &name);
-
-private:
-
-    Q_DISABLE_COPY(HsDocumentLoader)
-
-    HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
-};
-
-#endif
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -31,11 +31,11 @@
 
 class QGraphicsItem;
 class QGraphicsSceneMouseEvent;
-class QPropertyAnimation;
+
 class QGestureEvent;
 class HbAction;
 class HbContinuousFeedback;
-class HsIdleWidget;
+
 class HsTitleResolver;
 class QParallelAnimationGroup;
 class HbMenu;
@@ -44,6 +44,9 @@
 #endif
 
 class HsWidgetHost;
+class HsPage;
+class HsMessageBoxWrapper;
+
 
 class HsIdleState : public QState
 {
@@ -60,6 +63,7 @@
     void event_moveScene();
     void event_selectWallpaper();
     void event_addPage();
+    void event_preRemovePage();
     void event_removePage();
     void event_toggleConnection();
 
@@ -78,8 +82,6 @@
     void addPageToScene(int pageIndex);    
     void updateZoneAnimation();
     void showTrashBin();
-    void removeActivePage();
-    void deleteZoneAnimation();
     QList<QRectF> createInactiveWidgetRects();
     void updatePagePresentationToWidgetSnap();
     void resetSnapPosition();
@@ -117,6 +119,9 @@
     void action_moveScene_moveToNearestPage();
     void action_moveScene_disconnectGestureHandlers();    
     void action_addPage_addPage();
+    void action_preRemovePage_showQuery();
+    void action_preRemovePage_exit();
+    void action_removePage_startRemovePageAnimation();
     void action_removePage_removePage();
     void action_toggleConnection_toggleConnection();
     void action_idle_setupTitle();
@@ -136,18 +141,17 @@
     bool openTaskSwitcher();
     void zoneAnimationFinished();
     void pageChangeAnimationFinished();
-    void onRemovePageConfirmationOk();
     void onVerticalSnapLineTimerTimeout();
     void onHorizontalSnapLineTimerTimeout();
     void onActivePageChanged();
-
+   
 private:
     HbAction *mNavigationAction;
-    HsIdleWidget *mUiWidget;  
+    
     HsTitleResolver *mTitleResolver;
-    QPropertyAnimation *mZoneAnimation;
+  
     bool mAllowZoneAnimation;
-    QPropertyAnimation *mPageChangeAnimation;
+    
     HbContinuousFeedback *mContinuousFeedback;
     bool mTrashBinFeedbackAlreadyPlayed;    
     QPointF mPageHotSpot;
@@ -157,12 +161,13 @@
     QPointer<HbMenu> mSceneMenu;
     HsWidgetPositioningOnWidgetMove::Result mSnapResult;
     HsWidgetPositioningOnWidgetMove::Result mPreviousSnapResult;
-    qreal mSnapBorderGap;
     QTimer mVerticalSnapLineTimer;
-    QTimer mHorizontalSnapLineTimer;
+    QTimer mHorizontalSnapLineTimer; 
 #ifdef Q_OS_SYMBIAN    
     XQSettingsManager *mSettingsMgr;
 #endif    
+    HsMessageBoxWrapper *mMessageBoxWrapper;
+
     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
 };
 
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlewidget.h	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* 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:
-*
-*/
-
-
-#ifndef HSIDLEWIDGET_H
-#define HSIDLEWIDGET_H
-
-#include <HbWidget>
-
-#include "hstest_global.h"
-HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
-
-class HsPage;
-class HsTrashBinWidget;
-class HsPageIndicator;
-class HsSnapLine;
-
-class HsIdleWidget : public HbWidget
-{
-    Q_OBJECT
-    Q_PROPERTY(qreal sceneX READ sceneX WRITE setSceneX)
-
-public:
-    HsIdleWidget(QGraphicsItem *parent = 0);
-	~HsIdleWidget();
-
-    qreal sceneX() const;
-    void setSceneX(qreal x);
-
-    void setGeometry(const QRectF &rect);
-
-    void setActivePage(int index);
-    void insertPage(int index, HsPage *page);
-    void removePage(int index);
-
-    HbWidget *controlLayer() const { return mControlLayer; }
-    HbWidget *pageLayer() const { return mPageLayer; }
-    HbWidget *pageWallpaperLayer() const { return mPageWallpaperLayer; }
-    HbWidget *sceneLayer() const { return mSceneLayer; }
-
-    HsTrashBinWidget *trashBin() const { return mTrashBin; }
-    HsPageIndicator *pageIndicator() const { return mPageIndicator; }
-
-    qreal parallaxFactor() const;
-
-
-public slots:
-    void showTrashBin();
-    void showPageIndicator();
-
-    void showVerticalSnapLine(const QLineF &snapLine);	
-    void hideVerticalSnapLine();
-    void showHorizontalSnapLine(const QLineF &snapLine);
-    void hideHorizontalSnapLine();
-
-protected:
-    void polishEvent();
-
-private:
-    Q_DISABLE_COPY(HsIdleWidget)
-    void loadControlLayer();
-        
-private:
-    HbWidget *mControlLayer;
-    HbWidget *mPageLayer;
-    HbWidget *mPageWallpaperLayer;
-    HbWidget *mSceneLayer;
-
-    HsTrashBinWidget *mTrashBin;
-    HsPageIndicator *mPageIndicator;
-
-    HsSnapLine *mHorizontalSnapLine;
-    HsSnapLine *mVerticalSnapLine;
-
-    HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
-};
-
-#endif // HSIDLEWIDGET_H
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/resource/controllayer.docml	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
-    <widget name="controlLayer" type="HbWidget">
-        <widget name="pageIndicator" type="HsPageIndicator">
-            <sizehint height="2.5un" type="PREFERRED"/>
-        </widget>
-        <widget name="trashBin" type="HsTrashBinWidget">
-            <sizehint type="PREFERRED" height="11un" width="11un"/>
-        </widget>
-        <layout type="anchor">
-            <anchoritem dst="pageIndicator" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-            <anchoritem dst="pageIndicator" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-            <anchoritem dst="pageIndicator" dstEdge="BOTTOM" spacing="-1un" src="" srcEdge="BOTTOM"/>
-            <anchoritem dst="trashBin" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
-            <anchoritem dst="trashBin" dstEdge="BOTTOM" spacing="-1un" src="" srcEdge="BOTTOM"/>
-        </layout>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsbackuprestorestate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsbackuprestorestate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -27,6 +27,7 @@
 #include "hsscene.h"
 #include "hsgui.h"
 
+
 /*!
     \class HsBackupRestoreState
     \ingroup group_hshomescreenstateplugin
@@ -95,12 +96,5 @@
 void HsBackupRestoreState::deleteIdleView()
 {
     // Delete idle view
-    QScopedPointer<HbView> idleView(HsGui::takeIdleView());
-
-    if (idleView){
-        HbAction *navigationAction(idleView->navigationAction());
-        idleView->setNavigationAction(0);
-        delete navigationAction;
-        HsScene::mainWindow()->removeView(idleView.data());
-    }
+    HsGui::instance()->cleanupIdleUi();
 }
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsdocumentloader.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* 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:  Homescreen document loader class.
-*
-*/
-
-#include "hsdocumentloader.h"
-#include "hspageindicator.h"
-#include "hstrashbinwidget.h"
-#include "hsconfiguration.h"
-
-/*!
-    \class HsDocumentLoader
-    \ingroup group_hshomescreenstateplugin
-    \brief Homescreen document loader class.
-
-    Loads own widgets from docml.
-*/
-
-/*!
-    Constructor.
-*/
-HsDocumentLoader::HsDocumentLoader()
-    : HbDocumentLoader()
-{
-}
-
-/*!
-    Destructor.
-*/
-HsDocumentLoader::~HsDocumentLoader()
-{
-}
-
-/*!
-    Looks up an object which inherits class type and of which object name equals to name.
-    \a type type of the desired object.
-    \a name object name of the desired object.
-    */
-QObject *HsDocumentLoader::createObject(const QString &type, const QString &name)
-{
-    if (type == HsPageIndicator::staticMetaObject.className()) {
-        QObject *object = new HsPageIndicator(HSCONFIGURATION_GET(pageIndicatorSpacing));
-        object->setObjectName(name);
-        return object;
-    }
-    else if (type == HsTrashBinWidget::staticMetaObject.className()) {
-        QObject *object = new HsTrashBinWidget;
-        object->setObjectName(name);
-        return object;
-    }
-        
-    return HbDocumentLoader::createObject(type, name);
-}
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlestate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlestate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -42,7 +42,9 @@
 #include "hsdomainmodeldatastructures.h"
 #include "hsscene.h"
 #include "hspage.h"
+#include "hspagevisual.h"
 #include "hswidgethost.h"
+#include "hswidgethostvisual.h"
 #include "hswallpaper.h"
 #include "hswallpaperselectionstate.h"
 #include "hstrashbinwidget.h"
@@ -51,19 +53,15 @@
 #include "hshomescreenstatecommon.h"
 #include "hstitleresolver.h"
 #include "hsmenuservice.h"
+#include "hsconfiguration.h"
+#include "hsmessageboxwrapper.h"
+#include "hspropertyanimationwrapper.h"
 #include "hsgui.h"
-#include "hsconfiguration.h"
 
-// Helper macros for connecting state entry and exit actions.
-#define ENTRY_ACTION(state, action) \
-    connect(state, SIGNAL(entered()), SLOT(action()));
-#define EXIT_ACTION(state, action) \
-    connect(state, SIGNAL(exited()), SLOT(action()));
 
 namespace
 {
-    const char gApplicationLibraryIconName[] = "qtg_mono_applications_all";
-
+  
     //User adds a new page to home screen
     const char hsLocTextId_OptionsMenu_AddPage[] = "txt_homescreen_opt_add_page";
 
@@ -90,13 +88,15 @@
 
     //Text in confirmation dialog while removing page with content
     const char hsLocTextId_Confirmation_RemovePage[] = "txt_homescreen_info_page_and_content_will_be_remov";
-
-    //Button in confirmation dialog while removing page with content
-    const char hsLocTextId_ConfirmationButton_Ok[] = "txt_homescreen_button_ok";
+}
 
-    //Button in confirmation dialog while removing page with content
-    const char hsLocTextId_ConfirmationButton_Cancel[] = "txt_homescreen_button_cancel";
-}
+// Helper macros for connecting state entry and exit actions.
+#define ENTRY_ACTION(state, action) \
+    connect(state, SIGNAL(entered()), SLOT(action()));
+#define EXIT_ACTION(state, action) \
+    connect(state, SIGNAL(exited()), SLOT(action()));
+
+
 
 /*!
     \class HsIdleState
@@ -114,23 +114,22 @@
 */
 HsIdleState::HsIdleState(QState *parent)
   : QState(parent),
-    mNavigationAction(0), mUiWidget(0),
+    mNavigationAction(0), 
     mTitleResolver(0),
-    mZoneAnimation(0),
     mAllowZoneAnimation(false),
-    mPageChangeAnimation(0),
     mContinuousFeedback(0),
     mTrashBinFeedbackAlreadyPlayed(false),
     mDeltaX(0),
-    mSceneMenu(0),
-    mSnapBorderGap(0.0)
+    mSceneMenu(0)
 #ifdef Q_OS_SYMBIAN
     ,mSettingsMgr(0)
 #endif
+    ,mMessageBoxWrapper(0)
+    
 {
     setupStates();
     mTitleResolver = new HsTitleResolver(this);
-
+     
     // TODO: Uncomment when updated API available
     //mContinuousFeedback = new HbContinuousFeedback;
     //mContinuousFeedback->setContinuousEffect(HbFeedback::ContinuousSmooth);
@@ -145,7 +144,6 @@
 */
 HsIdleState::~HsIdleState()
 {
-    delete mZoneAnimation;
     // TODO: Uncomment when updated API available
     //delete mContinuousFeedback;
 }
@@ -231,6 +229,7 @@
     HsWallpaperSelectionState *state_wallpaperSelectionState =
         new HsWallpaperSelectionState(this);
     QState *state_addPage = new QState(this);
+    QState *state_preRemovePage = new QState(this);
     QState *state_removePage = new QState(this);
     QState *state_toggleConnection = new QState(this);
 
@@ -239,7 +238,7 @@
     state_waitInput->addTransition(
         this, SIGNAL(event_addPage()), state_addPage);
     state_waitInput->addTransition(
-        this, SIGNAL(event_removePage()), state_removePage);
+        this, SIGNAL(event_preRemovePage()), state_preRemovePage);
     state_waitInput->addTransition(
         this, SIGNAL(event_toggleConnection()), state_toggleConnection);
     state_waitInput->addTransition(
@@ -259,8 +258,15 @@
         state_wallpaperSelectionState, SIGNAL(event_waitInput()), state_waitInput);
 
     state_addPage->addTransition(state_waitInput);
+    
+    state_preRemovePage->addTransition(
+        this,SIGNAL(event_removePage()),state_removePage);
+    
+    state_preRemovePage->addTransition(
+        this,SIGNAL(event_waitInput()),state_waitInput);
 
-    state_removePage->addTransition(state_waitInput);
+    state_removePage->addTransition(
+        this,SIGNAL(event_waitInput()),state_waitInput);
 
     state_toggleConnection->addTransition(state_waitInput);
 
@@ -299,8 +305,12 @@
     EXIT_ACTION(state_moveScene, action_moveScene_disconnectGestureHandlers)
     
     ENTRY_ACTION(state_addPage, action_addPage_addPage)
+    
+    ENTRY_ACTION(state_preRemovePage, action_preRemovePage_showQuery)
+    EXIT_ACTION(state_preRemovePage, action_preRemovePage_exit);
 
-    ENTRY_ACTION(state_removePage, action_removePage_removePage)
+    ENTRY_ACTION(state_removePage, action_removePage_startRemovePageAnimation)
+    EXIT_ACTION(state_removePage, action_removePage_removePage)
 
     ENTRY_ACTION(state_toggleConnection, action_toggleConnection_toggleConnection)
 }
@@ -310,7 +320,7 @@
 */
 qreal HsIdleState::pageLayerXPos(int pageIndex) const
 {
-    return -pageIndex * HsScene::mainWindow()->layoutRect().width();
+    return -pageIndex * HsGui::instance()->layoutRect().width();
 }
 
 /*!
@@ -319,25 +329,31 @@
 */
 void HsIdleState::startPageChangeAnimation(int targetPageIndex, int duration)
 {
-    if (!mPageChangeAnimation) {
-        mPageChangeAnimation = new QPropertyAnimation(mUiWidget, "sceneX");        
+    HsPropertyAnimationWrapper *animation = HsGui::instance()->pageChangeAnimation();
+    if (animation->isRunning()) {
+        animation->stop();
+    }        
+    animation->disconnect(this);
+    animation->setEndValue(pageLayerXPos(targetPageIndex));
+    animation->setDuration(duration);
+    
+    if (abs(mDeltaX) < HSCONFIGURATION_GET(pageChangePanDistanceInPixels)) {
+        animation->setEasingCurve(HSCONFIGURATION_GET(bounceAnimationEasingCurve)); 
     }
-    else if (mPageChangeAnimation->state() != QAbstractAnimation::Stopped) {
-        mPageChangeAnimation->stop();
-    }        
-    
-    mPageChangeAnimation->setEndValue(pageLayerXPos(targetPageIndex));
-    mPageChangeAnimation->setDuration(duration);
-    connect(mPageChangeAnimation,
+    else {
+        animation->setEasingCurve(HSCONFIGURATION_GET(pageChangeAnimationEasingCurve));
+    }
+
+    connect(animation,
             SIGNAL(finished()),
             SLOT(pageChangeAnimationFinished()), 
             Qt::UniqueConnection);
-    mPageChangeAnimation->start();
+    animation->start();
     
     HbInstantFeedback::play(HSCONFIGURATION_GET(pageChangeFeedbackEffect));
     
-    mUiWidget->showPageIndicator();
-    mUiWidget->setActivePage(targetPageIndex);
+    HsGui::instance()->idleWidget()->showPageIndicator();
+    HsGui::instance()->idleWidget()->setActivePage(targetPageIndex);
 }
 
 /*!
@@ -358,25 +374,25 @@
         return;
     }
 
-    if (!mZoneAnimation) {
-        mZoneAnimation = new QPropertyAnimation(mUiWidget, "sceneX");
-    }
-
     int bounceEffect = HSCONFIGURATION_GET(bounceEffect);
+    
+    HsPropertyAnimationWrapper *pageCrawlingAnimation =
+        HsGui::instance()->pageCrawlingAnimation();
 
     if (isInLeftPageChangeZone()) {
-        mZoneAnimation->setEndValue(pageLayerXPos(scene->activePageIndex()) + bounceEffect);
+        pageCrawlingAnimation->setEndValue(pageLayerXPos(scene->activePageIndex()) + bounceEffect);
     } else {
-        mZoneAnimation->setEndValue(pageLayerXPos(scene->activePageIndex()) - bounceEffect);
+        pageCrawlingAnimation->setEndValue(pageLayerXPos(scene->activePageIndex()) - bounceEffect);
     }
-    mZoneAnimation->setDuration(duration);
-    mZoneAnimation->setDirection(QAbstractAnimation::Forward);
+    pageCrawlingAnimation->setDuration(duration);
+    pageCrawlingAnimation->setForward();
 
-    connect(mZoneAnimation,
+    connect(pageCrawlingAnimation,
             SIGNAL(finished()),
-            SLOT(zoneAnimationFinished()));
+            SLOT(zoneAnimationFinished()),
+            Qt::UniqueConnection);
     
-    mZoneAnimation->start();
+    pageCrawlingAnimation->start();
 }
 
 /*!
@@ -404,7 +420,7 @@
 */
 bool HsIdleState::isInRightPageChangeZone()
 {
-    qreal pageWidth = HsScene::mainWindow()->layoutRect().width();
+    qreal pageWidth = HsGui::instance()->layoutRect().width();
     return mWidgetHotSpot.x() > pageWidth - HSCONFIGURATION_GET(pageChangeZoneWidth);
 }
 
@@ -418,7 +434,7 @@
     HsPage *page = HsPage::createInstance(data);
     page->load();
     HsScene::instance()->addPage(page);
-    mUiWidget->insertPage(pageIndex, page);
+    HsGui::instance()->idleWidget()->insertPage(pageIndex, page);
 }
 
 /*!
@@ -426,26 +442,25 @@
 */
 void HsIdleState::updateZoneAnimation()
 {
-    if (isInPageChangeZone() && mAllowZoneAnimation) {
-        if (!mZoneAnimation && (!mPageChangeAnimation
-            || mPageChangeAnimation->state() == QAbstractAnimation::Stopped )) {
+    HsPropertyAnimationWrapper *pageCrawlingAnimation = 
+        HsGui::instance()->pageCrawlingAnimation();
+
+    if (!mAllowZoneAnimation) {
+        pageCrawlingAnimation->stop();
+    } else if (isInPageChangeZone()) {
+        // should we start it
+        if (!pageCrawlingAnimation->isRunning() &&
+            !HsGui::instance()->pageChangeAnimation()->isRunning()) {
             startPageChangeZoneAnimation(HSCONFIGURATION_GET(pageChangeZoneAnimationDuration));
-        }
-    } else if (mZoneAnimation && !isInPageChangeZone()) {
-        if (mZoneAnimation->state() == QAbstractAnimation::Running) {
-            if (mZoneAnimation->direction() == QAbstractAnimation::Forward) {
-                mZoneAnimation->setDuration(HSCONFIGURATION_GET(pageChangeZoneReverseAnimationDuration));
-                mZoneAnimation->setDirection(QAbstractAnimation::Backward);
-            }
-        } else {
-            // Out of the page change zone. Delete animation.
-            deleteZoneAnimation();
-        }
-    } else if (!isInPageChangeZone()) {
-        if (mZoneAnimation) {
-            mZoneAnimation->stop();
-        }
-    }
+        } 
+    } else if (pageCrawlingAnimation->isRunning()) {
+        // Not in zone, but still running     
+        if (pageCrawlingAnimation->isForward()){
+            // reverse
+            pageCrawlingAnimation->setDuration(HSCONFIGURATION_GET(pageChangeZoneReverseAnimationDuration));
+            pageCrawlingAnimation->setBackward();
+        } 
+    } 
 }
 
 /*!
@@ -453,87 +468,32 @@
 */
 void HsIdleState::showTrashBin()
 {
-    if (mUiWidget->trashBin()->isUnderMouse()) {
+    if (HsGui::instance()->idleWidget()->trashBin()->isUnderMouse()) {
         if (!mTrashBinFeedbackAlreadyPlayed) {
             HbInstantFeedback::play(HSCONFIGURATION_GET(widgetOverTrashbinFeedbackEffect));
             mTrashBinFeedbackAlreadyPlayed = true;
         }
-        mUiWidget->trashBin()->activate();
+        HsGui::instance()->idleWidget()->trashBin()->activate();
     } else {
-        mUiWidget->trashBin()->deactivate();
+        HsGui::instance()->idleWidget()->trashBin()->deactivate();
         mTrashBinFeedbackAlreadyPlayed = false;
     }
 
-    if (!mUiWidget->pageIndicator()->isAnimationRunning()) {
-        mUiWidget->showTrashBin();
+    if (!HsGui::instance()->idleWidget()->pageIndicator()->isAnimationRunning()) {
+        HsGui::instance()->idleWidget()->showTrashBin();
     }
 }
 
 /*!
-    Removes currently active page.
-*/
-void HsIdleState::removeActivePage()
-{
-    HsScene *scene = HsScene::instance();
-    HsPage *page = scene->activePage();
-
-    int pageIndex = scene->activePageIndex();
-
-    mUiWidget->removePage(pageIndex);
-    scene->removePage(page);
-    
-    if (page->wallpaper()) {
-        page->wallpaper()->remove();        
-    }
-    delete page;
-
-    pageIndex = pageIndex == 0 ? 0 : pageIndex - 1;
-    scene->setActivePageIndex(pageIndex);
-
-    startPageChangeAnimation(pageIndex, HSCONFIGURATION_GET(pageRemovedAnimationDuration));
-
-    mUiWidget->pageIndicator()->removeItem(pageIndex);
-    mUiWidget->setActivePage(pageIndex);
-    mUiWidget->showPageIndicator();
-}
-
-/*!
-    Deletes page change zone animation.
-*/
-void HsIdleState::deleteZoneAnimation()
-{
-    delete mZoneAnimation;
-    mZoneAnimation = NULL;
-}
-
-/*!
     If called for the first time, setups the idle view.
     Updates the soft key action and sets the idle view
     as the current view to the main window.
 */
 void HsIdleState::action_idle_setupView()
 {
-    HbView *idleView = HsGui::idleView();
-    if (!idleView) {
-        mUiWidget = new HsIdleWidget;
-        idleView = HsScene::mainWindow()->addView(mUiWidget);
-        idleView->setContentFullScreen();
+    HsGui::instance()->setupIdleUi();
+    connect(HsGui::instance(),SIGNAL(navigateToApplibrary()),SIGNAL(event_applicationLibrary()),Qt::UniqueConnection);
 
-        mNavigationAction = new HbAction(this);
-        mNavigationAction->setIcon(HbIcon(gApplicationLibraryIconName));
-        mNavigationAction->setObjectName("applib_navigation_action");
-        connect(mNavigationAction, SIGNAL(triggered()), SIGNAL(event_applicationLibrary()));
-        idleView->setNavigationAction(mNavigationAction);
-
-        HsGui::setIdleView(idleView);
-
-        if (mPageChangeAnimation) {
-            delete mPageChangeAnimation;
-            mPageChangeAnimation = NULL;
-        }
-    }
-
-    HsScene::mainWindow()->setCurrentView(idleView);
 }
 
 /*!
@@ -553,7 +513,7 @@
 void HsIdleState::onTitleChanged(QString title)
 {
     qDebug() << "HsIdleState::onTitleChanged() to title: " << title;
-    HsGui::idleView()->setTitle(title);
+    HsGui::instance()->idleView()->setTitle(title);
 }
 
 /*!
@@ -587,9 +547,6 @@
     mTitleResolver->disconnect(this);
 }
 
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
 /*!
 
 */
@@ -617,9 +574,6 @@
     mSceneMenu->setPreferredPos(mPageHotSpot);
     mSceneMenu->open();
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
 
 void HsIdleState::onPagePanStarted(QGestureEvent *event)
 {
@@ -636,11 +590,11 @@
 
     HsScene *scene = HsScene::instance();
     int bounceEffect = HSCONFIGURATION_GET(bounceEffect);
-    qreal x = qBound(pageLayerXPos(scene->pages().count() - 1) - bounceEffect / 2 / mUiWidget->parallaxFactor(),
+    qreal x = qBound(pageLayerXPos(scene->pages().count() - 1) - bounceEffect / 2 / HsGui::instance()->idleWidget()->parallaxFactor(),
                      pageLayerXPos(scene->activePageIndex()) + mDeltaX,
-                     pageLayerXPos(0) + (bounceEffect / 2 / mUiWidget->parallaxFactor()));
+                     pageLayerXPos(0) + (bounceEffect / 2 / HsGui::instance()->idleWidget()->parallaxFactor()));
 
-    mUiWidget->setSceneX(x);
+    HsGui::instance()->idleWidget()->setSceneX(x);
 }
  
 void HsIdleState::onPagePanFinished(QGestureEvent *event)
@@ -666,41 +620,42 @@
     
     mWidgetHotSpot = qobject_cast<HbTapAndHoldGesture *>(
         event->gesture(Qt::TapAndHoldGesture))->scenePosition();
-    mWidgetHotSpotOffset = mWidgetHotSpot - widget->pos();
+    mWidgetHotSpotOffset = mWidgetHotSpot - widget->visual()->pos();
     
     emit event_moveWidget();
 }
  
 void HsIdleState::onWidgetMoveUpdated(const QPointF &scenePos, HsWidgetHost *widget)
 {
-    HsScene *scene = HsScene::instance();
-    QRectF widgetRect = widget->geometry();
+    QRectF widgetRect = widget->visual()->geometry();
 
-    // Move widget to new position.
+    // Move widget to updated position.
     mWidgetHotSpot = scenePos;
-       
     widgetRect.moveTopLeft(mWidgetHotSpot - mWidgetHotSpotOffset);
 
-    // Widget can be moved over the pages left border.
+    // When moving widget can go over the pages left border.
     qreal lowerBoundX = -widgetRect.width();
-    HsPage *page = scene->activePage();
-    QRectF pageRect = HsGui::idleView()->rect();
-    // Widget can be moved over the pages right border.
+
+    // When moving widget can go over the pages right border.
+    QRectF pageRect = HsGui::instance()->idleView()->rect();
     qreal upperBoundX = pageRect.width();
 
+    // When moving widget can go under the chrome at the pages upper border.
     // Notice that chrome height is 64 pixels.
     qreal lowerBoundY = qreal(64) - widgetRect.height();
-    // Widget can be moved over the pages down border.
+
+    // When moving widget can go over the pages down border.
     qreal upperBoundY = pageRect.height();
 
     qreal widgetX = qBound(lowerBoundX, widgetRect.x(), upperBoundX);
     qreal widgetY = qBound(lowerBoundY, widgetRect.y(), upperBoundY);
+
     // If using ItemClipsChildrenToShape-flag in widgethost then
     // setPos does not update position here, however setGeometry does it, QT bug?
-    widget->setGeometry(widgetX, widgetY, widgetRect.width(), widgetRect.height());
+    widget->visual()->setGeometry(widgetX, widgetY, widgetRect.width(), widgetRect.height());
     
     if (HSCONFIGURATION_GET(isSnapEnabled)) {
-        mSnapResult = HsWidgetPositioningOnWidgetMove::instance()->run(widget->sceneBoundingRect());
+        mSnapResult = HsWidgetPositioningOnWidgetMove::instance()->run(widget->visual()->sceneBoundingRect());
 
         if (HSCONFIGURATION_GET(isSnapEffectsEnabled)) {
             if (mSnapResult.hasHorizontalSnap) {
@@ -720,11 +675,12 @@
         mPreviousSnapResult = mSnapResult;
     }
 
-
-    int bounceFeedbackEffectDistance = HSCONFIGURATION_GET(bounceFeedbackEffectDistance);
     // Handle effects:
     // User is indicated by a tactile feedback if he/she is trying to move
     // widget over the first or the last page.
+    HsScene *scene = HsScene::instance();
+    HsPage *page = scene->activePage();
+    int bounceFeedbackEffectDistance = HSCONFIGURATION_GET(bounceFeedbackEffectDistance);
     if( (page == scene->pages().first() && mWidgetHotSpot.x() < bounceFeedbackEffectDistance ) ||
         (page == scene->pages().last() && scene->pages().count() == HSCONFIGURATION_GET(maximumPageCount)
          && mWidgetHotSpot.x() > pageRect.width() - bounceFeedbackEffectDistance)) {
@@ -733,8 +689,7 @@
             //if (!mContinuousFeedback->isPlaying()) {
             //    mContinuousFeedback->play();
             //}
-        }
-        else /*if (mContinuousFeedback->isPlaying())*/ {
+        } else /*if (mContinuousFeedback->isPlaying())*/ {
             //mContinuousFeedback->stop();
         }
 
@@ -783,7 +738,7 @@
     QApplication::instance()->installEventFilter(scene);
     scene->activePage()->showWidgets();
     qreal x = pageLayerXPos(scene->activePageIndex());
-    mUiWidget->setSceneX(x);
+    HsGui::instance()->idleWidget()->setSceneX(x);
 }
 
 /*!
@@ -791,7 +746,7 @@
 */
 void HsIdleState::action_idle_connectOrientationChangeEventHandler()
 {
-    connect(HsScene::mainWindow(),
+    connect(HsGui::instance(),
         SIGNAL(orientationChanged(Qt::Orientation)),
         SLOT(action_idle_orientationChanged()));
 }
@@ -838,9 +793,10 @@
     HsScene *scene = HsScene::instance();
     QApplication::instance()->removeEventFilter(scene);
     scene->activePage()->hideWidgets();
-
+    
+    HsGui::instance()->disconnect(this,SIGNAL(event_applicationLibrary()));
     //Close options menu on view change
-    HsGui::idleView()->setMenu(NULL);
+    HsGui::instance()->idleView()->setMenu(NULL);
 
     //Close context menu on view change
     if (mSceneMenu) {
@@ -853,7 +809,7 @@
 */
 void HsIdleState::action_idle_disconnectOrientationChangeEventHandler()
 {
-    disconnect(HsScene::mainWindow(),
+    disconnect(HsGui::instance(),
         SIGNAL(orientationChanged(Qt::Orientation)),
         this, SLOT(action_idle_orientationChanged()));
 }
@@ -876,44 +832,39 @@
     HbMenu *menu = new HbMenu();
     menu->setObjectName("hs_menu");
     // Task switcher
-    HbAction *action = menu->addAction(hbTrId(hsLocTextId_OptionsMenu_TaskSwitcher),
+    menu->addAction(hbTrId(hsLocTextId_OptionsMenu_TaskSwitcher),
         this, SLOT(openTaskSwitcher()));
-    action->setObjectName("action_open_task_switcher");
+    
     // Add content
-    action = menu->addAction(hbTrId(hsLocTextId_ContextMenu_AddContent),
+    menu->addAction(hbTrId(hsLocTextId_ContextMenu_AddContent),
         this, SLOT(onAddContentFromOptionsMenuActionTriggered()));
-    action->setObjectName("action_add_content");
     // Add page
     if (scene->pages().count() < HSCONFIGURATION_GET(maximumPageCount)) {
-        action = menu->addAction(hbTrId(hsLocTextId_OptionsMenu_AddPage),
+        menu->addAction(hbTrId(hsLocTextId_OptionsMenu_AddPage),
             this, SIGNAL(event_addPage()));
-        action->setObjectName("action_add_page");
-
+    
     }
 
     // Change wallpaper
-    action = menu->addAction(hbTrId(hsLocTextId_ContextMenu_ChangeWallpaper),
+    menu->addAction(hbTrId(hsLocTextId_ContextMenu_ChangeWallpaper),
         this, SIGNAL(event_selectWallpaper()));
-    action->setObjectName("action_change_wallpaper");
+    
     // Remove page
     if (scene->activePage()->isRemovable()) {
-        action = menu->addAction(hbTrId(hsLocTextId_OptionsMenu_RemovePage),
-            this, SIGNAL(event_removePage()));
-        action->setObjectName("action_remove_page"); 
+        menu->addAction(hbTrId(hsLocTextId_OptionsMenu_RemovePage),
+            this, SIGNAL(event_preRemovePage()));
     }
 
     // Online / Offline
     if (scene->isOnline()) {
-        action = menu->addAction(hbTrId(hsLocTextId_OptionsMenu_HsToOffline),
+        menu->addAction(hbTrId(hsLocTextId_OptionsMenu_HsToOffline),
             this, SIGNAL(event_toggleConnection()));
-        action->setObjectName("action_to_offline");
     } else {
-        action = menu->addAction(hbTrId(hsLocTextId_OptionsMenu_HsToOnline),
+        menu->addAction(hbTrId(hsLocTextId_OptionsMenu_HsToOnline),
             this, SIGNAL(event_toggleConnection()));
-        action->setObjectName("action_to_online");
     }
 
-    HsGui::idleView()->setMenu(menu);
+    HsGui::instance()->idleView()->setMenu(menu);
 }
 
 void HsIdleState::action_waitInput_connectGestureHandlers()
@@ -962,9 +913,9 @@
 {
     HsWidgetHost *widget = HsScene::instance()->activeWidget();
     Q_ASSERT(widget);
-    widget->setParentItem(mUiWidget->controlLayer());
+    widget->visual()->setParentItem(HsGui::instance()->idleWidget()->controlLayer());
 
-    mUiWidget->showTrashBin();
+    HsGui::instance()->idleWidget()->showTrashBin();
 }
 
 /*!
@@ -1001,16 +952,13 @@
 void HsIdleState::action_moveWidget_setWidgetSnap()
 {
     if (HSCONFIGURATION_GET(isSnapEnabled)) {
-        mSnapBorderGap = HSCONFIGURATION_GET(snapBorderGap);
 
         QVariantHash snapConfiguration;
         snapConfiguration[SNAPENABLED] = QString::number(HSCONFIGURATION_GET(isSnapEnabled));
         snapConfiguration[SNAPFORCE] = QString::number(HSCONFIGURATION_GET(snapForce));
         snapConfiguration[SNAPGAP] = QString::number(HSCONFIGURATION_GET(snapGap));
-        snapConfiguration[SNAPBORDERGAP] = mSnapBorderGap;
         HsWidgetPositioningOnWidgetMove::instance()->setConfiguration(snapConfiguration);
 
-
         updatePagePresentationToWidgetSnap();
 
         connect(HsScene::instance(), SIGNAL(activePageChanged()),
@@ -1045,7 +993,7 @@
         if (widget == activeWidget) {
            continue;
         }
-        QRectF widgetRect = widget->geometry();
+        QRectF widgetRect = widget->visual()->geometry();
         incativeWidgetRects.append(widgetRect);
     }
     return incativeWidgetRects;
@@ -1056,18 +1004,20 @@
 */
 void HsIdleState::action_moveWidget_reparentToPage()
 {
-    if (mZoneAnimation
-        && mZoneAnimation->state() == QAbstractAnimation::Running
-        && mZoneAnimation->direction() == QAbstractAnimation::Forward) {
-        mZoneAnimation->setDuration(HSCONFIGURATION_GET(pageChangeZoneReverseAnimationDuration));
-        mZoneAnimation->setDirection(QAbstractAnimation::Backward);
+    HsPropertyAnimationWrapper *pageCrawlingAnimation =
+        HsGui::instance()->pageCrawlingAnimation();
+    if (pageCrawlingAnimation->isRunning()&& 
+        pageCrawlingAnimation->isForward()) {
+
+        pageCrawlingAnimation->setDuration(HSCONFIGURATION_GET(pageChangeZoneReverseAnimationDuration));
+        pageCrawlingAnimation->setBackward();
     }
 
     HsScene *scene = HsScene::instance();
     HsPage *page = scene->activePage();
     HsWidgetHost *widget = scene->activeWidget();
 
-    if (mUiWidget->trashBin()->isUnderMouse()) {
+    if (HsGui::instance()->idleWidget()->trashBin()->isUnderMouse()) {
         HbInstantFeedback::play(HSCONFIGURATION_GET(widgetDropToTrashbinFeedbackEffect));
         widget->page()->removeWidget(widget);
         widget->remove();
@@ -1076,17 +1026,15 @@
         if (widget->page() != page) {
             widget->page()->removeWidget(widget);
             page->addExistingWidget(widget);
-            if (HsScene::orientation() == Qt::Horizontal) {
+            if (HsGui::instance()->orientation() == Qt::Horizontal) {
                 widget->removePresentation(Qt::Vertical);
             } else {
                 widget->removePresentation(Qt::Horizontal);
             }
         }
 
-        QRectF widgetRect = widget->geometry();
-        QRectF pageRect = page->rect();
-
         //Set the snap position of the widget and save the position
+        QRectF widgetRect = widget->visual()->geometry();
         if (mSnapResult.hasHorizontalSnap) {
             widgetRect.moveLeft(mSnapResult.horizontalSnapPosition);
         }
@@ -1094,23 +1042,16 @@
             widgetRect.moveTop(mSnapResult.verticalSnapPosition);
         }
 
-        //if snapBorderGap is defined, the widget is bounded in the rectangle which is smaller by snapBorderGap on all sides
-        qreal widgetX = qBound(qreal(0) + mSnapBorderGap, widgetRect.x(), (pageRect.width() - mSnapBorderGap) - widgetRect.width());
-        qreal widgetY = qBound(qreal(64) + mSnapBorderGap, widgetRect.y(), (pageRect.height() - mSnapBorderGap) - widgetRect.height());
-
-        // play feedback effect if user drops widget between pages and it needs to be repositioned back to original page
-        if( widgetX != widgetRect.x() || widgetY != widgetRect.y()) {
-            HbInstantFeedback::play(HSCONFIGURATION_GET(widgetRepositionFeedbackEffect));
-        }
-        widget->setPos(widgetX, widgetY);
+        QPointF adjustedWidgetPosition = page->adjustedWidgetPosition(widgetRect);
+        widget->visual()->setPos(adjustedWidgetPosition);
 
         widget->savePresentation();
         page->updateZValues();
     }
 
-    widget->setParentItem(HsScene::instance()->activePage());
+    widget->visual()->setParentItem(HsScene::instance()->activePage()->visual());
 
-    mUiWidget->showPageIndicator();
+    HsGui::instance()->idleWidget()->showPageIndicator();
 }
 
 /*!
@@ -1181,7 +1122,7 @@
 void HsIdleState::action_moveScene_moveToNearestPage()
 {
     QList<HsPage *> pages = HsScene::instance()->pages();
-    QSizeF pageSize = pages.first()->size();
+    QSizeF pageSize = pages.first()->visual()->size();
 
     int pageIndex = HsScene::instance()->activePageIndex();
 
@@ -1193,6 +1134,17 @@
 
     HsScene::instance()->setActivePageIndex(pageIndex);
 
+    HsPage *page = HsScene::instance()->activePage();
+    if (page) {
+        QList<HsWidgetHost *> widgets = page->newWidgets();
+        if (!widgets.isEmpty()) {
+            foreach (HsWidgetHost *widget, widgets) {
+                widget->startWidget();
+            }
+        }
+    page->layoutNewWidgets();
+    }
+
     startPageChangeAnimation(pageIndex, HSCONFIGURATION_GET(pageChangeAnimationDuration));
 }
 
@@ -1212,8 +1164,74 @@
     addPageToScene(pageIndex);
     scene->setActivePageIndex(pageIndex);
     startPageChangeAnimation(pageIndex, HSCONFIGURATION_GET(newPageAddedAnimationDuration));
-    mUiWidget->pageIndicator()->addItem(pageIndex);
-    mUiWidget->showPageIndicator();
+    HsGui::instance()->idleWidget()->pageIndicator()->addItem(pageIndex);
+    HsGui::instance()->idleWidget()->showPageIndicator();
+}
+
+/*!
+    Displays a confirmation query before page is removed if there are widgets on page 
+*/
+void HsIdleState::action_preRemovePage_showQuery()
+{
+    HsScene *scene = HsScene::instance();
+    HsPage *page = scene->activePage();
+
+    if (!page->widgets().isEmpty()) {
+        if (!mMessageBoxWrapper) {
+            mMessageBoxWrapper = new HsMessageBoxWrapper(this);
+            mMessageBoxWrapper->setHeader(hbTrId(hsLocTextId_Title_RemovePage));
+            mMessageBoxWrapper->setQueryText(hbTrId(hsLocTextId_Confirmation_RemovePage));
+            connect(mMessageBoxWrapper,SIGNAL(accepted()),SIGNAL(event_removePage())); 
+            connect(mMessageBoxWrapper,SIGNAL(rejected()),SIGNAL(event_waitInput())); 
+        }
+        mMessageBoxWrapper->show();
+    } else {
+        // Empty page can be removed without confirmation
+        emit event_removePage();
+    }
+}
+
+/*!
+    Make sure confirmation query gets closed if user exits preRemovePage state e.g. by pressing application key
+*/
+void HsIdleState::action_preRemovePage_exit()
+{
+    if (mMessageBoxWrapper) {
+        mMessageBoxWrapper->close();
+    }
+}
+
+/*!
+    Start remove page animation.
+*/
+void HsIdleState::action_removePage_startRemovePageAnimation()
+{
+    HsScene *scene = HsScene::instance();
+   
+    int pageToRemoveIndex = scene->activePageIndex();
+    bool isLastPage(scene->activePage() == scene->pages().last());
+    
+    int nextPageIndex(pageToRemoveIndex);
+    nextPageIndex++;
+    if (isLastPage) {
+        nextPageIndex--; 
+    }
+    HsPropertyAnimationWrapper *animation = HsGui::instance()->pageChangeAnimation();
+    if (animation->isRunning()) {
+        animation->stop();
+    }
+    animation->disconnect(this);
+    connect(animation,
+            SIGNAL(finished()),
+            SIGNAL(event_waitInput()), 
+            Qt::UniqueConnection);
+    animation->setEndValue(pageLayerXPos(nextPageIndex));
+    animation->setDuration(HSCONFIGURATION_GET(pageRemovedAnimationDuration));
+   
+    animation->start();
+    
+    HbInstantFeedback::play(HSCONFIGURATION_GET(pageChangeFeedbackEffect));
+    
 }
 
 /*!
@@ -1221,30 +1239,26 @@
 */
 void HsIdleState::action_removePage_removePage()
 {
+    HsIdleWidget *idleWidget = HsGui::instance()->idleWidget();
+    HsPropertyAnimationWrapper *animation = HsGui::instance()->pageChangeAnimation();
     HsScene *scene = HsScene::instance();
-    HsPage *page = scene->activePage();
-
-    if (!page->widgets().isEmpty()) {
-#ifndef HOMESCREEN_TEST //We don't want to test message box.
-        //Confirm removal of page having content
-        HbMessageBox *box = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
-        box->setAttribute(Qt::WA_DeleteOnClose);
-        box->setHeadingWidget(new HbLabel
-                                (hbTrId(hsLocTextId_Title_RemovePage)));
-        box->setText(hbTrId(hsLocTextId_Confirmation_RemovePage));
+    HsPage *pageToRemove = scene->activePage();
 
-        QAction *buttonOk = box->actions().at(0);
-        //We are keen only from OK button. Cancel is not connected to any slot.
-        connect(buttonOk, SIGNAL(triggered()), SLOT(onRemovePageConfirmationOk()));
-       
-        box->open();
-#endif // HOMESCREEN_TEST
-    } else {
-        // Empty page can be removed without confirmation
-        removeActivePage();
+    if (animation->isRunning()) {
+        animation->stop();
     }
+    // remove from ui
+    idleWidget->removePage(pageToRemove->pageIndex());
+    idleWidget->showPageIndicator();
+    // update data model
+    scene->removePage(pageToRemove);
+    // Take new active page (previous was removed) and move scene to right position
+    qreal x = pageLayerXPos(scene->activePageIndex());
+    idleWidget->setSceneX(x);
+    // delete it   
+    pageToRemove->deleteLater();
+   
 }
-
 /*!
     Toggles the homescreen online/offline state.
 */
@@ -1277,8 +1291,8 @@
 {
     HsScene *scene = HsScene::instance();
     int pageIndex = scene->activePageIndex();
-
-    if (mZoneAnimation->direction() == QAbstractAnimation::Forward) {
+    HsGui *gui(HsGui::instance());
+    if (gui->pageCrawlingAnimation()->isForward()) {
         if (isInLeftPageChangeZone() &&
             0 < pageIndex) {
             --pageIndex;
@@ -1289,18 +1303,16 @@
         if (pageIndex == scene->pages().count()) {
             if (pageIndex < HSCONFIGURATION_GET(maximumPageCount)) {
                 addPageToScene(pageIndex);
-                mUiWidget->showPageIndicator();
-                mUiWidget->pageIndicator()->addItem(pageIndex);
+                gui->idleWidget()->showPageIndicator();
+                gui->idleWidget()->pageIndicator()->addItem(pageIndex);
             }
         }
         scene->setActivePageIndex(pageIndex);
         startPageChangeAnimation(pageIndex, HSCONFIGURATION_GET(pageChangeAnimationDuration));
     } else {
         scene->setActivePageIndex(pageIndex);
-        mUiWidget->setActivePage(pageIndex);
+        gui->idleWidget()->setActivePage(pageIndex);
     }
-
-    deleteZoneAnimation();
 }
 
 /*!
@@ -1311,23 +1323,16 @@
     updateZoneAnimation();
 }
 
-/*!
-    Handles the close of remove page confirmation dialog for page having content.
-*/
-void HsIdleState::onRemovePageConfirmationOk()
-{
-    removeActivePage();
-}
 
 /*!
     Provides the page presentation to the Widget Snap algorithm
 */
 void HsIdleState::updatePagePresentationToWidgetSnap()
 {
-    QRectF containerRect = HsScene::instance()->activePage()->rect();
-    containerRect.setTop(qreal(64));
+    QRectF containerRect = HsScene::instance()->activePage()->contentGeometry();
     HsWidgetHost *activeWidget = HsScene::instance()->activeWidget();
-    HsWidgetPositioningOnWidgetMove::instance()->setPagePresentation(containerRect, createInactiveWidgetRects(), activeWidget->geometry());
+    HsWidgetPositioningOnWidgetMove::instance()->setPagePresentation(
+        containerRect, createInactiveWidgetRects(), activeWidget->visual()->geometry());
 }
 
 /*!
@@ -1356,7 +1361,7 @@
         //the line will be shown when the timer expires.
         //If timer has already expired, just show the line, which is redrawn to new geometry.
         if (!mVerticalSnapLineTimer.isActive()) {
-            mUiWidget->showVerticalSnapLine(mSnapResult.verticalSnapLine);
+            HsGui::instance()->idleWidget()->showVerticalSnapLine(mSnapResult.verticalSnapLine);
         }
     }
 }
@@ -1366,7 +1371,7 @@
 */
 void HsIdleState::onVerticalSnapLineTimerTimeout()
 {
-    mUiWidget->showVerticalSnapLine(mSnapResult.verticalSnapLine);
+    HsGui::instance()->idleWidget()->showVerticalSnapLine(mSnapResult.verticalSnapLine);
 }
 
 /*!
@@ -1374,7 +1379,7 @@
 */
 void HsIdleState::hideVerticalLine()
 {
-    mUiWidget->hideVerticalSnapLine();
+    HsGui::instance()->idleWidget()->hideVerticalSnapLine();
     mVerticalSnapLineTimer.stop();
 }
 
@@ -1389,7 +1394,7 @@
     }
     else {
         if (!mHorizontalSnapLineTimer.isActive()) {
-            mUiWidget->showHorizontalSnapLine(mSnapResult.horizontalSnapLine);
+            HsGui::instance()->idleWidget()->showHorizontalSnapLine(mSnapResult.horizontalSnapLine);
         }
     }
 }
@@ -1399,7 +1404,7 @@
 */
 void HsIdleState::onHorizontalSnapLineTimerTimeout()
 {
-    mUiWidget->showHorizontalSnapLine(mSnapResult.horizontalSnapLine);
+    HsGui::instance()->idleWidget()->showHorizontalSnapLine(mSnapResult.horizontalSnapLine);
 }
 
 /*!
@@ -1407,7 +1412,7 @@
 */
 void HsIdleState::hideHorizontalLine()
 {
-    mUiWidget->hideHorizontalSnapLine();
+    HsGui::instance()->idleWidget()->hideHorizontalSnapLine();
     mHorizontalSnapLineTimer.stop();
 }
 
@@ -1419,3 +1424,5 @@
     updatePagePresentationToWidgetSnap();
     resetSnapPosition();
 }
+
+
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsidlewidget.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,405 +0,0 @@
-/*
-* 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:
-*
-*/
-
-#include <QApplication>
-#include <QGraphicsSceneMouseEvent>
-#include <QGraphicsLinearLayout>
-#include <QDir>
-
-#include <HbMainWindow>
-#include <HbVkbHost>
-
-#include "hsidlewidget.h"
-#include "hsscene.h"
-#include "hspage.h"
-#include "hswidgethost.h"
-#include "hswallpaper.h"
-#include "hstrashbinwidget.h"
-#include "hspageindicator.h"
-#include "hsdocumentloader.h"
-#include "hsconfiguration.h"
-#include "hsapp_defs.h"
-#include "hssnapline.h"
-
-namespace
-{
-    const char gControlLayerDocmlName[] = "controllayer.docml";
-    const char gControlLayerName[]      = "controlLayer";
-    const char gTrashBinName[]          = "trashBin";
-    const char gPageIndicatorName[]     = "pageIndicator";
-}
-
-/*!
-    \class HsIdleWidget
-    \ingroup group_hshomescreenstateplugin
-    \brief View part of the home screen idle state.
-
-    Maintains the idle view ui layers and takes care of
-    receiving user input and communicating it to the idle
-    state for further processing.
-*/
-
-/*!
-    Constructs a new idle widget with the given \a parent.
-*/
-HsIdleWidget::HsIdleWidget(QGraphicsItem *parent)
-  : HbWidget(parent),
-    mControlLayer(0), mPageLayer(0), mPageWallpaperLayer(0),
-    mSceneLayer(0),
-    mTrashBin(0), mPageIndicator(0),
-    mHorizontalSnapLine(0), mVerticalSnapLine(0)
-{
-    setFlag(ItemHasNoContents);
-
-    loadControlLayer();
-
-    QGraphicsLinearLayout *linearLayout = 0;
-
-    linearLayout = new QGraphicsLinearLayout(Qt::Horizontal);
-    linearLayout->setContentsMargins(0, 0, 0, 0);
-    linearLayout->setSpacing(0);
-    mPageLayer = new HbWidget(this);
-    mPageLayer->setLayout(linearLayout);
-    mPageLayer->setZValue(2);
-    
-    linearLayout = new QGraphicsLinearLayout(Qt::Horizontal);
-    linearLayout->setContentsMargins(0, 0, 0, 0);
-    linearLayout->setSpacing(0);
-    mPageWallpaperLayer = new HbWidget(this);
-    mPageWallpaperLayer->setLayout(linearLayout);
-    mPageWallpaperLayer->setZValue(1);
-    
-    linearLayout = new QGraphicsLinearLayout(Qt::Horizontal);
-    linearLayout->setContentsMargins(0, 0, 0, 0);
-    linearLayout->setSpacing(0);
-    mSceneLayer = new HbWidget(this);
-    mSceneLayer->setLayout(linearLayout);
-    mSceneLayer->setZValue(0);
-}
-
-/*!
-    Destroys this idle widget.
-*/
-HsIdleWidget::~HsIdleWidget()
-{
-    QList<HsPage *> pages = HsScene::instance()->pages();
-    foreach (HsPage *page, pages) {
-        page->setParentItem(0);
-        if (page->scene()) {
-            page->scene()->removeItem(page);
-        }
-        HsWallpaper *pageWallpaper = page->wallpaper();
-        if (pageWallpaper) {
-            pageWallpaper->setParentItem(0);
-            if (pageWallpaper->scene()) {
-                pageWallpaper->scene()->removeItem(pageWallpaper);
-            }
-        }
-    }
-
-    HsWallpaper *sceneWallpaper = HsScene::instance()->wallpaper();
-    if (sceneWallpaper) {
-        sceneWallpaper->setParentItem(0);
-        if (sceneWallpaper->scene()) {
-            sceneWallpaper->scene()->removeItem(sceneWallpaper);
-        }
-    }
-}
-
-qreal HsIdleWidget::sceneX() const
-{
-    return mPageLayer->x();
-}
-
-void HsIdleWidget::setSceneX(qreal x)
-{
-    if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::SceneWallpaper) {
-        mPageLayer->setX(x);
-        mSceneLayer->setX((parallaxFactor() * x) - HSCONFIGURATION_GET(bounceEffect) / 2);
-    } else {
-        mPageLayer->setX(x);
-        mPageWallpaperLayer->setX(x);
-    }
-}
-
-/*!
-    Layouts the ui layers according to the given \a rect.
-    If given \a rect has different size than a fullscreen view, rect
-    is lifted up by statuspane height. Normally HsIdleWidget position is 0,0 
-    relative to it's parent container (HbView). This functionality tackles
-    problem caused by HbStackedLayout which sets top most rect for all items 
-    (views) in a stack (not considering fullscreen mode).
-*/
-void HsIdleWidget::setGeometry(const QRectF &rect)
-{
-    
-    int n = HsScene::instance()->pages().count();
-    QRectF layoutRect(HsScene::instance()->mainWindow()->layoutRect());
-    if (layoutRect == rect || (layoutRect.height() == rect.width() && layoutRect.width() == rect.height())) {
-        mControlLayer->resize(rect.size());
-        mPageLayer->resize(n * rect.width(), rect.height());
-        if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
-            mPageWallpaperLayer->resize(n * rect.width(), rect.height());
-        }
-        mSceneLayer->resize(2 * rect.width() + HSCONFIGURATION_GET(bounceEffect), rect.height());
-        HbWidget::setGeometry(rect);
-    } else {
-        QRectF sceneRect = mapToScene(rect).boundingRect();
-        // HbView is a container item for widget, thus 0,0 is relative to view's position.
-        // Lift rect by offset. Fullscreen view is in 0,0 position in scene coordinates otherwise
-        // it's e.g 0,68 (statuspane being at 0,0 and view at 0,68)
-        sceneRect.setTop(-sceneRect.top());
-        HbWidget::setGeometry(sceneRect);
-    }
-}
-
-/*!
-    Sets the active page \a index to the page
-    indicator.
-*/
-void HsIdleWidget::setActivePage(int index)
-{
-    mPageIndicator->setActiveItemIndex(index);
-}
-
-/*!
-    Inserts the given \a page at index position
-    \a index in the page layer.
-*/
-void HsIdleWidget::insertPage(int index, HsPage *page)
-{
-    QGraphicsLinearLayout *layout =
-        static_cast<QGraphicsLinearLayout *>(mPageLayer->layout());
-    layout->insertItem(index, page);
-    mPageLayer->resize(
-        layout->count() * size().width(), size().height());
-
-    if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
-        QGraphicsLinearLayout *layout =
-            static_cast<QGraphicsLinearLayout *>(mPageWallpaperLayer->layout());
-        layout->insertItem(index, page->wallpaper());
-        mPageWallpaperLayer->resize(
-            layout->count() * size().width(), size().height());
-    }
-}
-
-/*!
-    Removes the page at index position
-    \a index in the page layer.
-*/
-void HsIdleWidget::removePage(int index)
-{
-    QGraphicsLinearLayout *layout =
-        static_cast<QGraphicsLinearLayout *>(mPageLayer->layout());
-    layout->removeAt(index);
-    mPageLayer->resize(
-        layout->count() * size().width(), size().height());
-
-    if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
-        QGraphicsLinearLayout *layout =
-            static_cast<QGraphicsLinearLayout *>(mPageWallpaperLayer->layout());
-        layout->removeAt(index);
-        mPageWallpaperLayer->resize(
-            layout->count() * size().width(), size().height());
-    }
-}
-
-/*!
-    \fn HsIdleWidget::controlLayer() const
-
-    Returns the control layer.
-*/
-
-/*!
-    \fn HsIdleWidget::pageLayer() const
-
-    Returns the page layer.
-*/
-
-/*!
-    \fn HsIdleWidget::sceneLayer() const
-
-    Returns the scene layer.
-*/
-
-/*!
-    \fn HsIdleWidget::trashBin() const
-
-    Returns the trashbin widget.
-*/
-
-/*!
-    \fn HsIdleWidget::pageIndicator() const
-
-    Returns the page indicator widget.
-*/
-
-/*!
-    Sets the trashbin visible and hides the page indicator.
-*/
-void HsIdleWidget::showTrashBin()
-{
-    mPageIndicator->hide();
-    mTrashBin->show();
-}
-
-/*!
-    Sets the page indicator visible and hides the trashbin.
-*/
-void HsIdleWidget::showPageIndicator()
-{
-    mTrashBin->hide();
-    mTrashBin->deactivate();
-    mPageIndicator->setSpacing(HSCONFIGURATION_GET(pageIndicatorSpacing)); // for usability optimization widget, can be removed later on
-    mPageIndicator->setVisible(1 < mPageIndicator->itemCount());
-}
-
-/*!
-    Shows the Vertical snapping lines showing the guidance
-*/
-void HsIdleWidget::showVerticalSnapLine(const QLineF &snapLine)
-{
-    QVariantHash snapConfiguration;
-    snapConfiguration[SNAPLINEFADEINDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeInDuration));
-    snapConfiguration[SNAPLINEFADEOUTDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeOutDuration));
-
-    mVerticalSnapLine->setConfiguration(snapConfiguration);
-    mVerticalSnapLine->showLine(snapLine);
-}
-
-/*!
-    Shows the Horizontal snapping lines showing the guidance
-*/
-void HsIdleWidget::showHorizontalSnapLine(const QLineF &snapLine)
-{
-    QVariantHash snapConfiguration;
-    snapConfiguration[SNAPLINEFADEINDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeInDuration));
-    snapConfiguration[SNAPLINEFADEOUTDURATION] = QString::number(HSCONFIGURATION_GET(snapLineFadeOutDuration));
-
-    mHorizontalSnapLine->setConfiguration(snapConfiguration);
-    mHorizontalSnapLine->showLine(snapLine);
-}
-
-/*!
-    Hides the Vertical snapping line showing the guidance
-*/
-void HsIdleWidget::hideVerticalSnapLine()
-{
-    mVerticalSnapLine->hideLine();
-}
-
-/*!
-    Hides the Horizontal snapping line showing the guidance
-*/
-void HsIdleWidget::hideHorizontalSnapLine()
-{
-    mHorizontalSnapLine->hideLine();
-}
-
-/*!
-    Reimplements QGraphicsWidget::polishEvent().
-*/
-void HsIdleWidget::polishEvent()
-{
-    HsScene *scene = HsScene::instance();
-    Q_ASSERT(scene);
-
-    QGraphicsLinearLayout *pageLayout = 
-        static_cast<QGraphicsLinearLayout *>(mPageLayer->layout());
-
-    QList<HsPage *> pages = scene->pages();
-
-    foreach (HsPage *page, pages) {
-        pageLayout->addItem(page);
-        if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) {
-            QGraphicsLinearLayout *pageWallpaperLayout = 
-                static_cast<QGraphicsLinearLayout *>(mPageWallpaperLayer->layout());
-            pageWallpaperLayout->addItem(page->wallpaper());
-        }
-    }
-   if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::SceneWallpaper) {
-        QGraphicsLinearLayout *sceneLayout = 
-            static_cast<QGraphicsLinearLayout *>(mSceneLayer->layout());
-    	HsWallpaper *wallpaper = HsScene::instance()->wallpaper();
-        sceneLayout->addItem(wallpaper);
-    }
-           
-    mPageIndicator->initialize(pages.count(), scene->activePageIndex());    
-    showPageIndicator();
-
-    HsScene::mainWindow()->scene()->installEventFilter(this);
-}
-
-/*!
-    Loads the control layer declared in a docml file.
-*/
-void HsIdleWidget::loadControlLayer()
-{
-    HsDocumentLoader loader;
-    bool loaded = false;
-
-#ifndef Q_OS_SYMBIAN
-    QString path = QDir::currentPath();
-#else
-    QString path = "c:";
-#endif
-
-    QString file = path + "/hsresources/" + gControlLayerDocmlName;
-    QString fallbackPath = QString(":/") + gControlLayerDocmlName;
-
-    if (QFile::exists(file)) {
-        loader.load(file, &loaded);
-        if (!loaded) {
-            loader.load(fallbackPath, &loaded);
-        }
-    } else {
-        loader.load(fallbackPath, &loaded);
-    }
-
-    if (loaded) {
-        mControlLayer = qobject_cast<HbWidget *>(loader.findWidget(gControlLayerName));
-        mControlLayer->setZValue(3);
-        mControlLayer->setParentItem(this);
-
-        mTrashBin = qobject_cast<HsTrashBinWidget *>(loader.findWidget(gTrashBinName));
-        mTrashBin->setZValue(1e6);
-
-        mPageIndicator = qobject_cast<HsPageIndicator *>(loader.findWidget(gPageIndicatorName));
-        mPageIndicator->setZValue(1e6);
-
-
-        mHorizontalSnapLine = new HsSnapLine(mControlLayer);
-        mHorizontalSnapLine->setZValue(10);
-
-        mVerticalSnapLine = new HsSnapLine(mControlLayer);
-        mVerticalSnapLine->setZValue(10);
-    } else {
-        // TODO: Handle error.
-    }
-}
-
-qreal HsIdleWidget::parallaxFactor() const
-{   
-    qreal clw = mControlLayer->size().width();
-    qreal slw = mSceneLayer->size().width() - HSCONFIGURATION_GET(bounceEffect);
-    int n = HsScene::instance()->pages().count();
-    if (n < 2) {
-        return 1;
-    } else {
-        return (slw - clw) / ((n - 1) * clw);
-    }
-}
--- a/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsloadscenestate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hshomescreenstateplugin/src/hsloadscenestate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,13 +15,15 @@
 *
 */
 
-#include <HbMainWindow>
+#include "hsloadscenestate.h"
+#include "hsscene.h"
+#include "hsgui.h"
+
 #ifdef Q_OS_SYMBIAN
 #include <XQSettingsManager>
 #include <startupdomainpskeys.h>
 #endif
-#include "hsloadscenestate.h"
-#include "hsscene.h"
+
 
 /*!
     \class HsLoadSceneState
@@ -121,7 +123,7 @@
 void HsLoadSceneState::showUi()
 {
     qDebug() << "HsLoadSceneState::showUi";
-    HsScene::mainWindow()->raise();
-    HsScene::mainWindow()->show();
+  
+    HsGui::instance()->show();
     emit event_history();
 }
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -31,7 +31,7 @@
 DEPENDPATH += ./inc \
     ./src
 INCLUDEPATH += ./inc \
-    ../../serviceproviders\hsmenuserviceprovider\inc \
+    ../../serviceproviders/hsmenuserviceprovider/inc \
     ../../hsutils/inc \
     ../../hsdomainmodel/inc
 
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.qrc	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/hsmenuworkerstateplugin.qrc	Wed Aug 18 09:40:07 2010 +0300
@@ -5,5 +5,7 @@
         <file alias="hsarrangedialog.docml">resource/hsarrangedialog.docml</file>
         <file alias="hsdetailsdialog.docml">resource/hsdetailsdialog.docml</file>
         <file alias="hsuninstalldialog.docml">resource/hsuninstalldialog.docml</file>
+        <file alias="hsinstallationlogdialog.docml">resource/hsinstallationlogdialog.docml</file>
+        <file alias="hscollectionslistdialog.docml">resource/hscollectionslistdialog.docml</file>
     </qresource>
 </RCC>
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -25,10 +25,11 @@
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
 class QStandardItemModel;
+class QModelIndex;
 class HbAction;
 class HsAppsCheckList;
 class HsCollectionNameDialog;
-class HsCollectionsListDialog;
+class HbDialog;
 
 class HsAddAppsToCollectionState: public QState
 {
@@ -54,11 +55,9 @@
 
     void transitToSaveState(const QString &collectionName);
 
-    void transitToAppsCheckListState(const QString &collectionName);
-
     void transitToSaveState(int collectionId);
 
-    void transitToAppsCheckListState(int collectionId);
+    void transitToSelectCollectionState();
 
     void transitToNewCollectionState();
 
@@ -85,6 +84,8 @@
     void cleanData();
 
     void selectApplicationsDone(const QList<int> &appList);
+    
+    void collectionSelected(const QModelIndex &modelIndex);
 
 private slots:
 
@@ -105,6 +106,8 @@
     void construct();
 
     void createStates();
+    
+    QStandardItemModel *standardItemModel(int collectionId);
 
 private:
 
@@ -128,14 +131,13 @@
 
     HsSortAttribute mApplicationsSortAttribute;
 
-    HsSortAttribute mCollectionsSortAttribute;
-
     HsAppsCheckList *mAppsCheckList;
 
     HsCollectionNameDialog *mEditorDialog;
 
-    HsCollectionsListDialog *mListDialog;
+    HbDialog *mListDialog; // not owned
 
+    QStandardItemModel *mModel; // delete with dialog
 };
 
 #endif /* ADDAPPSTOCOLLECTIONSTATE_H */
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -27,12 +27,14 @@
 
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
+class QAction;
 class HbAction;
 class HbMessageBox;
 class CaEntry;
 class CaNotifier;
 class HsContentService;
 
+
 class HsAddToHomeScreenState: public  QState
 {
     Q_OBJECT
@@ -52,8 +54,6 @@
     void cleanUp();
 
     void messageWidgetCorruptedFinished(HbAction* finishedAction);
-    
-    void memoryCardRemoved();
 
 signals:
 
@@ -71,7 +71,6 @@
 
     void logActionResult(QString operationName, int entryId,
                          bool operationSucceded);
-    void subscribeForMemoryCardRemove();
 
 private:
 
@@ -82,12 +81,10 @@
 
     HbMessageBox *mCorruptedMessage;
 
-    HbAction *mConfirmAction;
+    QAction *mConfirmAction;
     
     HsMenuMode mMenuMode;
     
-    CaNotifier *mNotifier;
-    
     QVariant mToken;
 
 };
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsappschecklist.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsappschecklist.h	Wed Aug 18 09:40:07 2010 +0300
@@ -20,13 +20,12 @@
 
 #include <QModelIndexList>
 #include <hsmenuservice.h>
-#include "hbmainwindow.h"
 
 #include "hsmenustates_global.h"
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
 //forward declarations
-class HbView;
+class HbDialog;
 class HbAction;
 class HbListView;
 class QStandardItemModel;
@@ -56,32 +55,28 @@
 
 protected slots:
 
-    void selectApplicationsDone();
+    void appsSelectionDialogFinished(HbAction* finishedAction);
+
+    void selectedItemsChanged();
 
 private:
 
     void constructControls();
 
-    HbMainWindow *mainWindow() const;
-
     QList<int> getSortedItemsList(const QModelIndexList &modelIndexList);
 
 private:
 
-    HbView *mView;
+    HbDialog *mAppsSelectDialog;
 
-    HbView *mPreviousView;
+    HbAction *mActionConfirm; // delete with dialog
 
-    HbAction *mActionConfirm;
+    HbListView *mListView; // delete with dialog
 
-    HbListView *mListView;
-
-    HsMenuItemModel *mModel;
+    HsMenuItemModel *mModel; // delete with dialog
 
     HsSortAttribute mSortAttribute;
 
-    QObjectList mLoadedObjects;
-
 };
 
 #endif /* APPSCHECKLIST_H */
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsarrangestate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsarrangestate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -15,8 +15,8 @@
  *
  */
 
-#ifndef ARRANGE_H
-#define ARRANGE_H
+#ifndef HSARRANGESTATE_H
+#define HSARRANGESTATE_H
 
 #include <QState>
 #include <QVariant>
@@ -76,15 +76,17 @@
     HsMenuItemModel *mItemModel;
 
     int mTopItemId;
+    
+    int mCollectionId;
 
     QModelIndex mTopModelIndex;
 
-    QList<int> mCollIdList;
+    QList<int> mCollItemIdList;
 
-    QList<int> mArrangedCollIdList;
+    QList<int> mArrangedCollItemIdList;
     
     QObjectList mObjectList;
 
 };
 
-#endif /* ARRANGE_H_ */
+#endif /* HSARRANGESTATE_H */
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionnamedialog.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionnamedialog.h	Wed Aug 18 09:40:07 2010 +0300
@@ -35,9 +35,9 @@
 
     virtual ~HsCollectionNameDialog();
 
-    void open(QObject* receiver, const char* member );
-    
-    QString newName(const QString &name, bool addLastName = false);
+    void open(QObject* receiver, const char* member);
+
+    QString uniqueCollectionName() const;
 
 protected:
     void closeEvent( QCloseEvent * event );
@@ -47,6 +47,10 @@
 
     void makeDisconnect();
 
+    QString suggestedCollectionName(const QString &name);
+
+    QString generateUniqueCollectionName(const QString &name) const;
+
 private slots:
 
     void onTextChanged(const QString &text);
@@ -58,13 +62,12 @@
     /*
      * Collections names list from data model.
      */
-    QStringList mCollectionsNames;
+    QStringList mOtherCollectionsNames;
 
     /*
-     * Last found collection name.
+     * Already suggested names.
      */
-    QString mLastCollectionName;
-
+    QStringList mSuggestedNames;
 };
 
 #endif /* HS_INPUT_DIALOG_H */
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionslistdialog.h	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * 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:
- *
- */
-
-#ifndef HS_LIST_DIALOG_H
-#define HS_LIST_DIALOG_H
-
-#include <HbSelectionDialog>
-#include <hsmenuservice.h>
-
-#include "hsmenustates_global.h"
-HS_STATES_TEST_CLASS(MenuStatesTest)
-class QStandardItemModel;
-
-class HsCollectionsListDialog: public HbSelectionDialog
-{
-    Q_OBJECT
-
-    HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
-
-public:
-
-    HsCollectionsListDialog(HsSortAttribute sortOrder,
-                            int collectionId = 0);
-
-    virtual ~HsCollectionsListDialog();
-
-    void open(QObject* receiver, const char* member );
-
-    int getItemId();
-
-protected:
-    void closeEvent( QCloseEvent * event );
-
-private:
-
-    void makeConnect();
-
-    void makeDisconnect();
-
-    QStandardItemModel *standartItemModel(HsSortAttribute sortOrder,
-                                          int collectionId);
-
-    void insertNewCollectionItem(QStandardItemModel *model);
-
-private:
-
-    QStandardItemModel *mModel;
-
-    int mItemId;
-};
-
-#endif /* HS_LIST_DIALOG_H */
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsdeletecollectionitemstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsdeletecollectionitemstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -23,6 +23,7 @@
 #include "hsmenustates_global.h"
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
+class QAction;
 class HbAction;
 class HbMessageBox;
 class HsShortcutService;
@@ -66,7 +67,7 @@
 
     HbMessageBox *mDeleteMessage; // deletes itself automatically on close
 
-    HbAction *mConfirmAction; // child for mDeleteMessage
+    QAction *mConfirmAction; // child for mDeleteMessage
 
 };
 
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsdeletecollectionstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsdeletecollectionstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -23,6 +23,7 @@
 #include "hsmenustates_global.h"
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
+class QAction;
 class HbAction;
 class HbMessageBox;
 class HsMenuService;
@@ -60,7 +61,7 @@
 private:
     int mItemId;
     HbMessageBox *mDeleteMessage; // deletes itself automatically on close
-    HbAction *mConfirmAction; // child for mDeleteMessage
+    QAction *mConfirmAction; // child for mDeleteMessage
 };
 
 #endif //HSDELETECOLLECTIONSTATE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsinstallationlogstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,65 @@
+/*
+ * 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:
+ *
+ */
+
+#ifndef HSINSTALLATIONLOGSTATE_H
+#define HSINSTALLATIONLOGSTATE_H
+
+#include <QState>
+
+#include "hsmenustates_global.h"
+HS_STATES_TEST_CLASS(MenuStatesTest)
+
+class HbDialog;
+
+class HsInstallationLogState: public QState
+{
+    Q_OBJECT
+
+    HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
+
+public:
+
+    HsInstallationLogState(QState *parent = 0);
+
+    virtual ~HsInstallationLogState();
+
+protected:
+
+    void onEntry(QEvent *event);
+    void onExit(QEvent *event);
+
+private slots:
+
+    void stateExited();
+    void cleanUp();
+
+signals:
+
+    void exit();
+
+private:
+
+    void construct();
+    void createInstallationLogDialog();
+
+private:
+    
+    HbDialog* mInstalationLogDialog;
+
+};
+
+#endif //HSINSTALLATIONLOGSTATE_H
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsmenustates_global.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsmenustates_global.h	Wed Aug 18 09:40:07 2010 +0300
@@ -60,6 +60,16 @@
 static const char *const HS_UNINSTALL_DIALOG_CONFIRMATION_ACTION ="qtl_dialog_softkey_2_left";
 static const char *const HS_UNINSTALL_DIALOG_CONFIRMATION_DIALOG_ICON ="icon";
 
+static const char *const HS_INSTALLATION_LOG_DIALOG_LAYOUT =":/xml/hsinstallationlogdialog.docml";
+static const char *const HS_INSTALLATION_LOG_DIALOG_NAME="installation_log_dialog";
+static const char *const HS_INSTALLATION_LOG_DIALOG_LOG_LABEL="log_label";
+
+static const char *const HS_COLLECTION_DIALOG_LAYOUT =":/xml/hscollectionslistdialog.docml";
+static const char *const HS_COLLECTION_DIALOG_NAME="collection_list_dialog";
+static const char *const HS_COLLECTION_DIALOG_LIST_VIEW="listView";
+static const char *const HS_COLLECTION_DIALOG_CREATE_NEW_ACTION="qtl_dialog_softkey_2_left";
+static const char *const HS_COLLECTION_DIALOG_CANCEL_ACTION="qtl_dialog_softkey_2_right";
+
 
 /*!
  To enable logging of function entry and exit use the following flag for qmake:
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hspreviewhswidgetstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hspreviewhswidgetstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -20,15 +20,19 @@
 #define HSPREVIEWHSWIDGETSTATE_H
 
 #include <QState>
+#include <QVariant>
 
 #include "hsmenustates_global.h"
+#include "hsmenuentryremovedhandler.h"
+
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
+class QAction;
+class HbAction;
 class CaEntry;
 class HbDialog;
 class HsWidgetHost;
 class CaNotifier;
-class HbAction;
 class HbScrollArea;
 class HbMessageBox;
 
@@ -49,7 +53,7 @@
     void previewDialogFinished(HbAction* finishedAction);
 
     void messageWidgetCorruptedFinished(HbAction* finishedAction);
-
+    
     void onEntry(QEvent *event);
 
     void cleanUp();
@@ -60,22 +64,23 @@
 private:
 
     void showMessageWidgetCorrupted();
-
-    void subscribeForMemoryCardRemove();
     
     HbDialog* buildPreviewDialog(const CaEntry& entry) const;
 
 private:
     
     HbDialog *mPreviewDialog;
-
-    CaNotifier *mNotifier;
-
-    QScopedPointer<HsWidgetHost> mWidget;
-
+    QScopedPointer<HsMenuEntryRemovedHandler> mEntryObserver;
     int mEntryId;
 
     HbMessageBox *mCorruptedMessage;
+
+    QAction *mConfirmRemovalAction;
+    QAction *mAddToHomescreenAction;
+    
+    QVariant mToken;
+    
+    QString mUri;
 };
 
 
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsuninstallitemstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsuninstallitemstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -23,6 +23,7 @@
 #include "hsmenustates_global.h"
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
+class QAction;
 class HbAction;
 class HbMessageBox;
 class HsShortcutService;
@@ -72,20 +73,17 @@
     
     void createUninstallMessage();
     void createUninstallJavaMessage();
-    void subscribeForMemoryCardRemove();
+    void createSimpleUninstallJavaMessage();
 
 private:
 
     int mItemId;
     
-    CaNotifier *mNotifier;
-
     HbMessageBox *mUninstallMessage; // deletes itself automatically on close
     HbDialog *mUninstallJavaMessage;
-    QObjectList mObjectList;
     UninstallDialogType mDialogType;
 
-    HbAction *mConfirmAction; // child for mConfirmMessage
+    QAction *mConfirmAction; // child for mConfirmMessage
 
 };
 
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappdetailsstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappdetailsstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -18,16 +18,20 @@
 #ifndef HSVIEWAPPDETAILSSTATE_H_
 #define HSVIEWAPPDETAILSSTATE_H_
 
+
 #include <QState>
 #include <QVariant>
 
 #include "hsmenustates_global.h"
+#include "casoftwareregistry.h"
 HS_STATES_TEST_CLASS(MenuStatesTest)
 
 class HbListWidget;
 class HsMenuItemModel;
 class HbDialog;
 class CaNotifier;
+class HbDocumentLoader;
+
 
 class HsViewAppDetailsState: public QState
 {
@@ -56,15 +60,13 @@
 private:
 
     void construct();
-    void subscribeForMemoryCardRemove(int entryId);
+    void setFieldPresentation(QString key,
+            CaSoftwareRegistry::DetailMap &detailMap,
+            HbDocumentLoader &loader);
 
 private:
 
     HbDialog *mDialog;
-    
-    QObjectList mObjectList;
-    
-    CaNotifier *mNotifier;
 };
 
 #endif /* HSVIEWAPPDETAILSSTATE_H_ */
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappsettingsstate.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsviewappsettingsstate.h	Wed Aug 18 09:40:07 2010 +0300
@@ -43,12 +43,8 @@
 
     virtual ~HsViewAppSettingsState();
     
-private slots:
-    
-    void settingsDone();
-    
 signals:
-        void initialize(const QString &aUid);      
+    void initialize(const QString &aUid);      
     void exit();
 
 protected:
@@ -61,8 +57,6 @@
     void construct();
     
     HbMainWindow *mainWindow() const; 
-    
-    void subscribeForMemoryCardRemove(int entryId);
 
 private:
 
@@ -71,9 +65,6 @@
     HbView *mPreviousView;
     
     HbAction *mActionConfirm;
-    
-    CaNotifier *mNotifier;
-
 };
 
 
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsappchecklist.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsappchecklist.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -1,17 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
-    <widget name="view" type="HbView">
-        <widget name="listView" role="HbView:widget" type="HbListView">
+<hbdocument version="1.1">
+    <object name="aps_dialog_softkey_2_left" type="HbAction">
+        <string name="role" value="HbDialog:primaryAction"/>
+        <string locid="txt_common_button_ok" name="text"/>
+    </object>
+    <object name="aps_dialog_softkey_2_right" type="HbAction">
+        <string name="role" value="HbDialog:secondaryAction"/>
+        <string locid="txt_common_button_cancel" name="text"/>
+    </object>
+    <widget name="applications_selection_dialog" type="HbDialog">
+        <contentsmargins bottom="var(hb-param-margin-view-bottom)" left="var(hb-param-margin-view-left)" right="var(hb-param-margin-view-right)" top="var(hb-param-margin-view-top)"/>
+        <enums name="dismissPolicy" value="NoDismiss"/>
+        <widget name="aps_dialog_pri_heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignLeft|AlignLeading"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+            <string locid="txt_applib_title_select_items" name="plainText"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+        </widget>
+        <widget name="listView" role="HbDialog:contentWidget" type="HbListView">
             <widget name="listViewItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem">
                 <enums name="graphicsSize" value="LargeIcon"/>
             </widget>
             <enums name="selectionMode" value="MultiSelection"/>
-            <bool name="visible" value="TRUE"/>
-            <string name="orientation" value="Horizontal"/>
+            <real name="z" value="1"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-popup-list)" left="var(hb-param-margin-gene-popup-list)" right="var(hb-param-margin-gene-popup-list)" top="var(hb-param-margin-gene-popup-list)"/>
         </widget>
-        <string locid="txt_applib_title_select_applications" name="title"/>
+        <ref object="aps_dialog_softkey_2_left" role="HbWidget:addAction"/>
+        <ref object="aps_dialog_softkey_2_right" role="HbWidget:addAction"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
+        <dummydata objectName="listView" section="#common" value="app_list_template5"/>
     </metadata>
 </hbdocument>
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsarrangedialog.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsarrangedialog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -3,9 +3,9 @@
     <widget name="arrange_dialog" type="HbDialog">
         <enums name="dismissPolicy" value="HbPopup::NoDismiss"/>
         <object name="qtl_dialog_softkey_left" type="HbAction">
-			<string name="role" value="HbDialog:primaryAction"/>
-			<string locid="txt_common_button_ok" name="text"/>
-		</object>
+            <string name="role" value="HbDialog:primaryAction"/>
+            <string locid="txt_common_button_ok" name="text"/>
+        </object>
         <widget name="qtl_dialog_pri_heading" role="HbDialog:headingWidget" type="HbLabel">
             <enums name="alignment" value="AlignLeft|AlignLeading"/>
             <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hscollectionslistdialog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="qtl_dialog_softkey_2_left" type="HbAction">
+        <string locid="txt_applib_button_create_new" name="text"/>
+    </object>
+    <object name="qtl_dialog_softkey_2_right" type="HbAction">
+        <string locid="txt_common_button_cancel" name="text"/>
+    </object>
+    <widget name="collection_list_dialog" type="HbDialog">
+        <enums name="dismissPolicy" value="NoDismiss"/>
+        <widget name="qtl_dialog_pri_heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignLeft|AlignLeading"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+            <string locid="txt_applib_title_add_to" name="plainText"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+        </widget>
+        <widget name="listView" role="HbDialog:contentWidget" type="HbListView">
+            <widget name="qtl_list_pri" role="HbAbstractView:prototype" type="HbListViewItem">
+                <enums name="graphicsSize" value="LargeIcon"/>
+            </widget>
+            <enums name="selectionMode" value="SingleSelection"/>
+            <real name="z" value="1"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-popup-list)" left="var(hb-param-margin-gene-popup-list)" right="var(hb-param-margin-gene-popup-list)" top="var(hb-param-margin-gene-popup-list)"/>
+        </widget>
+        <ref object="qtl_dialog_softkey_2_left" role="HbWidget:addAction"/>
+        <ref object="qtl_dialog_softkey_2_right" role="HbWidget:addAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <dummydata objectName="listView" section="#common" value="app_list_template1"/>
+    </metadata>
+</hbdocument>
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsdetailsdialog.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsdetailsdialog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -5,9 +5,8 @@
         <string locid="txt_common_button_ok" name="text" value="Ok"/>
     </object>
     <widget name="details_dialog" type="HbDialog">
-        <enums name="dismissPolicy" value="HbPopup::NoDismiss"/>
-    	
         <contentsmargins bottom="var(hb-param-margin-view-bottom)" left="var(hb-param-margin-view-left)" right="var(hb-param-margin-view-right)" top="var(hb-param-margin-view-top)"/>
+        <enums name="dismissPolicy" value="NoDismiss"/>
         <widget name="qtl_dialog_pri_heading" role="HbDialog:headingWidget" type="HbLabel">
             <enums name="alignment" value="AlignLeft|AlignLeading"/>
             <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
@@ -17,63 +16,62 @@
         <widget name="scrollArea" role="HbDialog:contentWidget" type="HbScrollArea">
             <widget name="scrollAreaContents" role="HbScrollArea:contents" type="HbWidget">
                 <widget name="_name" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <string locid="txt_applib_dialog_name" name="plainText" value="Name:"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="name" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="_version" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <string locid="txt_applib_dialog_version" name="plainText" value="Version:"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="version" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="_vendor" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <string locid="txt_applib_dialog_supplier" name="plainText" value="Supplier:"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="vendor" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="_driveInfo" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <string locid="txt_applib_dialog_memory_in_use" name="plainText" value="Memory in use:"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="driveInfo" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
+                    <string locid="txt_applib_dialog_1_device_memory" name="plainText" value="%1 Device memory"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-                    <string locid="txt_applib_dialog_1_device_memory" name="plainText" value="%1 Device memory"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="_size" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <string locid="txt_applib_dialog_size" name="plainText" value="Size:"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="size" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
+                    <string locid="txt_applib_dialog_l1_kb" name="plainText" value="%L1 KB"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-                    <string locid="txt_applib_dialog_l1_kb" name="plainText" value="%L1 KB"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="_type" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <string locid="txt_applib_dialog_format" name="plainText" value="Format:"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
                 <widget name="type" type="HbLabel">
-                    <sizehint height="expr(var(hb-param-text-height-secondary))" type="PREFERRED"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    <enums name="textWrapping" value="TextWordWrap"/>
                 </widget>
-                <sizehint type="PREFERRED" width="expr(var(hb-param-screen-width) )"/>
-                <layout orientation="Vertical" spacing="2px" type="linear">
+                <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
                     <linearitem itemname="_name"/>
                     <linearitem itemname="name"/>
                     <linearitem itemname="_version"/>
@@ -91,7 +89,123 @@
         </widget>
         <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
     </widget>
-    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+    <section name="detailsDialogForJavaApplication">
+        <widget name="details_dialog" type="HbDialog">
+            <widget name="qtl_dialog_pri_heading" role="HbDialog:headingWidget" type="HbLabel">
+                <enums name="alignment" value="AlignLeft|AlignLeading"/>
+                <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+                <string locid="txt_applib_title_details" name="plainText" value="Details"/>
+                <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+            </widget>
+            <widget name="scrollArea" role="HbDialog:contentWidget" type="HbScrollArea">
+                <widget name="scrollAreaContents" role="HbScrollArea:contents" type="HbWidget">
+                    <widget name="_name" type="HbLabel">
+                        <string locid="txt_applib_dialog_name" name="plainText" value="Name:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="name" type="HbLabel">
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_version" type="HbLabel">
+                        <string locid="txt_applib_dialog_version" name="plainText" value="Version:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="version" type="HbLabel">
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_vendor" type="HbLabel">
+                        <string locid="txt_applib_dialog_supplier" name="plainText" value="Supplier:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="vendor" type="HbLabel">
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_driveInfo" type="HbLabel">
+                        <string locid="txt_applib_dialog_memory_in_use" name="plainText" value="Memory in use:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="driveInfo" type="HbLabel">
+                        <string locid="txt_applib_dialog_1_device_memory" name="plainText" value="%1 Device memory"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_protectiondomain" type="HbLabel">
+                        <string locid="txt_applib_dialog_protection_domain" name="plainText" value="Protection domain:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="protectiondomain" type="HbLabel">
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_size" type="HbLabel">
+                        <string locid="txt_applib_dialog_size" name="plainText" value="Size:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="size" type="HbLabel">
+                        <string locid="txt_applib_dialog_l1_kb" name="plainText" value="%L1 KB"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_type" type="HbLabel">
+                        <string locid="txt_applib_dialog_format" name="plainText" value="Format:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="type" type="HbLabel">
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                    </widget>
+                    <widget name="_description" type="HbLabel">
+                        <string locid="txt_applib_dialog_description" name="plainText" value="Description:"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    </widget>
+                    <widget name="description" type="HbLabel">
+                        <enums name="textWrapping" value="TextWordWrap"/>
+                        <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                    </widget>
+                    <sizehint type="PREFERRED" width="expr(var(hb-param-screen-width) )"/>
+                    <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
+                        <linearitem itemname="_name"/>
+                        <linearitem itemname="name"/>
+                        <linearitem itemname="_version"/>
+                        <linearitem itemname="version"/>
+                        <linearitem itemname="_vendor"/>
+                        <linearitem itemname="vendor"/>
+                        <linearitem itemname="_driveInfo"/>
+                        <linearitem itemname="driveInfo"/>
+                        <linearitem itemname="_protectiondomain"/>
+                        <linearitem itemname="protectiondomain"/>
+                        <linearitem itemname="_size"/>
+                        <linearitem itemname="size"/>
+                        <linearitem itemname="_type"/>
+                        <linearitem itemname="type"/>
+                        <linearitem itemname="_description"/>
+                        <linearitem itemname="description"/>
+                    </layout>
+                </widget>
+            </widget>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+            <contentsmargins bottom="var(hb-param-margin-view-bottom)" left="var(hb-param-margin-view-left)" right="var(hb-param-margin-view-right)" top="var(hb-param-margin-view-top)"/>
+            <enums name="dismissPolicy" value="NoDismiss"/>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+            <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+        </widget>
+    </section>
+    <metadata activeUIState="Java dialog" display="NHD-3.2-inch_portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
+        <uistate name="Java dialog" sections="#common detailsDialogForJavaApplication"/>
     </metadata>
 </hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hsinstallationlogdialog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+    <object name="qtl_dialog_softkey_left" type="HbAction">
+        <string name="role" value="HbDialog:primaryAction"/>
+        <string locid="txt_common_button_close" name="text"/>
+    </object>
+    <widget name="installation_log_dialog" type="HbDialog">
+        <contentsmargins bottom="var(hb-param-margin-view-bottom)" left="var(hb-param-margin-view-left)" right="var(hb-param-margin-view-right)" top="var(hb-param-margin-view-top)"/>
+        <enums name="dismissPolicy" value="NoDismiss"/>
+        <widget name="qtl_dialog_pri_heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignLeft|AlignLeading"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+            <string locid="txt_applib_title_installation_logs" name="plainText"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+        </widget>
+        <widget name="scrollArea" role="HbDialog:contentWidget" type="HbScrollArea">
+            <widget name="scrollAreaContents" role="HbScrollArea:contents" type="HbWidget">
+                <widget name="log_label" type="HbLabel">
+                    <enums name="textWrapping" value="TextWordWrap"/>
+                    <enums name="alignment" value="AlignLeft|AlignTop|AlignLeading"/>
+                    <sizehint type="PREFERRED" width="expr(var(hb-param-screen-width) )"/>
+                    <string name="plainText" value=""/>
+                    <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
+                </widget>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+                <sizehint type="PREFERRED" width="expr(var(hb-param-screen-width) )"/>
+                <layout orientation="Vertical" spacing="var(hb-param-margin-gene-popup)" type="linear">
+                    <contentsmargins bottom="var(hb-param-margin-gene-popup)" left="var(hb-param-margin-gene-popup)" right="var(hb-param-margin-gene-popup)" top="var(hb-param-margin-gene-popup)"/>
+                    <linearitem itemname="log_label"/>
+                </layout>
+            </widget>
+        </widget>
+        <ref object="qtl_dialog_softkey_left" role="HbWidget:addAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hswidgetpreviewdialog.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/resource/hswidgetpreviewdialog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -11,21 +11,20 @@
         <widget name="label" role="HbDialog:headingWidget" type="HbLabel"/>
         <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
             <widget name="icon_box" type="HbLabel">
-                <enums name="alignment" value="AlignHCenter|AlignTop"/>
+                <enums name="alignment" value="AlignAbsolute|AlignVCenter|AlignHCenter"/>
                 <enums name="aspectRatioMode" value="KeepAspectRatio"/>
-                <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Minimum" verticalStretch="0"/>
-                <sizehint height="32un" type="PREFERRED"/>
-                <sizehint height="var(hb-param-text-height-secondary)" type="MINIMUM" width="32un"/>
-                <contentsmargins bottom="0un" left="0un" right="0un" top="expr(var(hb-param-margin-gene-popup) )"/>
-                <sizehint type="MAXIMUM" width="32un"/>
+                <sizehint height="var(hb-param-text-height-secondary)" type="MINIMUM"/>
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
                 <string locid="txt_applib_info_no_preview_available" name="plainText"/>
                 <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
             </widget>
+            
             <real name="z" value="0"/>
-            <layout orientation="Horizontal" type="linear">
-                <stretchitem stretchfactor="1"/>
-                <linearitem itemname="icon_box"/>
-                <stretchitem stretchfactor="1"/>
+           <layout type="anchor">
+                <anchoritem dst="icon_box" dstEdge="LEFT" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="icon_box" dstEdge="TOP" spacing="var(hb-param-margin-gene-popup)" src="" srcEdge="TOP"/>
+                <anchoritem dst="icon_box" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="icon_box" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-popup)" src="" srcEdge="BOTTOM"/>
             </layout>
         </widget>
         <ref object="add_to_homescreen" role="HbWidget:addAction"/>
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,6 +15,10 @@
  *
  */
 
+#include <HbDocumentLoader>
+#include <HbDialog>
+#include <HbListView>
+#include <QStandardItemModel>
 #include <qfinalstate.h>
 #include <QDebug>
 #include <hsmenuservice.h>
@@ -25,8 +29,8 @@
 #include "hsaddappstocollectionstate.h"
 #include "hsmenuevent.h"
 #include "hscollectionnamedialog.h"
-#include "hscollectionslistdialog.h"
 #include "hsappschecklist.h"
+#include "hsmenuitemmodel.h"
 
 /*!
  \class HsAddAppsToCollectionState
@@ -133,24 +137,16 @@
  */
 
 /*!
- \fn void HsAddAppsToCollectionState::transitToAppsCheckListState(const QString &collectionName);
- Signal emitted when collection name is selected - version to trigger
- transition to mAppCheckListState.
- \param collectionName name of collection.
- */
-
-/*!
  \fn void void HsAddAppsToCollectionState::transitToSaveState(int collectionId);
  Signal emitted when collection id is selected.
  \param collectionId id of collection.
  */
 
 /*!
- \fn void HsAddAppsToCollectionState::transitToAppsCheckListState(int collectionId);
- Signal emitted when collection name is selected - version to trigger
- transition to mAppCheckListState.
- \param collectionId id of collection.
- */
+ \fn void HsAddAppsToCollectionState::transitToSelectCollectionState();
+ Signal emitted after close multiselection list when CollectionActionType is ViaAllViewOptionMenuType   
+ transition to mSelectCollectionState.
+  */
 
 /*!
  \fn void HsAddAppsToCollectionState::transitToNewCollectionState();
@@ -179,15 +175,13 @@
     mShowConfirmation(0), mInitialState(0), mSelectCollectionState(0),
     mNewCollectionState(0), mAppsCheckListState(0), mActionType(
         NoActionType), mApplicationsSortAttribute(NoHsSortAttribute),
-    mCollectionsSortAttribute(NoHsSortAttribute), mAppsCheckList(0),
-    mEditorDialog(0), mListDialog(0)
+    mAppsCheckList(0), mEditorDialog(0), mListDialog(0), mModel(0)
 {
     construct();
 }
 
 /*!
  Destructor.
-
  */
 HsAddAppsToCollectionState::~HsAddAppsToCollectionState()
 {
@@ -238,10 +232,6 @@
             SLOT(setCollectionId(int)));
     connect(this, SIGNAL(transitToSaveState(QString)),
             SLOT(setCollectionName(QString)));
-    connect(this, SIGNAL(transitToAppsCheckListState(int)),
-            SLOT(setCollectionId(int)));
-    connect(this, SIGNAL(transitToAppsCheckListState(QString)),
-            SLOT(setCollectionName(QString)));
     connect(this, SIGNAL(transitToSaveState(QList<int>)),
             SLOT(setAppList(QList<int>)));
 
@@ -250,28 +240,29 @@
     // Add a specific item to a collection via collection specific menu.
     // Adding a new collection via the Collections view.
     mSelectCollectionState->addTransition(this,
-    		SIGNAL(transitToNewCollectionState()), mNewCollectionState);
+            SIGNAL(transitToNewCollectionState()), mNewCollectionState);
     mSelectCollectionState->addTransition(this,
-    		SIGNAL(transitToSaveState(int)), saveState);
+            SIGNAL(transitToSaveState(int)), saveState);
     mNewCollectionState->addTransition(this,
-    		SIGNAL(transitToSaveState(QString)), saveState);
+            SIGNAL(transitToSaveState(QString)), saveState);
 
     // Add one/many applications to an existing/a new collection
     // via the All view options menu.
-    // Add items to a collection via the collection's view options menu.
+    // Add items to a collection via the collection's view options menu.    
     mSelectCollectionState->addTransition(this,
-    		SIGNAL(transitToAppsCheckListState(int)), mAppsCheckListState);
+            SIGNAL(transitToSaveState(int)), saveState);
     mNewCollectionState->addTransition(this,
-    		SIGNAL(transitToAppsCheckListState(QString)), mAppsCheckListState);
+            SIGNAL(transitToSaveState(QString)), saveState);
     mAppsCheckListState->addTransition(this,
-    		SIGNAL(transitToSaveState(QList<int>)), saveState);
-
+                    SIGNAL(transitToSaveState(QList<int>)), saveState);
     mSelectCollectionState->addTransition(this,
-    		SIGNAL(transitToFinalState()),finalState);
+            SIGNAL(transitToFinalState()),finalState);
     mNewCollectionState->addTransition(this,
-    		SIGNAL(transitToFinalState()), finalState);
+            SIGNAL(transitToFinalState()), finalState);
     mAppsCheckListState->addTransition(this,
-    		SIGNAL(transitToFinalState()), finalState);
+            SIGNAL(transitToSelectCollectionState()), mSelectCollectionState);
+    mAppsCheckListState->addTransition(this,
+            SIGNAL(transitToFinalState()), finalState);
 
     //transition to final state after save
     saveState->addTransition(finalState);
@@ -330,27 +321,19 @@
 
     mApplicationsSortAttribute = static_cast<HsSortAttribute>(data.value(
                                      appSortOrderKey()).toInt());
-    mCollectionsSortAttribute = static_cast<HsSortAttribute>(data.value(
-                                    collectionSortOrderKey()).toInt());
 
     const int itemId = data.value(itemIdKey()).toInt();
     mCollectionId = data.value(collectionIdKey()).toInt();
 
-    if (itemId && (mCollectionsSortAttribute != NoHsSortAttribute
-                   || mCollectionId)) {
-        //add selected app item form allAppView or collectionView
+    if (itemId) {
+        //add selected app item from allAppView or collectionView
         mAppList.append(itemId);
-
         mInitialState->addTransition(mSelectCollectionState);
-
         mShowConfirmation = true;
-    } else if (mApplicationsSortAttribute != NoHsSortAttribute
-               && mCollectionsSortAttribute != NoHsSortAttribute) {
+    } else if (mApplicationsSortAttribute != NoHsSortAttribute) {
         //add apps from allAppView options menu
         mActionType = ViaAllViewOptionMenuType;
-
-        mInitialState->addTransition(mSelectCollectionState);
-
+        mInitialState->addTransition(mAppsCheckListState);
         mShowConfirmation = true;
     } else if (mCollectionId) {
         //add apps from collectionView options menu
@@ -406,22 +389,18 @@
 }
 
 
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
-void HsAddAppsToCollectionState::editorDialogFinished(HbAction* finishedAction)
+/*!
+ Slot invoked when editor dialog with name of created collection is finished.
+ */
+void HsAddAppsToCollectionState::editorDialogFinished(
+        HbAction* finishedAction)
 {
     if (finishedAction == mEditorDialog->actions().value(0)) {
-        QString newName(mEditorDialog->newName(mEditorDialog->value().toString(), true));
-        if (mActionType == ViaAllViewOptionMenuType) {
-            qDebug("HsAddAppsToCollectionState::newCollection() "
-                   "- emit collectionNameSelectedCl(newName)");
-            emit transitToAppsCheckListState(newName);
-        } else {
-            qDebug("HsAddAppsToCollectionState::newCollection() "
-                   "- emit collectionNameSelected(newName)");
-            emit transitToSaveState(newName);
-        }
+        QString newName(
+                mEditorDialog->uniqueCollectionName());
+        qDebug("HsAddAppsToCollectionState::newCollection() "
+               "- emit collectionNameSelectedCl(newName)");
+        emit transitToSaveState(newName);
     } else {
         qDebug(
             "HsAddAppsToCollectionState::newCollection() - emit cancel()");
@@ -437,36 +416,76 @@
 {
     qDebug("HsAddAppsToCollectionState::selectCollection()");
     HSMENUTEST_FUNC_ENTRY("HsAddAppsToCollectionState::selectCollection");
-    mListDialog = new HsCollectionsListDialog(mCollectionsSortAttribute,
-                                                       mCollectionId);
-    mListDialog->open(this, SLOT(listDialogFinished(HbAction*)));
+    
+    HbDocumentLoader loader;
+    bool loadStatusOk = false;
+    loader.load(HS_COLLECTION_DIALOG_LAYOUT, &loadStatusOk);
+    Q_ASSERT_X(loadStatusOk, HS_COLLECTION_DIALOG_LAYOUT,
+           "Error while loading docml file.");
+
+    mListDialog = qobject_cast<HbDialog*>(
+        loader.findWidget(HS_COLLECTION_DIALOG_NAME));
+    
+    HbListView *listView = qobject_cast<HbListView*>(
+        loader.findWidget(HS_COLLECTION_DIALOG_LIST_VIEW));
+    
+    HbAction* createNewCollection = 
+            qobject_cast<HbAction*>(loader.findObject(
+            HS_COLLECTION_DIALOG_CREATE_NEW_ACTION));
+    
+    HbAction* cancel = qobject_cast<HbAction*>(loader.findObject(
+            HS_COLLECTION_DIALOG_CANCEL_ACTION));
+    
+    if (mListDialog != NULL) {
+        mListDialog->setTimeout(HbPopup::NoTimeout);
+        mListDialog->setAttribute(Qt::WA_DeleteOnClose, true);
+        
+        createNewCollection->setParent(mListDialog);
+        cancel->setParent(mListDialog);
+        
+        mModel = standardItemModel(mCollectionId);
+        mModel->setParent(mListDialog);
+        listView->setModel(mModel);
+        
+        connect(listView, SIGNAL(activated(const QModelIndex &)),
+                this, SLOT(collectionSelected(const QModelIndex &)));
+        
+        mListDialog->open(this, SLOT(listDialogFinished(HbAction*)));
+    }
+    
     HSMENUTEST_FUNC_EXIT("HsAddAppsToCollectionState::selectCollection");
 }
 
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
-//
+/*!
+ Slot invoked when collection list dialog is finished
+ */
 void HsAddAppsToCollectionState::listDialogFinished(HbAction* finishedAction)
 {
-    if (finishedAction != mListDialog->actions().value(0)) {
-        int itemId = mListDialog->getItemId();
-        if (itemId) {
-            if (mActionType == ViaAllViewOptionMenuType) {
-                qDebug("emit collectionSelectedCl(%d)", itemId);
-                emit transitToAppsCheckListState(itemId);
-            } else {
-                qDebug("emit collectionSelected(%d)", itemId);
-                emit transitToSaveState(itemId);
-            }
-        } else {
-            qDebug("emit createNewCollection()");
-            emit transitToNewCollectionState();
-        }
-    } else {
+    if (finishedAction == mListDialog->actions().value(0)) {
+        qDebug("emit createNewCollection()");
+        emit transitToNewCollectionState();
+	} else if (finishedAction == mListDialog->actions().value(1)) {
         qDebug("emit cancel()");
         emit transitToFinalState();
-    }
+	}
+    
     mListDialog = NULL; // set to null since this will be deleted after close
+    mModel = NULL;// set to null since this will be deleted with dialog
+}
+
+/*!
+ Slot invoked when collection is selected
+  \param modelIndex Index of selected item.
+ */
+void HsAddAppsToCollectionState::collectionSelected(
+        const QModelIndex &modelIndex)
+{
+    int selectedCollection = mModel->data(
+            modelIndex, CaItemModel::IdRole).toInt();
+    mListDialog->close();
+    
+    qDebug("emit collectionSelected(%d)", selectedCollection);
+    emit transitToSaveState(selectedCollection);
 }
 
 /*!
@@ -479,9 +498,9 @@
     HSMENUTEST_FUNC_ENTRY("HsAddAppsToCollectionState::showMessageAppsAdded");
     HbNotificationDialog *notificationDialog = new HbNotificationDialog();
     notificationDialog->setAttribute(Qt::WA_DeleteOnClose);
-    notificationDialog->setTitle(hbTrId(
-                                     "txt_applib_dpopinfo_added_to_collection_1") .arg(
-                                     HsMenuService::getName(id)));
+    notificationDialog->setTitle(
+            hbTrId("txt_applib_dpophead_added_to_collection_1") .arg(
+                    HsMenuService::getName(id)));
     notificationDialog->show();
     mShowConfirmation = false;
     HSMENUTEST_FUNC_EXIT("HsAddAppsToCollectionState::showMessageAppsAdded");
@@ -527,9 +546,6 @@
 /*!
  Slot invoked when apps checklist state is entered.
  */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
 void HsAddAppsToCollectionState::appsCheckListState()
 {
     qDebug("HsAddAppsToCollectionState::appsCheckListState()");
@@ -544,29 +560,60 @@
     mAppsCheckList->showAppsCheckboxList(mApplicationsSortAttribute);
     HSMENUTEST_FUNC_EXIT("HsAddAppsToCollectionState::appsCheckListState");
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
 /*!
  Slot connected trrigger action of secondary soft key of check list box.
  It is called when done button is selected.
  */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
 void HsAddAppsToCollectionState::selectApplicationsDone(
     const QList<int> &appList)
 {
     if (appList.count()) {
         qDebug("AppsCheckListState::selectApplicationsDone() "
                "- emit appsSelected(mAppList)");
-        emit transitToSaveState(appList);
+        if (mActionType == ViaAllViewOptionMenuType) {
+            setAppList(appList);
+            emit transitToSelectCollectionState();
+        } else {
+            emit transitToSaveState(appList);
+        }
     } else {
         qDebug(
             "AppsCheckListState::selectApplicationsDone() - emit cancel()");
         emit transitToFinalState();
     }
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
+/*!
+ Creates standard item model.
+ \param collectionId id of collection to remove from model.
+ \return QStandardItemModel - caller takes ownership.
+ */
+QStandardItemModel *HsAddAppsToCollectionState::standardItemModel(
+    int collectionId)
+{
+    HSMENUTEST_FUNC_ENTRY("HsListDialog::standartItemModel");
+    QScopedPointer<HsMenuItemModel> caModel(
+        HsMenuService::getAllCollectionsModel());
+    caModel->setSecondLineVisibility(true);
+    QStandardItemModel *model = new QStandardItemModel(this);
+    QList<QStandardItem *> items;
+    for (int row = 0; row < caModel->rowCount(); row++) {
+        uint flags = caModel->data(caModel->index(row, 0),
+                CaItemModel::FlagsRole).value<EntryFlags> ();
+        int itemId = caModel->data(caModel->index(row, 0),
+                                   CaItemModel::IdRole).toInt();
+        if ((flags & RemovableEntryFlag) && (itemId != collectionId)) {
+            QStandardItem *standardItem = new QStandardItem();
+            standardItem->setData(caModel->data(caModel->index(row, 0),
+                CaItemModel::IdRole), CaItemModel::IdRole);
+            standardItem->setData(caModel->data(caModel->index(row, 0),
+                Qt::DisplayRole), Qt::DisplayRole);
+            standardItem->setData(caModel->data(caModel->index(row, 0),
+                Qt::DecorationRole), Qt::DecorationRole);
+            items << standardItem;
+        }
+    }
+    model->insertColumn(0, items);
+
+    HSMENUTEST_FUNC_EXIT("HsListDialog::standartItemModel");
+    return model;
+}
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddtohomescreenstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddtohomescreenstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -17,13 +17,14 @@
 
 #include <qstatemachine.h>
 #include <hblabel.h>
-#include <hsiwidgetprovider.h>
 #include <hsshortcutservice.h>
 #include <hscontentservice.h>
 #include <hbmessagebox.h>
 #include <hbaction.h>
 #include <hbnotificationdialog.h>
 #include <hsmenueventfactory.h>
+#include "hsmenudialogfactory.h"
+#include "hsmenuentryremovedhandler.h"
 
 #include "hsaddtohomescreenstate.h"
 #include "hsmenuevent.h"
@@ -56,8 +57,7 @@
 HsAddToHomeScreenState::HsAddToHomeScreenState(QState *parent) :
     QState(parent), 
     mCorruptedMessage(NULL), mConfirmAction(NULL),
-    mMenuMode(NormalHsMenuMode),
-    mNotifier(0)
+    mMenuMode(NormalHsMenuMode)
 {
     setObjectName("/AddToHomeScreenState");
     
@@ -140,7 +140,6 @@
     params[HOMESCREENDATA] = mToken;
     bool success = contentService.createWidget(params);
     if (!success) {
-        subscribeForMemoryCardRemove();
         showMessageWidgetCorrupted();
     } else {
         emit exit();
@@ -163,21 +162,16 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsCollectionState::showMessageWidgetCorrupted");
 
-    mCorruptedMessage = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
-    mCorruptedMessage->setAttribute(Qt::WA_DeleteOnClose);
-
-    QString message(hbTrId("txt_applib_dialog_file_corrupted_unable_to_use_wi"));
-    mCorruptedMessage->setText(message);
-
-    mCorruptedMessage->clearActions();
-    mConfirmAction = new HbAction(hbTrId("txt_common_button_ok"), 
-                                  mCorruptedMessage);
-    mCorruptedMessage->addAction(mConfirmAction);
-
-    HbAction *secondaryAction = new HbAction(
-            hbTrId("txt_common_button_cancel"), mCorruptedMessage);
-    mCorruptedMessage->addAction(secondaryAction);
-
+    mCorruptedMessage = HsMenuDialogFactory().create(
+            hbTrId("txt_applib_dialog_file_corrupted_unable_to_use_wi"));
+    mConfirmAction = mCorruptedMessage->actions().value(0);
+    
+    QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+        new HsMenuEntryRemovedHandler(mEntryId, 
+            mCorruptedMessage, SLOT(close())));
+    
+    entryObserver.take()->setParent(mCorruptedMessage); 
+    
     mCorruptedMessage->open(this, SLOT(messageWidgetCorruptedFinished(HbAction*)));
 
     HSMENUTEST_FUNC_EXIT("HsCollectionState::showMessageWidgetCorrupted");
@@ -190,7 +184,7 @@
 void HsAddToHomeScreenState::messageWidgetCorruptedFinished
         (HbAction* finishedAction)
 {
-    if (finishedAction == mConfirmAction) {
+    if (static_cast<QAction*>(finishedAction) == mConfirmAction) {
         HsMenuService::executeAction(mEntryId, removeActionIdentifier());
     }
     emit exit();
@@ -198,6 +192,7 @@
         machine()->postEvent(
             HsMenuEventFactory::createOpenHomeScreenEvent());
     }
+    mConfirmAction = NULL;
 }
 
 
@@ -208,19 +203,11 @@
 void HsAddToHomeScreenState::cleanUp()
 {
     // Close popups if App key was pressed
-    if (mCorruptedMessage) {
-        disconnect(mCorruptedMessage, SIGNAL(finished(HbAction*)),
-                   this, SLOT(messageWidgetCorruptedFinished(HbAction*)));
+    if (mCorruptedMessage != NULL) {
         mCorruptedMessage->close();
         mCorruptedMessage = NULL;
     }
     
-    disconnect(mNotifier,
-               SIGNAL(entryChanged(CaEntry,ChangeType)),
-               this, SLOT(memoryCardRemoved()));
-
-    delete mNotifier;
-    mNotifier = NULL;
     mToken = NULL;
 }
 
@@ -317,32 +304,6 @@
     }
 }
 
-/*!
- Subscribe for memory card remove.
- \retval void
- */
-void HsAddToHomeScreenState::subscribeForMemoryCardRemove()
-{
-    CaNotifierFilter filter;
-    QList<int> entryIds;
-    entryIds.append(mEntryId);
-    filter.setIds(entryIds);
-    mNotifier = CaService::instance()->createNotifier(filter);
-    mNotifier->setParent(this);
-    connect(mNotifier,
-            SIGNAL(entryChanged(CaEntry,ChangeType)),
-            SLOT(memoryCardRemoved()));
-}
+
 
-/*!
- Memory card with instaled widget was removed.
- \retval void
- */
-void HsAddToHomeScreenState::memoryCardRemoved()
-{
-    if (mCorruptedMessage) {
-        mCorruptedMessage->close();
-        mCorruptedMessage = NULL;
-    }
-    // exit not needed, it is called after dialog closed
-}
+
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsappschecklist.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsappschecklist.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -17,7 +17,7 @@
 
 #include <hbaction.h>
 #include <hbinstance.h>
-#include <hbview.h>
+#include <hbdialog.h>
 #include <hblistview.h>
 #include <hbdocumentloader.h>
 #include <hsmenuservice.h>
@@ -81,7 +81,7 @@
  \retval void
  */
 HsAppsCheckList::HsAppsCheckList() :
-    mView(0), mPreviousView(0), mActionConfirm(0), mListView(0), mModel(0),
+    mAppsSelectDialog(0), mActionConfirm(0), mListView(0), mModel(0),
     mSortAttribute(AscendingNameHsSortAttribute)
 {
 }
@@ -101,16 +101,10 @@
 void HsAppsCheckList::cleanUp()
 {
     //clean up
+    if (mAppsSelectDialog) {
+        mAppsSelectDialog->close();
+    }
 
-    qDeleteAll(mLoadedObjects);
-    mLoadedObjects.clear();
-    mListView = NULL;
-    mView = NULL;
-
-    delete mActionConfirm;
-    mActionConfirm = NULL;
-    delete mModel;
-    mModel = NULL;
     mSortAttribute = AscendingNameHsSortAttribute;
 }
 
@@ -127,9 +121,6 @@
  Shows check box list with all application.
  \param sortAttribute order to sort applications.
  */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
 void HsAppsCheckList::showAppsCheckboxList(HsSortAttribute sortOrder)
 {
     HSMENUTEST_FUNC_ENTRY("HsAppsCheckList::showAppsCheckboxList");
@@ -139,84 +130,81 @@
     // fills model with data
     // constucts controls such as checklist
     constructControls();
-
-    // Add mListView to main window
-    HbMainWindow *hbMainWindow = mainWindow();
+    
+    if (mAppsSelectDialog) {
+        mAppsSelectDialog->setTimeout(HbPopup::NoTimeout);
+        mAppsSelectDialog->setAttribute(Qt::WA_DeleteOnClose);
+        mAppsSelectDialog->open(this,
+            SLOT(appsSelectionDialogFinished(HbAction*)));
+    }
 
-    // add confirm action
-    mView->setNavigationAction(mActionConfirm);
-
-    hbMainWindow->addView(mView);
-    // record the current view in order to activate it once done
-    mPreviousView = hbMainWindow->currentView();
-    hbMainWindow->setCurrentView(mView);
-    hbMainWindow->show();
     HSMENUTEST_FUNC_EXIT("HsAppsCheckList::showAppsCheckboxList");
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
+
 /*!
  Construct contrlos.
  */
 void HsAppsCheckList::constructControls()
 {
     HSMENUTEST_FUNC_ENTRY("HsAppsCheckList::constructControls");
-    if (!mActionConfirm) {
-        mActionConfirm = new HbAction(Hb::ConfirmNaviAction, mView);
-        connect(mActionConfirm, SIGNAL(triggered()),SLOT(selectApplicationsDone()));
-    }
+
+    bool loadStatusOk = false;
+    HbDocumentLoader loader;
+    loader.load(HS_APP_CHECK_LIST_LAYOUT, &loadStatusOk);
 
-    if (!mView) { // it implies that mListView is NULL as well
-        bool loadStatusOk = false;
+    Q_ASSERT_X(loadStatusOk,
+                HS_APP_CHECK_LIST_LAYOUT,
+               "Error while loading docml file.");
 
-        HbDocumentLoader loader;
-        mLoadedObjects = loader.load(HS_APP_CHECK_LIST_LAYOUT, &loadStatusOk);
+    static const QString APPS_SELECTION_DIALOG("applications_selection_dialog");
+    mAppsSelectDialog =
+        qobject_cast<HbDialog *>(loader.findWidget(APPS_SELECTION_DIALOG));
 
-        Q_ASSERT_X(loadStatusOk,
-                    HS_APP_CHECK_LIST_LAYOUT,
-                   "Error while loading docml file.");
+    if (mAppsSelectDialog) {
+        static const QString LIST_VIEW_WIDGET("listView");
+        mListView = qobject_cast<HbListView *> (loader.findWidget(
+            LIST_VIEW_WIDGET));
+        mModel->setParent(mAppsSelectDialog);
+        mListView->setModel(mModel);
 
-        static const QString VIEW_WIDGET_NAME("view");
-        mView = qobject_cast<HbView *> (loader.findWidget(VIEW_WIDGET_NAME));
-        mView->setParent(this);
+        connect(mListView,SIGNAL(activated(const QModelIndex&) ),this
+                ,SLOT(selectedItemsChanged()));
+        connect(mModel,SIGNAL(rowsRemoved(const QModelIndex&, int,int)),
+        		this, SLOT(selectedItemsChanged()));
 
-        static const QString LIST_VIEW_WIDGET_NAME("listView");
-        mListView = qobject_cast<HbListView *> (loader.findWidget(
-                LIST_VIEW_WIDGET_NAME));
-        mListView->setModel(mModel);
+        // add confirm action
+        static const QString HS_APPS_SELECTION_DIALOG_CONFIRMATION_ACTION
+                ("aps_dialog_softkey_2_left");
+        mActionConfirm = qobject_cast<HbAction*>(loader.findObject(
+                        HS_APPS_SELECTION_DIALOG_CONFIRMATION_ACTION));
+        mActionConfirm->setEnabled(false);
+        mAppsSelectDialog->actions()[0]->setParent(mAppsSelectDialog);
+        mAppsSelectDialog->actions()[1]->setParent(mAppsSelectDialog);
     }
     HSMENUTEST_FUNC_EXIT("HsAppsCheckList::constructControls");
 }
 
 /*!
- Slot connected trrigger action of secondary soft key of check list box.
- It is called when done button is selected.
+ Action after closed application selection dialog.
+ \param finishedAction chosen action.
+ \retval void
  */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
-void HsAppsCheckList::selectApplicationsDone()
+void HsAppsCheckList::appsSelectionDialogFinished(HbAction* finishedAction)
 {
-    HSMENUTEST_FUNC_ENTRY("HsAppsCheckList::selectApplicationsDone");
-    // Remove mListView from main window and restore previous view.
-    HbMainWindow *hbMainWindow = mainWindow();
-    hbMainWindow->setCurrentView(mPreviousView);
-    hbMainWindow->removeView(mView);
-    
-    QItemSelectionModel *itemSelectionModel = mListView->selectionModel();
+    HSMENUTEST_FUNC_ENTRY("HsAppsCheckList::appsSelectionDialogFinished");
     QList<int> itemsList;
-    if (itemSelectionModel) {
-        QModelIndexList modelIndexList =
-            itemSelectionModel->selectedIndexes();
-        itemsList = getSortedItemsList(modelIndexList);
+    if (finishedAction == mActionConfirm) {
+        QItemSelectionModel *itemSelectionModel = mListView->selectionModel();
+        if (itemSelectionModel) {
+            QModelIndexList modelIndexList =
+                itemSelectionModel->selectedIndexes();
+            itemsList = getSortedItemsList(modelIndexList);
+        }
     }
+    mAppsSelectDialog = NULL;
     emit commit(itemsList);
-    HSMENUTEST_FUNC_EXIT("HsAppsCheckList::selectApplicationsDone");
+    HSMENUTEST_FUNC_EXIT("HsAppsCheckList::appsSelectionDialogFinished");
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
 
 /*!
  Returns list with selected items ids.
@@ -251,16 +239,13 @@
 }
 
 /*!
- Returns pointer to tha main window.
- \return Pointer to the main window.
+ Slot activated then user select or unselect item
  */
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC SKIP
-#endif //COVERAGE_MEASUREMENT
-HbMainWindow *HsAppsCheckList::mainWindow() const
+void HsAppsCheckList::selectedItemsChanged()
 {
-    return HbInstance::instance()->allMainWindows().value(0);
+    if (mListView->selectionModel()->hasSelection()) {
+        mActionConfirm->setEnabled(true);
+    } else {
+        mActionConfirm->setEnabled(false);
+    }
 }
-#ifdef COVERAGE_MEASUREMENT
-#pragma CTC ENDSKIP
-#endif //COVERAGE_MEASUREMENT
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsarrangestate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsarrangestate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -78,7 +78,7 @@
  */
 HsArrangeState::HsArrangeState(QState *parent) :
     QState(parent), mDialog(0), mEntriesList(0), 
-    mItemModel(0)
+    mItemModel(0),mCollectionId(0)
 {
     construct();
 }
@@ -119,9 +119,10 @@
     HSMENUTEST_FUNC_ENTRY("HsArrangeState::save");
 
     getArrangedEntriesIds(listWidget);
-    if (mArrangedCollIdList != mCollIdList) {
+    if (mArrangedCollItemIdList != mCollItemIdList) {
         HsMenuService::organizeCollection(
-            HsMenuService::allCollectionsId(), mArrangedCollIdList);
+            mCollectionId,
+            mArrangedCollItemIdList);
     }
 
     HSMENUTEST_FUNC_EXIT("HsArrangeState::save");
@@ -156,9 +157,22 @@
     mDialog = qobject_cast<HbDialog*>(
             loader.findWidget(HS_ARRANGE_DIALOG_NAME));
 
-    if (mEntriesList != NULL && mDialog != NULL) {
+    if (mEntriesList && mDialog) {
+        switch (menuEvent->operation()) {
+        case HsMenuEvent::ArrangeCollection:
+            mCollectionId = data.value(collectionIdKey()).toInt();
+            mItemModel = HsMenuService::getCollectionModel(
+                mCollectionId,
+                NoHsSortAttribute);
+            break;
+        case HsMenuEvent::ArrangeAllCollections:
+            mCollectionId = HsMenuService::allCollectionsId();
+            mItemModel = HsMenuService::getAllCollectionsModel();
+            break;
+        default:
+            break;
+        }
 
-        mItemModel = HsMenuService::getAllCollectionsModel();
         // as we copy the model contents to the list widget
         // we do not need the model to auto update
         mItemModel->setAutoUpdate(false);
@@ -171,7 +185,7 @@
         mEntriesList->setArrangeMode(true);
     
         mDialog->setTimeout(HbPopup::NoTimeout);
-        mDialog->setAttribute(Qt::WA_DeleteOnClose, true);
+        mDialog->setAttribute(Qt::WA_DeleteOnClose);
 
         mDialog->setPreferredSize(
             HbInstance::instance()->allMainWindows().at(0)->size());
@@ -201,7 +215,8 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsArrangeState::stateExited");
     if (mDialog) {
-        disconnect(mDialog, SIGNAL(finished(HbAction*)), this, SLOT(arrangeDialogFinished(HbAction*)));
+        disconnect(mDialog, SIGNAL(finished(HbAction*)),
+        this, SLOT(arrangeDialogFinished(HbAction*)));
         mDialog->close();
         mDialog = NULL;
     }
@@ -212,8 +227,8 @@
     delete mItemModel;
     mItemModel = NULL;
 
-    mArrangedCollIdList.clear();
-    mCollIdList.clear();
+    mArrangedCollItemIdList.clear();
+    mCollItemIdList.clear();
 
     HSMENUTEST_FUNC_EXIT("HsArrangeState::stateExited");
     qDebug("HsArrangeState::stateExited()");
@@ -235,7 +250,7 @@
         int itemId = mItemModel->data(idx, CaItemModel::IdRole).toInt();
         widgetItem->setData(mItemModel->data(idx, CaItemModel::IdRole),
                             CaItemModel::IdRole);
-        mCollIdList.append(itemId);
+        mCollItemIdList.append(itemId);
         widgetItem->setData(mItemModel->data(idx, Qt::DisplayRole),
                             Qt::DisplayRole);
         widgetItem->setData(mItemModel->data(idx, Qt::DecorationRole),
@@ -259,6 +274,6 @@
     for (int i(0); i < listWidget.count(); ++i) {
         HbListWidgetItem *widgetItem = listWidget.item(i);
         QVariant entryId = widgetItem->data(CaItemModel::IdRole);
-        mArrangedCollIdList.append(entryId.toInt());
+        mArrangedCollItemIdList.append(entryId.toInt());
     }
 }
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -54,16 +54,22 @@
 HsCollectionNameDialog::HsCollectionNameDialog(const int &itemId)
 {
     HSMENUTEST_FUNC_ENTRY("HsInputDialog::HsInputDialog");
-    mCollectionsNames = HsMenuService::getCollectionNames();
+    mOtherCollectionsNames = HsMenuService::getCollectionNames();
+
+
     setInputMode(HbInputDialog::TextInput);
     setPromptText(hbTrId("txt_applib_title_collection_name"));
     lineEdit()->setMaxLength(qMaxStrLength);
     if (itemId) {
-        setValue(HsMenuService::getName(itemId));
-        mCollectionsNames.removeOne(value().toString());
+        const QString currentCollectionName(
+                HsMenuService::getName(itemId));
+        setValue(currentCollectionName);
+        mOtherCollectionsNames.removeOne(currentCollectionName);
+        mSuggestedNames << currentCollectionName;
     } else {
         setValue(hbTrId("txt_applib_dialog_entry_collection"));
     }
+
     HSMENUTEST_FUNC_EXIT("HsInputDialog::HsInputDialog");
 }
 
@@ -72,8 +78,8 @@
  */
 HsCollectionNameDialog::~HsCollectionNameDialog()
 {
-    mCollectionsNames.clear();
-    mLastCollectionName.clear();
+    mOtherCollectionsNames.clear();
+    mSuggestedNames.clear();
 }
 
 /*!
@@ -95,6 +101,16 @@
 }
 
 /*!
+  \return User input if it is unique collection name or an unique collection name being
+  a combination of user name and a suffix matching following regular expression:
+  "\([0-9][1-9]\)|\([1-9][0-9]+\)"
+ */
+QString HsCollectionNameDialog::uniqueCollectionName() const
+{
+    return generateUniqueCollectionName(value().toString());
+}
+
+/*!
     \reimp 
     Disconnects signals and calls base class impl. which emits finished(HbAction*) 
  */
@@ -106,41 +122,50 @@
 }
 
 /*!
- * Gets new collection's name.
- \param name name of collection.
- \param addLastName true
- if last found name is need to add to validation
- \retval new collection name.
+  \param name Input string which is to be basename
+    of resulting unique collection name.
+  \return Unique collection name.
  */
-QString HsCollectionNameDialog::newName(const QString &name,
-                                        bool addLastName)
+QString HsCollectionNameDialog::generateUniqueCollectionName(
+        const QString &name) const
 {
     HSMENUTEST_FUNC_ENTRY("HsInputDialog::newName");
+
     QString newName(name);
-    int numToAppend(1);
-    if (addLastName && mLastCollectionName.length() > 0
-            && !mCollectionsNames.contains(mLastCollectionName)) {
-        mCollectionsNames << mLastCollectionName;
+
+    unsigned int numToAppend(1);
+
+    while (mOtherCollectionsNames.contains(newName)) {
+        newName =
+                name
+                + QString("(%1)").arg(numToAppend, 2, 10, QLatin1Char('0'));
+        numToAppend++;
     }
-    while (mCollectionsNames.contains(newName)) {
+
+    HSMENUTEST_FUNC_EXIT("HsInputDialog::newName");
+    return newName;
+}
+/*!
+  \param name Input string which is to be basename
+    for suggested collection name.
+  \return Unique collection name if it was not yet proposed during lifetime of the dialog
+   or \a name otherwise.
+ */
+QString HsCollectionNameDialog::suggestedCollectionName(const QString &name)
+{
+    HSMENUTEST_FUNC_ENTRY("HsInputDialog::processInput");
+
+    QString newName = generateUniqueCollectionName(name);
+
+    if (mSuggestedNames.contains(newName)) {
         newName = name;
-        newName.append("(");
-        if (numToAppend < 10) {
-            newName.append("0");
-        }
-        newName.append(QString::number(numToAppend));
-        newName.append(")");
-        numToAppend++;
-        if (!addLastName) {
-            if (mLastCollectionName.length() > 0
-                    && !mCollectionsNames.contains(mLastCollectionName)) {
-                mCollectionsNames << mLastCollectionName;
-            }
-            mCollectionsNames.removeOne(name);
-            mLastCollectionName = name;
-        }
     }
-    HSMENUTEST_FUNC_EXIT("HsInputDialog::newName");
+
+    if (newName != name) {
+        mSuggestedNames << newName;
+    }
+
+    HSMENUTEST_FUNC_EXIT("HsInputDialog::validate");
     return newName;
 }
 
@@ -184,7 +209,7 @@
         actions()[0]->setEnabled(true);
     }
 
-    QString newText = newName(text);
+    QString newText = suggestedCollectionName(text);
     if (newText != text) {
         makeDisconnect();
         lineEdit()->setText(newText);
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -111,7 +111,7 @@
 void HsCollectionNameState::dialogFinished(HbAction* finishedAction)
 {
     if (finishedAction == mCollectionNameDialog->actions().value(0)) {
-        QString newName(mCollectionNameDialog->newName(mCollectionNameDialog->value().toString(), true));
+        QString newName(mCollectionNameDialog->uniqueCollectionName());
         if (mItemId) {
             if (newName != HsMenuService::getName(mItemId)) {
                 HsMenuService::renameCollection(mItemId, newName);
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionslistdialog.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*
- * 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: Hs list dialog
- *
- */
-
-#include <HbAction>
-#include <HbLabel>
-#include <QDebug>
-#include <QStandardItemModel>
-
-#include <hsmenuservice.h>
-#include <hsmenuitemmodel.h>
-#include "hscollectionslistdialog.h"
-
-/*!
- \class HsCollectionsListDialog
- \ingroup group_hsworkerstateplugin
- \brief Hs List Dialog
- Hs List Dialog
- */
-
-/*!
- \var HsCollectionsListDialog::mModel
- Model.
- */
-
-/*!
- \var HsCollectionsListDialog::mItemId
- Selected item id.
- */
-
-/*!
- \fn void HsCollectionsListDialog::makeConnect();
- Connects edit line signals to slots.
-*/
-
-/*!
- \fn void HsCollectionsListDialog::makeDisconnect();
- Disconnects edit line signals from slots.
- */
-
-/*!
- Constructor
- \param sortOrder sort order.
- \param collectionId collectionId id of collection
- to remove from list.
- \retval void
- */
-HsCollectionsListDialog::HsCollectionsListDialog(HsSortAttribute sortOrder,
-        int collectionId) :
-    HbSelectionDialog(), mItemId(0)
-{
-    clearActions();
-    HbAction *cancelAction = new HbAction(hbTrId("txt_common_button_cancel"), this);
-    addAction(cancelAction);
-
-    setHeadingWidget(new HbLabel(hbTrId("txt_applib_title_add_to")));
-    // it must be single selection, although it shows checkboxes -
-    // it is Orbit defect and will be fixed in next release
-    setSelectionMode(HbAbstractItemView::SingleSelection);
-    mModel = standartItemModel(sortOrder, collectionId);
-    setModel(mModel);
-}
-
-/*!
- Destructor
- */
-HsCollectionsListDialog::~HsCollectionsListDialog()
-{
-    delete mModel;
-}
-
-/*!
- Executes dialog.
- \retval Selected action.
- */
-void HsCollectionsListDialog::open(QObject* receiver, const char* member)
-{
-    this->setAttribute(Qt::WA_DeleteOnClose);
-    HbSelectionDialog::open(receiver, member);
-}
-
-/*!
-    \reimp
-    Disconnects signals and calls base class impl. which emits finished(HbAction*)
- */
-void HsCollectionsListDialog::closeEvent ( QCloseEvent * event )
-{
-    qDebug("HsCollectionsListDialog::closeEvent");
-    HbAction *closingAction = qobject_cast<HbAction *>(sender());
-
-    if (closingAction != actions().value(0)) {
-        QModelIndexList modlist = selectedModelIndexes();
-        if (modlist.count()) {
-            mItemId
-            = mModel-> data(modlist[0], CaItemModel::IdRole).toInt();
-        }
-    }
-
-    HbDialog::closeEvent(event); // emits finished(HbAction*)
-}
-
-/*!
- Creates standard item model.
- \param sortOrder sort order.
- \param collectionId id of collection to remove from model.
- \return QStandardItemModel - caller takes ownership.
- */
-QStandardItemModel *HsCollectionsListDialog::standartItemModel(
-    HsSortAttribute sortOrder, int collectionId)
-{
-    HSMENUTEST_FUNC_ENTRY("HsListDialog::standartItemModel");
-    QScopedPointer<HsMenuItemModel> caModel(
-        HsMenuService::getAllCollectionsModel(sortOrder));
-    caModel->setSecondLineVisibility(false);
-    QStandardItemModel *model = new QStandardItemModel(this);
-    QList<QStandardItem *> items;
-    for (int row = 0; row < caModel->rowCount(); row++) {
-        uint flags = caModel->data(caModel->index(row, 0),
-                                   CaItemModel::FlagsRole).value<EntryFlags> ();
-        int itemId = caModel->data(caModel->index(row, 0),
-                                   CaItemModel::IdRole).toInt();
-        if ((flags & RemovableEntryFlag) && (itemId != collectionId)) {
-            QStandardItem *standardItem = new QStandardItem();
-            standardItem->setData(caModel->data(caModel->index(row, 0),
-                                                CaItemModel::IdRole), CaItemModel::IdRole);
-            standardItem->setData(caModel->data(caModel->index(row, 0),
-                                                Qt::DisplayRole), Qt::DisplayRole);
-            standardItem->setData(caModel->data(caModel->index(row, 0),
-                                                Qt::DecorationRole), Qt::DecorationRole);
-            items << standardItem;
-        }
-    }
-    model->insertColumn(0, items);
-
-    insertNewCollectionItem(model);
-    HSMENUTEST_FUNC_EXIT("HsListDialog::standartItemModel");
-    return model;
-}
-
-/*!
- Inserts "new collection" item into model.
- \param model a model.
- */
-void HsCollectionsListDialog::insertNewCollectionItem(
-    QStandardItemModel *model)
-{
-    HSMENUTEST_FUNC_ENTRY("HsListDialog::insertNewCollectionItem");
-    QStandardItem *standardItem = new QStandardItem();
-    standardItem->setData(0, CaItemModel::IdRole);
-    standardItem->setData(hbTrId("txt_applib_list_new_collection"),
-                          Qt::DisplayRole);
-
-    standardItem->setData(HbIcon(defaultCollectionIconId()),
-                          Qt::DecorationRole);
-
-    QList<QStandardItem *> items;
-    items << standardItem;
-    model->insertRow(0, items);
-    HSMENUTEST_FUNC_EXIT("HsListDialog::insertNewCollectionItem");
-}
-
-/*!
- Gets selected item id.
- \retval Selected item id.
- */
-int HsCollectionsListDialog::getItemId()
-{
-    return mItemId;
-}
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionitemstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,12 +15,13 @@
  *
  */
 
-#include <hbmessagebox.h>
+#include <HbMessageBox>
 #include <hbaction.h>
 #include <HbParameterLengthLimiter>
 #include <hsmenuservice.h>
 #include <hsmenueventfactory.h>
 
+#include "hsmenudialogfactory.h"
 #include "hsdeletecollectionitemstate.h"
 #include "hsmenuevent.h"
 
@@ -86,18 +87,8 @@
             HsMenuService::getName(mItemId)));
 
     // create and show message box
-    mDeleteMessage = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
-    mDeleteMessage->setAttribute(Qt::WA_DeleteOnClose);
-
-    mDeleteMessage->setText(message);
-
-    mDeleteMessage->clearActions();
-    mConfirmAction = new HbAction(hbTrId("txt_common_button_ok"), mDeleteMessage);
-    mDeleteMessage->addAction(mConfirmAction);
-
-    HbAction *secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), mDeleteMessage);
-    mDeleteMessage->addAction(secondaryAction);
-
+    mDeleteMessage = HsMenuDialogFactory().create(message);
+    mConfirmAction = mDeleteMessage->actions().value(0);
     mDeleteMessage->open(this, SLOT(deleteMessageFinished(HbAction*)));
 
     HSMENUTEST_FUNC_EXIT("HsDeleteCollectionItemState::onEntry");
@@ -110,10 +101,11 @@
  */
 void HsDeleteCollectionItemState::deleteMessageFinished(HbAction* finishedAction)
 {
-    if (finishedAction == mConfirmAction) {
+    if (static_cast<QAction*>(finishedAction) == mConfirmAction) {
         HsMenuService::removeApplicationFromCollection(mItemId, mCollectionId);
     }
     emit exit();
+    mConfirmAction = NULL;
 }
 
 /*!
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsdeletecollectionstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -16,7 +16,7 @@
  */
 
 #include <QStateMachine>
-#include <hbmessagebox.h>
+#include <HbMessageBox>
 #include <hbaction.h>
 #include <hsmenuservice.h>
 #include <HbParameterLengthLimiter>
@@ -24,6 +24,7 @@
 #include <hsmenueventfactory.h>
 
 #include "hsdeletecollectionstate.h"
+#include "hsmenudialogfactory.h"
 #include "hsmenuevent.h"
 
 /*!
@@ -91,19 +92,10 @@
     }
 
     // create and show message box
-    mDeleteMessage = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
-    mDeleteMessage->setAttribute(Qt::WA_DeleteOnClose);
-
-    mDeleteMessage->setText(message);
+    mDeleteMessage = HsMenuDialogFactory().create(message);
+    mConfirmAction = mDeleteMessage->actions().value(0);
+    mDeleteMessage->open(this, SLOT(deleteMessageFinished(HbAction*)));
 
-    mDeleteMessage->clearActions();
-    mConfirmAction = new HbAction(hbTrId("txt_common_button_ok"), mDeleteMessage);
-    mDeleteMessage->addAction(mConfirmAction);
-
-    HbAction *secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), mDeleteMessage);
-    mDeleteMessage->addAction(secondaryAction);
-
-    mDeleteMessage->open(this, SLOT(deleteMessageFinished(HbAction*)));
     HSMENUTEST_FUNC_EXIT("HsDeleteCollectionState::onEntry");
 }
 
@@ -113,12 +105,13 @@
 //
 void HsDeleteCollectionState::deleteMessageFinished(HbAction* finishedAction)
 {
-    if (finishedAction == mConfirmAction) {
+    if (static_cast<QAction*>(finishedAction) == mConfirmAction) {
         HsMenuService::removeCollection(mItemId);
         machine()->postEvent(
         HsMenuEventFactory::createCollectionDeletedEvent());
     }
     emit exit();
+    mConfirmAction = NULL;
 }
 
 /*!
@@ -129,7 +122,6 @@
 {
     // Close messagebox if App key was pressed
     if (mDeleteMessage) {
-        disconnect(mDeleteMessage, SIGNAL(finished(HbAction*)), this, SLOT(deleteMessageFinished(HbAction*)));
         mDeleteMessage->close();
         mDeleteMessage = NULL;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsinstallationlogstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,169 @@
+/*
+ * 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: Menu delete collection item state
+ *
+ */
+
+#include <HbDocumentLoader>
+#include <HbLabel>
+#include <HbMessageBox>
+#include <QAction>
+#include <hsmenuservice.h>
+#include <casoftwareregistry.h>
+
+#include "hsinstallationlogstate.h"
+
+/*!
+ \class HsInstallationLogState
+ \ingroup group_hsworkerstateplugin
+ \brief Uninstall Item State.
+ Deletes app from collection.
+ */
+
+/*!
+ Constructor.
+ \param parent Parent state.
+ */
+HsInstallationLogState::HsInstallationLogState(QState *parent) :
+    QState(parent),
+    mInstalationLogDialog(NULL)
+{
+    construct();
+}
+
+/*!
+ Destructor.
+ */
+HsInstallationLogState::~HsInstallationLogState()
+{
+    cleanUp(); // in case of throw
+}
+
+/*!
+ Constructs contained objects.
+ */
+void HsInstallationLogState::construct()
+{
+    setObjectName("/InstallationLogState");
+    if (this->parent()) {
+        setObjectName(this->parent()->objectName() + objectName());
+    }
+    connect(this, SIGNAL(exited()), SLOT(cleanUp()));
+}
+
+/*!
+ Sets entry event.
+ \param event entry event.
+ */
+void HsInstallationLogState::onEntry(QEvent *event)
+{
+    HSMENUTEST_FUNC_ENTRY("HsInstallationLogState::onEntry");
+    QState::onEntry(event);
+    qDebug("HsInstallationLogState::onEntry()");
+    
+    createInstallationLogDialog();
+
+    HSMENUTEST_FUNC_EXIT("HsInstallationLogState::onEntry");
+}
+
+/*!
+ Invoked on exiting state
+ */
+void HsInstallationLogState::onExit(QEvent *event)
+{
+    QState::onExit(event);
+}
+
+/*!
+ Create installation log dialog.
+ \retval void
+ */
+void HsInstallationLogState::createInstallationLogDialog()
+{
+    QList<CaSoftwareRegistry::DetailMap> detailsList =
+        CaSoftwareRegistry::create()->retrieveLogEntries();
+    
+    HbDocumentLoader loader;
+    bool loadStatusOk = false;
+    loader.load(HS_INSTALLATION_LOG_DIALOG_LAYOUT, &loadStatusOk);
+    Q_ASSERT_X(loadStatusOk, HS_INSTALLATION_LOG_DIALOG_LAYOUT,
+           "Error while loading docml file.");
+
+    mInstalationLogDialog = qobject_cast<HbDialog*>(
+        loader.findWidget(HS_INSTALLATION_LOG_DIALOG_NAME));
+    
+    if (mInstalationLogDialog != NULL) {
+        mInstalationLogDialog->actions()[0]->setParent(mInstalationLogDialog);
+        mInstalationLogDialog->setTimeout(HbPopup::NoTimeout);
+        mInstalationLogDialog->setAttribute(Qt::WA_DeleteOnClose, true);
+    
+        HbLabel* logList;
+        QString applicationsList;
+        QString listElement("%1 (%2)\n%3 - ");
+        QString applicationName;
+        QString version;
+        QString date;
+        QString type;
+        QString installed(hbTrId("txt_applib_dialog_installed"));
+        QString removed(hbTrId("txt_applib_dialog_removed"));
+        QString newLine("\n");
+    
+        logList = qobject_cast<HbLabel*>(
+                loader.findWidget(HS_INSTALLATION_LOG_DIALOG_LOG_LABEL));
+
+        for (int i=0; i<detailsList.count(); i++) {
+            applicationName = detailsList[i].value(CaSoftwareRegistry::componentNameKey());
+            version = detailsList[i].value(CaSoftwareRegistry::componentVersionKey());
+            date = detailsList[i].value(CaSoftwareRegistry::componentTimeKey());
+            QString localListElement(listElement);
+            localListElement = localListElement.arg(applicationName).arg(version).arg(date);
+            type = detailsList[i].value(CaSoftwareRegistry::componentOperationTypeKey());
+            if ((type.compare(CaSoftwareRegistry::componentInstallValue()) == 0) ||
+                (type.compare(CaSoftwareRegistry::componentUpgradeValue()) == 0)) {
+                localListElement = localListElement + installed;
+                applicationsList = applicationsList + localListElement +
+                        newLine + newLine;
+            } else if (type.compare(CaSoftwareRegistry::componentUninstallValue()) == 0) {
+                localListElement = localListElement + removed;
+                applicationsList = applicationsList + localListElement + 
+                        newLine + newLine;
+            }
+        }
+
+        applicationsList.chop(2 * newLine.size());
+        logList->setPlainText(applicationsList);
+    
+        mInstalationLogDialog->open(this, SLOT(stateExited()));
+    }
+}
+
+void HsInstallationLogState::stateExited()
+{
+    mInstalationLogDialog = NULL;
+    emit exit();
+}
+
+/*!
+ Slot launched after state has exited and in destructor.
+ \retval void
+ */
+void HsInstallationLogState::cleanUp()
+{
+    // Close popups if App key was pressed
+    if (mInstalationLogDialog) {
+        mInstalationLogDialog->close();
+        mInstalationLogDialog = NULL;
+    }
+}
+
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -28,6 +28,7 @@
 #include "hspreviewhswidgetstate.h"
 #include "hsviewappsettingsstate.h"
 #include "hsviewappdetailsstate.h"
+#include "hsinstallationlogstate.h"
 
 /*!
  \class HsMenuWorkerState
@@ -79,7 +80,9 @@
     createChildState<HsUninstallItemState> (
         HsMenuEvent::UninstallApplication);
     createChildState<HsArrangeState> (HsMenuEvent::ArrangeCollection);
+    createChildState<HsArrangeState> (HsMenuEvent::ArrangeAllCollections);
 
+    
     // create a new child state based on the template
     HsCollectionNameState *newChildState = new HsCollectionNameState(this);
     // create a transition to the new child state which will be triggered by
@@ -95,7 +98,8 @@
     mInitialState->addTransition(createCollectionTransition);
     // set a transition to the initial state after child processing finished
     newChildState->addTransition(newChildState, SIGNAL(exit()), mInitialState);
-
+    connect(this, SIGNAL(reset()), newChildState, SIGNAL(exit()));
+    
     HsAddAppsToCollectionState *addAppsToCollectionState =
         new HsAddAppsToCollectionState(this);
     // create a transition to the new child state which will be triggered by
@@ -108,9 +112,12 @@
     addAppsToCollectionState->addTransition(addAppsToCollectionState,
                                             SIGNAL(finished()), mInitialState);
     connect(this, SIGNAL(reset()), addAppsToCollectionState, SIGNAL(finished()));
+    
+    
     createChildState<HsPreviewHSWidgetState> (HsMenuEvent::PreviewHSWidget);
     createChildState<HsViewAppSettingsState> (HsMenuEvent::ShowAppSettings);
     createChildState<HsViewAppDetailsState> (HsMenuEvent::ShowAppDetails);
+    createChildState<HsInstallationLogState> (HsMenuEvent::ShowInstallationLog);
 
     HSMENUTEST_FUNC_EXIT("HsMenuWorkerState::construct");
 }
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hspreviewhswidgetstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hspreviewhswidgetstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -15,7 +15,6 @@
  *
 */
 
-
 #include <hblabel.h>
 #include <hbmessagebox.h>
 #include <qstatemachine.h>
@@ -35,10 +34,12 @@
 #include "hswidgethost.h"
 #include "hspreviewhswidgetstate.h"
 #include "hsmenuevent.h"
+#include "hsmenudialogfactory.h"
 #include "hsapp_defs.h"
 #include "hsscene.h"
 #include "hspage.h"
 
+
 #include "canotifier.h"
 #include "canotifierfilter.h"
 #include "caservice.h"
@@ -63,10 +64,12 @@
 HsPreviewHSWidgetState::HsPreviewHSWidgetState(QState *parent) :
     QState(parent),
     mPreviewDialog(0),
-    mNotifier(0),
-    mWidget(0),
     mEntryId(0),
-    mCorruptedMessage(0)
+    mCorruptedMessage(0),
+    mConfirmRemovalAction(0),
+    mAddToHomescreenAction(0),
+    mToken(),
+    mUri()
 {
     setObjectName("/HsPreviewHSWidgetState");
     if (this->parent()) {
@@ -100,34 +103,27 @@
     HSMENUTEST_FUNC_ENTRY("HsPreviewHSWidgetState::onEntry");
     QState::onEntry(event);
     HsMenuEvent *menuEvent = static_cast<HsMenuEvent *>(event);
+   
     QVariantMap data = menuEvent->data();
-
     mEntryId = data.value(itemIdKey()).toInt();
-
-    QVariantHash widgetData;
-    widgetData.insert(LIBRARY, data.value(widgetLibraryAttributeName()).toString());
-    widgetData.insert(URI, data.value(widgetUriAttributeName()).toString());
-
-    mWidget.reset(
-        HsContentService::instance()->createWidgetForPreview(widgetData));
-
-    if (!mWidget.isNull()) {
+    mToken = data.value(HOMESCREENDATA);
+    
         
-        QSharedPointer<CaEntry> entry = 
-            CaService::instance()->getEntry(mEntryId);
-        
-        mPreviewDialog = buildPreviewDialog(*entry);
+    QSharedPointer<CaEntry> entry =
+        CaService::instance()->getEntry(mEntryId);
+    mUri = entry->attribute(widgetUriAttributeName());
+    mPreviewDialog = buildPreviewDialog(*entry);
+    mAddToHomescreenAction = mPreviewDialog->actions().value(0);
+    
+    if (mPreviewDialog != NULL) {
+        // Launch popup asyncronously
         
-        if (mPreviewDialog != NULL) {
-            subscribeForMemoryCardRemove();
-            // Launch popup asyncronously
-            mPreviewDialog->open(this, SLOT(previewDialogFinished(HbAction*)));    
-        }
-    } else {
-        subscribeForMemoryCardRemove();
-        showMessageWidgetCorrupted();
+        mEntryObserver.reset(
+            new HsMenuEntryRemovedHandler(mEntryId, this, SIGNAL(exit())));
+        
+        mPreviewDialog->open(this, SLOT(previewDialogFinished(HbAction*)));
     }
-
+    
     HSMENUTEST_FUNC_EXIT("HsPreviewHSWidgetState::onEntry");
 }
 
@@ -137,29 +133,19 @@
  */
 void HsPreviewHSWidgetState::cleanUp()
 {
-    // Close popups if App key was pressed or memory card removed
-    if (mPreviewDialog) {
-        disconnect(mPreviewDialog, SIGNAL(finished(HbAction*)), 
-            this, SLOT(previewDialogFinished(HbAction*)));
-        mPreviewDialog->close();
+    if (mPreviewDialog != NULL) {
+        mPreviewDialog->disconnect();
+        mPreviewDialog ->close();
         mPreviewDialog = NULL;
     }
-
-    if (mCorruptedMessage) {
-        disconnect(mCorruptedMessage, SIGNAL(finished(HbAction*)), 
-            this, SLOT(messageWidgetCorruptedFinished(HbAction*)));
+    
+    if (mCorruptedMessage != NULL) {
+        mCorruptedMessage->disconnect();
         mCorruptedMessage->close();
         mCorruptedMessage = NULL;
     }
-
-    mWidget.reset();
-
-    disconnect(mNotifier,
-               SIGNAL(entryChanged(CaEntry,ChangeType)),
-               this, SIGNAL(exit()));
-
-    delete mNotifier;
-    mNotifier = NULL;
+    
+    mToken = NULL;
 }
 
 /*!
@@ -168,38 +154,30 @@
  */
 void HsPreviewHSWidgetState::previewDialogFinished(HbAction* finishedAction)
 {
-    if (finishedAction == mPreviewDialog->actions().value(0)) {
+    mPreviewDialog = NULL;
+
+    if (finishedAction == mAddToHomescreenAction) {
 
-        HsScene::instance()->activePage()->addNewWidget(
-            mWidget.take()); // ownership transferred
-        HbNotificationDialog *notificationDialog = new HbNotificationDialog();
-        notificationDialog->setAttribute(Qt::WA_DeleteOnClose);
-        notificationDialog->setTitle(hbTrId(
-                                     "txt_applib_dpophead_added_to_homescreen") );
-        notificationDialog->show();
+        QVariantHash widgetData;
+        widgetData[URI] = mUri;
+        widgetData[HOMESCREENDATA] = mToken;
+        
+        bool success = HsContentService::instance()->createWidget(widgetData);
+        
+        if (success) {
+            HbNotificationDialog *notificationDialog = new HbNotificationDialog();
+            notificationDialog->setAttribute(Qt::WA_DeleteOnClose);
+            notificationDialog->setTitle(hbTrId("txt_applib_dpophead_added_to_homescreen"));
+            notificationDialog->show();
+            emit exit();
+        }
+        else {
+            showMessageWidgetCorrupted();            
+        }
     } else {
-            mWidget->remove();
-            mWidget.take();   
-            mWidget.reset();
+        emit exit();
     }
-    emit exit();
-}
-
-/*!
- Subscribe for memory card remove.
- \retval void
- */
-void HsPreviewHSWidgetState::subscribeForMemoryCardRemove()
-{
-    CaNotifierFilter filter;
-    QList<int> entryIds;
-    entryIds.append(mEntryId);
-    filter.setIds(entryIds);
-    mNotifier = CaService::instance()->createNotifier(filter);
-    mNotifier->setParent(this);
-    connect(mNotifier,
-            SIGNAL(entryChanged(CaEntry,ChangeType)),
-            SIGNAL(exit()));
+    mAddToHomescreenAction = 0;
 }
 
 /*!
@@ -210,20 +188,13 @@
 {
     HSMENUTEST_FUNC_ENTRY("HsCollectionState::showMessageWidgetCorrupted");
 
-    mCorruptedMessage = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
-    mCorruptedMessage->setAttribute(Qt::WA_DeleteOnClose);
-
-    QString message(hbTrId("txt_applib_dialog_file_corrupted_unable_to_use_wi"));
-    mCorruptedMessage->setText(message);
+    mCorruptedMessage = HsMenuDialogFactory().create(
+            hbTrId("txt_applib_dialog_file_corrupted_unable_to_use_wi"));
 
-    mCorruptedMessage->clearActions();
-    HbAction *primaryAction = new HbAction(hbTrId("txt_common_button_ok"), mCorruptedMessage);
-    mCorruptedMessage->addAction(primaryAction);
+    mConfirmRemovalAction = mCorruptedMessage->actions().value(0);
+    mCorruptedMessage
+        ->open(this, SLOT(messageWidgetCorruptedFinished(HbAction*)));
 
-    HbAction *secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), mCorruptedMessage);
-    mCorruptedMessage->addAction(secondaryAction);
-
-    mCorruptedMessage->open(this, SLOT(messageWidgetCorruptedFinished(HbAction*)));
     HSMENUTEST_FUNC_EXIT("HsCollectionState::showMessageWidgetCorrupted");
 }
 
@@ -233,10 +204,14 @@
  */
 void HsPreviewHSWidgetState::messageWidgetCorruptedFinished(HbAction* finishedAction)
 {
-    if (finishedAction == mCorruptedMessage->actions().value(0)) {
+    mCorruptedMessage = NULL;
+	
+    if (static_cast<QAction*>(finishedAction) == mConfirmRemovalAction) {
         HsMenuService::executeAction(mEntryId, removeActionIdentifier());
     }
     emit exit();
+    
+    mConfirmRemovalAction = NULL;
 }
 
 /*!
@@ -260,7 +235,7 @@
     HbLabel *const iconBox =
         qobject_cast<HbLabel*>(
             loader.findWidget(HS_WIDGET_PREVIEW_ICON_BOX_NAME));
-    
+
     loadStatusOk = loadStatusOk && (previewDialog != NULL)
         && (headingLabel != NULL) && (iconBox != NULL);
     
@@ -269,8 +244,8 @@
            "Cannot initialize widgets based on docml file.");
     
     if (loadStatusOk) {
-        previewDialog->actions()[0]->setParent(previewDialog);
-        previewDialog->actions()[1]->setParent(previewDialog);
+        previewDialog->actions().value(0)->setParent(previewDialog);
+        previewDialog->actions().value(1)->setParent(previewDialog);
         
         previewDialog->setTimeout(HbPopup::NoTimeout);
         previewDialog->setAttribute(Qt::WA_DeleteOnClose, true);
@@ -283,6 +258,8 @@
         if (!previewImageName.isEmpty()) {
             const HbIcon previewImage(previewImageName);
             if (previewImage.size().isValid()) {
+                iconBox->setMinimumHeight(previewImage.height());
+                iconBox->setMaximumHeight(previewImage.height());
                 iconBox->setIcon(previewImage);
             }
         }
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsuninstallitemstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsuninstallitemstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -24,7 +24,7 @@
 #include <HbListView>
 #include <HbParameterLengthLimiter>
 
-
+#include <QScopedPointer>
 #include <QStandardItemModel>
 #include <QStandardItem>
 #include <casoftwareregistry.h>
@@ -33,7 +33,8 @@
 
 #include "hsuninstallitemstate.h"
 #include "hsmenuevent.h"
-
+#include "hsmenudialogfactory.h"
+#include "hsmenuentryremovedhandler.h"
 /*!
  \class HsUninstallItemState
  \ingroup group_hsworkerstateplugin
@@ -48,7 +49,6 @@
 HsUninstallItemState::HsUninstallItemState(QState *parent) :
     QState(parent),
     mItemId(0),
-    mNotifier(NULL),
     mUninstallMessage(NULL),
     mUninstallJavaMessage(NULL),
     mConfirmAction(NULL)
@@ -74,6 +74,7 @@
         setObjectName(this->parent()->objectName() + objectName());
     }
     connect(this, SIGNAL(exited()), SLOT(cleanUp()));
+    
 }
 
 /*!
@@ -98,9 +99,7 @@
         // other
         createUninstallMessage();
     }
-    
-    subscribeForMemoryCardRemove();
-
+        
     HSMENUTEST_FUNC_EXIT("HsUninstallItemState::onEntry");
 }
 
@@ -111,9 +110,12 @@
  */
 void HsUninstallItemState::uninstallMessageFinished(HbAction* finishedAction)
 {
-    if (finishedAction == mConfirmAction) {
+    if (static_cast<QAction*>(finishedAction) == mConfirmAction) {
         HsMenuService::executeAction(mItemId, removeActionIdentifier());
     }
+    mConfirmAction = NULL;
+    mUninstallMessage = NULL;
+	mUninstallJavaMessage = NULL;
     emit exit();
 }
 
@@ -163,19 +165,6 @@
     return retval;
 }
 
-/*!
- Subscribe for memory card remove.
- */
-void HsUninstallItemState::subscribeForMemoryCardRemove()
-{
-    CaNotifierFilter filter;
-    filter.setIds(QList<int>() << mItemId);
-    mNotifier = CaService::instance()->createNotifier(filter);
-    mNotifier->setParent(this);
-    connect(mNotifier,
-        SIGNAL(entryChanged(CaEntry,ChangeType)),
-        SIGNAL(exit()));
-}
 
 /*!
  Slot launched after state has exited and in destructor.
@@ -184,21 +173,16 @@
 void HsUninstallItemState::cleanUp()
 {
     // Close messagebox if App key was pressed
-    if (mUninstallMessage) {
-        disconnect(mUninstallMessage, SIGNAL(finished(HbAction*)),
-            this, SLOT(uninstallMessageFinished(HbAction*)));
+    if (mUninstallMessage != NULL) {
         mUninstallMessage->close();
         mUninstallMessage = NULL;
     }
     
-    if (mUninstallJavaMessage) {
-        disconnect(mUninstallJavaMessage, SIGNAL(finished(HbAction*)), this, SLOT(uninstallMessageFinished(HbAction*)));
+    if (mUninstallJavaMessage != NULL) {
         mUninstallJavaMessage->close();
         mUninstallJavaMessage = NULL;
     }
 
-    delete mNotifier;
-    mNotifier = NULL;
     mConfirmAction = NULL;
     mItemId = 0;
 }
@@ -226,19 +210,40 @@
     }
 
     // create and show message box
-    mUninstallMessage = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
-    mUninstallMessage->setAttribute(Qt::WA_DeleteOnClose);
-
-    mUninstallMessage->setText(message);
+    mUninstallMessage = HsMenuDialogFactory().create(message);
+    mConfirmAction = mUninstallMessage->actions().value(0);
+    
+    QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+        new HsMenuEntryRemovedHandler(mItemId, this, SIGNAL(exit())));
+    entryObserver.take()->setParent(mUninstallMessage);
+    
+    mUninstallMessage->open(this, SLOT(uninstallMessageFinished(HbAction*)));
+}
 
-    mUninstallMessage->clearActions();
-    mConfirmAction = new HbAction(hbTrId("txt_common_button_ok"),
-            mUninstallMessage);
-    mUninstallMessage->addAction(mConfirmAction);
+/*!
+ Method create uninstall confirmation message.
+ Used for java applications without deletion confirmation
+ and with midlet name equal to app name
+ \retval void
+ */
+void HsUninstallItemState::createSimpleUninstallJavaMessage()
+{
+    QString message;
+    message.append(
+        HbParameterLengthLimiter("txt_applib_dialog_1_will_be_removed_from_phone_c").arg(
+            HsMenuService::getName(mItemId)));
 
-    HbAction *secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"),
-            mUninstallMessage);
-    mUninstallMessage->addAction(secondaryAction);
+    // create and show message box
+    mUninstallMessage = HsMenuDialogFactory().create(message);
+    
+    QSharedPointer<CaEntry> entry = CaService::instance()->getEntry(mItemId);
+    HbIcon icon = entry->makeIcon();
+    mUninstallMessage->setIcon(icon);
+    mConfirmAction = mUninstallMessage->actions().value(0);
+
+    QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+        new HsMenuEntryRemovedHandler(mItemId, this, SIGNAL(exit())));
+    entryObserver.take()->setParent(mUninstallMessage);
 
     mUninstallMessage->open(this, SLOT(uninstallMessageFinished(HbAction*)));
 }
@@ -251,7 +256,7 @@
 {
     HbDocumentLoader loader;
     bool loadStatusOk = false;
-    mObjectList = loader.load(HS_UNINSTALL_DIALOG_LAYOUT, &loadStatusOk);
+    loader.load(HS_UNINSTALL_DIALOG_LAYOUT, &loadStatusOk);
     
     Q_ASSERT_X(loadStatusOk,
             HS_UNINSTALL_DIALOG_LAYOUT,
@@ -263,70 +268,80 @@
     getApplicationsNames(componentName, applicationsNames, detailsMessage);
     
     QString section;
-    if (applicationsNames.isEmpty() && detailsMessage.isEmpty()) {
-        mDialogType = UninstallDialogDefinition01;
-        section = QString("uninstallDialogDefinition01");
-        mObjectList = loader.load(
-                HS_UNINSTALL_DIALOG_LAYOUT, section, &loadStatusOk);
-    } else if ( (!applicationsNames.isEmpty()) && (!detailsMessage.isEmpty())) {
-        mDialogType = UninstallDialogDefinition02;
-        section = QString("uninstallDialogDefinition02");
-        mObjectList = loader.load(
+    if (applicationsNames.isEmpty() && detailsMessage.isEmpty()) {        
+        createSimpleUninstallJavaMessage();        
+    }
+    else {
+        if ( (!applicationsNames.isEmpty()) && (!detailsMessage.isEmpty())) {
+            mDialogType = UninstallDialogDefinition02;
+            section = QString("uninstallDialogDefinition02");
+            loader.load(
                 HS_UNINSTALL_DIALOG_LAYOUT, section, &loadStatusOk);
-    } else if ( (!applicationsNames.isEmpty() && detailsMessage.isEmpty())) {
-        mDialogType = UninstallDialogDefinition03;
-        section = QString("uninstallDialogDefinition03");
-        mObjectList = loader.load(
+        }
+        else if ( (!applicationsNames.isEmpty() && detailsMessage.isEmpty())) {
+            mDialogType = UninstallDialogDefinition03;
+            section = QString("uninstallDialogDefinition03");
+            loader.load(
                 HS_UNINSTALL_DIALOG_LAYOUT, section, &loadStatusOk);
-    } else if (applicationsNames.isEmpty()  && (!detailsMessage.isEmpty())) {
-        mDialogType = UninstallDialogDefinition04;
-        section = QString("uninstallDialogDefinition04");
-        mObjectList = loader.load(
+        }
+        else if (applicationsNames.isEmpty() && (!detailsMessage.isEmpty())) {
+            mDialogType = UninstallDialogDefinition04;
+            section = QString("uninstallDialogDefinition04");
+            loader.load(
                 HS_UNINSTALL_DIALOG_LAYOUT, section, &loadStatusOk);
-    }
- 
-    mUninstallJavaMessage = 
-        qobject_cast<HbDialog*>(
+        }
+
+        mUninstallJavaMessage = qobject_cast<HbDialog*>(
             loader.findWidget(HS_UNINSTALL_DIALOG_NAME));
-    
-    HbLabel* iconLabel = 
-        qobject_cast<HbLabel*>(
-            loader.findWidget(HS_UNINSTALL_DIALOG_CONFIRMATION_DIALOG_ICON));
-    QSharedPointer<CaEntry> entry2 = CaService::instance()->getEntry(mItemId);
-    HbIcon icon = entry2->makeIcon();
-    iconLabel->setIcon(icon);
-    
-    HbLabel* textLabel = 
-        qobject_cast<HbLabel*>(
-            loader.findWidget(HS_UNINSTALL_DIALOG_CONFIRMATION_DIALOG_LABEL));
-    textLabel->setPlainText(textLabel->plainText().arg(componentName));
-    
-    HbLabel* detailsUninstalLabel;
-    if ((mDialogType == UninstallDialogDefinition02) ||
-        (mDialogType == UninstallDialogDefinition04)) {
-        detailsUninstalLabel= qobject_cast<HbLabel*>(
-                loader.findWidget(HS_UNINSTALL_DIALOG_DELETE_LABEL));
-        detailsUninstalLabel->setPlainText(detailsMessage);
-    }
+
+        if (mUninstallJavaMessage) {
+            mUninstallJavaMessage->setAttribute(Qt::WA_DeleteOnClose);
+            mUninstallJavaMessage->setTimeout(HbPopup::NoTimeout);
+            mUninstallJavaMessage->actions()[0]->setParent(mUninstallJavaMessage);
+            mUninstallJavaMessage->actions()[1]->setParent(mUninstallJavaMessage);
+
+            HbLabel* iconLabel =
+            qobject_cast<HbLabel*>(
+                loader.findWidget(HS_UNINSTALL_DIALOG_CONFIRMATION_DIALOG_ICON));
+            QSharedPointer<CaEntry> entry2 = CaService::instance()->getEntry(mItemId);
+            HbIcon icon = entry2->makeIcon();
+            iconLabel->setIcon(icon);
+
+            HbLabel* textLabel =
+            qobject_cast<HbLabel*>(
+                loader.findWidget(HS_UNINSTALL_DIALOG_CONFIRMATION_DIALOG_LABEL));
+            textLabel->setPlainText(textLabel->plainText().arg(componentName));
 
-    HbLabel* listView;
-    QString applicationsList;
-    QString newLine("\n");
-    if ((mDialogType == UninstallDialogDefinition02) ||
-        (mDialogType == UninstallDialogDefinition03)) {
-        listView = qobject_cast<HbLabel*>(
-                loader.findWidget(HS_UNINSTALL_DIALOG_LIST_VIEW_LABEL));
+            HbLabel* detailsUninstalLabel;
+            if ((mDialogType == UninstallDialogDefinition02) ||
+                (mDialogType == UninstallDialogDefinition04)) {
+                detailsUninstalLabel= qobject_cast<HbLabel*>(
+                    loader.findWidget(HS_UNINSTALL_DIALOG_DELETE_LABEL));
+                detailsUninstalLabel->setPlainText(detailsMessage);
+            }
 
-        for (int i=0; i<applicationsNames.count(); i++) {
-            applicationsList = applicationsList + applicationsNames[i] + newLine;
+            HbLabel* listView;
+            QString applicationsList;
+            QString newLine("\n");
+            if ((mDialogType == UninstallDialogDefinition02) ||
+                (mDialogType == UninstallDialogDefinition03)) {
+                listView = qobject_cast<HbLabel*>(
+                    loader.findWidget(HS_UNINSTALL_DIALOG_LIST_VIEW_LABEL));
+
+                for (int i=0; i<applicationsNames.count(); i++) {
+                    applicationsList = applicationsList + applicationsNames[i] + newLine;
+                }
+                listView->setPlainText(applicationsList);
+            }
+
+            mConfirmAction = qobject_cast<HbAction*>(loader.findObject(
+                    HS_UNINSTALL_DIALOG_CONFIRMATION_ACTION));
+        
+            QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+                new HsMenuEntryRemovedHandler(mItemId, this, SIGNAL(exit())));
+            entryObserver.take()->setParent(mUninstallJavaMessage);
+            
+            mUninstallJavaMessage->open(this, SLOT(uninstallMessageFinished(HbAction*)));
         }
-        listView->setPlainText(applicationsList);
     }
-
-    mUninstallJavaMessage->setAttribute(Qt::WA_DeleteOnClose);
-    mUninstallJavaMessage->setTimeout(HbPopup::NoTimeout);
-    mConfirmAction = qobject_cast<HbAction*>(loader.findObject(
-            HS_UNINSTALL_DIALOG_CONFIRMATION_ACTION));
-    
-    mUninstallJavaMessage->open(this, SLOT(uninstallMessageFinished(HbAction*)));
 }
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappdetailsstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappdetailsstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -16,6 +16,7 @@
 */
 
 #include <QDebug>
+#include <QScopedPointer>
 #include <HbDialog>
 #include <HbDocumentLoader>
 #include <HbLabel>
@@ -30,14 +31,17 @@
 #include "hsviewappdetailsstate.h"
 #include "hsmenuevent.h"
 #include "hsmenuitemmodel.h"
+#include "hsmenuentryremovedhandler.h"
 
+static const char *const HS_VIEWAPPDETAILS_JAVA_DIALOG_SECTION_NAME=
+        "detailsDialogForJavaApplication";
 
 /*!
  Constructor.
- @param parent Parent state.
+ /param parent Parent state.
  */
 HsViewAppDetailsState::HsViewAppDetailsState(QState *parent) :
-    QState(parent), mDialog(0), mNotifier(0)
+    QState(parent), mDialog(0)
 {
     construct();
 }
@@ -47,9 +51,7 @@
  */
 HsViewAppDetailsState::~HsViewAppDetailsState()
 {
-    if (mDialog) {
-        delete mDialog;
-    }
+    delete mDialog;
 }
 
 /*!
@@ -58,7 +60,7 @@
 void HsViewAppDetailsState::construct()
 {
     HSMENUTEST_FUNC_ENTRY("HsViewAppDetailsState::construct");
-        
+
     setObjectName("/ViewAppDetailsState");
     if (this->parent()) {
         setObjectName(this->parent()->objectName() + objectName());
@@ -75,61 +77,102 @@
     QState::onEntry(event);
     HsMenuEvent *menuEvent = static_cast<HsMenuEvent *>(event);
     QVariantMap data = menuEvent->data();
-    
+
     const int entryId = data.value(itemIdKey()).toInt();
-    QSharedPointer<const CaEntry> entry 
+    QSharedPointer<const CaEntry> entry
         = CaService::instance()->getEntry(entryId);
     const int componentId = entry->attribute(
         componentIdAttributeName()).toInt();
     
     QSharedPointer<CaSoftwareRegistry> scr = CaSoftwareRegistry::create();
     CaSoftwareRegistry::DetailMap detailMap = scr->entryDetails(componentId);
+
+    QString appType = entry->attribute(swTypeKey());
+
+    
+    //TODO: Should we display something In that case?
+    if (detailMap.size() < 1){
+        stateExited();
+        return;
+    }
     
     HbDocumentLoader loader;
     bool loadStatusOk = false;
-    mObjectList = loader.load(HS_DETAILS_DIALOG_LAYOUT, &loadStatusOk);
+    loader.load(HS_DETAILS_DIALOG_LAYOUT, &loadStatusOk);
     Q_ASSERT_X(loadStatusOk, HS_DETAILS_DIALOG_LAYOUT,
            "Error while loading docml file.");
 
+    if (!appType.compare(javaSwType())) {
+        QString section = QString(HS_VIEWAPPDETAILS_JAVA_DIALOG_SECTION_NAME);
+        loader.load(HS_DETAILS_DIALOG_LAYOUT,
+                                  section, &loadStatusOk);
+    }
+
     mDialog = qobject_cast<HbDialog*>(
         loader.findWidget(HS_DETAILS_DIALOG_NAME));
-    mDialog->actions()[0]->setParent(mDialog);
-    
-    subscribeForMemoryCardRemove(entryId);
-    
-    HbLabel* nameLabel = qobject_cast<HbLabel*>(
-        loader.findWidget(CaSoftwareRegistry::componentNameKey()));
-    HbLabel* versionLabel = qobject_cast<HbLabel*>(
-        loader.findWidget(CaSoftwareRegistry::componentVersionKey()));
-    HbLabel* supplierLabel = qobject_cast<HbLabel*>(
-        loader.findWidget(CaSoftwareRegistry::componentVendorKey()));
-    HbLabel* memoryLabel = qobject_cast<HbLabel*>(
-        loader.findWidget(CaSoftwareRegistry::componentDriveInfoKey()));
-    HbLabel* sizeLabel = qobject_cast<HbLabel*>(
-        loader.findWidget(CaSoftwareRegistry::componentSizeKey()));
-    HbLabel* typeLabel = qobject_cast<HbLabel*>(
-        loader.findWidget(CaSoftwareRegistry::componentTypeKey()));    
-    
-    nameLabel->setPlainText(
-        detailMap[CaSoftwareRegistry::componentNameKey()]);
-    versionLabel->setPlainText(
-        detailMap[CaSoftwareRegistry::componentVersionKey()]);
-    supplierLabel->setPlainText(
-        detailMap[CaSoftwareRegistry::componentVendorKey()]);
-    memoryLabel->setPlainText(
-            detailMap[CaSoftwareRegistry::componentDriveInfoKey()]);
-    sizeLabel->setPlainText(
-        detailMap[CaSoftwareRegistry::componentSizeKey()]);
 
-    typeLabel->setPlainText(
-        detailMap[CaSoftwareRegistry::componentTypeKey()]);
-    
     if (mDialog != NULL) {
         mDialog->setTimeout(HbPopup::NoTimeout);
         mDialog->setAttribute(Qt::WA_DeleteOnClose, true);
-        mDialog->open(this, SLOT(stateExited())); 
+        mDialog->actions()[0]->setParent(mDialog);
+        
+        setFieldPresentation(CaSoftwareRegistry::componentNameKey(),
+            detailMap, loader);
+        setFieldPresentation(CaSoftwareRegistry::componentVersionKey(),
+            detailMap, loader);
+        setFieldPresentation(CaSoftwareRegistry::componentVendorKey(),
+            detailMap, loader);
+        setFieldPresentation(CaSoftwareRegistry::componentDriveInfoKey(),
+            detailMap, loader);
+        setFieldPresentation(CaSoftwareRegistry::componentSizeKey(),
+            detailMap, loader);
+        setFieldPresentation(CaSoftwareRegistry::componentTypeKey(),
+            detailMap, loader);
+
+        if (!appType.compare(javaSwType())) {
+            setFieldPresentation(CaSoftwareRegistry::componentDescriptionKey(),
+                detailMap, loader);
+            setFieldPresentation(CaSoftwareRegistry::componentProtectionDomainKey(),
+                detailMap, loader);
+        }
+        
+        QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+            new HsMenuEntryRemovedHandler(entryId, this, SIGNAL(exit())));
+        
+        entryObserver.take()->setParent(mDialog);
+        
+        mDialog->open(this, SLOT(stateExited()));
+    } else {
+        stateExited();
     }
-    HSMENUTEST_FUNC_EXIT("HsViewAppDetailsState::onEntry");    
+    HSMENUTEST_FUNC_EXIT("HsViewAppDetailsState::onEntry");
+}
+
+/*!
+ Extracting label from loader and set content of data field.
+ Hide label if the is no data to display.
+ \param key detail key.
+ \param detailMap detail map.
+ \param loader session to document loader
+ \retval void
+ */
+void HsViewAppDetailsState::setFieldPresentation(QString key,
+        CaSoftwareRegistry::DetailMap &detailMap,
+        HbDocumentLoader &loader)
+{
+    HbLabel* dataLabel = qobject_cast<HbLabel*>(
+                loader.findWidget(key));
+    QString data = detailMap[key];
+    if (data.isEmpty()) {
+        dataLabel->setVisible(false);
+        dataLabel->setMaximumHeight(0);
+        HbLabel* titleLabel = qobject_cast<HbLabel*>(
+            loader.findWidget(QString("_") + key));
+        titleLabel->setVisible(false);
+        titleLabel->setMaximumHeight(0);
+    } else {
+        dataLabel->setPlainText(data);
+    }
 }
 
 /*!
@@ -138,7 +181,6 @@
 void HsViewAppDetailsState::stateExited()
 {
     HSMENUTEST_FUNC_ENTRY("HsViewAppDetailsState::stateExited");
-    mDialog = NULL;
     emit exit();
     HSMENUTEST_FUNC_EXIT("HsViewAppDetailsState::stateExited");
     qDebug("HsViewAppDetailsState::stateExited()");
@@ -152,26 +194,9 @@
     QState::onExit(event);
     // Close popups if App key was pressed or
     // memory card removed
-    if (mDialog) {
+    if (mDialog != NULL) {
         mDialog->close();
+        mDialog = NULL;
     }
-    mDialog = NULL;
 }
 
-/*!
- Subscribe for memory card remove.
- \param entryId: entry id.
- \retval void
- */
-void HsViewAppDetailsState::subscribeForMemoryCardRemove(int entryId)
-{
-    CaNotifierFilter filter;
-    QList<int> entryIds;
-    entryIds.append(entryId);
-    filter.setIds(entryIds);
-    mNotifier = CaService::instance()->createNotifier(filter);
-    mNotifier->setParent(this);
-    connect(mNotifier,
-            SIGNAL(entryChanged(CaEntry,ChangeType)),
-            SIGNAL(exit()));
-}
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappsettingsstate.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsviewappsettingsstate.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -14,7 +14,7 @@
 * Description:  Menu Application Library state.
  *
 */
-
+#include <QScopedPointer>
 #include <hbmainwindow.h>
 #include <hbview.h>
 #include <hbinstance.h>
@@ -26,6 +26,7 @@
 #include "hsapp_defs.h"
 #include "hsmenuevent.h"
 #include "hsviewappsettingsstate.h"
+#include "hsmenuentryremovedhandler.h"
 #include "caentry.h"
 #include "canotifier.h"
 #include "canotifierfilter.h"
@@ -64,9 +65,7 @@
         QState(parent),
         mView(0), 
         mPreviousView(0), 
-        mActionConfirm(0),
-        mNotifier(0)
-        
+        mActionConfirm(0)
 {
     construct();
 }
@@ -87,9 +86,6 @@
  */
 HsViewAppSettingsState::~HsViewAppSettingsState()
 {
-    if (mNotifier) {
-        delete mNotifier;
-    }    
 }
 
 /*!
@@ -109,16 +105,20 @@
     QSharedPointer<const CaEntry> entry = CaService::instance()->getEntry(entryId);    
     
     QString pluginPath;
-    pluginPath = pluginPath.append("/resource/qt/plugins/appsettings/").append(entry->attribute(appSettingsPlugin())).append(".qtplugin");
+    pluginPath = pluginPath.append("/resource/qt/plugins/appsettings/")
+        .append(entry->attribute(appSettingsPlugin())).append(".qtplugin");
     QPluginLoader loader(pluginPath);
     mView = qobject_cast<HbView *>(loader.instance()); 
     
     mActionConfirm = new HbAction(Hb::ConfirmNaviAction, mView);
-    connect(mActionConfirm, SIGNAL(triggered()),SLOT(settingsDone()));
+    connect(mActionConfirm, SIGNAL(triggered()), SIGNAL(exit()));
     
-    if(mView)
-        {    
-        subscribeForMemoryCardRemove(entryId);
+    if (mView) {    
+        QScopedPointer<HsMenuEntryRemovedHandler> entryObserver(
+            new HsMenuEntryRemovedHandler(entryId, this, SIGNAL(exit())));
+        
+        entryObserver.take()->setParent(mView);
+        
         QObject::connect(this, SIGNAL(initialize(QString)), mView, SLOT(initialize(QString)));        
         mView->setParent(this);
         emit initialize(entry->attribute(applicationUidEntryKey()));        
@@ -132,7 +132,7 @@
         mPreviousView = hbMainWindow->currentView();
         hbMainWindow->setCurrentView(mView);
         hbMainWindow->show();
-        }
+    }
 
     
     HSMENUTEST_FUNC_EXIT("HsViewAppSettingsState::onEntry");
@@ -155,32 +155,6 @@
 #endif //COVERAGE_MEASUREMENT
 
 
-/*!
- Invoked when plugin view exits
- */
-void HsViewAppSettingsState::settingsDone()
-{
-    emit exit();
-}
-
-/*!
- Subscribe for memory card remove.
- \param entryId: entry id.
- \retval void
- */
-void HsViewAppSettingsState::subscribeForMemoryCardRemove(int entryId)
-{
-    CaNotifierFilter filter;
-    QList<int> entryIds;
-    entryIds.append(entryId);
-    filter.setIds(entryIds);
-    mNotifier = CaService::instance()->createNotifier(filter);
-    mNotifier->setParent(this);
-    connect(mNotifier,
-            SIGNAL(entryChanged(CaEntry,ChangeType)),
-            SLOT(settingsDone()));
-}
-
 void HsViewAppSettingsState::onExit(QEvent *event)
 {
     
@@ -189,12 +163,7 @@
     HbMainWindow *hbMainWindow = mainWindow();
     hbMainWindow->setCurrentView(mPreviousView);
     hbMainWindow->removeView(mView);
-    disconnect(mNotifier,
-               SIGNAL(entryChanged(CaEntry,ChangeType)),
-               this,
-               SLOT(settingsDone()));
-    delete mNotifier;
-    mNotifier = NULL;
+
     
     delete mActionConfirm;
     mActionConfirm = NULL;
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/hsclockwidgetplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -38,7 +38,7 @@
     
 }
 
-win32:include(hsclockwidgetplugin_win.pri)
+!symbian:include(hsclockwidgetplugin_win.pri)
 symbian:include(hsclockwidgetplugin_symbian.pri)
 
 RESOURCES = hsclockwidgetplugin.qrc
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockwidget.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsanalogclockwidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -25,7 +25,7 @@
 HOMESCREEN_TEST_CLASS(TestClockWidget)
 
 class HbIconItem;
-class HbTouchArea;
+class QGestureEvent;
 
 class HsAnalogClockWidget : public HbWidget
 {
@@ -35,7 +35,6 @@
     explicit HsAnalogClockWidget(QGraphicsItem *parent = 0);
     ~HsAnalogClockWidget();
 
-    bool eventFilter(QObject *watched, QEvent *event);
     QRectF boundingRect() const;
     QPainterPath shape() const;
 
@@ -47,19 +46,18 @@
 
 protected:
     void resizeEvent(QGraphicsSceneResizeEvent *event);
+    void gestureEvent(QGestureEvent *event);
 
 private:
     Q_DISABLE_COPY(HsAnalogClockWidget)
     void createPrimitives();
     void updatePrimitives();
-    void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
 
 private:
     HbIconItem *mBackground;
     HbIconItem *mHourHand;
     HbIconItem *mMinuteHand;
     HbIconItem *mSecondHand;
-    HbTouchArea *mTouchArea;
 
     HOMESCREEN_TEST_FRIEND_CLASS(TestClockWidget)
 };
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsdigitalclockwidget.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/inc/hsdigitalclockwidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -26,7 +26,7 @@
 
 class HbFrameItem;
 class HbIconItem;
-class HbTouchArea;
+class QGestureEvent;
 
 class HsDigitalClockWidget : public HbWidget
 {
@@ -36,7 +36,6 @@
     explicit HsDigitalClockWidget(bool useAmPm = true, QGraphicsItem *parent = 0);
     ~HsDigitalClockWidget();
 
-    bool eventFilter(QObject *watched, QEvent *event);
     QPainterPath shape() const;
 signals:
     void clockTapped();
@@ -47,12 +46,12 @@
 
 protected:
     void resizeEvent(QGraphicsSceneResizeEvent *event);
+    void gestureEvent(QGestureEvent *event);
 
 private:
     Q_DISABLE_COPY(HsDigitalClockWidget)
     void createPrimitives();
     void updatePrimitives();
-    void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
 
 private:
     HbFrameItem *mBackground;
@@ -63,7 +62,6 @@
     HbIconItem *mDigit5;
     HbIconItem *mDigit6;
     HbIconItem *mAmPm;
-    HbTouchArea *mTouchArea;
     bool mUseAmPm;
     QMap<QChar, QString> mDigitMap;
     
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.css	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.css	Wed Aug 18 09:40:07 2010 +0300
@@ -25,7 +25,3 @@
   fixed-height: 25.0un;
   zvalue: 1;
 }
-
-HsAnalogClockWidget::toucharea {  
-  zvalue: 4;
-}
\ No newline at end of file
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.widgetml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsanalogclockwidget.widgetml	Wed Aug 18 09:40:07 2010 +0300
@@ -21,10 +21,6 @@
         <meshitem src="second_hand" srcEdge="LEFT" dst="" dstEdge="LEFT" />
         <meshitem src="second_hand" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
 
-        <meshitem src="toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
-        <meshitem src="toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-        <meshitem src="toucharea" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-        <meshitem src="toucharea" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
     </layout>
 
 </hbwidget>
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsdigitalclockwidget.css	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsdigitalclockwidget.css	Wed Aug 18 09:40:07 2010 +0300
@@ -65,6 +65,3 @@
   zvalue: 2;
 }
 
-HsDigitalClockWidget::toucharea {  
-  zvalue: 4;
-}
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsdigitalclockwidget.widgetml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/hsdigitalclockwidget.widgetml	Wed Aug 18 09:40:07 2010 +0300
@@ -27,10 +27,6 @@
         <meshitem src="digit6" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
         <meshitem src="digit6" srcEdge="LEFT" dst="digit5" dstEdge="RIGHT" />
 
-        <meshitem src="toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
-        <meshitem src="toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-        <meshitem src="toucharea" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-        <meshitem src="toucharea" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
     </layout>
     
 </hbwidget>
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/qtg_graf_hswidget_preview_clock.svg	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/resource/qtg_graf_hswidget_preview_clock.svg	Wed Aug 18 09:40:07 2010 +0300
@@ -1,49 +1,161 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="224px" height="140px" viewBox="0 0 224 140">
-<rect fill="#FFFFFF" width="224" height="140"/>
-<rect x="57" y="14.619" fill="none" width="110" height="110"/>
-<circle fill="none" stroke="#404040" stroke-width="3.5" stroke-opacity="0.4" cx="111.999" cy="69.618" r="54.053"/>
-<circle fill="none" stroke="#404040" stroke-width="1.4883" stroke-opacity="0.4" cx="111.999" cy="69.617" r="54.069"/>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="21.02" y1="206.9834" x2="21.02" y2="98.1177" gradientTransform="matrix(1 0 0 -1 90.98 221.9902)">
-<stop offset="0" style="stop-color:#DBDBDB"/>
-<stop offset="0" style="stop-color:#C1C1C1"/>
-<stop offset="0.53" style="stop-color:#DBDBDB"/>
-<stop offset="0.53" style="stop-color:#C1C1C1"/>
-<stop offset="1" style="stop-color:#A8A8A8"/>
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="320px" height="210px" viewBox="-9 14 320 210">
+<path fill-opacity="0.4" stroke-opacity="0.4" d="M150.999,188.197c-38.155,0-69.195-31.039-69.195-69.195  c0-38.154,31.04-69.196,69.195-69.196c38.155,0,69.194,31.042,69.194,69.196C220.193,157.158,189.154,188.197,150.999,188.197  L150.999,188.197z"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="336.9785" y1="-63.1782" x2="336.9785" y2="-201.4114" gradientTransform="matrix(1 0 0 -1 -185.98 -13.5195)">
+<stop offset="0" style="stop-color:#DCDCDC"/>
+<stop offset="0.6" style="stop-color:#C0C0C0"/>
+<stop offset="1" style="stop-color:#A7A7A7"/>
 </linearGradient>
-<circle fill="url(#SVGID_1_)" cx="111.999" cy="69.619" r="53.991"/>
-<circle fill="none" stroke="#FFFFFF" stroke-width="1.1" stroke-opacity="0.4" cx="111.999" cy="69.619" r="53.728"/>
-<circle fill="none" stroke="#E6E6E6" stroke-width="2.3" cx="111.999" cy="69.618" r="48.839"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="21.02" y1="201.0898" x2="21.02" y2="104.9416" gradientTransform="matrix(1 0 0 -1 90.98 221.9902)">
+<circle fill="url(#SVGID_1_)" cx="150.999" cy="119.002" r="68.555"/>
+<path fill-opacity="0.4" stroke-opacity="0.4" fill="#FFFFFF" d="M150.999,50.447c-37.862,0-68.556,30.691-68.556,68.555  c0,37.861,30.693,68.555,68.556,68.555c37.862,0,68.556-30.693,68.556-68.555C219.555,81.139,188.861,50.447,150.999,50.447z   M150.999,186.916c-37.448,0-67.914-30.467-67.914-67.914c0-37.449,30.466-67.915,67.914-67.915  c37.446,0,67.914,30.466,67.914,67.915C218.913,156.449,188.445,186.916,150.999,186.916z"/>
+<path fill="#E5E5E5" d="M150.999,181.791c-34.622,0-62.789-28.166-62.789-62.789s28.167-62.789,62.789-62.789  s62.788,28.166,62.788,62.789S185.621,181.791,150.999,181.791L150.999,181.791z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="336.9795" y1="-194.0273" x2="336.9795" y2="-71.0137" gradientTransform="matrix(1 0 0 -1 -185.98 -13.5195)">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.4121" style="stop-color:#DCDCDC"/>
+<stop offset="0.9455" style="stop-color:#CBCBCB"/>
+<stop offset="1" style="stop-color:#CBCBCB"/>
+</linearGradient>
+<circle fill="url(#SVGID_2_)" cx="150.999" cy="119.001" r="61.507"/>
+<path fill-opacity="0.5" stroke-opacity="0.5" d="M150.999,57.494c-33.971,0-61.508,27.538-61.508,61.508  c0,33.969,27.537,61.506,61.508,61.506c33.97,0,61.508-27.537,61.508-61.506C212.507,85.032,184.969,57.494,150.999,57.494z   M150.999,179.875c-33.565,0-60.874-27.307-60.874-60.873c0-33.565,27.309-60.873,60.874-60.873  c33.565,0,60.876,27.308,60.876,60.873C211.875,152.568,184.564,179.875,150.999,179.875z"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="336.9795" y1="-186.9824" x2="336.9795" y2="-78.0605" gradientTransform="matrix(1 0 0 -1 -185.98 -13.5195)">
+<stop offset="0" style="stop-color:#B4B4B4"/>
+<stop offset="1" style="stop-color:#A0A0A0"/>
+</linearGradient>
+<circle fill="url(#SVGID_3_)" cx="150.999" cy="119.002" r="54.461"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="336.9785" y1="-79.3413" x2="336.9785" y2="-185.6992" gradientTransform="matrix(1 0 0 -1 -185.98 -13.5195)">
 <stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.56" style="stop-color:#CCCCCC"/>
-<stop offset="1" style="stop-color:#E6E6E6"/>
-</linearGradient>
-<circle fill="url(#SVGID_2_)" cx="111.999" cy="69.618" r="48.44"/>
-<circle fill="none" stroke="#000000" stroke-opacity="0.5" cx="111.999" cy="69.617" r="48.157"/>
-<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="40.4355" y1="184.1553" x2="40.4355" y2="156.1365" gradientTransform="matrix(1 0 0 -1 90.98 221.9902)">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="1" style="stop-color:#B3B3B3"/>
+<stop offset="0.9455" style="stop-color:#CBCBCB"/>
+<stop offset="1" style="stop-color:#CBCBCB"/>
 </linearGradient>
-<path fill="url(#SVGID_3_)" fill-opacity="0.5" d="M120.316,66.446c-3.05,0-4.729-1.768-4.729-4.977V50.475  c0-3.331,2.766-4.513,5.135-4.513h0.222c0.198,0,0.215-0.002,0.375-0.007l0.13-0.005c1.279-0.044,2.646-0.969,2.644-3.433  c-0.001-2.085,0.564-3.615,1.682-4.544c0.958-0.795,2.099-0.961,2.889-0.961c0.558,0,0.952,0.083,0.968,0.089  c11.037,1.901,16.931,11.18,17.581,17.158c0.188,1.701-0.431,3.575-1.609,4.889c-0.792,0.879-2.201,1.928-4.439,1.928  c-3.351,0-4.679,1.155-5.387,2.025l-0.2,0.249c-0.919,1.159-2.459,3.097-5.764,3.097H120.316z"/>
-<path fill="#B3B3B3" fill-opacity="0.4" d="M147.211,54.258c-0.65-5.978-6.544-15.256-17.581-17.158  c-0.016-0.005-0.41-0.089-0.968-0.089c-0.789,0-1.931,0.166-2.889,0.961c-1.117,0.93-1.683,2.459-1.682,4.544  c0.002,2.463-1.364,3.389-2.644,3.433l-0.13,0.005c-0.16,0.005-0.179,0.007-0.375,0.007h-0.222c-2.369,0-5.135,1.182-5.135,4.513  v10.995c0,3.209,1.68,4.977,4.729,4.977h9.495c3.305,0,4.845-1.938,5.764-3.097l0.2-0.249c0.708-0.87,2.036-2.025,5.387-2.025  c2.238,0,3.647-1.049,4.439-1.928C146.78,57.833,147.398,55.959,147.211,54.258z M141.162,60.571c-3.538,0-4.989,1.242-5.777,2.211  c-0.919,1.13-2.279,3.16-5.572,3.16c-3.295,0-5.888,0-9.496,0c-3.604,0-4.224-2.559-4.224-4.473c0-1.914,0-10.995,0-10.995  c0-2.97,2.403-4.009,4.629-4.009c0.503,0,0.382,0.002,0.746-0.01c1.671-0.059,3.134-1.298,3.13-3.939  c-0.003-6.013,4.927-4.923,4.927-4.923c10.858,1.872,16.565,11.015,17.187,16.72C147,56.975,145.119,60.571,141.162,60.571z"/>
-<ellipse fill="#FFFFFF" fill-opacity="0.25" cx="111.999" cy="44.893" rx="32.798" ry="22.203"/>
-<path fill="#808080" d="M107.654,32.983h-0.033l-1.853,1.001l-0.28-1.1l2.329-1.246h1.229v10.659h-1.393V32.983z M111.702,42.298  v-0.885l1.133-1.099c2.722-2.591,3.969-3.968,3.969-5.575c0-1.084-0.51-2.084-2.101-2.084c-0.966,0-1.771,0.493-2.263,0.903  l-0.458-1.017c0.723-0.608,1.786-1.083,3.001-1.083c2.296,0,3.264,1.575,3.264,3.1c0,1.968-1.427,3.56-3.673,5.724l-0.835,0.787  v0.034h4.772v1.197L111.702,42.298L111.702,42.298z M75.029,73.937c0.311,0.034,0.673,0,1.164-0.048  c0.837-0.115,1.625-0.442,2.231-1.034c0.704-0.641,1.213-1.576,1.41-2.82h-0.049c-0.59,0.723-1.443,1.13-2.527,1.13  c-1.901,0-3.131-1.441-3.131-3.263c0-2.018,1.46-3.788,3.642-3.788c2.18,0,3.525,1.755,3.525,4.51c0,2.325-0.787,3.969-1.836,4.983  c-0.819,0.807-1.951,1.295-3.101,1.427c-0.523,0.081-0.983,0.098-1.327,0.081V73.937L75.029,73.937z M75.554,67.82  c0,1.33,0.803,2.261,2.051,2.261c0.967,0,1.722-0.474,2.099-1.112c0.082-0.147,0.13-0.297,0.13-0.542  c0-1.82-0.671-3.214-2.197-3.214C76.424,65.213,75.554,66.294,75.554,67.82z M133.846,30.986l-0.46,0.788  c0.039,0.02,0.109,0.059,0.209,0.116c0.316,0.186,0.512,0.41,0.581,0.676c0.073,0.266,0.017,0.559-0.17,0.878  c-0.212,0.362-0.462,0.578-0.75,0.648c-0.289,0.068-0.624-0.009-1.003-0.231c-0.221-0.126-0.431-0.294-0.644-0.503l0.22-0.375  l0.005,0.002c0.221,0.223,0.401,0.376,0.545,0.459c0.213,0.125,0.4,0.161,0.568,0.11c0.165-0.051,0.317-0.196,0.454-0.435  c0.122-0.208,0.158-0.399,0.108-0.57c-0.049-0.171-0.188-0.322-0.411-0.453c-0.154-0.09-0.315-0.173-0.477-0.25l0.898-1.544  l1.641,0.957l-0.214,0.367L133.846,30.986z M148.161,48.604l-0.345,0.194l-1.077-1.89l0.345-0.194l0.382,0.672l2.389-1.36  l-0.537-0.585l0.345-0.195l0.834,0.775l0.178,0.31l-2.877,1.638L148.161,48.604z M151.886,48.442  c0.187,0.329,0.212,0.645,0.073,0.946c-0.137,0.302-0.503,0.622-1.096,0.958c-0.648,0.37-1.139,0.536-1.469,0.496  c-0.327-0.037-0.586-0.223-0.775-0.555c-0.167-0.291-0.214-0.556-0.144-0.792c0.067-0.236,0.206-0.444,0.416-0.622  c0.212-0.179,0.483-0.364,0.817-0.554c0.579-0.331,1.042-0.478,1.378-0.443C151.427,47.914,151.694,48.101,151.886,48.442z   M148.971,50.08c0.084,0.146,0.225,0.206,0.427,0.182c0.203-0.026,0.58-0.195,1.13-0.508c0.528-0.299,0.847-0.527,0.954-0.681  c0.107-0.154,0.121-0.302,0.041-0.444c-0.075-0.128-0.179-0.193-0.316-0.195c-0.137-0.002-0.293,0.036-0.466,0.115  c-0.176,0.08-0.405,0.2-0.692,0.363c-0.566,0.322-0.907,0.562-1.024,0.717C148.907,49.784,148.888,49.935,148.971,50.08z   M148.192,90.153l-0.374-0.211l1.084-1.914l0.234,0.136c0.222,0.125,0.398,0.274,0.529,0.451c0.127,0.175,0.222,0.353,0.279,0.535  c0.06,0.183,0.112,0.402,0.161,0.655c0.056,0.308,0.117,0.515,0.18,0.625c0.066,0.108,0.148,0.187,0.243,0.239  c0.163,0.096,0.314,0.121,0.447,0.081c0.134-0.042,0.249-0.15,0.349-0.326c0.106-0.185,0.187-0.436,0.238-0.756l0.002-0.005  l0.384,0.218c-0.07,0.326-0.18,0.619-0.328,0.884c-0.184,0.325-0.396,0.531-0.632,0.62c-0.238,0.086-0.496,0.053-0.772-0.103  c-0.156-0.089-0.288-0.214-0.396-0.377c-0.108-0.157-0.201-0.447-0.274-0.864c-0.046-0.232-0.087-0.419-0.126-0.556  c-0.038-0.14-0.095-0.271-0.165-0.389c-0.073-0.122-0.171-0.223-0.294-0.298L148.192,90.153z M150.175,93.316  c-0.186,0.329-0.445,0.511-0.775,0.549c-0.328,0.035-0.789-0.115-1.384-0.45c-0.65-0.368-1.042-0.705-1.179-1.006  c-0.136-0.306-0.11-0.62,0.079-0.954c0.166-0.29,0.366-0.468,0.606-0.53c0.239-0.059,0.487-0.047,0.75,0.043  c0.26,0.09,0.559,0.227,0.893,0.417c0.581,0.329,0.944,0.648,1.086,0.959C150.393,92.65,150.368,92.974,150.175,93.316z   M147.274,91.653c-0.081,0.145-0.061,0.299,0.064,0.459s0.463,0.396,1.012,0.709c0.53,0.301,0.889,0.454,1.075,0.469  c0.188,0.012,0.322-0.05,0.402-0.19c0.072-0.132,0.075-0.255,0.005-0.371c-0.065-0.119-0.179-0.234-0.337-0.343  c-0.157-0.108-0.378-0.243-0.666-0.408c-0.565-0.32-0.948-0.49-1.141-0.513C147.495,91.445,147.356,91.508,147.274,91.653z   M133.36,105.639l-0.236-0.355l1.831-1.213l0.149,0.224c0.138,0.214,0.227,0.427,0.266,0.643c0.034,0.213,0.038,0.415,0.008,0.603  c-0.034,0.189-0.082,0.407-0.157,0.658c-0.089,0.298-0.127,0.51-0.118,0.637c0.009,0.128,0.043,0.237,0.103,0.326  c0.105,0.159,0.227,0.25,0.363,0.273c0.139,0.024,0.291-0.018,0.461-0.13c0.177-0.116,0.362-0.307,0.555-0.565l0.004-0.003  l0.241,0.364c-0.209,0.26-0.44,0.473-0.691,0.642c-0.311,0.205-0.593,0.294-0.845,0.262c-0.253-0.026-0.468-0.174-0.641-0.44  c-0.1-0.148-0.162-0.319-0.185-0.514c-0.022-0.19,0.025-0.489,0.147-0.895c0.064-0.227,0.114-0.412,0.141-0.553  c0.028-0.14,0.037-0.282,0.029-0.422c-0.01-0.14-0.051-0.271-0.128-0.4L133.36,105.639z M133.727,108.782l-0.503-0.763  c-0.036,0.027-0.102,0.072-0.198,0.136c-0.305,0.203-0.595,0.275-0.863,0.225c-0.271-0.055-0.509-0.235-0.713-0.542  c-0.23-0.352-0.315-0.669-0.248-0.961c0.064-0.289,0.28-0.554,0.651-0.799c0.208-0.139,0.453-0.256,0.733-0.354l0.241,0.362h-0.003  c-0.301,0.104-0.518,0.199-0.654,0.289c-0.205,0.137-0.322,0.289-0.348,0.459c-0.029,0.173,0.033,0.373,0.184,0.604  c0.133,0.202,0.291,0.318,0.467,0.348c0.175,0.034,0.371-0.023,0.589-0.167c0.147-0.101,0.295-0.206,0.435-0.319l0.986,1.489  l-1.581,1.045l-0.234-0.352L133.727,108.782z M92.177,108.299c-0.42-0.237-0.706-0.345-0.858-0.319  c-0.154,0.027-0.28,0.129-0.38,0.308c-0.089,0.153-0.113,0.297-0.076,0.422c0.039,0.125,0.142,0.235,0.309,0.33  c0.146,0.084,0.37,0.161,0.676,0.24l0.004,0.002l-0.215,0.379c-0.307-0.085-0.568-0.191-0.785-0.314  c-0.327-0.188-0.536-0.391-0.624-0.616c-0.09-0.224-0.059-0.468,0.089-0.731c0.103-0.179,0.241-0.31,0.414-0.382  c0.171-0.077,0.366-0.089,0.582-0.04c-0.18-0.148-0.284-0.318-0.316-0.51c-0.033-0.193,0.009-0.39,0.123-0.588  c0.186-0.327,0.42-0.518,0.704-0.572c0.284-0.057,0.617,0.024,0.997,0.239c0.229,0.133,0.445,0.299,0.646,0.502l-0.211,0.373  l-0.003-0.004c-0.241-0.228-0.441-0.39-0.603-0.48c-0.196-0.11-0.368-0.145-0.521-0.102c-0.154,0.042-0.287,0.158-0.396,0.357  c-0.12,0.208-0.146,0.394-0.083,0.551c0.065,0.159,0.312,0.358,0.735,0.599L92.177,108.299z M88.768,107.63l0.454-0.796  c-0.041-0.019-0.111-0.056-0.211-0.113c-0.319-0.18-0.516-0.403-0.59-0.67c-0.075-0.264-0.02-0.557,0.162-0.879  c0.208-0.366,0.455-0.585,0.743-0.656c0.287-0.072,0.622,0,1.008,0.219c0.218,0.126,0.434,0.292,0.647,0.496l-0.214,0.377  l-0.004-0.002c-0.226-0.22-0.408-0.371-0.552-0.452c-0.213-0.122-0.402-0.158-0.567-0.104c-0.166,0.052-0.315,0.199-0.453,0.438  c-0.12,0.211-0.154,0.403-0.103,0.574c0.052,0.17,0.192,0.318,0.417,0.445c0.156,0.09,0.316,0.174,0.481,0.246l-0.882,1.554  l-1.648-0.938L87.664,107L88.768,107.63z M75.081,91.36l0.363-0.218l0.195,0.326l0.694-0.411l0.34,0.572l-0.696,0.413l0.756,1.271  l-0.347,0.207l-2.214-0.028l-0.694-0.009l-0.319-0.54l2.114-1.257L75.081,91.36z M76.107,93.087l-0.492-0.828l-1.392,0.828H76.107z   M72.124,91.238c-0.196-0.323-0.227-0.641-0.094-0.944c0.133-0.303,0.492-0.63,1.078-0.979c0.642-0.381,1.128-0.556,1.458-0.524  c0.329,0.035,0.592,0.213,0.789,0.543c0.171,0.287,0.225,0.554,0.159,0.788c-0.064,0.238-0.201,0.449-0.407,0.632  c-0.207,0.182-0.475,0.371-0.806,0.568c-0.575,0.341-1.031,0.499-1.369,0.468C72.591,91.759,72.321,91.575,72.124,91.238z   M75.004,89.547c-0.085-0.146-0.229-0.2-0.431-0.175c-0.202,0.031-0.574,0.207-1.117,0.531c-0.521,0.31-0.835,0.542-0.941,0.699  c-0.104,0.157-0.116,0.304-0.033,0.443c0.076,0.128,0.183,0.191,0.319,0.191c0.137,0,0.293-0.043,0.466-0.126  c0.172-0.083,0.399-0.208,0.685-0.376c0.558-0.333,0.896-0.58,1.009-0.735C75.075,89.841,75.09,89.689,75.004,89.547z   M69.072,69.765l0.425-0.007l0.007,0.378l0.809-0.014l0.012,0.665l-0.809,0.016l0.029,1.478l-0.405,0.009l-1.911-1.122l-0.599-0.35  l-0.011-0.624l2.461-0.047L69.072,69.765z M69.112,71.773l-0.02-0.964l-1.618,0.031L69.112,71.773z M67.031,68.535l0.915-0.018  c-0.004-0.048-0.007-0.126-0.009-0.24c-0.009-0.367,0.083-0.65,0.273-0.85c0.19-0.198,0.468-0.302,0.839-0.311  c0.42-0.008,0.735,0.094,0.944,0.305c0.208,0.209,0.317,0.537,0.326,0.977c0.004,0.253-0.028,0.521-0.096,0.812l-0.433,0.007V69.21  c0.075-0.304,0.11-0.538,0.106-0.7c-0.004-0.247-0.072-0.429-0.201-0.544c-0.128-0.115-0.333-0.169-0.608-0.164  c-0.242,0.005-0.425,0.073-0.544,0.205c-0.119,0.133-0.178,0.328-0.171,0.587c0.002,0.179,0.014,0.359,0.034,0.538l-1.786,0.037  l-0.037-1.898l0.425-0.008L67.031,68.535z M154.084,69.496h-0.396l0.006-2.177l0.395,0.001l-0.001,0.774l2.747,0.006l-0.175-0.774  l0.394,0.001l0.341,1.087v0.356l-3.31-0.008L154.084,69.496z M156.935,70.862l-0.912-0.002c0.003,0.042,0.004,0.121,0.004,0.236  c0,0.368-0.1,0.649-0.294,0.845c-0.193,0.196-0.475,0.291-0.846,0.291c-0.421,0-0.732-0.108-0.936-0.324  c-0.203-0.213-0.305-0.544-0.305-0.984c0.001-0.251,0.037-0.521,0.113-0.807h0.434v0.005c-0.081,0.305-0.122,0.537-0.122,0.702  c-0.001,0.247,0.062,0.429,0.188,0.546c0.128,0.116,0.328,0.178,0.605,0.178c0.242,0.001,0.426-0.063,0.549-0.193  c0.123-0.128,0.185-0.324,0.186-0.581c0-0.18-0.008-0.359-0.023-0.539l1.785,0.003l-0.005,1.896l-0.425-0.001L156.935,70.862z   M72.231,48.142l0.789,0.462c0.02-0.041,0.058-0.11,0.116-0.209c0.185-0.316,0.411-0.511,0.677-0.582  c0.266-0.073,0.558-0.015,0.877,0.171c0.363,0.212,0.579,0.462,0.647,0.75c0.07,0.289-0.008,0.624-0.23,1.005  c-0.126,0.217-0.294,0.431-0.503,0.643l-0.375-0.219l0.003-0.003c0.221-0.222,0.375-0.404,0.458-0.546  c0.125-0.212,0.161-0.402,0.109-0.567c-0.05-0.167-0.195-0.318-0.434-0.458c-0.209-0.122-0.399-0.158-0.57-0.108  c-0.17,0.05-0.322,0.189-0.452,0.412c-0.091,0.155-0.174,0.314-0.251,0.479l-1.542-0.9l0.957-1.639l0.366,0.213L72.231,48.142z   M73.423,45.179c0.191-0.329,0.452-0.508,0.783-0.54c0.33-0.032,0.789,0.124,1.377,0.467c0.646,0.377,1.034,0.717,1.168,1.022  c0.129,0.303,0.1,0.62-0.094,0.951c-0.168,0.29-0.373,0.463-0.612,0.522c-0.239,0.057-0.488,0.041-0.748-0.051  c-0.261-0.093-0.558-0.235-0.889-0.429c-0.579-0.337-0.936-0.66-1.073-0.972C73.198,45.839,73.226,45.515,73.423,45.179z   M76.302,46.879c0.085-0.146,0.065-0.299-0.058-0.461c-0.122-0.162-0.457-0.402-1.004-0.721c-0.524-0.307-0.88-0.468-1.067-0.484  c-0.188-0.017-0.321,0.045-0.405,0.186c-0.074,0.128-0.078,0.253-0.011,0.372c0.067,0.121,0.178,0.235,0.334,0.347  c0.156,0.111,0.376,0.25,0.663,0.416c0.561,0.328,0.939,0.505,1.132,0.527C76.078,47.083,76.218,47.022,76.302,46.879z   M88.294,31.414l0.452,0.793c0.038-0.025,0.105-0.065,0.206-0.122c0.318-0.181,0.611-0.236,0.877-0.165  c0.266,0.071,0.491,0.267,0.674,0.589c0.208,0.365,0.27,0.69,0.184,0.974c-0.085,0.285-0.32,0.534-0.705,0.753  c-0.219,0.126-0.471,0.227-0.756,0.304l-0.215-0.376l0.004-0.002c0.304-0.081,0.528-0.161,0.671-0.244  c0.214-0.121,0.34-0.267,0.379-0.436s-0.01-0.373-0.146-0.612c-0.12-0.211-0.266-0.337-0.439-0.379  c-0.175-0.043-0.373,0.001-0.599,0.128c-0.156,0.089-0.308,0.186-0.458,0.288l-0.883-1.551l1.648-0.938l0.21,0.368L88.294,31.414z   M90.74,30.021l0.454,0.795c0.035-0.026,0.105-0.067,0.204-0.124c0.319-0.181,0.612-0.235,0.878-0.165  c0.268,0.071,0.492,0.267,0.673,0.589c0.208,0.365,0.269,0.69,0.185,0.974c-0.086,0.284-0.32,0.535-0.704,0.753  c-0.22,0.125-0.472,0.227-0.757,0.305l-0.215-0.377l0.004-0.002c0.303-0.081,0.526-0.161,0.669-0.242  c0.214-0.122,0.34-0.268,0.379-0.436c0.039-0.169-0.01-0.373-0.146-0.612c-0.12-0.211-0.268-0.337-0.441-0.38  c-0.172-0.042-0.373,0.001-0.598,0.129c-0.155,0.088-0.308,0.185-0.457,0.288l-0.883-1.552l1.65-0.939l0.209,0.37L90.74,30.021z   M114.219,113.636c-0.485,0.002-0.787,0.053-0.905,0.15c-0.119,0.099-0.179,0.249-0.178,0.452c0,0.181,0.049,0.314,0.146,0.405  c0.095,0.09,0.237,0.134,0.428,0.134c0.167,0,0.405-0.04,0.71-0.127l0.004,0.002l0.002,0.433c-0.309,0.077-0.591,0.116-0.84,0.116  c-0.376,0.002-0.659-0.07-0.848-0.224c-0.19-0.15-0.285-0.376-0.286-0.68c0-0.206,0.055-0.389,0.17-0.538  c0.113-0.149,0.275-0.258,0.487-0.319c-0.23-0.039-0.407-0.137-0.529-0.288c-0.122-0.152-0.185-0.344-0.186-0.57  c0-0.377,0.108-0.66,0.326-0.848c0.221-0.188,0.549-0.285,0.989-0.287c0.26,0,0.532,0.041,0.807,0.116l0.001,0.43h-0.005  c-0.324-0.079-0.576-0.12-0.761-0.119c-0.225,0-0.39,0.057-0.502,0.17c-0.116,0.114-0.17,0.283-0.17,0.507  c0.003,0.242,0.069,0.415,0.204,0.521c0.135,0.104,0.447,0.155,0.935,0.153L114.219,113.636z M110.583,115.208  c-0.381,0.002-0.667-0.134-0.861-0.399c-0.195-0.27-0.292-0.745-0.295-1.428c-0.001-0.747,0.097-1.251,0.292-1.521  c0.195-0.268,0.485-0.402,0.867-0.402c0.334-0.003,0.588,0.087,0.759,0.264c0.171,0.178,0.283,0.403,0.336,0.671  c0.051,0.273,0.08,0.6,0.08,0.982c0.001,0.671-0.097,1.144-0.296,1.417C111.268,115.069,110.974,115.208,110.583,115.208z   M110.593,111.864c-0.167,0-0.292,0.097-0.369,0.285c-0.077,0.188-0.115,0.601-0.115,1.229c0.003,0.609,0.043,0.999,0.125,1.169  c0.081,0.169,0.202,0.256,0.364,0.256c0.148-0.002,0.256-0.062,0.326-0.18c0.069-0.118,0.112-0.275,0.129-0.463  c0.017-0.192,0.025-0.453,0.025-0.783c-0.002-0.65-0.042-1.066-0.119-1.243C110.882,111.956,110.76,111.864,110.593,111.864z   M110.625,24.026c0.381,0.001,0.667,0.138,0.859,0.408c0.193,0.27,0.29,0.746,0.287,1.425c0,0.749-0.101,1.256-0.299,1.523  c-0.196,0.266-0.486,0.398-0.869,0.397c-0.335,0-0.587-0.09-0.758-0.268c-0.17-0.178-0.281-0.402-0.331-0.673  c-0.053-0.272-0.078-0.6-0.077-0.984c0.001-0.668,0.102-1.141,0.302-1.416C109.94,24.163,110.235,24.025,110.625,24.026z   M110.602,27.37c0.167,0,0.29-0.092,0.368-0.281c0.078-0.188,0.119-0.598,0.12-1.231c0.002-0.606-0.037-0.995-0.118-1.166  c-0.081-0.17-0.202-0.255-0.364-0.255c-0.148,0-0.257,0.058-0.327,0.177c-0.069,0.117-0.113,0.272-0.13,0.463  c-0.02,0.19-0.028,0.451-0.029,0.78c0,0.65,0.036,1.065,0.113,1.245C110.312,27.28,110.434,27.37,110.602,27.37z M113.441,24.033  c0.381,0.001,0.668,0.136,0.859,0.406c0.193,0.27,0.289,0.747,0.287,1.427c-0.001,0.748-0.103,1.254-0.299,1.522  c-0.197,0.266-0.484,0.398-0.869,0.397c-0.335,0-0.586-0.09-0.759-0.268c-0.17-0.177-0.281-0.402-0.332-0.673  s-0.075-0.601-0.075-0.984c0.002-0.668,0.102-1.14,0.302-1.415C112.756,24.17,113.052,24.031,113.441,24.033z M113.417,27.376  c0.168,0.001,0.292-0.092,0.37-0.281c0.075-0.188,0.117-0.599,0.119-1.23c0-0.607-0.039-0.996-0.117-1.167  c-0.08-0.168-0.2-0.254-0.365-0.256c-0.147,0-0.257,0.059-0.327,0.178c-0.069,0.117-0.116,0.271-0.131,0.462  c-0.019,0.19-0.028,0.451-0.03,0.781c-0.001,0.65,0.038,1.064,0.116,1.244C113.127,27.287,113.251,27.376,113.417,27.376z   M141.838,73.309c0.41,0.246,1.343,0.654,2.361,0.654c1.839,0,2.427-1.162,2.41-2.066c-0.017-1.493-1.359-2.132-2.755-2.132h-0.805  v-1.083h0.805c1.048,0,2.378-0.54,2.378-1.803c0-0.853-0.541-1.606-1.871-1.606c-0.852,0-1.67,0.377-2.131,0.705l-0.393-1.049  c0.572-0.41,1.654-0.821,2.804-0.821c2.098,0,3.05,1.248,3.05,2.543c0,1.114-0.672,2.049-1.967,2.525v0.032  c1.314,0.246,2.363,1.232,2.378,2.724c0,1.705-1.343,3.198-3.886,3.198c-1.195,0-2.245-0.376-2.771-0.722L141.838,73.309z   M114.606,97.213c-0.293-0.015-0.672,0.016-1.083,0.083c-2.279,0.359-3.458,1.998-3.706,3.772h0.033  c0.508-0.691,1.411-1.248,2.591-1.248c1.887,0,3.214,1.377,3.214,3.442c0,1.969-1.327,3.772-3.558,3.772  c-2.263,0-3.754-1.771-3.754-4.542c0-2.097,0.737-3.755,1.804-4.805c0.885-0.869,2.066-1.409,3.409-1.572  c0.427-0.068,0.79-0.081,1.05-0.081L114.606,97.213L114.606,97.213z M114.195,103.363c0-1.525-0.869-2.446-2.196-2.446  c-0.869,0-1.689,0.525-2.083,1.314c-0.082,0.162-0.147,0.361-0.147,0.621c0.017,1.757,0.836,3.068,2.362,3.068  C113.361,105.921,114.195,104.887,114.195,103.363z"/>
-<path fill="#666666" d="M112.504,30.561h-1.008v-1.201h1.008V30.561z M111.494,109.877h1.01v-1.2h-1.01V109.877z M152.258,70.124  v-1.012h-1.2v1.012H152.258z M71.742,69.112v1.01h1.201v-1.01H71.742z M92.309,34.5l-0.875,0.506l0.6,1.04l0.876-0.505L92.309,34.5z   M131.689,104.736l0.874-0.507l-0.598-1.04l-0.874,0.506L131.689,104.736z M147.118,49.926l-0.507-0.874l-1.038,0.6l0.504,0.875  L147.118,49.926z M76.882,89.308l0.505,0.874l1.04-0.598l-0.505-0.874L76.882,89.308z M77.389,49.051l-0.505,0.875l1.039,0.6  l0.505-0.874L77.389,49.051z M146.611,90.184l0.506-0.873l-1.041-0.601l-0.504,0.874L146.611,90.184z M132.566,35.007l-0.875-0.505  l-0.599,1.041l0.874,0.504L132.566,35.007z M91.433,104.229l0.873,0.505l0.602-1.039l-0.875-0.506L91.433,104.229z"/>
-<path fill="#808080" d="M107.395,26.71l-0.172,0.018l-0.177-1.677l0.173-0.018L107.395,26.71z M116.783,114.203l0.17-0.017  l-0.177-1.68l-0.172,0.018L116.783,114.203z M156.584,64.837l-0.017-0.172l-1.679,0.177l0.018,0.172L156.584,64.837z M67.416,74.4  l0.017,0.173l1.677-0.178l-0.017-0.173L67.416,74.4z M102.585,25.777l-0.17,0.035l0.35,1.65l0.17-0.037L102.585,25.777z   M121.415,113.459l0.169-0.035l-0.351-1.651l-0.171,0.038L121.415,113.459z M155.841,60.204l-0.036-0.17l-1.65,0.351l0.037,0.17  L155.841,60.204z M68.159,79.034l0.036,0.169l1.65-0.351l-0.037-0.172L68.159,79.034z M98.054,27.002l-0.166,0.054l0.521,1.604  l0.166-0.053L98.054,27.002z M125.946,112.236l0.164-0.055l-0.519-1.605l-0.167,0.055L125.946,112.236z M154.618,55.671  l-0.056-0.165l-1.604,0.522l0.055,0.165L154.618,55.671z M69.383,83.564l0.054,0.165l1.604-0.521l-0.054-0.166L69.383,83.564z   M93.676,28.693l-0.158,0.071l0.686,1.541l0.159-0.07L93.676,28.693z M130.324,110.544l0.159-0.072l-0.687-1.54l-0.159,0.072  L130.324,110.544z M152.925,51.294l-0.071-0.159l-1.541,0.686l0.072,0.159L152.925,51.294z M71.074,87.942l0.07,0.159l1.542-0.685  l-0.071-0.161L71.074,87.942z M86.558,34.762l-0.139,0.102l-0.993-1.365l0.141-0.102L86.558,34.762z M138.434,105.84l0.139-0.103  l-0.991-1.365l-0.14,0.103L138.434,105.84z M148.222,43.185l-0.103-0.14l-1.364,0.992l0.101,0.14L148.222,43.185z M75.779,96.052  l0.102,0.139l1.364-0.991l-0.102-0.139L75.779,96.052z M81.925,36.358l-0.128,0.116l1.129,1.253l0.128-0.116L81.925,36.358z   M142.075,102.879l0.128-0.115l-1.127-1.255l-0.131,0.115L142.075,102.879z M145.262,39.544l-0.116-0.129l-1.255,1.128l0.115,0.129  L145.262,39.544z M78.74,99.692l0.116,0.128l1.253-1.126l-0.117-0.131L78.74,99.692z M78.613,39.685l-0.117,0.128l1.255,1.128  l0.116-0.128L78.613,39.685z M145.386,99.554l0.117-0.131l-1.255-1.127l-0.115,0.128L145.386,99.554z M141.935,36.232l-0.131-0.116  l-1.127,1.254l0.128,0.116L141.935,36.232z M82.065,103.006l0.129,0.115l1.128-1.255l-0.128-0.114L82.065,103.006z M75.668,43.338  l-0.103,0.14l1.364,0.993l0.103-0.141L75.668,43.338z M148.331,95.899l0.103-0.144l-1.365-0.989l-0.1,0.14L148.331,95.899z   M138.281,33.286l-0.142-0.102l-0.992,1.365l0.141,0.102L138.281,33.286z M85.72,105.949l0.14,0.102l0.992-1.364l-0.141-0.1  L85.72,105.949z M72.538,52.152l-0.071,0.159l-1.541-0.687l0.072-0.158L72.538,52.152z M153.003,87.771l0.069-0.157l-1.541-0.687  l-0.071,0.159L153.003,87.771z M130.152,28.617l-0.156-0.072l-0.688,1.542l0.16,0.07L130.152,28.617z M93.847,110.62l0.158,0.071  l0.686-1.54l-0.159-0.073L93.847,110.62z M69.324,55.851l-0.054,0.166l1.604,0.52l0.054-0.165L69.324,55.851z M154.674,83.384  l0.056-0.163l-1.605-0.522l-0.056,0.164L154.674,83.384z M125.767,26.943l-0.165-0.055l-0.521,1.605l0.164,0.054L125.767,26.943z   M98.233,112.292l0.165,0.056l0.52-1.605l-0.165-0.055L98.233,112.292z M68.12,60.388l-0.037,0.169l1.651,0.352l0.036-0.17  L68.12,60.388z M155.879,78.849l0.038-0.171l-1.651-0.349l-0.036,0.172L155.879,78.849z M121.229,25.738l-0.17-0.036l-0.35,1.65  l0.172,0.036L121.229,25.738z M102.769,113.498l0.17,0.038l0.351-1.653l-0.17-0.035L102.769,113.498z M67.396,65.023l-0.02,0.174  l1.678,0.176l0.019-0.173L67.396,65.023z M156.604,74.212l0.018-0.174l-1.676-0.175l-0.02,0.171L156.604,74.212z M116.593,25.014  l-0.173-0.019l-0.174,1.678l0.171,0.02L116.593,25.014z M107.405,114.222l0.175,0.019l0.175-1.675l-0.173-0.02L107.405,114.222z"/>
-<polygon fill-opacity="0.4" points="120.303,64.168 90.39,94.083 87.194,94.245 87.549,91.215 117.451,61.313 "/>
-<polygon points="117.451,62.029 119.592,64.17 90.17,93.589 87.766,93.711 88.029,91.446 "/>
-<polygon fill-opacity="0.4" points="108.156,62.206 130.577,84.627 130.383,88.182 126.997,88.183 104.588,65.773 "/>
-<polygon fill="#1A1A1A" points="105.301,65.773 108.156,62.919 130.082,84.847 129.849,87.609 127.229,87.701 "/>
-<path fill-opacity="0.4" d="M108.789,66.406c1.771-1.771,4.65-1.77,6.423,0.001c1.769,1.771,1.769,4.65,0,6.422  c-1.772,1.77-4.651,1.771-6.423,0C107.018,71.058,107.018,68.178,108.789,66.406L108.789,66.406z"/>
-<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-297.3677" y1="401.4014" x2="-297.3677" y2="393.2246" gradientTransform="matrix(-0.7071 0.7071 0.7071 0.7071 -379.2077 -1.0529)">
+<path fill="url(#SVGID_4_)" d="M150.999,172.18c-29.323,0-53.179-23.854-53.179-53.178c0-29.323,23.855-53.18,53.179-53.18  c29.323,0,53.179,23.857,53.179,53.18C204.178,148.325,180.322,172.18,150.999,172.18L150.999,172.18z"/>
+<circle fill="#C8C8C8" cx="150.999" cy="119.002" r="1.922"/>
+<path fill="none" d="M150.999,172.18c-29.323,0-53.179-23.854-53.179-53.178c0-29.323,23.855-53.18,53.179-53.18  c29.323,0,53.179,23.857,53.179,53.18C204.178,148.325,180.322,172.18,150.999,172.18L150.999,172.18z"/>
+<circle fill="#646464" cx="150.999" cy="69.026" r="1.923"/>
+<path fill="#646464" d="M147.145,73.971h-0.028l-1.643,0.887l-0.248-0.975l2.065-1.104h1.09v9.45h-1.236V73.971z"/>
+<path fill="#646464" d="M150.738,82.229v-0.786l1.002-0.975c2.412-2.295,3.52-3.517,3.52-4.942c0-0.96-0.451-1.847-1.861-1.847  c-0.856,0-1.57,0.438-2.005,0.801l-0.41-0.9c0.642-0.539,1.587-0.96,2.662-0.96c2.035,0,2.894,1.395,2.894,2.747  c0,1.744-1.265,3.155-3.256,5.074l-0.741,0.697v0.03h4.23v1.061H150.738z"/>
+<circle fill="#646464" cx="175.986" cy="75.723" r="1.922"/>
+<circle fill="#646464" cx="194.277" cy="94.014" r="1.921"/>
+<circle fill="#646464" cx="200.975" cy="119.002" r="1.922"/>
+<path fill="#646464" d="M191.912,122.219c0.357,0.215,1.171,0.572,2.061,0.572c1.6,0,2.113-1.016,2.102-1.803  c-0.014-1.301-1.188-1.859-2.402-1.859h-0.699v-0.943h0.699c0.915,0,2.074-0.473,2.074-1.573c0-0.743-0.473-1.401-1.633-1.401  c-0.743,0-1.459,0.329-1.858,0.613l-0.344-0.914c0.5-0.357,1.444-0.715,2.446-0.715c1.83,0,2.66,1.087,2.66,2.217  c0,0.971-0.588,1.788-1.717,2.202v0.028c1.145,0.215,2.061,1.072,2.072,2.375c0,1.486-1.172,2.789-3.391,2.789  c-1.043,0-1.957-0.33-2.416-0.629L191.912,122.219z"/>
+<path fill="#646464" d="M194.277,142.066c1.063,0,1.924,0.861,1.924,1.924c0,1.059-0.861,1.922-1.924,1.922  c-1.062,0-1.922-0.863-1.922-1.922C192.355,142.928,193.217,142.066,194.277,142.066z"/>
+<rect x="183.879" y="133.423" transform="matrix(0.5006 -0.8657 0.8657 0.5006 -27.6308 229.1995)" fill="#646464" width="1.923" height="10.251"/>
+<path fill="#646464" d="M175.986,160.359c1.063,0,1.922,0.863,1.922,1.922c0,1.063-0.859,1.924-1.922,1.924  s-1.924-0.861-1.924-1.924C174.063,161.223,174.924,160.359,175.986,160.359z"/>
+<rect x="169.591" y="147.724" transform="matrix(0.8657 -0.5006 0.5006 0.8657 -53.609 105.9139)" fill="#646464" width="1.923" height="10.254"/>
+<circle fill="#646464" cx="150.998" cy="168.978" r="1.923"/>
+<path fill="#646464" d="M153.275,156.805c-0.258-0.016-0.588,0.014-0.944,0.068c-1.992,0.316-3.023,1.75-3.237,3.295h0.027  c0.445-0.602,1.233-1.088,2.264-1.088c1.648,0,2.809,1.203,2.809,3.008c0,1.719-1.159,3.293-3.107,3.293  c-1.977,0-3.28-1.545-3.28-3.967c0-1.834,0.645-3.279,1.574-4.197c0.775-0.758,1.807-1.23,2.979-1.373  c0.373-0.061,0.688-0.07,0.918-0.07v1.031H153.275z M152.917,162.174c0-1.332-0.758-2.131-1.919-2.131  c-0.758,0-1.474,0.457-1.819,1.145c-0.07,0.144-0.128,0.314-0.128,0.543c0.014,1.533,0.73,2.679,2.063,2.679  C152.188,164.408,152.917,163.508,152.917,162.174z"/>
+<circle fill="#646464" cx="126.012" cy="162.281" r="1.922"/>
+<rect x="130.504" y="147.719" transform="matrix(0.8652 0.5015 -0.5015 0.8652 94.3752 -45.32)" fill="#646464" width="1.924" height="10.25"/>
+<rect x="169.748" y="79.205" transform="matrix(0.8657 0.5006 -0.5006 0.8657 65.1487 -74.1317)" fill="#646464" width="1.923" height="10.25"/>
+<path fill="#646464" d="M107.72,142.066c1.061,0,1.921,0.861,1.921,1.924c0,1.059-0.86,1.922-1.921,1.922  c-1.062,0-1.923-0.863-1.923-1.922C105.797,142.928,106.658,142.066,107.72,142.066z"/>
+<rect x="116.19" y="133.411" transform="matrix(0.5003 0.8659 -0.8659 0.5003 178.5003 -32.2056)" fill="#646464" width="1.922" height="10.254"/>
+<rect x="184.436" y="93.813" transform="matrix(0.5003 0.8658 -0.8658 0.5003 178.2984 -111.0867)" fill="#646464" width="1.923" height="10.252"/>
+<circle fill="#646464" cx="101.023" cy="119.002" r="1.922"/>
+<path fill="#646464" d="M106.139,122.797c0.273,0.027,0.591,0,1.023-0.044c0.735-0.101,1.428-0.39,1.96-0.907  c0.621-0.563,1.067-1.385,1.241-2.479h-0.044c-0.519,0.635-1.269,0.993-2.22,0.993c-1.673,0-2.754-1.268-2.754-2.868  c0-1.773,1.283-3.33,3.2-3.33s3.099,1.544,3.099,3.965c0,2.047-0.69,3.487-1.613,4.381c-0.721,0.709-1.715,1.142-2.725,1.255  c-0.462,0.072-0.866,0.088-1.168,0.072L106.139,122.797L106.139,122.797z M106.6,117.42c0,1.168,0.707,1.99,1.803,1.99  c0.85,0,1.514-0.42,1.846-0.98c0.071-0.131,0.115-0.261,0.115-0.477c0-1.6-0.592-2.825-1.933-2.825  C107.363,115.128,106.6,116.079,106.6,117.42z"/>
+<circle fill="#646464" cx="107.72" cy="94.014" r="1.921"/>
+<rect x="116.202" y="94.334" transform="matrix(-0.5006 0.8657 -0.8657 -0.5006 261.918 47.8307)" fill="#646464" width="1.922" height="10.251"/>
+<circle fill="#646464" cx="126.012" cy="75.722" r="1.923"/>
+<rect x="130.503" y="80.027" transform="matrix(-0.8659 0.5002 -0.5002 -0.8659 287.8932 93.1373)" fill="#646464" width="1.922" height="10.252"/>
+<rect x="144.655" y="59.73" transform="matrix(-0.9946 0.1039 -0.1039 -0.9946 295.5698 107.9097)" fill="#646464" width="0.639" height="3.844"/>
+<rect x="156.703" y="174.428" transform="matrix(-0.9943 0.1067 -0.1067 -0.9943 331.9748 334.9315)" fill="#646464" width="0.64" height="3.846"/>
+<rect x="138.682" y="60.684" transform="matrix(-0.9782 0.2075 -0.2075 -0.9782 287.9719 94.9994)" fill="#646464" width="0.64" height="3.844"/>
+<rect x="162.672" y="173.466" transform="matrix(-0.977 0.2131 -0.2131 -0.977 359.6113 312.0218)" fill="#646464" width="0.642" height="3.845"/>
+<rect x="132.859" y="62.234" transform="matrix(-0.9512 0.3085 -0.3085 -0.9512 279.6555 84.1022)" fill="#646464" width="0.643" height="3.844"/>
+<rect x="168.492" y="171.929" transform="matrix(-0.9505 0.3107 -0.3107 -0.9505 383.2836 286.6476)" fill="#646464" width="0.638" height="3.846"/>
+<rect x="127.219" y="64.404" transform="matrix(-0.9141 0.4054 -0.4054 -0.9141 271.0186 75.246)" fill="#646464" width="0.643" height="3.843"/>
+<rect x="174.138" y="169.753" transform="matrix(-0.9139 0.4059 -0.4059 -0.9139 403.5764 257.7682)" fill="#646464" width="0.64" height="3.841"/>
+<rect x="116.787" y="70.428" transform="matrix(-0.8096 0.587 -0.587 -0.8096 254.3857 62.1845)" fill="#646464" width="0.641" height="3.845"/>
+<rect x="184.572" y="163.727" transform="matrix(-0.8098 0.5867 -0.5867 -0.8098 431.8035 191.3113)" fill="#646464" width="0.639" height="3.844"/>
+<rect x="112.089" y="74.227" transform="matrix(-0.7441 0.6681 -0.6681 -0.7441 246.9279 57.7112)" fill="#646464" width="0.642" height="3.844"/>
+<rect x="189.259" y="159.939" transform="matrix(-0.7427 0.6696 -0.6696 -0.7427 438.7674 155.124)" fill="#646464" width="0.642" height="3.845"/>
+<rect x="107.82" y="78.497" transform="matrix(-0.6691 0.7431 -0.7431 -0.6691 240.262 53.8664)" fill="#646464" width="0.64" height="3.843"/>
+<rect x="193.507" y="155.676" transform="matrix(-0.6696 0.7427 -0.7427 -0.6696 440.6693 119.1786)" fill="#646464" width="0.642" height="3.846"/>
+<rect x="104.032" y="83.187" transform="matrix(-0.5869 0.8097 -0.8097 -0.5869 234.5073 50.5697)" fill="#646464" width="0.642" height="3.843"/>
+<rect x="197.331" y="150.964" transform="matrix(-0.587 0.8096 -0.8096 -0.587 437.4468 82.6123)" fill="#646464" width="0.641" height="3.845"/>
+<rect x="98" y="93.625" transform="matrix(-0.4074 0.9132 -0.9132 -0.4074 225.6352 44.6846)" fill="#646464" width="0.64" height="3.844"/>
+<rect x="203.359" y="140.543" transform="matrix(-0.4078 0.9131 -0.9131 -0.4078 416.8253 14.5954)" fill="#646464" width="0.642" height="3.844"/>
+<rect x="95.833" y="99.264" transform="matrix(-0.3066 0.9518 -0.9518 -0.3066 221.9467 40.688)" fill="#646464" width="0.64" height="3.845"/>
+<rect x="205.522" y="134.9" transform="matrix(-0.3116 0.9502 -0.9502 -0.3116 399.9991 -16.1291)" fill="#646464" width="0.639" height="3.844"/>
+<rect x="94.271" y="105.085" transform="matrix(-0.2072 0.9783 -0.9783 -0.2072 218.8786 36.6457)" fill="#646464" width="0.641" height="3.845"/>
+<rect x="207.09" y="129.056" transform="matrix(-0.2087 0.978 -0.978 -0.2087 378.7904 -44.5298)" fill="#646464" width="0.641" height="3.845"/>
+<rect x="93.335" y="111.049" transform="matrix(-0.1022 0.9948 -0.9948 -0.1022 215.6073 31.3552)" fill="#646464" width="0.64" height="3.845"/>
+<rect x="208.031" y="123.119" transform="matrix(-0.1098 0.994 -0.994 -0.1098 355.5052 -68.328)" fill="#646464" width="0.641" height="3.843"/>
+<rect x="93.33" y="123.116" transform="matrix(0.1052 0.9944 -0.9944 0.1052 208.1383 18.7487)" fill="#646464" width="0.64" height="3.844"/>
+<rect x="208.037" y="111.046" transform="matrix(0.1008 0.9949 -0.9949 0.1008 299.7495 -105.7131)" fill="#646464" width="0.639" height="3.844"/>
+<rect x="94.28" y="129.078" transform="matrix(0.2049 0.9788 -0.9788 0.2049 203.4314 11.5621)" fill="#646464" width="0.639" height="3.842"/>
+<rect x="207.083" y="105.067" transform="matrix(0.2079 0.9782 -0.9782 0.2079 268.9449 -118.1214)" fill="#646464" width="0.639" height="3.846"/>
+<rect x="95.837" y="134.894" transform="matrix(0.3087 0.9512 -0.9512 0.3087 196.6118 3.123)" fill="#646464" width="0.641" height="3.845"/>
+<rect x="205.527" y="99.265" transform="matrix(0.3066 0.9518 -0.9518 0.3066 239.0479 -125.7694)" fill="#646464" width="0.64" height="3.844"/>
+<rect x="98.001" y="140.536" transform="matrix(0.4078 0.9131 -0.9131 0.4078 188.2951 -5.4151)" fill="#646464" width="0.642" height="3.844"/>
+<rect x="203.38" y="93.62" transform="matrix(0.4061 0.9138 -0.9138 0.4061 208.2778 -129.4044)" fill="#646464" width="0.64" height="3.845"/>
+<rect x="104.025" y="150.966" transform="matrix(0.5873 0.8094 -0.8094 0.5873 166.8141 -21.3547)" fill="#646464" width="0.642" height="3.845"/>
+<rect x="197.325" y="83.182" transform="matrix(0.586 0.8103 -0.8103 0.586 150.7878 -124.9214)" fill="#646464" width="0.64" height="3.843"/>
+<rect x="107.839" y="155.664" transform="matrix(0.6707 0.7417 -0.7417 0.6707 152.4944 -28.3337)" fill="#646464" width="0.64" height="3.843"/>
+<rect x="193.534" y="78.483" transform="matrix(0.6704 0.742 -0.742 0.6704 123.557 -117.3383)" fill="#646464" width="0.641" height="3.846"/>
+<rect x="112.101" y="159.932" transform="matrix(0.7439 0.6683 -0.6683 0.7439 136.9672 -33.6781)" fill="#646464" width="0.64" height="3.843"/>
+<rect x="189.271" y="74.219" transform="matrix(0.7413 0.6712 -0.6712 0.7413 100.1464 -107.548)" fill="#646464" width="0.64" height="3.846"/>
+<rect x="116.771" y="163.73" transform="matrix(0.8102 0.5862 -0.5862 0.8102 119.3294 -37.1933)" fill="#646464" width="0.643" height="3.846"/>
+<rect x="184.58" y="70.434" transform="matrix(0.8087 0.5882 -0.5882 0.8087 77.9324 -94.9199)" fill="#646464" width="0.64" height="3.845"/>
+<rect x="127.237" y="169.758" transform="matrix(0.9128 0.4084 -0.4084 0.9128 81.2365 -37.1244)" fill="#646464" width="0.641" height="3.843"/>
+<rect x="174.128" y="64.385" transform="matrix(0.9128 0.4083 -0.4083 0.9128 42.2816 -65.4531)" fill="#646464" width="0.64" height="3.844"/>
+<rect x="132.858" y="171.933" transform="matrix(0.9515 0.3078 -0.3078 0.9515 59.9693 -32.5487)" fill="#646464" width="0.641" height="3.843"/>
+<rect x="168.491" y="62.239" transform="matrix(0.9508 0.3098 -0.3098 0.9508 28.1799 -49.1374)" fill="#646464" width="0.637" height="3.845"/>
+<rect x="138.683" y="173.483" transform="matrix(0.979 0.204 -0.204 0.979 38.7088 -24.6697)" fill="#646464" width="0.641" height="3.844"/>
+<rect x="162.676" y="60.67" transform="matrix(0.9778 0.2097 -0.2097 0.9778 16.7533 -32.7942)" fill="#646464" width="0.64" height="3.845"/>
+<rect x="144.665" y="174.417" transform="matrix(0.9949 0.1009 -0.1009 0.9949 18.5261 -13.7246)" fill="#646464" width="0.639" height="3.848"/>
+<rect x="156.703" y="59.731" transform="matrix(0.9943 0.1071 -0.1071 0.9943 7.504 -16.4585)" fill="#646464" width="0.638" height="3.844"/>
+<path fill="#646464" d="M149.543,58.717c0.483,0,0.847,0.17,1.094,0.514c0.247,0.342,0.368,0.945,0.368,1.812  c0,0.948-0.124,1.593-0.374,1.931c-0.249,0.34-0.617,0.508-1.103,0.508c-0.426,0-0.747-0.111-0.964-0.338  c-0.217-0.223-0.357-0.508-0.424-0.852c-0.065-0.344-0.098-0.762-0.098-1.249c0-0.849,0.125-1.448,0.379-1.799  C148.674,58.893,149.048,58.717,149.543,58.717z M149.522,62.963c0.213,0,0.368-0.119,0.468-0.359  c0.099-0.238,0.148-0.76,0.148-1.562c0-0.772-0.051-1.267-0.152-1.482c-0.104-0.214-0.257-0.323-0.464-0.323  c-0.188,0-0.326,0.075-0.414,0.225c-0.089,0.15-0.146,0.348-0.167,0.588c-0.021,0.243-0.033,0.572-0.033,0.993  c0,0.825,0.049,1.353,0.147,1.581C149.153,62.848,149.31,62.963,149.522,62.963z"/>
+<path fill="#646464" d="M152.801,58.717c0.48,0,0.846,0.17,1.092,0.514c0.246,0.342,0.369,0.945,0.369,1.812  c0,0.948-0.125,1.593-0.373,1.931c-0.25,0.34-0.617,0.508-1.104,0.508c-0.428,0-0.747-0.111-0.965-0.338  c-0.217-0.223-0.357-0.508-0.424-0.852c-0.065-0.344-0.098-0.762-0.098-1.249c0-0.849,0.126-1.448,0.379-1.799  S152.303,58.717,152.801,58.717z M152.777,62.963c0.213,0,0.369-0.119,0.468-0.359c0.099-0.238,0.146-0.76,0.146-1.562  c0-0.772-0.05-1.267-0.15-1.482c-0.102-0.214-0.258-0.323-0.465-0.323c-0.188,0-0.326,0.075-0.414,0.225s-0.145,0.348-0.164,0.588  c-0.022,0.243-0.034,0.572-0.034,0.993c0,0.825,0.05,1.353,0.147,1.581C152.409,62.848,152.564,62.963,152.777,62.963z"/>
+<path fill="#646464" d="M98.354,90.792l1.006,0.579c0.024-0.05,0.072-0.139,0.147-0.266c0.23-0.402,0.517-0.65,0.854-0.742  c0.338-0.093,0.71-0.023,1.116,0.213c0.463,0.266,0.737,0.582,0.826,0.947c0.09,0.366-0.008,0.791-0.288,1.278  c-0.159,0.274-0.371,0.548-0.634,0.817l-0.478-0.276l0.004-0.005c0.281-0.283,0.474-0.515,0.578-0.695  c0.156-0.272,0.202-0.513,0.137-0.723c-0.065-0.209-0.25-0.4-0.554-0.576c-0.267-0.154-0.51-0.199-0.726-0.135  c-0.218,0.064-0.409,0.24-0.574,0.526c-0.113,0.196-0.219,0.399-0.314,0.607l-1.965-1.134l1.205-2.086l0.467,0.27L98.354,90.792z"/>
+<path fill="#646464" d="M99.691,87.299c0.24-0.417,0.57-0.646,0.99-0.689c0.419-0.041,1.004,0.154,1.753,0.588  c0.823,0.474,1.317,0.902,1.487,1.289c0.168,0.387,0.132,0.787-0.111,1.209c-0.213,0.369-0.472,0.592-0.775,0.665  c-0.304,0.076-0.622,0.057-0.951-0.06c-0.332-0.115-0.707-0.295-1.131-0.539c-0.734-0.424-1.191-0.834-1.368-1.227  C99.408,88.141,99.443,87.729,99.691,87.299z M103.357,89.441c0.106-0.186,0.08-0.381-0.076-0.586  c-0.157-0.203-0.584-0.508-1.279-0.91c-0.668-0.385-1.121-0.588-1.359-0.607c-0.238-0.019-0.409,0.061-0.512,0.238  c-0.094,0.164-0.098,0.32-0.013,0.473c0.087,0.151,0.228,0.298,0.427,0.438c0.198,0.141,0.479,0.314,0.841,0.524  c0.716,0.414,1.196,0.633,1.443,0.663C103.074,89.702,103.25,89.625,103.357,89.441z"/>
+<path fill="#646464" d="M93.864,118.926h0.538v0.48h1.027v0.844h-1.027v1.879h-0.514l-2.398-1.469l-0.751-0.458v-0.796h3.125  V118.926z M93.864,121.475v-1.225H91.81L93.864,121.475z"/>
+<path fill="#646464" d="M91.303,117.632h1.161c-0.005-0.057-0.008-0.157-0.008-0.306c0-0.465,0.124-0.821,0.37-1.071  c0.245-0.249,0.604-0.374,1.072-0.374c0.535,0,0.932,0.137,1.191,0.41c0.259,0.272,0.389,0.688,0.389,1.248  c0,0.32-0.047,0.661-0.141,1.026h-0.55v-0.005c0.102-0.387,0.152-0.684,0.152-0.893c0-0.313-0.081-0.545-0.242-0.693  c-0.162-0.148-0.418-0.225-0.769-0.225c-0.308,0-0.54,0.083-0.695,0.248c-0.156,0.164-0.234,0.413-0.234,0.74  c0,0.229,0.012,0.457,0.032,0.686h-2.269v-2.408h0.539v1.617H91.303z"/>
+<path fill="#646464" d="M101.485,147.51l0.466-0.27l0.241,0.418l0.889-0.516l0.422,0.731l-0.89,0.515l0.938,1.625l-0.442,0.256  l-2.813-0.068l-0.88-0.023l-0.397-0.688l2.707-1.566L101.485,147.51z M102.76,149.717l-0.611-1.059l-1.781,1.027L102.76,149.717z"/>
+<path fill="#646464" d="M97.89,147.586c-0.241-0.418-0.274-0.82-0.102-1.205c0.174-0.385,0.635-0.791,1.385-1.225  c0.821-0.473,1.44-0.688,1.859-0.643c0.419,0.047,0.749,0.28,0.992,0.7c0.213,0.369,0.275,0.705,0.188,1.004  c-0.086,0.3-0.262,0.563-0.526,0.791c-0.267,0.229-0.609,0.47-1.032,0.712c-0.734,0.424-1.317,0.614-1.747,0.571  C98.477,148.25,98.139,148.012,97.89,147.586z M101.576,145.48c-0.105-0.185-0.287-0.26-0.543-0.226  c-0.256,0.031-0.732,0.25-1.428,0.651c-0.668,0.386-1.071,0.679-1.207,0.871c-0.136,0.197-0.151,0.388-0.048,0.563  c0.093,0.164,0.228,0.246,0.402,0.246c0.175,0.002,0.372-0.047,0.591-0.149c0.222-0.101,0.514-0.256,0.877-0.465  c0.715-0.412,1.146-0.72,1.294-0.918C101.664,145.855,101.684,145.666,101.576,145.48z"/>
+<path fill="#646464" d="M124.009,170.736c-0.531-0.309-0.894-0.443-1.089-0.41c-0.194,0.029-0.356,0.16-0.485,0.383  c-0.113,0.195-0.147,0.373-0.099,0.533s0.178,0.303,0.388,0.422c0.185,0.109,0.47,0.213,0.857,0.313l0.005,0.004l-0.274,0.478  c-0.388-0.112-0.721-0.246-0.995-0.403c-0.414-0.238-0.677-0.502-0.787-0.789c-0.112-0.285-0.072-0.595,0.12-0.929  c0.132-0.229,0.308-0.392,0.528-0.481c0.22-0.097,0.467-0.105,0.738-0.041c-0.227-0.191-0.359-0.408-0.397-0.654  c-0.038-0.244,0.016-0.492,0.16-0.742c0.239-0.412,0.54-0.652,0.899-0.723c0.361-0.066,0.781,0.037,1.265,0.318  c0.289,0.163,0.561,0.379,0.813,0.637l-0.271,0.473l-0.005-0.004c-0.304-0.293-0.558-0.498-0.761-0.615  c-0.247-0.143-0.467-0.188-0.662-0.137c-0.195,0.055-0.362,0.205-0.508,0.451c-0.152,0.266-0.188,0.498-0.106,0.699  c0.082,0.2,0.391,0.457,0.926,0.766L124.009,170.736z"/>
+<path fill="#646464" d="M119.964,170.016l0.581-1.006c-0.052-0.025-0.14-0.074-0.268-0.146c-0.402-0.231-0.649-0.518-0.742-0.854  c-0.094-0.338-0.021-0.711,0.212-1.119c0.269-0.459,0.584-0.736,0.95-0.826c0.364-0.09,0.791,0.011,1.276,0.289  c0.276,0.16,0.55,0.371,0.819,0.638l-0.277,0.475l-0.005-0.004c-0.283-0.28-0.516-0.474-0.695-0.578  c-0.271-0.155-0.513-0.198-0.722-0.135c-0.211,0.063-0.402,0.25-0.578,0.551c-0.154,0.269-0.199,0.511-0.134,0.726  c0.064,0.221,0.24,0.41,0.525,0.574c0.197,0.112,0.4,0.221,0.608,0.317l-1.134,1.963l-2.086-1.207l0.27-0.467L119.964,170.016z"/>
+<path fill="#646464" d="M153.499,177.301c-0.614,0-0.996,0.061-1.149,0.186c-0.152,0.125-0.229,0.316-0.229,0.578  c0,0.226,0.063,0.396,0.184,0.513s0.305,0.174,0.547,0.174c0.213,0,0.512-0.056,0.896-0.162h0.008v0.552  c-0.393,0.1-0.748,0.146-1.064,0.146c-0.478,0-0.838-0.097-1.075-0.285c-0.24-0.194-0.36-0.481-0.36-0.864  c0-0.269,0.072-0.496,0.217-0.685c0.144-0.188,0.349-0.326,0.619-0.404c-0.292-0.051-0.516-0.176-0.672-0.366  c-0.155-0.193-0.233-0.437-0.233-0.728c0-0.478,0.14-0.834,0.418-1.074c0.276-0.237,0.695-0.358,1.252-0.358  c0.334,0,0.678,0.049,1.026,0.146v0.543h-0.006c-0.41-0.101-0.731-0.151-0.966-0.151c-0.284,0-0.497,0.071-0.643,0.217  c-0.144,0.145-0.213,0.356-0.213,0.643c0,0.305,0.084,0.525,0.254,0.658c0.174,0.135,0.568,0.201,1.188,0.201V177.301  L153.499,177.301z"/>
+<path fill="#646464" d="M149.197,179.285c-0.482,0-0.845-0.17-1.092-0.514c-0.245-0.34-0.367-0.943-0.367-1.81  c0-0.948,0.122-1.594,0.373-1.933c0.249-0.34,0.616-0.51,1.103-0.51c0.426,0,0.747,0.111,0.964,0.338  c0.218,0.228,0.358,0.511,0.424,0.854c0.065,0.347,0.098,0.761,0.098,1.248c0,0.851-0.125,1.451-0.377,1.799  C150.068,179.111,149.694,179.285,149.197,179.285z M149.22,175.041c-0.213,0-0.369,0.121-0.468,0.359  c-0.098,0.236-0.147,0.76-0.147,1.563c0,0.771,0.05,1.266,0.153,1.482c0.102,0.217,0.256,0.322,0.463,0.322  c0.188,0,0.325-0.072,0.414-0.226c0.088-0.149,0.145-0.349,0.166-0.588c0.021-0.242,0.033-0.574,0.033-0.992  c0-0.828-0.051-1.353-0.147-1.582C149.587,175.154,149.433,175.041,149.22,175.041z"/>
+<path fill="#646464" d="M179.164,167.535l-0.273-0.469l2.418-1.396l0.17,0.295c0.164,0.283,0.258,0.559,0.287,0.836  c0.027,0.275,0.014,0.531-0.039,0.766c-0.054,0.238-0.136,0.515-0.248,0.822c-0.135,0.369-0.201,0.639-0.199,0.799  c0.002,0.158,0.037,0.299,0.104,0.418c0.12,0.209,0.268,0.334,0.441,0.379c0.171,0.039,0.369-0.002,0.59-0.131  c0.234-0.137,0.484-0.358,0.75-0.676l0.005-0.002l0.278,0.482c-0.285,0.313-0.598,0.564-0.928,0.756  c-0.412,0.238-0.773,0.326-1.09,0.27c-0.316-0.055-0.576-0.26-0.781-0.608c-0.112-0.197-0.176-0.416-0.189-0.664  c-0.016-0.246,0.068-0.623,0.252-1.125c0.104-0.281,0.176-0.513,0.227-0.688c0.047-0.178,0.069-0.354,0.068-0.533  c-0.002-0.18-0.043-0.352-0.131-0.518L179.164,167.535z"/>
+<path fill="#646464" d="M179.66,171.387l-0.58-1.006c-0.046,0.029-0.135,0.084-0.26,0.156c-0.402,0.232-0.773,0.307-1.112,0.215  c-0.338-0.088-0.626-0.334-0.86-0.74c-0.266-0.463-0.348-0.873-0.24-1.236c0.104-0.356,0.399-0.68,0.887-0.961  c0.277-0.16,0.599-0.291,0.96-0.389l0.274,0.475l-0.006,0.004c-0.386,0.104-0.666,0.207-0.849,0.314  c-0.271,0.155-0.431,0.342-0.479,0.555c-0.045,0.215,0.017,0.475,0.192,0.779c0.153,0.266,0.341,0.426,0.562,0.479  s0.474-0.004,0.761-0.17c0.196-0.111,0.389-0.236,0.577-0.369l1.135,1.965l-2.087,1.203l-0.269-0.465L179.66,171.387z"/>
+<path fill="#646464" d="M199.659,146.943l-0.47-0.271l1.395-2.416l0.295,0.171c0.283,0.161,0.504,0.356,0.666,0.577  c0.162,0.226,0.281,0.453,0.352,0.685c0.072,0.231,0.139,0.512,0.196,0.836c0.067,0.389,0.146,0.652,0.228,0.791  s0.182,0.242,0.302,0.311c0.209,0.121,0.397,0.156,0.569,0.107c0.168-0.051,0.317-0.187,0.445-0.408  c0.135-0.236,0.239-0.557,0.311-0.961l0.004-0.006l0.482,0.279c-0.094,0.414-0.233,0.786-0.427,1.12  c-0.235,0.41-0.506,0.669-0.81,0.779c-0.303,0.108-0.629,0.062-0.979-0.142c-0.198-0.112-0.362-0.272-0.497-0.479  c-0.136-0.206-0.25-0.574-0.345-1.102c-0.052-0.297-0.103-0.531-0.147-0.707c-0.049-0.176-0.117-0.342-0.207-0.498  c-0.092-0.152-0.213-0.281-0.369-0.381L199.659,146.943z"/>
+<path fill="#646464" d="M202.305,150.705c-0.24,0.414-0.57,0.645-0.99,0.688c-0.418,0.041-1.002-0.154-1.752-0.586  c-0.821-0.475-1.317-0.904-1.485-1.291c-0.17-0.385-0.132-0.787,0.11-1.209c0.213-0.369,0.471-0.59,0.774-0.664  c0.304-0.076,0.622-0.057,0.95,0.06c0.332,0.114,0.708,0.295,1.131,0.541c0.734,0.422,1.191,0.834,1.371,1.226  C202.59,149.861,202.555,150.273,202.305,150.705z M198.641,148.564c-0.107,0.182-0.082,0.375,0.075,0.582  c0.157,0.205,0.582,0.51,1.278,0.912c0.669,0.385,1.122,0.588,1.357,0.604c0.238,0.02,0.41-0.059,0.516-0.238  c0.094-0.162,0.096-0.318,0.012-0.471c-0.086-0.15-0.227-0.297-0.426-0.438c-0.199-0.142-0.48-0.314-0.844-0.521  c-0.715-0.414-1.195-0.637-1.44-0.664C198.922,148.301,198.746,148.377,198.641,148.564z"/>
+<path fill="#646464" d="M119.518,68.245l0.58,1.005c0.047-0.032,0.134-0.084,0.26-0.156c0.404-0.232,0.773-0.307,1.113-0.217  c0.337,0.09,0.626,0.336,0.859,0.742c0.268,0.463,0.348,0.873,0.241,1.236c-0.105,0.359-0.401,0.682-0.888,0.963  c-0.276,0.156-0.596,0.289-0.959,0.389l-0.275-0.477l0.006-0.004c0.387-0.102,0.668-0.207,0.848-0.312  c0.272-0.155,0.431-0.341,0.479-0.558c0.049-0.214-0.015-0.472-0.19-0.775c-0.154-0.266-0.341-0.428-0.562-0.479  c-0.22-0.055-0.474,0.003-0.759,0.168c-0.197,0.113-0.39,0.237-0.578,0.371l-1.133-1.965l2.085-1.205l0.27,0.465L119.518,68.245z"/>
+<path fill="#646464" d="M122.338,66.618l0.58,1.004c0.046-0.031,0.134-0.083,0.259-0.156c0.403-0.232,0.774-0.306,1.113-0.216  c0.339,0.088,0.626,0.336,0.86,0.742c0.267,0.463,0.348,0.873,0.24,1.234c-0.104,0.361-0.401,0.682-0.887,0.963  c-0.276,0.16-0.596,0.29-0.958,0.391l-0.276-0.475l0.006-0.006c0.385-0.104,0.668-0.207,0.849-0.312  c0.271-0.157,0.431-0.343,0.479-0.558c0.048-0.214-0.015-0.474-0.19-0.775c-0.155-0.269-0.342-0.429-0.562-0.479  c-0.221-0.055-0.473,0.002-0.76,0.166c-0.197,0.114-0.39,0.238-0.577,0.371l-1.135-1.965l2.087-1.203l0.269,0.464L122.338,66.618z"/>
+<path fill="#646464" d="M207.07,118.969h-0.502v-2.763h0.502v0.982h3.49l-0.227-0.982h0.501l0.435,1.378v0.455h-4.201  L207.07,118.969L207.07,118.969z"/>
+<path fill="#646464" d="M210.693,120.371h-1.16c0.005,0.057,0.008,0.158,0.008,0.304c0,0.466-0.123,0.821-0.369,1.073  c-0.246,0.248-0.604,0.373-1.074,0.373c-0.533,0-0.93-0.137-1.188-0.408c-0.262-0.271-0.391-0.689-0.391-1.251  c0-0.317,0.047-0.659,0.143-1.026h0.55v0.007c-0.104,0.386-0.153,0.684-0.153,0.894c0,0.312,0.082,0.543,0.242,0.692  c0.162,0.148,0.416,0.225,0.768,0.225c0.31,0,0.543-0.083,0.697-0.249c0.155-0.164,0.232-0.411,0.232-0.739  c0-0.228-0.012-0.457-0.031-0.685h2.268v2.407h-0.539v-1.617H210.693z"/>
+<path fill="#646464" d="M180.623,67.174l-0.58,1.006c0.053,0.023,0.141,0.072,0.266,0.146c0.402,0.233,0.652,0.519,0.744,0.855  c0.094,0.339,0.021,0.712-0.213,1.117c-0.267,0.462-0.584,0.737-0.949,0.827c-0.365,0.087-0.791-0.008-1.275-0.289  c-0.276-0.158-0.549-0.371-0.816-0.634l0.275-0.478l0.007,0.004c0.28,0.28,0.515,0.474,0.694,0.578  c0.271,0.156,0.511,0.201,0.722,0.136c0.21-0.065,0.401-0.25,0.577-0.552c0.152-0.268,0.199-0.51,0.134-0.729  c-0.065-0.215-0.24-0.406-0.524-0.57c-0.197-0.114-0.399-0.22-0.609-0.315l1.135-1.965l2.086,1.203l-0.268,0.468L180.623,67.174z"/>
+<path fill="#646464" d="M199.538,90.932l-0.433,0.25l-1.383-2.392l0.434-0.25l0.492,0.851l3.023-1.746l-0.688-0.738l0.437-0.25  l1.065,0.977l0.226,0.393l-3.639,2.101L199.538,90.932z"/>
+<path fill="#646464" d="M204.107,90.42c0.242,0.418,0.274,0.816,0.102,1.202c-0.173,0.384-0.634,0.792-1.385,1.226  c-0.819,0.475-1.441,0.688-1.859,0.641c-0.416-0.047-0.748-0.28-0.99-0.701c-0.213-0.366-0.275-0.703-0.189-1.002  c0.088-0.3,0.264-0.566,0.527-0.795c0.267-0.228,0.609-0.465,1.031-0.709c0.734-0.425,1.318-0.615,1.748-0.572  S203.859,89.99,204.107,90.42z M200.42,92.523c0.105,0.185,0.288,0.26,0.545,0.225c0.256-0.031,0.732-0.25,1.428-0.652  c0.67-0.385,1.07-0.678,1.207-0.871c0.135-0.197,0.151-0.386,0.049-0.564c-0.094-0.162-0.229-0.245-0.402-0.246  c-0.174-0.002-0.372,0.049-0.592,0.15c-0.223,0.102-0.514,0.256-0.877,0.467c-0.715,0.412-1.146,0.719-1.295,0.917  C200.335,92.148,200.313,92.34,200.42,92.523z"/>
+<circle fill="none" cx="150.999" cy="119.001" r="61.507"/>
+<rect x="81.162" y="49.164" fill="none" width="139.674" height="139.676"/>
+<rect x="81.165" y="49.164" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -39.9185 141.6281)" fill="none" width="139.672" height="139.672"/>
+<path fill-opacity="0.4" d="M166.857,135.764c-0.252,0.25-0.654,0.25-0.903,0.004l-50.748-50.75c-0.248-0.248-0.247-0.65,0.003-0.9  l0.906-0.906c0.25-0.25,0.654-0.252,0.901-0.006l50.751,50.75c0.246,0.248,0.246,0.651-0.006,0.899L166.857,135.764z"/>
+<rect x="140.849" y="73.605" transform="matrix(0.7067 -0.7075 0.7075 0.7067 -35.968 132.2127)" fill="#FFFFFF" width="1.281" height="71.77"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="354.7988" y1="-95.1782" x2="354.7988" y2="-130.7611" gradientTransform="matrix(1 0 0 -1 -185.98 -13.5195)">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.9455" style="stop-color:#CBCBCB"/>
+<stop offset="1" style="stop-color:#CBCBCB"/>
+</linearGradient>
+<path display="none" fill="url(#SVGID_5_)" d="M154.729,117.99c-3.874,0-6.007-2.244-6.007-6.319v-13.96  c0-4.23,3.511-5.73,6.517-5.73h0.287c0.248,0,0.271-0.002,0.472-0.01l0.164-0.006c1.626-0.056,3.36-1.23,3.358-4.359  c-0.002-2.646,0.717-4.59,2.139-5.769c1.215-1.011,2.662-1.222,3.664-1.222c0.71,0,1.21,0.107,1.229,0.112  c14.013,2.417,21.496,14.197,22.324,21.788c0.235,2.158-0.549,4.537-2.044,6.206c-1.003,1.117-2.794,2.45-5.637,2.45  c-4.256,0-5.939,1.467-6.84,2.57l-0.254,0.317c-1.168,1.472-3.125,3.933-7.32,3.933L154.729,117.99L154.729,117.99z"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="354.7988" y1="-131.1069" x2="354.7988" y2="-94.4508" gradientTransform="matrix(1 0 0 -1 -185.98 -13.5195)">
+<stop offset="0" style="stop-color:#B4B4B4"/>
+<stop offset="1" style="stop-color:#A0A0A0"/>
+</linearGradient>
+<path display="none" fill="url(#SVGID_6_)" d="M188.876,102.516c-0.828-7.591-8.312-19.371-22.323-21.788  c-0.021-0.005-0.521-0.112-1.23-0.112c-1.002,0-2.449,0.211-3.664,1.222c-1.422,1.179-2.141,3.122-2.139,5.769  c0.002,3.129-1.732,4.304-3.358,4.359l-0.164,0.006c-0.2,0.008-0.224,0.01-0.472,0.01h-0.287c-3.006,0-6.517,1.5-6.517,5.73v13.96  c0,4.075,2.134,6.319,6.007,6.319h12.054c4.194,0,6.151-2.461,7.319-3.931l0.254-0.317c0.898-1.104,2.586-2.57,6.842-2.57  c2.842,0,4.632-1.333,5.636-2.45C188.326,107.053,189.111,104.674,188.876,102.516z M181.193,110.531  c-4.494,0-6.334,1.576-7.336,2.807c-1.164,1.436-2.895,4.014-7.076,4.014s-7.477,0-12.055,0c-4.579,0-5.365-3.25-5.365-5.681  c0-2.429,0-13.96,0-13.96c0-3.771,3.05-5.091,5.876-5.091c0.639,0,0.482,0.002,0.947-0.015c2.119-0.072,3.977-1.645,3.975-4.998  c-0.006-7.635,6.253-6.255,6.253-6.255c13.789,2.379,21.036,13.987,21.825,21.231C188.607,105.965,186.218,110.531,181.193,110.531z  "/>
+<rect x="81.163" y="49.163" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 173.6274 309.9154)" fill="none" width="139.672" height="139.671"/>
+<polygon fill-opacity="0.4" points="161.545,112.082 123.561,150.064 119.503,150.271 119.953,146.424 157.92,108.457 "/>
+<polygon points="157.92,109.363 160.639,112.082 123.281,149.438 120.229,149.594 120.563,146.719 "/>
+<rect x="81.162" y="49.164" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 341.915 96.3727)" fill="none" width="139.673" height="139.671"/>
+<polygon fill-opacity="0.4" points="146.12,109.589 174.588,138.059 174.344,142.57 170.041,142.572 141.589,114.119 "/>
+<polygon fill="#1A1A1A" points="142.495,114.119 146.12,110.495 173.962,138.336 173.665,141.844 170.337,141.963 "/>
+<path fill-opacity="0.4" d="M146.924,114.924c2.247-2.25,5.905-2.248,8.154,0c2.248,2.248,2.248,5.905,0,8.152  c-2.249,2.249-5.906,2.251-8.154,0.002C144.675,120.829,144.675,117.17,146.924,114.924L146.924,114.924z"/>
+<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-3819.5313" y1="-1695.1787" x2="-3819.5313" y2="-1684.7993" gradientTransform="matrix(-0.7071 0.7071 -0.7071 -0.7071 -3744.7813 1624.7996)">
 <stop offset="0" style="stop-color:#999999"/>
 <stop offset="0.31" style="stop-color:#4D4D4D"/>
 <stop offset="1" style="stop-color:#000000"/>
 </linearGradient>
-<circle fill="url(#SVGID_4_)" cx="112" cy="69.618" r="4.088"/>
-<path fill="#E6E6E6" d="M109.432,67.049c1.417-1.416,3.72-1.417,5.138,0c1.417,1.416,1.416,3.721,0,5.138  c-1.417,1.415-3.722,1.416-5.138,0.001C108.015,70.772,108.015,68.464,109.432,67.049L109.432,67.049z"/>
-<path fill="#595959" d="M126.015,58.987l-0.303-1.292h-1.688l-0.315,1.292h-1.268l1.737-6.196h1.705l1.623,6.196H126.015z   M125.541,56.892l-0.665-2.917l-0.681,2.917H125.541z"/>
-<path fill="#595959" d="M133.559,52.791v6.196h-1.389v-4.111l-1.071,2.095h-0.512l-1.072-2.095v4.111h-1.397v-6.196h1.226l1.5,2.93  l1.497-2.93H133.559z"/>
+<circle fill="url(#SVGID_7_)" cx="151" cy="119" r="5.19"/>
+<path fill="#E6E6E6" d="M147.739,115.738c1.798-1.797,4.725-1.799,6.525,0c1.797,1.799,1.797,4.725-0.002,6.524  c-1.798,1.799-4.726,1.799-6.523,0C145.939,120.463,145.941,117.537,147.739,115.738L147.739,115.738z"/>
+<rect fill="none" width="302" height="238"/>
 </svg>
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsanalogclockwidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -20,7 +20,7 @@
 
 #include <HbStyleLoader>
 #include <HbIconItem>
-#include <HbTouchArea>
+#include <HbTapGesture>
 #include <HbInstantFeedback>
 
 #include "hsconfiguration.h"
@@ -38,12 +38,13 @@
 HsAnalogClockWidget::HsAnalogClockWidget(QGraphicsItem *parent)
     : HbWidget(parent),
       mBackground(0), mHourHand(0), mMinuteHand(0), 
-      mSecondHand(0), mTouchArea(0)
+      mSecondHand(0)
 {
     HbStyleLoader::registerFilePath(":/hsanalogclockwidget.widgetml");
     HbStyleLoader::registerFilePath(":/hsanalogclockwidget.css");
 
     createPrimitives();
+    grabGesture(Qt::TapGesture);
 }
 
 /*!
@@ -53,28 +54,27 @@
 {
     HbStyleLoader::unregisterFilePath(":/hsanalogclockwidget.widgetml");
     HbStyleLoader::unregisterFilePath(":/hsanalogclockwidget.css");
-    mTouchArea->removeEventFilter(this);
 }
 
-/*!
-    Filters touch area events.
-*/
-bool HsAnalogClockWidget::eventFilter(QObject *watched, QEvent *event)
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif //COVERAGE_MEASUREMENT
+void HsAnalogClockWidget::gestureEvent(QGestureEvent *event)
 {
-    Q_UNUSED(watched)
+    HbTapGesture *gesture = qobject_cast<HbTapGesture *>(event->gesture(Qt::TapGesture));
+    if (gesture) {
+        if (gesture->state() == Qt::GestureFinished) {
+            if (gesture->tapStyleHint() == HbTapGesture::Tap) {
+                    HbInstantFeedback::play(HSCONFIGURATION_GET(clockWidgetTapFeedbackEffect));
+                    emit clockTapped();                
+            }
+        }
+    }
+}
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
 
-    switch (event->type()) {
-        case QEvent::GraphicsSceneMousePress:
-            return true;
-        case QEvent::GraphicsSceneMouseRelease:
-            handleMouseReleaseEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
-            return true;
-        default:
-            break;
-    }
-
-    return false;
-}
 
 /*!
     Return bounding rect
@@ -130,10 +130,6 @@
 
     mSecondHand = new HbIconItem(QLatin1String("qtg_graf_clock_day_sec"), this);
     HbStyle::setItemName(mSecondHand, QLatin1String("second_hand"));
-
-    mTouchArea = new HbTouchArea(this);
-    mTouchArea->installEventFilter(this);    
-    HbStyle::setItemName(mTouchArea, QLatin1String("toucharea"));
 }
 
 /*!
@@ -160,17 +156,3 @@
     mSecondHand->setTransformOriginPoint(originPoint);
     mSecondHand->setRotation(s);
 }
-
-/*!
-    \internal
-*/
-void HsAnalogClockWidget::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-    if (!contains(event->pos())) {
-        return;
-    }
-
-    HbInstantFeedback::play(HSCONFIGURATION_GET(clockWidgetTapFeedbackEffect));
-
-    emit clockTapped();
-}
--- a/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsdigitalclockwidget.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsclockwidgetplugin/src/hsdigitalclockwidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -22,10 +22,11 @@
 #include <HbIconItem>
 #include <HbFrameItem>
 #include <HbFrameDrawer>
-#include <HbTouchArea>
+#include <HbTapGesture>
 #include <HbInstantFeedback>
 
 #include "hsdigitalclockwidget.h"
+#include "hsconfiguration.h"
 
 /*!
     \class HsDigitalClockWidget
@@ -41,7 +42,7 @@
     mBackground(0),
     mDigit1(0), mDigit2(0), mDigit3(0),
     mDigit4(0), mDigit5(0), mDigit6(0),
-    mAmPm(0), mTouchArea(0), mUseAmPm(useAmPm)
+    mAmPm(0), mUseAmPm(useAmPm)
 {
     HbStyleLoader::registerFilePath(":/hsdigitalclockwidget.widgetml");
     HbStyleLoader::registerFilePath(":/hsdigitalclockwidget.css");
@@ -69,6 +70,7 @@
     mDigitMap.insert(QChar('9'), QString(":/clock_widget_nine.svg"));
 
     createPrimitives();
+    grabGesture(Qt::TapGesture);
 }
 
 /*!
@@ -78,28 +80,26 @@
 {
     HbStyleLoader::unregisterFilePath(":/hsdigitalclockwidget.widgetml");
     HbStyleLoader::unregisterFilePath(":/hsdigitalclockwidget.css");
-    mTouchArea->removeEventFilter(this);
 }
 
-/*!
-    Filters touch area events.
-*/
-bool HsDigitalClockWidget::eventFilter(QObject *watched, QEvent *event)
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif //COVERAGE_MEASUREMENT
+void HsDigitalClockWidget::gestureEvent(QGestureEvent *event)
 {
-    Q_UNUSED(watched)
-
-    switch (event->type()) {
-        case QEvent::GraphicsSceneMousePress:
-            return true;
-        case QEvent::GraphicsSceneMouseRelease:
-            handleMouseReleaseEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
-            return true;
-        default:
-            break;
+    HbTapGesture *gesture = qobject_cast<HbTapGesture *>(event->gesture(Qt::TapGesture));
+    if (gesture) {
+        if (gesture->state() == Qt::GestureFinished) {
+            if (gesture->tapStyleHint() == HbTapGesture::Tap) {
+                    HbInstantFeedback::play(HSCONFIGURATION_GET(clockWidgetTapFeedbackEffect));
+                    emit clockTapped();                
+            }
+        }
     }
-
-    return false;
 }
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
 
 /*!
     Return shape
@@ -202,10 +202,6 @@
         mAmPm = new HbIconItem(QLatin1String(":/clock_widget_am.svg"), this);
         HbStyle::setItemName(mAmPm, QLatin1String("ampm"));
     }
-
-    mTouchArea = new HbTouchArea(this);
-    mTouchArea->installEventFilter(this);
-    HbStyle::setItemName(mTouchArea, QLatin1String("toucharea"));
 }
 
 /*!
@@ -248,17 +244,3 @@
         }
     }
 }
-
-/*!
-    \internal
-*/
-void HsDigitalClockWidget::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-    if (!contains(event->pos())) {
-        return;
-    }
-
-    HbInstantFeedback::play(HbFeedback::BasicItem);
-
-    emit clockTapped();
-}
--- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidget.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/inc/hsshortcutwidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -28,7 +28,7 @@
 class HbFrameItem;    
 class HbIconItem;
 class HbTextItem;
-class HbTouchArea;
+class QGestureEvent;
 class CaEntry;
 
 class HsShortcutWidget : public HbWidget
@@ -51,8 +51,6 @@
     QString text() const;
     void setText(const QString& textItem);
 
-    bool eventFilter(QObject *watched, QEvent *event);
-
 signals:
     void finished();
     void setPreferences(const QStringList &names);
@@ -62,12 +60,13 @@
     void onShow();
     void onHide();
 
+protected:
+    void gestureEvent(QGestureEvent *event);
+
 private:
     Q_DISABLE_COPY(HsShortcutWidget)
-
-    void handleMousePressEvent(QGraphicsSceneMouseEvent *event);
-    void handleMouseMoveEvent(QGraphicsSceneMouseEvent *event);
-    void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+    
+    void launch();
             
     void createPrimitives();
     void updateContent(const CaEntry &caEntry);
@@ -85,8 +84,7 @@
     HbFrameItem *mBackground;
     HbIconItem *mIcon;
     HbTextItem *mText;
-    HbTouchArea *mTouchArea;
-    
+        
     int mCaEntryId;
     QString mUid;
     EntryRole mCaEntryRole;
--- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.css	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.css	Wed Aug 18 09:40:07 2010 +0300
@@ -54,7 +54,3 @@
 	color: var(qtc_hs_list_item_title_normal);
 	zvalue: 2;
 }
-
-HsShortcutWidget::toucharea {  
-  zvalue: 3;
-}
--- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.widgetml	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/resource/hsshortcutwidget.widgetml	Wed Aug 18 09:40:07 2010 +0300
@@ -10,12 +10,7 @@
     <meshitem src="icon" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />
     
     <meshitem src="text" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-    <meshitem src="text" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />  
-    
-    <meshitem src="toucharea" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-    <meshitem src="toucharea" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-    <meshitem src="toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
-    <meshitem src="toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />  
+    <meshitem src="text" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />
   </layout>
   
   <layout name="icon_shortcut" type="mesh">    
@@ -25,12 +20,7 @@
     <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
     
     <meshitem src="icon" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
-    <meshitem src="icon" srcEdge="CENTERH" dst="" dstEdge="CENTERH" /> 
-    
-    <meshitem src="toucharea" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-    <meshitem src="toucharea" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-    <meshitem src="toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
-    <meshitem src="toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+    <meshitem src="icon" srcEdge="CENTERH" dst="" dstEdge="CENTERH" />
   </layout>
   
 </hbwidget>
--- a/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -22,8 +22,8 @@
 #include <HbFrameDrawer>
 #include <HbIconItem>
 #include <HbTextItem>
-#include <HbTouchArea>
 #include <HbInstantFeedback>
+#include <HbTapGesture>
 
 #include "hsshortcutwidget.h"
 #include "hsshortcutservice.h"
@@ -47,9 +47,11 @@
 */
 HsShortcutWidget::HsShortcutWidget(QGraphicsItem *parent, Qt::WindowFlags flags)
   : HbWidget(parent, flags),
-    mBackground(0), mIcon(0), mText(0), mTouchArea(0),
+    mBackground(0), mIcon(0), mText(0),
     mCaEntryId(-1), mCaEntryRole(ItemEntryRole)
 {
+    grabGesture(Qt::TapGesture);
+
     HbStyleLoader::registerFilePath(":/hsshortcutwidget.widgetml");
     HbStyleLoader::registerFilePath(":/hsshortcutwidget.css");
 
@@ -120,33 +122,6 @@
 }
 
 /*!
-    Filters touch area events.
-*/
-bool HsShortcutWidget::eventFilter(QObject *watched, QEvent *event)
-{
-    Q_UNUSED(watched)
-
-    switch (event->type()) {
-        case QEvent::GraphicsSceneMousePress:
-            handleMousePressEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
-            return true;
-        case QEvent::GraphicsSceneMouseMove:
-            handleMouseMoveEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
-            return true;
-        case QEvent::GraphicsSceneMouseRelease:
-            handleMouseReleaseEvent(static_cast<QGraphicsSceneMouseEvent *>(event));
-            return true;
-        case QEvent::UngrabMouse:
-            setBackgroundToNormal();
-            return true;
-        default:
-            break;
-    }
-
-    return false;
-}
-
-/*!
     Initializes this widget.
 */
 void HsShortcutWidget::onInitialize()
@@ -204,37 +179,42 @@
 }
 
 /*!
-    \internal
+    \internal  
 */
-void HsShortcutWidget::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC SKIP
+#endif //COVERAGE_MEASUREMENT
+void HsShortcutWidget::gestureEvent(QGestureEvent *event)
 {
-    Q_UNUSED(event)
-    setBackgroundToPressed();
+    HbTapGesture *gesture = qobject_cast<HbTapGesture *>(event->gesture(Qt::TapGesture));
+    if (gesture) {
+        switch (gesture->state()) {
+            case Qt::GestureStarted:
+                setBackgroundToPressed();
+                break;            
+            case Qt::GestureCanceled:
+                setBackgroundToNormal();
+                break;
+            case Qt::GestureFinished:
+                setBackgroundToNormal();
+                if (gesture->tapStyleHint() == HbTapGesture::Tap) {
+                    launch();
+                }
+                break;
+            default:
+                break;
+        }
+    }
 }
+#ifdef COVERAGE_MEASUREMENT
+#pragma CTC ENDSKIP
+#endif //COVERAGE_MEASUREMENT
 
 /*!
     \internal
 */
-void HsShortcutWidget::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void HsShortcutWidget::launch()
 {
-    if (contains(event->pos())) {
-        setBackgroundToPressed();
-    } else {
-        setBackgroundToNormal();
-    }
-}
-
-/*!
-    \internal
-*/
-void HsShortcutWidget::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
-    setBackgroundToNormal();
-
-    if (!contains(event->pos())) {
-        return;
-    }
-
     HbInstantFeedback::play(HSCONFIGURATION_GET(shortcutWidgetTapFeedbackEffect));
     
     if (mCaEntryRole == ItemEntryRole) {
@@ -267,12 +247,6 @@
     if (HSCONFIGURATION_GET(isShortcutLabelVisible) && !mText ) {
         mText = new HbTextItem(this);
         HbStyle::setItemName(mText, QLatin1String("text"));
-        }
-    // Touch Area
-    if (!mTouchArea) {
-        mTouchArea = new HbTouchArea(this);
-        mTouchArea->installEventFilter(this);
-        HbStyle::setItemName(mTouchArea, QLatin1String("toucharea"));
     }
 }
 
@@ -350,6 +324,3 @@
         emit finished();
     }
 }
-
-
-
--- a/screensaver/bwins/screensavermodelu.def	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/bwins/screensavermodelu.def	Wed Aug 18 09:40:07 2010 +0300
@@ -54,4 +54,5 @@
 	?handleDeactivatedIndicator@Screensaver@@QAEXPAVHbIndicatorInterface@@@Z @ 53 NONAME ; void Screensaver::handleDeactivatedIndicator(class HbIndicatorInterface *)
 	?onHandleActiveIndicators@Screensaver@@MAEXABV?$QList@PAVHbIndicatorInterface@@@@@Z @ 54 NONAME ; void Screensaver::onHandleActiveIndicators(class QList<class HbIndicatorInterface *> const &)
 	?handleActiveIndicators@Screensaver@@QAEXABV?$QList@PAVHbIndicatorInterface@@@@@Z @ 55 NONAME ; void Screensaver::handleActiveIndicators(class QList<class HbIndicatorInterface *> const &)
+	?screenPowerModeRequested@Screensaver@@IAEXW4ScreenPowerMode@1@@Z @ 56 NONAME ; void Screensaver::screenPowerModeRequested(enum Screensaver::ScreenPowerMode)
 
--- a/screensaver/common.pri	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/common.pri	Wed Aug 18 09:40:07 2010 +0300
@@ -129,7 +129,7 @@
 }
 }
 
-!exists($${EPOCROOT}epoc32/include/mw/XQSettingsManager) {
+!symbian {
     DEFINES += NO_QT_EXTENSIONS
 }
 
--- a/screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h	Wed Aug 18 09:40:07 2010 +0300
@@ -23,18 +23,17 @@
 
 
 
-
+#include "screensaver.h"
 #include "snsrtest_global.h"
 
 class Screensaver;
 class SnsrUserActivityServiceInterface;
 class QGraphicsLinearLayout;
 class XQSettingsManager;
+class HbIndicatorInterface;
 
 SCREENSAVER_TEST_CLASS(T_SnsrDeviceDialogPlugin)
 
-class HbIndicatorInterface;
-
 
 class SnsrDeviceDialog: public HbPopup, public HbDeviceDialogInterface
 {
@@ -55,6 +54,8 @@
     };
     
     static const char *dataKeyUnlock;
+    static const char *dataKeySwitchLights;
+    static const char *dataKeySwitchLowPower;
 
 public: // methods
 
@@ -77,6 +78,7 @@
     void screensaverFaulted();
     void changeLayout(Qt::Orientation);
     void requestUnlock();
+    void requestScreenMode(Screensaver::ScreenPowerMode mode);
     // slots for signals emitted by HbIndicatorPluginManager
     void indicatorsActivated(const QList<HbIndicatorInterface*> &activatedIndicators);
     void indicatorActivated(HbIndicatorInterface *activatedIndicator);
--- a/screensaver/devicedialogplugins/snsrdevicedialogplugin/snsrdevicedialogplugin.pro	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/devicedialogplugins/snsrdevicedialogplugin/snsrdevicedialogplugin.pro	Wed Aug 18 09:40:07 2010 +0300
@@ -29,7 +29,7 @@
     TARGET.CAPABILITY = CAP_ECOM_PLUGIN
     
     include(snsrdevicedialogplugin_exports_to_rom.pri)
-    exists($${EPOCROOT}epoc32/include/mw/XQSettingsManager):LIBS += -lxqsettingsmanager
+    LIBS += -lxqsettingsmanager
 
     pluginstub.sources = snsrdevicedialogplugin.dll
     pluginstub.path = /resource/plugins/devicedialogs
--- a/screensaver/devicedialogplugins/snsrdevicedialogplugin/src/snsrdevicedialog.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/devicedialogplugins/snsrdevicedialogplugin/src/snsrdevicedialog.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 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"
@@ -15,22 +15,20 @@
 *
 */
 
-#include <HbMainWindow>
 #include <QGraphicsLinearLayout>
+#include <QGraphicsSceneResizeEvent>
 #include <QPainter>
 #include <QDebug>
+#include <QServiceManager>
+#include <QServiceFilter>
+#include <QServiceInterfaceDescriptor>
+#include <XQSettingsManager>
+#include <HbMainWindow>
 #include <HbIndicatorInterface>
 
-#include <qservicemanager.h>
-#include <qservicefilter.h>
-#include <qserviceinterfacedescriptor.h>
-
 #include <screensaver.h>
-
+#include <screensaverdomaincrkeys.h>
 #include "snsrdevicedialog.h"
-#include <screensaverdomaincrkeys.h>
-#include <xqsettingsmanager.h> 
-
 
 const char *gBigClockInterfaceName = "com.nokia.screensaver.ISnsrBigClockScreensaver";
 
@@ -43,6 +41,8 @@
 extern const char *lViewType;
 
 const char *SnsrDeviceDialog::dataKeyUnlock = "unlock";
+const char *SnsrDeviceDialog::dataKeySwitchLights = "switch_lights";
+const char *SnsrDeviceDialog::dataKeySwitchLowPower = "switch_low_power";
 
 QTM_USE_NAMESPACE
 
@@ -52,7 +52,10 @@
     \param parent Parent.
  */
 SnsrDeviceDialog::SnsrDeviceDialog(const QVariantMap &parameters, QGraphicsItem *parent) :
-        HbPopup(parent) , mScreensaver(0), mLayout(0), m_setManager (0)
+        HbPopup(parent), 
+        mScreensaver(0), 
+        mLayout(0), 
+        m_setManager(0)
 {
     qDebug("SnsrDeviceDialog::SnsrDeviceDialog()");
 
@@ -76,6 +79,10 @@
         SLOT(changeView(QGraphicsWidget*)));
     connect(mScreensaver, SIGNAL(faulted()),
         SLOT(screensaverFaulted()));
+    connect( mScreensaver, SIGNAL(unlockRequested()),
+        SLOT(requestUnlock()) );
+    connect( mScreensaver, SIGNAL(screenPowerModeRequested(Screensaver::ScreenPowerMode)),
+        SLOT(requestScreenMode(Screensaver::ScreenPowerMode)) );
     
     mScreensaver->initialize();
 
@@ -83,10 +90,10 @@
 
     setDismissPolicy(HbPopup::NoDismiss);
     setTimeout(HbPopup::NoTimeout);
+    
+    mainWindow()->setAutomaticOrientationEffectEnabled(false);
 
     setDeviceDialogParameters( parameters );
-    
-    connect( mScreensaver, SIGNAL(unlockRequested()), SLOT(requestUnlock()) );
 }
 
 /*!
@@ -123,18 +130,19 @@
         
     // Check initial view from repository
     if (viewType == ViewTypeInitial ) {
-    XQSettingsManager::Error error;
+        XQSettingsManager::Error error;
         int startupView = 0; 
-        XQSettingsKey settingsKey( XQSettingsKey::TargetCentralRepository, 
+        XQCentralRepositorySettingsKey settingsKey(
                  KCRUidScreensaverSettings.iUid, KScreensaverStartupView ); // TUid as same repository used in control panel via Symbian APIs 
         m_setManager = new XQSettingsManager(this);
-         if (m_setManager) {
-            startupView = m_setManager->readItemValue(settingsKey, XQSettingsManager::TypeInt).toUInt();
+        if (m_setManager) {
+            startupView = m_setManager->readItemValue(settingsKey, XQSettingsManager::TypeInt).toInt();
             error = m_setManager->error();
-            if (error == XQSettingsManager::NoError)
+            if (error == XQSettingsManager::NoError) {
                 viewType = startupView;
+            }
             delete m_setManager;
-         }
+        }
     }
 
     switch (viewType) {
@@ -253,11 +261,17 @@
     
     if (mLayout->count()) {
         mLayout->removeAt(0);
-    }    
+    }
     if (widget) {
         widget->show();
         mLayout->addItem(widget);
+
+        if ( isVisible() ) {
+           changeLayout( mainWindow()->orientation() );
+        }
     }
+    
+
 }
 
 /*!
@@ -280,6 +294,10 @@
     QRectF rect = mainWindow()->layoutRect();
     setMinimumSize( rect.size() );
     setPreferredPos( QPointF(0,0) );
+    QGraphicsSceneResizeEvent sceneResize;
+    sceneResize.setNewSize( rect.size() );
+    event( &sceneResize );
+    mScreensaver->updateLayout();
 }
 
 /*!
@@ -291,6 +309,37 @@
     data.insert(dataKeyUnlock, 1);
     emit deviceDialogData(data);
 }
+
+/*!
+    Send low power mode on/off request to autolock.
+ */
+void SnsrDeviceDialog::requestScreenMode(Screensaver::ScreenPowerMode mode)
+{
+    /* TEMPORARY FIX for the "black screen jam" bug. To be re-enabled when proper fix is found.
+    QVariantMap data;
+    QVariantList rowLimits;
+    if ( mode == Screensaver::ScreenModeOff ) {
+        data.insert(dataKeySwitchLights, 0);
+        data.insert(dataKeySwitchLowPower, rowLimits); // empty list means "low power off"
+    }
+    else if ( mode == Screensaver::ScreenModeLowPower ) {
+        //data.insert(dataKeySwitchLights, 0);
+        int firstRow;
+        int lastRow;
+        mScreensaver->getActiveScreenRows(&firstRow, &lastRow);
+        rowLimits.append( firstRow );
+        rowLimits.append( lastRow );
+        data.insert(dataKeySwitchLowPower, rowLimits);
+    }
+    else if ( mode == Screensaver::ScreenModeFullPower ) {
+        data.insert(dataKeySwitchLights, 30);
+        data.insert(dataKeySwitchLowPower, rowLimits); // empty list means "low power off"
+    }
+    
+    emit deviceDialogData(data);
+    */
+}
+
 /*!
     Called when the dialog is created if they are any currently
     activate universal indicators present.
--- a/screensaver/devicedialogplugins/snsrdevicedialogplugin/src/snsrdevicedialogplugin.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/devicedialogplugins/snsrdevicedialogplugin/src/snsrdevicedialogplugin.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 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"
@@ -122,7 +122,7 @@
     Q_UNUSED(deviceDialogType)
 
     info->group = SecurityGroup;
-    info->flags = NoDeviceDialogFlags;
+    info->flags = ReceiveIndicatorStatus;
     info->priority = DefaultPriority;
 
     return true;
--- a/screensaver/eabi/screensavermodelu.def	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/eabi/screensavermodelu.def	Wed Aug 18 09:40:07 2010 +0300
@@ -53,4 +53,5 @@
 	_ZN11Screensaver26handleDeactivatedIndicatorEP20HbIndicatorInterface @ 52 NONAME
 	_ZN11Screensaver26onHandleActivatedIndicatorEP20HbIndicatorInterface @ 53 NONAME
 	_ZN11Screensaver28onHandleDeactivatedIndicatorEP20HbIndicatorInterface @ 54 NONAME
+	_ZN11Screensaver24screenPowerModeRequestedENS_15ScreenPowerModeE @ 55 NONAME
 
--- a/screensaver/screensavermodel/inc/screensaver.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensavermodel/inc/screensaver.h	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 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"
@@ -42,10 +42,20 @@
 
 public:
 
+    Q_ENUMS(ScreenPowerMode)
+    
+    enum ScreenPowerMode {
+        ScreenModeOff = 0,
+        ScreenModeLowPower,
+        ScreenModeFullPower
+    };
+    
     Screensaver(QObject *parent = 0);
     virtual ~Screensaver();
 
     ScreensaverState currentState();
+    virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow) = 0;
+    virtual void updateLayout() = 0;
 
 public slots:
 
@@ -80,6 +90,7 @@
     void faulted();
     void viewChanged(QGraphicsWidget *widget);
     void unlockRequested();
+    void screenPowerModeRequested(Screensaver::ScreenPowerMode mode);
 
 private:
 
--- a/screensaver/screensavermodel/src/screensaver.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensavermodel/src/screensaver.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -108,6 +108,19 @@
  */
 
 /*!
+    \fn void Screensaver::unlockRequested()
+
+    This signal is emitted if screensaver wants the device to be unlocked.
+ */
+
+/*!
+    \fn void Screensaver::screenPowerModeRequested(ScreenPowerMode mode)
+
+    This signal is emitted when screensaver wants to switch the power
+    mode of the screen, or update the visible area in power save mode.
+ */
+
+/*!
     Returns the state that the Screensaver is currently in.
     \return The current state.
  */
@@ -117,6 +130,26 @@
 }
 
 /*!
+    \fn virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow) = 0
+
+    Inherited screensavers must implement this function to return the rows where 
+    the screensaver wants to draw graphics. This is called when screen is set to the
+    power save mode. The values returned do not matter in case the screensaver doesn't
+    ask for power save mode.
+    Note that the returned rows should reflect the rows in the natural orientation
+    of the screen device. That is, if default orientation of the screen is portrait,
+    then the return value in landscape mode must reflect the columns between which
+    the graphics are drawn.
+ */
+
+/*!
+    \fn virtual void updateLayout() = 0
+
+    Inherited screensavers must implement this function to reload the screen layout
+    for the current screen orientation.
+ */
+
+/*!
     Initializes the Screensaver
  */
 void Screensaver::initialize()
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsranalogclockcontainer.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsranalogclockcontainer.h	Wed Aug 18 09:40:07 2010 +0300
@@ -22,7 +22,7 @@
 
 SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverPlugin)
 
-class HbLabel;
+class SnsrLabel;
 class SnsrAnalogClockWidget;
 class SnsrSwipeWidget;
 
@@ -38,15 +38,18 @@
 public slots:
 
     virtual void update();
-    virtual void changeLayout(Qt::Orientation orientation);
 
 public: // from base classes
 
     virtual int updateIntervalInMilliseconds();
 
+protected: // from base classes
+
+    virtual void loadWidgets();
+
 private: // data
 
-    HbLabel *mDateLabel;
+    SnsrLabel *mDateLabel;
     SnsrAnalogClockWidget *mAnalogClockWidget;
     SnsrSwipeWidget *mSwipeWidget;
 
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockcontainer.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockcontainer.h	Wed Aug 18 09:40:07 2010 +0300
@@ -42,22 +42,26 @@
 public slots:
 
     virtual void update() = 0;
-    virtual void changeLayout(Qt::Orientation orientation) = 0;
+    virtual void changeLayout(Qt::Orientation orientation);
     
 public:
     
+    void setIndicatorModel(SnsrIndicatorModel &model);
+    virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow);
+    virtual bool isOrientationLocked();
     virtual int updateIntervalInMilliseconds() = 0;
-    void initIndicators(SnsrIndicatorModel &model);
 
 protected:
 
+    virtual void loadWidgets() = 0;
     virtual void changeEvent(QEvent * event);
     QPointF randomPosition(const QRectF &rect);
     QPointF nextRandomPosition(const QPointF &curPos, QPointF &destPos, const QRectF &containerRect);
-
+    void initIndicatorWidget();
+    void resetIndicatorConnections();
+    
 private:
 
-    void resetIndicatorConnections();
     void setBackgroundColor(); 
     void paint(
             QPainter *painter,
@@ -68,6 +72,7 @@
 signals:
 
     void unlockRequested();
+    void activeAreaMoved();
 
 protected:
 
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockscreensaver.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrbigclockscreensaver.h	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 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"
@@ -28,6 +28,7 @@
 class HbMainWindow;
 class SnsrBigClockContainer;
 class SnsrIndicatorModel;
+class XQSettingsManager;
 
 class SnsrBigClockScreensaver : public Screensaver
 {
@@ -60,7 +61,12 @@
     virtual void onHandleActiveIndicators(const QList<HbIndicatorInterface*> &activeIndicators);
     virtual void onHandleActivatedIndicator(HbIndicatorInterface *activatedIndicator);
     virtual void onHandleDeactivatedIndicator(HbIndicatorInterface *deactivatedIndicator);
+    virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow);
+    virtual void updateLayout();
 
+private slots:
+
+    void updateActiveAreaForLowPower();
 
 private:
 
@@ -68,7 +74,8 @@
     HbMainWindow *mMainWindow;
     SnsrBigClockContainer *mCurrentContainer;
     SnsrIndicatorModel *mIndicatorModel;
-    
+    XQSettingsManager *m_setManager;
+
     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverPlugin)
 
 };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrblankcontainer.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 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:  Container for blank screen.
+*
+*/
+
+#ifndef SNSRBLANKCONTAINER_H
+#define SNSRBLANKCONTAINER_H
+
+#include "snsrbigclockcontainer.h"
+
+//SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverPlugin)
+
+class SnsrBlankContainer : public SnsrBigClockContainer
+{
+    Q_OBJECT
+
+public:
+
+    SnsrBlankContainer();
+    ~SnsrBlankContainer();
+
+public slots:
+
+    virtual void update();
+
+public: // from base classes
+
+    virtual int updateIntervalInMilliseconds();
+
+protected: // from base classes
+
+    virtual void loadWidgets();
+
+private:
+
+//    SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverPlugin)
+};
+
+#endif // SNSRBLANKCONTAINER_H
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrdigitalclockcontainer.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsrdigitalclockcontainer.h	Wed Aug 18 09:40:07 2010 +0300
@@ -22,7 +22,7 @@
 
 SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverPlugin)
 
-class HbLabel;
+class SnsrLabel;
 class SnsrSwipeWidget;
 
 class SnsrDigitalClockContainer : public SnsrBigClockContainer
@@ -37,17 +37,20 @@
 public slots:
 
     virtual void update();
-    virtual void changeLayout(Qt::Orientation orientation);
 
 public: // from base classes
 
     virtual int updateIntervalInMilliseconds();
 
+protected: // from base classes
+
+    virtual void loadWidgets();
+
 private: // data
 
-    HbLabel *mTimeLabel;
-    HbLabel *mAmPmLabel;
-    HbLabel *mDateLabel;
+    SnsrLabel *mTimeLabel;
+    SnsrLabel *mAmPmLabel;
+    SnsrLabel *mDateLabel;
     SnsrSwipeWidget *mSwipeWidget;
 
     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrBigClockScreensaverPlugin)
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsroledanalogclockcontainer.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsroledanalogclockcontainer.h	Wed Aug 18 09:40:07 2010 +0300
@@ -23,7 +23,7 @@
 SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverPlugin)
 
 class SnsrOledClockWidget;
-class HbLabel;
+class SnsrLabel;
 
 class SnsrOledAnalogClockContainer : public SnsrBigClockContainer
 {
@@ -37,19 +37,24 @@
 public slots:
 
     virtual void update();
-    virtual void changeLayout(Qt::Orientation orientation);
     void updatePosition();
 
 public: // from base classes
 
     virtual int updateIntervalInMilliseconds();
+    virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow);
+    virtual bool isOrientationLocked();
+
+protected: // from base classes
+
+    virtual void loadWidgets();
 
 private:
 
     QGraphicsWidget *mClockContainer;
     
     SnsrOledClockWidget *mOledClockWidget;
-    HbLabel *mDateLabel;
+    SnsrLabel *mDateLabel;
     
     QPointF mDestPosition;
     bool mInitialize;
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsroleddigitalclockcontainer.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/inc/snsroleddigitalclockcontainer.h	Wed Aug 18 09:40:07 2010 +0300
@@ -20,9 +20,11 @@
 
 #include "snsrbigclockcontainer.h"
 
+
 SCREENSAVER_TEST_CLASS(T_SnsrBigClockScreensaverPlugin)
 
-class HbLabel;
+class SnsrLabel;
+class SnsrOledTimeLabel;
 
 class SnsrOledDigitalClockContainer : public SnsrBigClockContainer
 {
@@ -36,21 +38,26 @@
 public slots:
 
     virtual void update();
-    virtual void changeLayout(Qt::Orientation orientation);
     void updatePosition();
 
 public: // from base classes
 
     virtual int updateIntervalInMilliseconds();
+    virtual void getActiveScreenRows(int *firstActiveRow, int *lastActiveRow);
+    virtual bool isOrientationLocked();
+    
+protected: // from base classes
+
+    virtual void loadWidgets();
 
 private:
 
     QGraphicsWidget *mClockContainer;
 
-    HbLabel *mTimeLabel;
-    HbLabel *mDateLabel;
-    HbLabel *mAmPmLabel;
-
+    SnsrLabel *mAmPmLabel;
+    SnsrOledTimeLabel *mTimeLabel;
+    SnsrLabel *mDateLabel;
+    
     QPointF mDestPosition;
     bool mInitialize;
 
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveranalog.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveranalog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -10,16 +10,16 @@
             </widget>
             <widget name="indicatorWidget" type="SnsrIndicatorWidget">
                 <sizehint height="2.5un" type="PREFERRED"/>
-                <sizehint width="0" type="MINIMUM"/>
+                <sizehint width="2.5un" type="MINIMUM"/>
                 <sizepolicy horizontalPolicy="Expanding" verticalPolicy="Preferred"/>
                 <real name="z" value="2"/>
             </widget>
             <widget name="dateLabel" type="SnsrLabel">
                 <real name="z" value="3"/>
                 <sizepolicy horizontalPolicy="Expanding" verticalPolicy="Preferred"/>
-                <sizehint height="5.8209un" type="PREFERRED"/>
-                <sizehint width="0un" type="MINIMUM"/>
-                <fontspec name="fontSpec" role="Secondary" textheight="30"/>
+                <sizehint height="var(hb-param-text-height-tiny)" type="PREFERRED"/>
+                <sizehint width="1.0un" type="MINIMUM"/>
+                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-tiny)"/>
                 <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
             </widget>
             <layout type="anchor">
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaverdigital.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaverdigital.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -3,9 +3,9 @@
     <widget name="view" type="HbView">
         <widget name="mainContainer" role="HbView:widget" type="HbWidget">
             <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
-            <contentsmargins bottom="var(hb-param-margin-gene-screen)" left="var(hb-param-margin-gene-screen)" right="var(hb-param-margin-gene-screen)" top="var(hb-param-margin-gene-screen)"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
             <widget name="amPmLabel" type="SnsrLabel">
-                <sizehint type="MINIMUM" width="0"/>
+                <sizehint type="MINIMUM" width="1.0un"/>
                 <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED"/>
                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <real name="z" value="1"/>
@@ -13,7 +13,7 @@
                 <string name="alignment" value="AlignVCenter|AlignLeft"/>
              </widget>
             <widget name="timeLabel" type="SnsrLabel">
-                <sizehint type="MINIMUM" width="0un"/>
+                <sizehint type="MINIMUM" width="1.0un"/>
                 <sizehint height="14.7un" type="PREFERRED"/>
                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <real name="z" value="2"/>
@@ -21,13 +21,13 @@
                 <string name="alignment" value="AlignVCenter|AlignHCenter"/>
              </widget>
              <widget name="indicatorWidget" type="SnsrIndicatorWidget">
-                <sizehint type="MINIMUM" width="0"/>
+                <sizehint type="MINIMUM" width="2.5un"/>
                 <sizehint height="2.5un" type="PREFERRED"/>
                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <real name="z" value="3"/>
               </widget>
               <widget name="dateLabel" type="SnsrLabel">
-                <sizehint type="MINIMUM" width="0"/>
+                <sizehint type="MINIMUM" width="1.0un"/>
                 <sizehint height="var(hb-param-text-height-tiny)" type="PREFERRED"/>
                 <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                 <real name="z" value="4"/>
@@ -35,7 +35,7 @@
                 <string name="alignment" value="AlignVCenter|AlignHCenter"/>
              </widget>
              <layout type="anchor">
-                <anchoritem dst="amPmLabel" dstEdge="BOTTOM" spacing="1.0un" src="timeLabel" srcEdge="TOP"/>
+                <anchoritem dst="amPmLabel" dstEdge="BOTTOM" spacing="-0.5un" src="timeLabel" srcEdge="TOP"/>
                 <anchoritem dst="amPmLabel" dstEdge="LEFT" spacing="0" src="timeLabel" srcEdge="LEFT"/>
                 <anchoritem dst="timeLabel" dstEdge="TOP" spacing="26.4un" src="" srcEdge="TOP"/>
                 <anchoritem dst="timeLabel" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
@@ -45,12 +45,14 @@
                 <anchoritem dst="dateLabel" dstEdge="CENTERH" spacing="0" src="timeLabel" srcEdge="CENTERH"/>
             </layout>
         </widget>
-        <string name="title" value=""/>
+        <string name="title" value="View"/>
     </widget>
     <section name="landscape">
-        <widget name="mainContainer" type="HbWidget">
+        <widget name="mainContainer" role="HbView:widget" type="HbWidget">
+            <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
             <layout type="anchor">
-                <anchoritem dst="amPmLabel" dstEdge="BOTTOM" spacing="1.0un" src="timeLabel" srcEdge="TOP"/>
+                <anchoritem dst="amPmLabel" dstEdge="BOTTOM" spacing="-0.5un" src="timeLabel" srcEdge="TOP"/>
                 <anchoritem dst="amPmLabel" dstEdge="LEFT" spacing="0" src="timeLabel" srcEdge="LEFT"/>
                 <anchoritem dst="timeLabel" dstEdge="TOP" spacing="17.3un" src="" srcEdge="TOP"/>
                 <anchoritem dst="timeLabel" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveroledanalog.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveroledanalog.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -2,15 +2,17 @@
 <hbdocument version="0.9">
     <widget name="view" type="HbView">
         <widget name="mainContainer" role="HbView:widget" type="HbWidget">
+            <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
             <widget name="clockContainer" type="HbWidget">
-                <sizehint height="49.5un" type="PREFERRED" width="45un"/>
+                <sizehint height="expr( 32.8un + 2.5un + var(hb-param-text-height-tiny) + var(hb-param-margin-gene-top) + var(hb-param-margin-gene-bottom) + var(hb-param-margin-gene-bottom) + var(hb-param-margin-gene-top) )" type="PREFERRED" width="45un"/>
                 <widget name="oledAnalogClockWidget" type="SnsrOledClockWidget">
                     <real name="z" value="1"/>
                     <sizehint height="32.8un" type="PREFERRED" width="32.8un"/>
                 </widget>
                 <widget name="indicatorWidget" type="SnsrIndicatorWidget">
                     <sizehint height="2.5un" type="PREFERRED"/>
-                    <sizehint width="0" type="MINIMUM"/>
+                    <sizehint width="2.5un" type="MINIMUM"/>
                     <sizepolicy horizontalPolicy="Expanding" verticalPolicy="Preferred"/>
                     <real name="z" value="2"/>
                 </widget>
@@ -18,7 +20,7 @@
                     <real name="z" value="3"/>
                     <sizepolicy horizontalPolicy="Expanding" verticalPolicy="Preferred"/>
                     <sizehint height="var(hb-param-text-height-tiny)" type="PREFERRED"/>
-                    <sizehint width="0un" type="MINIMUM"/>
+                    <sizehint width="1.0un" type="MINIMUM"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-tiny)"/>
                     <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
                 </widget>
@@ -33,14 +35,22 @@
             </widget>
             <layout type="anchor">
                 <anchoritem dst="clockContainer" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
-                <anchoritem dst="clockContainer" dstEdge="CENTERV" spacing="0" src="" srcEdge="CENTERV"/>
+                <anchoritem dst="clockContainer" dstEdge="TOP" spacing="22un" src="" srcEdge="TOP"/>
             </layout>
         </widget>
         <string name="title" value="View"/>
     </widget>
     <section name="landscape">
+        <widget name="mainContainer" role="HbView:widget" type="HbWidget">
+            <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
+            <layout type="anchor">
+                <anchoritem dst="clockContainer" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
+                <anchoritem dst="clockContainer" dstEdge="TOP" spacing="3.3un" src="" srcEdge="TOP"/>
+            </layout>
+        </widget>
     </section>
-    <metadata activeUIState="landscape" display="NHD portrait" unit="un">
+    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="landscape" sections="#common landscape"/>
     </metadata>
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveroleddigital.docml	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/resource/snsrbigclockscreensaveroleddigital.docml	Wed Aug 18 09:40:07 2010 +0300
@@ -2,18 +2,21 @@
 <hbdocument version="0.9">
     <widget name="view" type="HbView">
         <widget name="mainContainer" role="HbView:widget" type="HbWidget">
-        <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+            <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
             <widget name="clockContainer" type="HbWidget">
+                <sizehint height="expr(var(hb-param-text-height-primary)+(0.5un)+(14.7un)+var(hb-param-margin-gene-top)+(2.5un)+var(hb-param-margin-gene-bottom)+var(hb-param-text-height-tiny) + var(hb-param-margin-gene-bottom) + var(hb-param-margin-gene-top) )" type="PREFERRED" width="45un"/>
+                <real name="z" value="1"/>
                 <widget name="amPmLabel" type="SnsrLabel">
-                    <sizehint type="MINIMUM" width="0"/>
+                    <sizehint type="MINIMUM" width="1.0un"/>
                     <sizehint height="var(hb-param-text-height-primary)" type="PREFERRED"/>
                     <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                     <real name="z" value="1"/>
                     <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
                     <string name="alignment" value="AlignVCenter|AlignLeft"/>
                 </widget>
-                <widget name="timeLabel" type="SnsrLabel">
-                    <sizehint type="MINIMUM" width="0un"/>
+                <widget name="oledTimeLabel" type="SnsrOledTimeLabel">
+                    <sizehint type="MINIMUM" width="1.0un"/>
                     <sizehint height="14.7un" type="PREFERRED"/>
                     <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                     <real name="z" value="2"/>
@@ -21,40 +24,47 @@
                     <string name="alignment" value="AlignVCenter|AlignHCenter"/>
                 </widget>
                 <widget name="indicatorWidget" type="SnsrIndicatorWidget">
-                    <sizehint type="MINIMUM" width="0"/>
+                    <sizehint type="MINIMUM" width="2.5un"/>
                     <sizehint height="2.5un" type="PREFERRED"/>
                     <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                     <real name="z" value="3"/>
                 </widget>
                 <widget name="dateLabel" type="SnsrLabel">
-                    <sizehint type="MINIMUM" width="0"/>
+                    <sizehint type="MINIMUM" width="1.0un"/>
                     <sizehint height="var(hb-param-text-height-tiny)" type="PREFERRED"/>
                     <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                     <real name="z" value="4"/>
                     <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-tiny)"/>
                     <string name="alignment" value="AlignVCenter|AlignHCenter"/>
                 </widget>
-                <sizehint height="expr(var(hb-param-text-height-primary)+(1.0un)+(14.7un)+var(hb-param-margin-gene-top)+(2.5un)+var(hb-param-margin-gene-bottom)+var(hb-param-text-height-tiny))" type="PREFERRED" width="45un"/>
-                <real name="z" value="1"/>
                 <layout type="anchor">
                     <anchoritem dst="amPmLabel" dstEdge="TOP" spacing="0" src="" srcEdge="TOP"/>
-                    <anchoritem dst="amPmLabel" dstEdge="LEFT" spacing="0" src="timeLabel" srcEdge="LEFT"/>
-                    <anchoritem dst="timeLabel" dstEdge="TOP" spacing="1.0un" src="amPmLabel" srcEdge="BOTTOM"/>
-                    <anchoritem dst="timeLabel" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
-                    <anchoritem dst="indicatorWidget" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="timeLabel" srcEdge="BOTTOM"/>
-                    <anchoritem dst="indicatorWidget" dstEdge="CENTERH" spacing="0" src="timeLabel" srcEdge="CENTERH"/>
+                    <anchoritem dst="amPmLabel" dstEdge="LEFT" spacing="0" src="oledTimeLabel" srcEdge="LEFT"/>
+                    <anchoritem dst="oledTimeLabel" dstEdge="TOP" spacing="0.5un" src="amPmLabel" srcEdge="BOTTOM"/>
+                    <anchoritem dst="oledTimeLabel" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>      
+                    <anchoritem dst="indicatorWidget" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="oledTimeLabel" srcEdge="BOTTOM"/>
+                    <anchoritem dst="indicatorWidget" dstEdge="CENTERH" spacing="0" src="oledTimeLabel" srcEdge="CENTERH"/>
                     <anchoritem dst="dateLabel" dstEdge="TOP" spacing="var(hb-param-margin-gene-bottom)" src="indicatorWidget" srcEdge="BOTTOM"/>
-                    <anchoritem dst="dateLabel" dstEdge="CENTERH" spacing="0" src="timeLabel" srcEdge="CENTERH"/>
+                    <anchoritem dst="dateLabel" dstEdge="CENTERH" spacing="0" src="oledTimeLabel" srcEdge="CENTERH"/>
                 </layout>
             </widget>
             <layout type="anchor">
-                <anchoritem dst="clockContainer" dstEdge="TOP" spacing="1un" src="" srcEdge="TOP"/>
+                <anchoritem dst="clockContainer" dstEdge="TOP" spacing="expr((26.4un)-var(hb-param-text-height-primary)-(0.5un))" src="" srcEdge="TOP"/>
                 <anchoritem dst="clockContainer" dstEdge="CENTERH" spacing="0un" src="" srcEdge="CENTERH"/>
             </layout>
         </widget>
-        <string name="title" value=""/>
+        <string name="title" value="View"/>
     </widget>
-    <section name="landscape"/>
+    <section name="landscape">
+        <widget name="mainContainer" role="HbView:widget" type="HbWidget">
+            <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
+            <layout type="anchor">
+                <anchoritem dst="clockContainer" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
+                <anchoritem dst="clockContainer" dstEdge="TOP" spacing="expr((17.3un)-var(hb-param-text-height-primary)-(0.5un))" src="" srcEdge="TOP"/>
+            </layout>
+        </widget>
+    </section>
     <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="landscape" sections="#common landscape"/>
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsranalogclockwidget.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsranalogclockwidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 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"
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsroledclockwidget.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsroledclockwidget.h	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 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"
@@ -53,6 +53,9 @@
     HbIconItem *mClockHourHand;
     HbIconItem *mClockMinuteHand;
     // TODO: not known yet what label (or any) is shown in clock face (day or am/pm or none)
+    // If some label will be put onto the clock face, then it's color must come
+    // from theme and is most propably different than SnsrLabel uses (=text/icon color
+    // used in screensaver in general
     //HbIconItem *mClockDateFrame;
     //SnsrLabel *mClockDateLabel;
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/inc/snsroledtimelabel.h	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2010 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: Time label for oled digital clock.
+*
+*/
+
+#ifndef SNSROLEDTIMELABEL_H
+#define SNSROLEDTIMELABEL_H
+
+#include <HbTextItem>
+#include "snsrtest_global.h"
+
+SCREENSAVER_TEST_CLASS(T_SnsrClockWidgets)
+
+class SnsrOledTimeLabel : public HbTextItem
+{
+    Q_OBJECT
+
+    Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
+    
+public:
+    
+    SnsrOledTimeLabel(QGraphicsItem *parent = 0);
+    ~SnsrOledTimeLabel();
+    
+    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+protected:
+    
+    virtual void changeEvent(QEvent *event);
+
+private:
+
+    void setThemedTextColor();
+    
+private:
+        
+    Q_DISABLE_COPY(SnsrOledTimeLabel)
+    SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrClockWidgets)
+};
+    
+#endif //  SNSROLEDTIMELABEL_H
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsranalogclockwidget.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsranalogclockwidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 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"
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsroledclockwidget.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsroledclockwidget.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 - 2010 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"
@@ -131,9 +131,12 @@
     Q_ASSERT( mClockHourHand && mClockMinuteHand /*&& mClockDateLabel */);
     
     // Calculate angles for clock hands.
+    // Use granularity of one minute so that minute hand is always exactly
+    // on some minute and not between minutes. OLED clock is not updated more
+    // frequently than once per minute and using finer granularity would cause
+    // the minute hand to be always between even minutes.
     QTime time = QTime::currentTime();
-    qreal s = 6 * time.second();
-    qreal m = 6 * (time.minute() + s/360);
+    qreal m = 6 * time.minute();
     qreal h = 30 * ((time.hour() % 12) + m/360);
     
     int x = mClockHourHand->preferredSize().width()/2;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrclockwidgets/src/snsroledtimelabel.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2010 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: Time label for oled digital clock.
+*
+*/
+
+#include "snsroledtimelabel.h"
+
+#include <hbevent.h>
+#include <hbcolorscheme.h>
+#include <QPainter>
+
+
+const QString snsrForegroundColorRole("snsrforeground");
+
+/*!
+    \class SnsrOledTimeLabel
+    \ingroup group_snsrbigclockscreensaverprovider
+    \brief Screensaver oled digital clock's time label
+ */
+
+/*!
+    Constructs a new SnsrOledTimeLabel.
+    \param parent Parent object.
+ */
+
+SnsrOledTimeLabel::SnsrOledTimeLabel(QGraphicsItem *parent)
+    : HbTextItem(parent)
+{
+    setThemedTextColor();
+    
+    setMinimumLines( 1 );
+    setMaximumLines( 1 );
+    setAlignment(Qt::AlignCenter);
+    
+    // as we do own painting, must disable the flag that is enabled
+    // by default due to performance optimatizations.
+    setFlag(QGraphicsItem::ItemHasNoContents,false);
+}
+
+SnsrOledTimeLabel::~SnsrOledTimeLabel()
+{
+}
+
+/*!
+    \reimp
+    We want to draw only the outlines of the time label text and thus
+    text is drawn here with QPainterPath and pen (no brush) which seems to be the
+    only way to accomplish this. 
+    Base class's Paint method must not be called!
+    We use base class only to get the bounding rect inside which to draw the text
+    (boundingRect has been adjusted to current text, font, alignment etc.)
+ */
+void SnsrOledTimeLabel::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+    Q_UNUSED(option);
+    Q_UNUSED(widget);
+    
+    // TODO: changes needed for mirrored layout and/or other than latin digits??
+    
+    painter->save();   //saves the painter state.
+    
+    QPainterPath path;
+    
+    QRectF boundingRect = this->boundingRect();   
+    QString timeText = this->text();
+    QFont font = this->font();
+
+    // As painterPath takes the left end of the text's baseline as 
+    // a parameter we must calculate that point from boundingRect's bottom left 
+    // so that font's descent (and baseline (=1)) are taken into account. 
+    // We want to center the text horizontally too. The logic
+    // is basically the same as used inside the base class for drawing the text
+    // within boundingRect.
+    QPointF leftEndOfBaseline(0,0);  // for painterPath
+    QFontMetrics fontMetrics(font);
+    int descent = fontMetrics.descent();
+    int width = fontMetrics.width(timeText);   
+    leftEndOfBaseline.setY(boundingRect.bottomLeft().y() - descent -1);
+    leftEndOfBaseline.setX((boundingRect.width() - width) / 2 ); // centerH
+    
+    path.addText(leftEndOfBaseline, font, timeText);  
+    
+    painter->setFont(font);
+
+    QPen newPen = painter->pen();
+    newPen.setWidth( 1 ); // TODO: is this width ok?
+    newPen.setColor(this->textColor());
+    painter->setPen(newPen);
+    
+    painter->setBrush(QBrush(Qt::NoBrush));
+
+  //  painter->setLayoutDirection ( layoutDirection() ); // TODO: needed or not?
+    
+    painter->setRenderHint(QPainter::Antialiasing, true); // TODO: use or not?
+    
+    painter->drawPath(path);
+    
+    // Must restore the painter or the whole UI will be messed up!
+    painter->restore();
+
+}
+
+/*!
+    \reimp
+ */
+void SnsrOledTimeLabel::changeEvent(QEvent * event)
+{
+    if (event->type() == HbEvent::ThemeChanged) {
+        setThemedTextColor();
+    }
+    return HbTextItem::changeEvent(event);
+}
+
+
+/*!
+    Sets the time label's color to follow the theme.
+ */
+void SnsrOledTimeLabel::setThemedTextColor()
+{
+    QColor textColor(HbColorScheme::color(snsrForegroundColorRole));
+    if (textColor.isValid()) {
+        setTextColor(textColor);
+    } else {
+        // fallback mechanism when color definition is missing in default theme
+        setTextColor(Qt::white);
+    }
+}
+
+
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatormodel.h	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/inc/snsrindicatormodel.h	Wed Aug 18 09:40:07 2010 +0300
@@ -42,6 +42,8 @@
     void handleActivatedIndicator(HbIndicatorInterface *activatedIndicator);
     void handleDeactivatedIndicator(HbIndicatorInterface *deactivatedIndicator);
     
+    void handleUpdatedIndicator();
+    
     void initializeIndicatorWidget();
 
     /*
@@ -53,15 +55,18 @@
 
     void indicatorsUpdated(const QList<SnsrIndicatorInfo> &activeIndicators);
     void allIndicatorsDeactivated();
-   
+
 private:
 
-    void addIndicator(const SnsrIndicatorInfo &indicatorInfo);
-
+    bool addIndicator(const SnsrIndicatorInfo &indicatorInfo);
+    bool isIndicatorAlreadyAdded(const SnsrIndicatorInfo &indicatorInfo) const;
+    
     bool findAndRemoveIndicator(const SnsrIndicatorInfo &indicatorInfo);
-    
+   
     bool showIndicatorInScreensaver(const HbIndicatorInterface &indicatorInterface,
                                     SnsrIndicatorInfo &indicatorInfo);
+    
+    void connectToIndicatorsUpdateSignal(const HbIndicatorInterface &indicatorInterface);
 
     bool anyActiveIndicators() const;
     
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/resource/snsrindicatorwidget.widgetml	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/resource/snsrindicatorwidget.widgetml	Wed Aug 18 09:40:07 2010 +0300
@@ -1,16 +1,16 @@
 <hbwidget version="0.1">
   <layout name="indicatorlayout" type="mesh">
-    <meshitem src="icon1" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="icon1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
     <meshitem src="icon1" srcEdge="LEFT" dst="" dstEdge="LEFT" />   
-    <meshitem src="icon2" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="icon2" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
     <meshitem src="icon2" srcEdge="LEFT" dst="icon1" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />   
-    <meshitem src="icon3" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="icon3" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
     <meshitem src="icon3" srcEdge="LEFT" dst="icon2" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />   
-    <meshitem src="icon4" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="icon4" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
     <meshitem src="icon4" srcEdge="LEFT" dst="icon3" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />   
-    <meshitem src="icon5" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="icon5" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
     <meshitem src="icon5" srcEdge="LEFT" dst="icon4" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
-    <meshitem src="icon6" srcEdge="TOP" dst="" dstEdge="TOP" />
+    <meshitem src="icon6" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
     <meshitem src="icon6" srcEdge="LEFT" dst="icon5" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
   </layout>  
 </hbwidget>
\ No newline at end of file
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/src/snsrindicatormodel.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/snsrindicatorwidget/src/snsrindicatormodel.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -29,10 +29,10 @@
     \brief Model for handling indicator data.
  */
 
-// TODO: what is the type string of silent indicator? couldn't
+// TODO: what is the final type string of silent indicator? couldn't
 // find it in wk22 -> workaround solution: assume that it contains
-// substring "silent"
-const char *gSilentIndicatorTypeString = "silent";
+// substring "silence" like in their demo app.
+const char *gSilentIndicatorTypeString = "silence";
 const char *gOfflineIndicatorTypeString = "offline";
 
 
@@ -80,6 +80,7 @@
         if (activatedIndicator 
             && showIndicatorInScreensaver(*activatedIndicator,indicatorInfo)) {
             addIndicator(indicatorInfo);
+            connectToIndicatorsUpdateSignal(*activatedIndicator);
             addedAny = true;
         }
     }
@@ -89,12 +90,6 @@
     if (addedAny) {
         emitChangeSignal();
     }
-    
-    // TODO: no we need to listen to update signals?
-    // used for changing icon?
-    /* //connect indicator's update signal
-     QObject::connect(activatedIndicator, SIGNAL(dataChanged()),
-                      this, SLOT(indicatorUpdated()));*/
 }
 
 /*!
@@ -107,8 +102,10 @@
     SnsrIndicatorInfo indicatorInfo;
     if (activatedIndicator
         && showIndicatorInScreensaver(*activatedIndicator,indicatorInfo)) {
-        addIndicator(indicatorInfo);
-        emitChangeSignal();
+        if (addIndicator(indicatorInfo)) {
+            connectToIndicatorsUpdateSignal(*activatedIndicator);
+            emitChangeSignal();
+        }
     }
 }
 
@@ -132,6 +129,35 @@
 }
 
 /*!
+    Called when some universal indicator updates its data by
+    emitting dataChanged signal. 
+    We listen to this signal because at least the silent indicator plugin demo 
+    uses this method to inform the clients when it gets deactivated/activated 
+    once it has been activated once by setting its icon path to empty/valid string.
+    Don't know if this is going to be the final solution as it's unconventional (?) 
+    but let's be prepared also to this kind of approach. 
+ */
+void SnsrIndicatorModel::handleUpdatedIndicator()
+{
+    HbIndicatorInterface* indicator =
+        qobject_cast<HbIndicatorInterface*>(sender());
+    if (!indicator) {
+        return;
+    }
+    
+    // If indicator's icon path was set to empty string, then treat it
+    // like it were deactivated. And if not empty, then it's active again.
+    if (indicator->indicatorData(
+            HbIndicatorInterface::MonoDecorationNameRole).toString().isEmpty()) {
+        handleDeactivatedIndicator(indicator);
+    }
+    else {
+        handleActivatedIndicator(indicator);
+    }
+    
+}
+
+/*!
     Sends a signal with a list of all currently active indicators.
     No signal is sent if there are no active indicators currently.
  */
@@ -175,24 +201,50 @@
     Add the indicator into this model. Handle here the order in which
     indicators are shown in screensaver: notification indicators should be
     shown in the same order as shown in statusbar, that is in reversed
-    chronological order. Silent indicator should always be the right-most.
+    chronological order. Silent indicator should always be the right-most one.
+    /retval true if indicator was added (not found already in the listings)
  */
-void SnsrIndicatorModel::addIndicator(const SnsrIndicatorInfo &indicatorInfo)
+bool SnsrIndicatorModel::addIndicator(const SnsrIndicatorInfo &indicatorInfo)
 {
-    // info from pattern library - todo: remove
-    //Indicators are displayed inside of each group in reversed chronological order 
-    // according to the arrival time; the indicator that appeared most recently is placed on top of the group.
+    // To be on the safe side, check that the indicator doesn't already
+    // exists in the active indicator listings.
+    bool added(false);
+    
+    // Use prepend to keep the list in reversed chronological order
+    if (indicatorInfo.category == HbIndicatorInterface::NotificationCategory
+        && !isIndicatorAlreadyAdded(indicatorInfo)) {
+        mNotificationIndicators.prepend(indicatorInfo);
+        added = true;
+    }
+    else if (indicatorInfo.category == HbIndicatorInterface::SettingCategory
+             && !isIndicatorAlreadyAdded(indicatorInfo)) {
+        mSettingIndicators.append(indicatorInfo);
+        added = true;
+    }
+    
+    return added;
+}
 
-    //Status bar indicators follow the same order; the most recent notification indicator (4) is on the left 
-    // and similarly the most recent settings indicator (5) is on the right.
-
-    // use prepend to keep the list in reversed chronological order
-    if (indicatorInfo.category == HbIndicatorInterface::NotificationCategory) {
-        mNotificationIndicators.prepend(indicatorInfo);
+/*!
+    Check whether the indicator is already added in the active 
+    indicator listing.
+    /retval true if indicator is already added; false if not.
+ */
+bool SnsrIndicatorModel::isIndicatorAlreadyAdded(const SnsrIndicatorInfo &indicatorInfo) const
+{
+    bool alreadyExits(false);
+    
+    const QList<SnsrIndicatorInfo> &indicatorList = 
+        indicatorInfo.category == HbIndicatorInterface::NotificationCategory 
+        ? mNotificationIndicators : mSettingIndicators;
+    
+    for (int i = 0; i < indicatorList.size(); ++i) {
+        if (indicatorList.at(i).type == indicatorInfo.type) {
+            alreadyExits = true;
+            break;
+        }
     }
-    else {
-        mSettingIndicators.append(indicatorInfo);
-    }
+    return alreadyExits;
 }
 
 /*!
@@ -254,7 +306,7 @@
              && !iconPath.isEmpty()
              // TODO: what is the type string of silent indicator? couldn't
              // find it in wk22 -> workaround solution: assume that it contains
-             // substring "silent"
+             // substring "silence" like in their demo app.
              // && type == gSilentIndicatorTypeString ) { 
              && typeString.contains(gSilentIndicatorTypeString, Qt::CaseInsensitive)) {  
         show = true;
@@ -272,6 +324,27 @@
 }
 
 /*!
+   Start listening to indicator's dataChanged signals.
+   /parameter indicator whose dataChanged signal we want to listen
+ */
+void SnsrIndicatorModel::connectToIndicatorsUpdateSignal(const HbIndicatorInterface &indicatorInterface)
+{
+    // Connect to silent indicator's dataChanged signal as it seems to 
+    // use unconventional method (demo at least) to inform when
+    // it's get deactivated/activated: dataChanged signal is emitted and
+    // icon path is set to empty string/valid string.
+    // It's assumed that we don't need to listen to other indicators
+    // as we are not interested e.g. when primary/secondary texts change etc.
+    
+    // NOTE: do NOT disconnect the indicator signal anywhere explicitly here
+    // or we won't get activation/deactivation messages.
+    if (indicatorInterface.indicatorType().contains(gSilentIndicatorTypeString, Qt::CaseInsensitive)) {
+        QObject::connect( &indicatorInterface, SIGNAL(dataChanged()),
+                          this, SLOT(handleUpdatedIndicator()));
+    }
+}
+
+/*!
    Check whether there is any active indicator currently.
    /retval true if there is at least one indicator to show
  */
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsranalogclockcontainer.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsranalogclockcontainer.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -21,12 +21,13 @@
 #include <QTime>
 #include <QGraphicsLinearLayout>
 
-#include <hblabel.h>
-#include <hbextendedlocale.h>
+#include <HbExtendedLocale>
+#include <HbMainWindow>
 
 #include "snsranalogclockwidget.h"
 #include "snsrindicatorwidget.h"
 #include "snsrswipewidget.h"
+#include "snsrlabel.h"
 
 /*!
     \class SnsrAnalogClockContainer
@@ -61,41 +62,8 @@
     mDateLabel(0),
     mAnalogClockWidget(0)/*,
     mSwipeWidget(0)*/
-    {
+{
     SCREENSAVER_TEST_FUNC_ENTRY("SnsrAnalogClockContainer::SnsrAnalogClockContainer")
-
-    bool ok(true);
-
-    // load analog clock
-    qDebug() << gAnalogLayoutDocml;
-    mDocumentObjects = mDocumentLoader.load(gAnalogLayoutDocml, &ok);
-    Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid DocML file.");
-    if (ok) {
-        mMainView = mDocumentLoader.findWidget(gMainViewName);
-        mDateLabel = qobject_cast<HbLabel *>(
-            mDocumentLoader.findWidget(gDateLabelName));
-        mAnalogClockWidget = qobject_cast<SnsrAnalogClockWidget *>(
-            mDocumentLoader.findWidget(gAnalogClockWidgetName));
-        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
-            mDocumentLoader.findWidget(gIndicatorWidgetName));
-        //We don't implement swipe widget at this poin
-        /*mSwipeWidget = qobject_cast<SnsrSwipeWidget *>(
-            mDocumentLoader.findWidget(gSwipeWidgetName));*/
-        
-        Q_ASSERT_X(
-                mMainView && mDateLabel && mAnalogClockWidget &&
-                mIndicatorWidget /*&& mSwipeWidget*/,
-                gAnalogLayoutDocml, "Objects not found in DocML file."
-                );
-        
-        //connect( mSwipeWidget, SIGNAL(swipeDownDetected()), SIGNAL(unlockRequested()) );
-
-        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
-        
-        mBackgroundContainerLayout->addItem(mMainView);
- //       mSwipeWidget->start();
-    }
-
     SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::SnsrAnalogClockContainer")
 }
 
@@ -104,6 +72,7 @@
  */
 SnsrAnalogClockContainer::~SnsrAnalogClockContainer()
 {
+    resetIndicatorConnections();
     //mDateLabel, mAnalogClockWidget - deleted by the parent
 }
 
@@ -131,43 +100,57 @@
     SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::update")
 }
 
-/*!
-    Changes screensaver layout basing on orientation changes.
-    \param orientation Current orientation.
- */
-void SnsrAnalogClockContainer::changeLayout(Qt::Orientation orientation)
-{
-    SCREENSAVER_TEST_FUNC_ENTRY("SnsrAnalogClockContainer::changeLayout")
-
-    bool ok(false);
-    if (mCurrentOrientation != orientation) {
-        mCurrentOrientation = orientation;
-
-        // hide controls to avoid screen flickering
-        mMainView->hide();
-
-        QString sectionToLoad("");
-        if (mCurrentOrientation == Qt::Horizontal) {
-            sectionToLoad = gLandscapeSectionName;
-        }
-        qDebug() << "loading: " << gAnalogLayoutDocml << ", section: " << sectionToLoad;
-        mDocumentLoader.load(gAnalogLayoutDocml, sectionToLoad, &ok);
-        // view is rebuilt and ready to show
-        update();
-        mMainView->show();
-        Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid section in DocML file.");
-    }
-    // update anyway - this is needed in situations when screensaver goes to
-    // foreground but layout change did not occur
-    if (!ok) {
-        update();
-    }
-
-    SCREENSAVER_TEST_FUNC_EXIT("SnsrAnalogClockContainer::changeLayout")
-}
-
 int SnsrAnalogClockContainer::updateIntervalInMilliseconds()
 {
     return 1000;
 }
 
+void SnsrAnalogClockContainer::loadWidgets()
+{
+    bool ok(true);
+
+    // reset widget pointers, any previous widgets are already deleted by now
+    mMainView = 0;
+    mDateLabel = 0;
+    mAnalogClockWidget = 0;
+    mIndicatorWidget = 0;
+    
+    // load widgets from docml
+    qDebug() << gAnalogLayoutDocml;
+    mDocumentObjects = mDocumentLoader.load(gAnalogLayoutDocml, &ok);
+    Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid DocML file.");
+    if (ok) {
+        mMainView = mDocumentLoader.findWidget(gMainViewName);
+        mDateLabel = qobject_cast<SnsrLabel *>(
+            mDocumentLoader.findWidget(gDateLabelName));
+        mAnalogClockWidget = qobject_cast<SnsrAnalogClockWidget *>(
+            mDocumentLoader.findWidget(gAnalogClockWidgetName));
+        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
+            mDocumentLoader.findWidget(gIndicatorWidgetName));
+        //We don't implement swipe widget at this poin
+        /*mSwipeWidget = qobject_cast<SnsrSwipeWidget *>(
+            mDocumentLoader.findWidget(gSwipeWidgetName));*/
+        
+        Q_ASSERT_X(
+                mMainView && mDateLabel && mAnalogClockWidget &&
+                mIndicatorWidget /*&& mSwipeWidget*/,
+                gAnalogLayoutDocml, "Objects not found in DocML file."
+                );
+        
+        // In case of landscape layout, read also the landscape delta section
+        if ( mCurrentOrientation == Qt::Horizontal ) {
+            qDebug() << "loading: " << gAnalogLayoutDocml << ", section: " << gLandscapeSectionName;
+            mDocumentLoader.load(gAnalogLayoutDocml, gLandscapeSectionName, &ok);
+            Q_ASSERT_X(ok, gAnalogLayoutDocml, "Invalid section in DocML file.");
+        }
+
+        initIndicatorWidget();
+        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
+        
+        mBackgroundContainerLayout->addItem(mMainView);
+
+        //connect( mSwipeWidget, SIGNAL(swipeDownDetected()), SIGNAL(unlockRequested()) );
+        //mSwipeWidget->start();
+    }
+}
+
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrbigclockcontainer.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrbigclockcontainer.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -22,11 +22,9 @@
 #include <QTime>
 #include <QGraphicsLinearLayout>
 
-#include <hblabel.h>
-#include <hbevent.h>
-#include <hbcolorscheme.h>
-
-#include <qsysteminfo.h>
+#include <HbEvent>
+#include <HbColorScheme>
+#include <HbMainWindow>
 
 #include "snsrbigclockcontainer.h"
 #include "snsrindicatorwidget.h"
@@ -41,7 +39,6 @@
 const QString snsrBackgroundColorRole("snsrbackground");
 const int gStep(5);
 
-QTM_USE_NAMESPACE
 
 /*!
     Constructs a new SnsrBigClockContainer.
@@ -55,7 +52,7 @@
     mCurrentOrientation(-1)
 {
     setBackgroundColor();
-    mBackgroundContainerLayout = new QGraphicsLinearLayout(Qt::Vertical);
+    mBackgroundContainerLayout = new QGraphicsLinearLayout(Qt::Vertical, this);
     setLayout(mBackgroundContainerLayout);
     qsrand(QTime::currentTime().msec());
 }
@@ -64,9 +61,7 @@
     Destructs the class.
  */
 SnsrBigClockContainer::~SnsrBigClockContainer()
-{
-    resetIndicatorConnections();
-    
+{    
     // e.g. mIndicatorWidget gets deleted during these calls
     mDocumentLoader.reset();
     qDeleteAll(mDocumentObjects);
@@ -83,10 +78,74 @@
  */
 
 /*!
-    \fn virtual void changeLayout(Qt::Orientation orientation) = 0;
+    Changes screensaver layout based on orientation changes.
+    \param orientation Current orientation.
+ */
+void SnsrBigClockContainer::changeLayout(Qt::Orientation orientation)
+{
+    SCREENSAVER_TEST_FUNC_ENTRY("SnsrBigClockContainer::changeLayout")
+
+    if (mCurrentOrientation != orientation) {
+        mCurrentOrientation = orientation;
+        
+        // delete any old widgets
+        if ( mBackgroundContainerLayout->count() ) {
+            mBackgroundContainerLayout->removeAt(0);
+        }
+        mDocumentLoader.reset();
+        qDeleteAll(mDocumentObjects);
+        mDocumentObjects.clear();
+
+        // reload widgets from docml
+        loadWidgets();
+    }
+    mBackgroundContainerLayout->setGeometry( mainWindow()->layoutRect() );
+    update();
+
+    SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockContainer::changeLayout")
+}
 
-    Slot for members update in container when orientation changed.
+/*!
+    Set used indicator model that is owned by the screensaver class. 
+    Model's life cycle must be the same as screensaver's so that indicators'
+    status data can be kept in memory and one can receive updates. 
+    This method should be called when the current container is set.
+ */
+void SnsrBigClockContainer::setIndicatorModel(SnsrIndicatorModel &model)
+{
+    mIndicatorModel = &model;
+}
+
+/*!
+    @copydoc Screensaver::getActiveScreenRows()
  */
+void SnsrBigClockContainer::getActiveScreenRows(int *firstActiveRow, int *lastActiveRow)
+{
+    // This default implementation return the whole area of the
+    // container. Inherited low power mode containers can and should
+    // return smaller area which just barely encloses all the content.
+    if ( mMainContainer ) {
+        QRect mainRect = mMainContainer->rect().toRect();
+        if ( mCurrentOrientation == Qt::Vertical ) {
+            *firstActiveRow = mainRect.top();
+            *lastActiveRow = mainRect.bottom();
+        }
+        else {
+            *firstActiveRow = mainRect.left();
+            *lastActiveRow = mainRect.right();
+        }
+    }
+}
+
+/*!
+    Tell if this container wants to lock the screen orientation.
+    Default implementation in not locked but inherited classes may
+    override this.
+ */
+bool SnsrBigClockContainer::isOrientationLocked()
+{
+    return false;
+}
 
 /*!
     \fn virtual int updateIntervalInMilliseconds() = 0;
@@ -96,22 +155,16 @@
  */
 
 /*!
-    Set used indicator model and do necessary initializations to show currently
-    active indicators.
+    \fn virtual int loadWidgets() = 0;
+
+    Concrete inherited container classes must implement this to instantiate
+    all the widgets shown in the container. The base class calls this
+    method when screen layuot is changed. The old widgets are already 
+    deleted by the base class before this is called. Also changing the visible
+    container is treated as a layout change, and results in call to this method.
+    Thus, inherited containers don't have to load their widgets yet in their
+    constructors.
  */
-void SnsrBigClockContainer::initIndicators(SnsrIndicatorModel &model)
-{
-    mIndicatorModel = &model;
-    if (mIndicatorWidget) {
-        connect(mIndicatorModel, SIGNAL(indicatorsUpdated(QList<SnsrIndicatorInfo>)),
-                mIndicatorWidget, SLOT(showIndicators(QList<SnsrIndicatorInfo>)));
-                
-        connect(mIndicatorModel, SIGNAL(allIndicatorsDeactivated()),
-                mIndicatorWidget, SLOT(removeAllIndicators()));
-        
-        mIndicatorModel->initializeIndicatorWidget();
-    }
-}
 
 /*!
     \reimp
@@ -229,15 +282,35 @@
 }
 
 /*!
+    Do necessary initializations to show currently active indicators.
+    Should be called after the indicator widget is created.
+ */
+void SnsrBigClockContainer::initIndicatorWidget()
+{
+    Q_ASSERT(mIndicatorModel && mIndicatorWidget);
+    
+    connect(mIndicatorModel, SIGNAL(indicatorsUpdated(QList<SnsrIndicatorInfo>)),
+            mIndicatorWidget, SLOT(showIndicators(QList<SnsrIndicatorInfo>)));
+                
+    connect(mIndicatorModel, SIGNAL(allIndicatorsDeactivated()),
+            mIndicatorWidget, SLOT(removeAllIndicators()));
+        
+    mIndicatorModel->initializeIndicatorWidget();
+}
+
+/*!
     Disconnect connections between indicator model and widget.
+    Should be called before deleting the indicator widget.
  */
 void SnsrBigClockContainer::resetIndicatorConnections()
-{
-    disconnect(mIndicatorModel, SIGNAL(indicatorsUpdated(QList<SnsrIndicatorInfo>)),
-               mIndicatorWidget, SLOT(showIndicators(QList<SnsrIndicatorInfo>)));
-    
-    disconnect(mIndicatorModel, SIGNAL(allIndicatorsDeactivated()),
-               mIndicatorWidget, SLOT(removeAllIndicators()));
+{   
+    if (mIndicatorWidget && mIndicatorModel) {
+        disconnect(mIndicatorModel, SIGNAL(indicatorsUpdated(QList<SnsrIndicatorInfo>)),
+                   mIndicatorWidget, SLOT(showIndicators(QList<SnsrIndicatorInfo>)));
+        
+        disconnect(mIndicatorModel, SIGNAL(allIndicatorsDeactivated()),
+                   mIndicatorWidget, SLOT(removeAllIndicators()));
+    }
 }
 
 /*!
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrbigclockscreensaver.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrbigclockscreensaver.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -24,14 +24,16 @@
 #include <QDebug>
 #include <QTime>
 #include <QTimer>
+#include <XQSettingsManager> 
+#include <HbInstance>
+#include <HbMainWindow>
 
-#include <hbinstance.h>
-#include <hbmainwindow.h>
-
+#include <screensaverdomaincrkeys.h>
 #include "snsranalogclockcontainer.h"
 #include "snsrdigitalclockcontainer.h"
 #include "snsroledanalogclockcontainer.h"
 #include "snsroleddigitalclockcontainer.h"
+#include "snsrblankcontainer.h"
 #include "snsrindicatormodel.h"
 
 /*!
@@ -40,15 +42,14 @@
     \brief Screensaver with big digital clock.
  */
 
-const int gTimeInterval(100);
-
 /*!
     Constructs a new SnsrBigClockScreensaver.
  */
 SnsrBigClockScreensaver::SnsrBigClockScreensaver() :
     mMainWindow(0),
     mCurrentContainer(0),
-    mIndicatorModel(0)
+    mIndicatorModel(0),
+    m_setManager(0)
 {
     mMainWindow = HbInstance::instance()->allMainWindows().at(0);
     // for nice looking clock hand transformations
@@ -64,6 +65,7 @@
  */
 SnsrBigClockScreensaver::~SnsrBigClockScreensaver()
 {
+    mMainWindow->unsetOrientation( /*animate*/false );
     // mCurrentContainer, mIndicatorModel - deleted by the parent
 }
 
@@ -86,6 +88,8 @@
 
     removeCurrentContainer();
 
+    emit screenPowerModeRequested( Screensaver::ScreenModeFullPower );
+    
     SnsrBigClockContainer* newContainer( 0 );
     if (clockFormat() == ClockFormatAnalog) {
         newContainer = new SnsrAnalogClockContainer();
@@ -95,7 +99,7 @@
     }
 
     setCurrentContainer( newContainer );
-
+    
     SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onForeground")
     return true;
 }
@@ -111,13 +115,34 @@
     removeCurrentContainer();
     
     SnsrBigClockContainer* newContainer( 0 );
-    if (clockFormat() == ClockFormatAnalog) {
-        newContainer = new SnsrOledAnalogClockContainer();
+        
+    // Check ScreensaverStatus from repository
+    XQSettingsManager::Error error;
+    int screensaverOn = 1; 
+    XQCentralRepositorySettingsKey settingsKey(
+            KCRUidScreensaverSettings.iUid, KScreensaverStatus ); // TUid as same repository used in control panel via Symbian APIs 
+    m_setManager = new XQSettingsManager(this);
+    if (m_setManager) {
+        screensaverOn = m_setManager->readItemValue(settingsKey, XQSettingsManager::TypeInt).toInt();
+        error = m_setManager->error();
+        if (error != XQSettingsManager::NoError) {
+            qDebug("Error reading value from XQSettingsManager.. error = %d", error);
+        }
+        delete m_setManager;
+    }
+    
+    if (screensaverOn) {
+        if (clockFormat() == ClockFormatAnalog) {
+            newContainer = new SnsrOledAnalogClockContainer();
+        }
+        else {
+            newContainer = new SnsrOledDigitalClockContainer();
+        }
     }
     else {
-        newContainer = new SnsrOledDigitalClockContainer();
+        newContainer = new SnsrBlankContainer();
     }
-
+    
     setCurrentContainer( newContainer );
 
     SCREENSAVER_TEST_FUNC_EXIT("SnsrBigClockScreensaver::onPartialForeground")
@@ -196,6 +221,46 @@
     mIndicatorModel->handleDeactivatedIndicator(deactivatedIndicator);
 }
 
+/*!
+    @copydoc Screensaver::getActiveScreenRows
+ */
+void SnsrBigClockScreensaver::getActiveScreenRows(int *firstActiveRow, int *lastActiveRow)
+{
+    if ( mCurrentContainer ) {
+        mCurrentContainer->getActiveScreenRows( firstActiveRow, lastActiveRow );
+    }
+    else {
+        qWarning() << "No current container when active rows queried.";
+    }
+}
+
+/*!
+    @copydoc Screensaver::updateLayout
+ */
+void SnsrBigClockScreensaver::updateLayout()
+{
+    if ( mCurrentContainer ) {
+        if ( mCurrentContainer->isOrientationLocked() ) {
+            mMainWindow->setOrientation( mMainWindow->orientation(), /*animate*/false );
+        }
+        else {
+            mMainWindow->unsetOrientation( /*animate*/false );
+        }
+        mCurrentContainer->changeLayout( mMainWindow->orientation() );
+    }
+    else {
+        qWarning() << "No current container when updateLayout called.";
+    }
+}
+
+/*!
+    Update the area visible in the power save screen mode. Power save mode gets
+    also activated on call if not already active.
+ */
+void SnsrBigClockScreensaver::updateActiveAreaForLowPower()
+{
+    emit screenPowerModeRequested( Screensaver::ScreenModeLowPower );
+}
 
 /*!
     Determines the curent clock format settings.
@@ -223,38 +288,41 @@
 {
     if ( mCurrentContainer ) {
         disconnect(
-            mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)),
-            mCurrentContainer, SLOT(changeLayout(Qt::Orientation))
-            );
-        disconnect(
             &mTimer, SIGNAL(timeout()),
             mCurrentContainer, SLOT(update())
             );
         disconnect( 
             mCurrentContainer, SIGNAL(unlockRequested()), 
             this, SIGNAL(unlockRequested()) );
-        mTimer.stop();
+        if (mTimer.timerId()!= -1) {
+            mTimer.stop();
+        }
         emit viewChanged(0);
         
         delete mCurrentContainer;
         mCurrentContainer = 0;
     }
+    
+    mMainWindow->unsetOrientation( /*animate*/false );
 }
 
 void SnsrBigClockScreensaver::setCurrentContainer( SnsrBigClockContainer* newContainer )
 {
     mCurrentContainer = newContainer;
-    connect(
-            mMainWindow, SIGNAL(orientationChanged(Qt::Orientation)),
-            mCurrentContainer, SLOT(changeLayout(Qt::Orientation))
-        );
+    mCurrentContainer->setParent(this);
     connect( &mTimer, SIGNAL(timeout()), mCurrentContainer, SLOT(update()) );
     connect( mCurrentContainer, SIGNAL(unlockRequested()), SIGNAL(unlockRequested()) );
+    connect( mCurrentContainer, SIGNAL(activeAreaMoved()), SLOT(updateActiveAreaForLowPower()) );
 
-    mCurrentContainer->initIndicators(*mIndicatorModel);
+    mCurrentContainer->setIndicatorModel(*mIndicatorModel);
+
+    int updateInterval = mCurrentContainer->updateIntervalInMilliseconds(); 
+    // blankcontainer is empty one, don't start timer with -1 return value
+    if ( updateInterval != -1) {
+        mTimer.start(updateInterval);
+    }
     
-    mCurrentContainer->changeLayout(mMainWindow->orientation());
-    mTimer.start( mCurrentContainer->updateIntervalInMilliseconds() );
+    
     emit viewChanged(mCurrentContainer);
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrblankcontainer.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2010 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:  Container for blank screen.
+*
+*/
+
+#include "snsrblankcontainer.h"
+
+/*!
+    \class SnsrBlankContainer
+    \ingroup group_snsrbigclockscreensaverplugin
+    \brief Container used for preparing layout for blank screen.
+ */
+
+/*!
+    Constructs a new SnsrBlankContainer.
+ */
+SnsrBlankContainer::SnsrBlankContainer() :
+    SnsrBigClockContainer()
+{
+}
+
+/*!
+    Destructs the class.
+ */
+SnsrBlankContainer::~SnsrBlankContainer()
+{
+}
+
+void SnsrBlankContainer::update()
+{
+    // nothing to do
+}
+
+int SnsrBlankContainer::updateIntervalInMilliseconds()
+{
+    // don't start timer
+    return -1;
+}
+
+void SnsrBlankContainer::loadWidgets()
+{
+    // nothing to do as we have no visual components
+}
+
+// end of file
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdigitalclockcontainer.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdigitalclockcontainer.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -21,11 +21,12 @@
 #include <QTime>
 #include <QGraphicsLinearLayout>
 
-#include <hblabel.h>
-#include <hbextendedlocale.h>
+#include <HbExtendedLocale>
+#include <HbMainWindow>
 
 #include "snsrswipewidget.h"
 #include "snsrindicatorwidget.h"
+#include "snsrlabel.h"
 
 /*!
     \class SnsrDigitalClockContainer
@@ -66,41 +67,6 @@
     mSwipeWidget(0)*/
 {
     SCREENSAVER_TEST_FUNC_ENTRY("SnsrDigitalClockContainer::SnsrDigitalClockContainer")
-
-    bool ok(false);
-    // load digital clock
-    qDebug() << gDigitalLayoutDocml;
-    mDocumentObjects = mDocumentLoader.load(gDigitalLayoutDocml, &ok);
-    Q_ASSERT_X(ok, gDigitalLayoutDocml, "Invalid DocML file.");
-
-    if (ok) {
-        mMainView = mDocumentLoader.findWidget(gMainViewName);
-        mDateLabel = qobject_cast<HbLabel *>(
-                mDocumentLoader.findWidget(gDateLabelName));
-        mTimeLabel = qobject_cast<HbLabel *>(
-                mDocumentLoader.findWidget(gTimeLabelName));
-        mAmPmLabel = qobject_cast<HbLabel *>(
-                mDocumentLoader.findWidget(gAmPmLabelName));
-        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
-                mDocumentLoader.findWidget(gIndicatorWidgetName));
-        // implement swipewidget later on
-        /*mSwipeWidget = qobject_cast<SnsrSwipeWidget *>(
-                mDocumentLoader.findWidget(gSwipeWidgetName));*/
-
-        Q_ASSERT_X(
-                mMainView && mDateLabel && mTimeLabel && mAmPmLabel &&
-                mIndicatorWidget /*&& mSwipeWidget*/,
-                gDigitalLayoutDocml, "Objects not found in DocML file."
-                );
-        
-        //connect( mSwipeWidget, SIGNAL(swipeDownDetected()), SIGNAL(unlockRequested()) );
-
-        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
-        
-        mBackgroundContainerLayout->addItem(mMainView);
- //       mSwipeWidget->start();
-    }
-
     SCREENSAVER_TEST_FUNC_EXIT("SnsrDigitalClockContainer::SnsrDigitalClockContainer")
 }
 
@@ -109,6 +75,7 @@
  */
 SnsrDigitalClockContainer::~SnsrDigitalClockContainer()
 {
+    resetIndicatorConnections();
     //mTimeLabel, mAmPmLabel, mDateLabel - deleted by the parent
 }
 
@@ -130,7 +97,8 @@
     mTimeLabel->setPlainText(
         HbExtendedLocale().format(QTime::currentTime(), gTimeFormatStr)
         );
-    // if clock type is 24, this will return an empty string.
+    
+    // if clock type is 24h, this will return an empty string.
     mAmPmLabel->setPlainText(
         HbExtendedLocale().format(QTime::currentTime(), gAmPmFormatStr)
         );
@@ -151,44 +119,60 @@
     SCREENSAVER_TEST_FUNC_EXIT("SnsrDigitalClockContainer::update")
 }
 
-/*!
-    Changes screensaver layout basing on orientation changes.
-    \param orientation Current orientation.
- */
-void SnsrDigitalClockContainer::changeLayout(Qt::Orientation orientation)
-{
-    SCREENSAVER_TEST_FUNC_ENTRY("SnsrDigitalClockContainer::changeLayout")
-
-    bool ok(false);
-    if (mCurrentOrientation != orientation) {
-        mCurrentOrientation = orientation;
-
-        // hide controls to avoid screen flickering
-        mMainView->hide();
-
-        QString sectionToLoad("");
-        if (mCurrentOrientation == Qt::Horizontal) {
-            sectionToLoad = gLandscapeSectionName;
-        }
-        qDebug() << "loading: " << gDigitalLayoutDocml << ", section: "
-                << sectionToLoad;
-        mDocumentLoader.load(gDigitalLayoutDocml, sectionToLoad, &ok);
-        // view is rebuilt and ready to show
-        update();
-        mMainView->show();
-        Q_ASSERT_X(ok, gDigitalLayoutDocml, "Invalid section in DocML file.");
-    }
-    // update anyway - this is needed in situations when screensaver goes to
-    // foreground but layout change did not occur
-    if (!ok) {
-        update();
-    }
-
-    SCREENSAVER_TEST_FUNC_EXIT("SnsrDigitalClockContainer::changeLayout")
-}
-
 int SnsrDigitalClockContainer::updateIntervalInMilliseconds()
 {
     return 1000;
 }
 
+void SnsrDigitalClockContainer::loadWidgets()
+{
+    // reset widget pointers, any previous widgets are already deleted by now
+    mMainView = 0;
+    mDateLabel = 0;
+    mTimeLabel = 0;
+    mAmPmLabel = 0;
+    mIndicatorWidget = 0;
+    
+    // load widgets from docml
+    bool ok(false);
+    qDebug() << gDigitalLayoutDocml;
+    mDocumentObjects = mDocumentLoader.load(gDigitalLayoutDocml, &ok);
+    Q_ASSERT_X(ok, gDigitalLayoutDocml, "Invalid DocML file.");
+
+    if (ok) {
+        mMainView = mDocumentLoader.findWidget(gMainViewName);
+        mDateLabel = qobject_cast<SnsrLabel *>(
+                mDocumentLoader.findWidget(gDateLabelName));
+        mTimeLabel = qobject_cast<SnsrLabel *>(
+                mDocumentLoader.findWidget(gTimeLabelName));
+        mAmPmLabel = qobject_cast<SnsrLabel *>(
+                mDocumentLoader.findWidget(gAmPmLabelName));
+        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
+                mDocumentLoader.findWidget(gIndicatorWidgetName));
+        // implement swipewidget later on
+        /*mSwipeWidget = qobject_cast<SnsrSwipeWidget *>(
+                mDocumentLoader.findWidget(gSwipeWidgetName));*/
+
+        Q_ASSERT_X(
+                mMainView && mDateLabel && mTimeLabel && mAmPmLabel &&
+                mIndicatorWidget /*&& mSwipeWidget*/,
+                gDigitalLayoutDocml, "Objects not found in DocML file."
+                );
+
+        // In case of landscape layout, read also the landscape delta section
+        if ( mCurrentOrientation == Qt::Horizontal ) {
+            qDebug() << "loading: " << gDigitalLayoutDocml << ", section: " << gLandscapeSectionName;
+            mDocumentLoader.load(gDigitalLayoutDocml, gLandscapeSectionName, &ok);
+            Q_ASSERT_X(ok, gDigitalLayoutDocml, "Invalid section in DocML file.");
+        }
+
+        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
+        initIndicatorWidget();
+        
+        mBackgroundContainerLayout->addItem(mMainView);
+
+        //connect( mSwipeWidget, SIGNAL(swipeDownDetected()), SIGNAL(unlockRequested()) );
+        //mSwipeWidget->start();
+    }
+}
+
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdocumentloader.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsrdocumentloader.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -21,6 +21,7 @@
 #include "snsroledclockwidget.h"
 #include "snsrlabel.h"
 #include "snsrindicatorwidget.h"
+#include "snsroledtimelabel.h"
 #include "snsrswipewidget.h"
 
 /*!
@@ -28,11 +29,11 @@
     \ingroup group_snsrbigclockscreensaverplugin
     \brief Custom screensaver docml layout loader.
 
-    Used mainly to create the analog clock widget from docml.
+    Used to create the widgets from docml.
  */
 
 /*!
-    Creates the analog clock.
+    Creates the requested widget.
     \param type Static type name.
     \param name Object name.
     \retval Created object.
@@ -63,6 +64,12 @@
         return object;
     }
 
+    if (type == SnsrOledTimeLabel::staticMetaObject.className()) {
+        QObject *object = new SnsrOledTimeLabel();
+        object->setObjectName(name);
+        return object;
+    }
+    
     /* Add swipeWidget implementation later on
      
      if (type == SnsrSwipeWidget::staticMetaObject.className()) {
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsroledanalogclockcontainer.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsroledanalogclockcontainer.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -21,11 +21,12 @@
 #include <QGraphicsLinearLayout>
 #include <QTimer>
 #include <QTime>
-#include <hblabel.h>
-#include <hbextendedlocale.h>
+#include <HbExtendedLocale>
+#include <HbMainWindow>
 
 #include "snsroledclockwidget.h"
 #include "snsrindicatorwidget.h"
+#include "snsrlabel.h"
 
 /*!
     \class SnsrOledAnalogClockContainer
@@ -57,34 +58,6 @@
     mDateLabel(0), mDestPosition(QPointF()), mInitialize(false)
 {
     SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledAnalogClockContainer::SnsrOledAnalogClockContainer")
-
-    bool ok(false);
-    qDebug() << gOledAnalogLayoutDocml;
-
-    // load oled analog clock
-    mDocumentObjects = mDocumentLoader.load(gOledAnalogLayoutDocml, &ok);
-    Q_ASSERT_X(ok, gOledAnalogLayoutDocml, "Invalid DocML file.");
-    if (ok) {
-        mMainView = mDocumentLoader.findWidget(gMainViewName);
-        mMainContainer = mDocumentLoader.findWidget(gMainContainerName);
-        mClockContainer = mDocumentLoader.findWidget(gClockContainerName);
-        mOledClockWidget = qobject_cast<SnsrOledClockWidget *>(
-              mDocumentLoader.findWidget(gOledAnalogClockWidgetName));
-        mDateLabel = qobject_cast<HbLabel *>(
-              mDocumentLoader.findWidget(gDateLabelName));
-        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
-              mDocumentLoader.findWidget(gIndicatorWidgetName));
-        Q_ASSERT_X(
-                mMainView && mMainContainer && mClockContainer
-                && mOledClockWidget && mDateLabel && mIndicatorWidget,
-                gOledAnalogLayoutDocml, "Objects not found in DocML file."
-                );
-        
-        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
-        
-        mBackgroundContainerLayout->addItem(mMainView);
-    }
-
     SCREENSAVER_TEST_FUNC_EXIT("SnsrOledAnalogClockContainer::SnsrOledAnalogClockContainer")
 }
 
@@ -93,6 +66,7 @@
  */
 SnsrOledAnalogClockContainer::~SnsrOledAnalogClockContainer()
 {
+    resetIndicatorConnections();
     //mOledClockWidget etc - deleted by the parent
 }
 
@@ -106,9 +80,14 @@
     // Container must have a valid size to enable calculating the 
     // destination position for the clock.
     if ( containerSize.width() > 0 && containerSize.height() > 0 ) {
-        containerSize -= mClockContainer->boundingRect().size();
+        containerSize -= mClockContainer->size();
         QRectF containerRect( mMainContainer->pos(), containerSize );
         if ( mInitialize ) {
+            // disconnect container from parent layout,
+            // connected container resets its position to the one defined in docml
+            // after label text updates
+            mClockContainer->setParentLayoutItem(0);
+
             QPointF clockPos = nextRandomPosition( mClockContainer->pos(), mDestPosition, containerRect );
             mClockContainer->setPos( clockPos );
         }
@@ -116,6 +95,8 @@
             mDestPosition = randomPosition( containerRect );
             mInitialize = true;
         }
+        // the active area of power save mode needs to be updated when clock container is moved
+        emit activeAreaMoved();
     }
 }
 
@@ -143,57 +124,86 @@
     // position
     updatePosition();
     
-    // TODO: Currently, both time and position are updated 10 times per second.
-    // These should happen only once per minute in the power save mode.
-
     SCREENSAVER_TEST_FUNC_EXIT("SnsrOledAnalogClockContainer::update")
 }
 
-/*!
-    Changes screensaver layout basing on orientation changes.
-    \param orientation Current orientation.
- */
-void SnsrOledAnalogClockContainer::changeLayout(Qt::Orientation orientation)
-{
-    SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledAnalogClockContainer::changeLayout")
-
-    bool ok(false);
-    if (mCurrentOrientation != orientation) {
-        mCurrentOrientation = orientation;
-        // hide controls to avoid screen flickering
-        mMainView->hide();
-
-        QString sectionToLoad("");
-        if (mCurrentOrientation == Qt::Horizontal) {
-            sectionToLoad = gLandscapeSectionName;
-        }
-        qDebug() << "loading: " << gOledAnalogLayoutDocml << ", section: " << sectionToLoad;
-        mDocumentLoader.load(gOledAnalogLayoutDocml, sectionToLoad, &ok);
-        Q_ASSERT_X(ok, gOledAnalogLayoutDocml, "Invalid section in DocML file.");
-
-        // disconnect container from parent layout,
-        // connected container resets its position to the one defined in docml
-        // after label text updates
-        mClockContainer->setParentLayoutItem(0);
-
-        update();
-
-        // view is rebuilt and ready to show
-        mMainView->show();
-    }
-
-    // update anyway - this is needed in situations when screensaver goes to
-    // foreground but layout change did not occur
-    if (!ok) {
-        update();
-    }
-
-    SCREENSAVER_TEST_FUNC_EXIT("SnsrOledAnalogClockContainer::changeLayout")
-}
-
 int SnsrOledAnalogClockContainer::updateIntervalInMilliseconds()
 {
     return 60*1000;
 }
 
+/*!
+    @copydoc SnsrBigClockContainer::getActiveScreenRows()
+ */
+void SnsrOledAnalogClockContainer::getActiveScreenRows(int *firstActiveRow, int *lastActiveRow)
+{
+    if ( mClockContainer ) {
+        QRect clockRect( mClockContainer->pos().toPoint(), 
+                         mClockContainer->size().toSize() );
+        if ( mCurrentOrientation == Qt::Vertical ) {
+            *firstActiveRow = clockRect.top();
+            *lastActiveRow = clockRect.bottom() + 1;
+        }
+        else {
+            *firstActiveRow = clockRect.left();
+            *lastActiveRow = clockRect.right() + 1;
+        }
+    }
+}
+
+/*!
+    Orientation is locked in power save mode as sensors are off anyway,
+    at least after some timeout.
+ */
+bool SnsrOledAnalogClockContainer::isOrientationLocked()
+{
+    return true;
+}
+
+void SnsrOledAnalogClockContainer::loadWidgets()
+{
+    bool ok(true);
+
+    // reset widget pointers, any previous widgets are already deleted by now
+    mMainView = 0;
+    mMainContainer = 0;
+    mClockContainer = 0;
+    mOledClockWidget = 0;
+    mDateLabel = 0;
+    mIndicatorWidget = 0;
+    
+    // load widgets from docml
+    qDebug() << gOledAnalogLayoutDocml;
+    mDocumentObjects = mDocumentLoader.load(gOledAnalogLayoutDocml, &ok);
+    Q_ASSERT_X(ok, gOledAnalogLayoutDocml, "Invalid DocML file.");
+    if (ok) {
+        mMainView = mDocumentLoader.findWidget(gMainViewName);
+        mMainContainer = mDocumentLoader.findWidget(gMainContainerName);
+        mClockContainer = mDocumentLoader.findWidget(gClockContainerName);
+        mOledClockWidget = qobject_cast<SnsrOledClockWidget *>(
+              mDocumentLoader.findWidget(gOledAnalogClockWidgetName));
+        mDateLabel = qobject_cast<SnsrLabel *>(
+              mDocumentLoader.findWidget(gDateLabelName));
+        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
+              mDocumentLoader.findWidget(gIndicatorWidgetName));
+        Q_ASSERT_X(
+                mMainView && mMainContainer && mClockContainer
+                && mOledClockWidget && mDateLabel && mIndicatorWidget,
+                gOledAnalogLayoutDocml, "Objects not found in DocML file."
+                );
+        
+        // In case of landscape layout, read also the landscape delta section
+        if ( mCurrentOrientation == Qt::Horizontal ) {
+            qDebug() << "loading: " << gOledAnalogLayoutDocml << ", section: " << gLandscapeSectionName;
+            mDocumentLoader.load(gOledAnalogLayoutDocml, gLandscapeSectionName, &ok);
+            Q_ASSERT_X(ok, gOledAnalogLayoutDocml, "Invalid section in DocML file.");
+        }
+
+        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
+        initIndicatorWidget();
+        
+        mBackgroundContainerLayout->addItem(mMainView);
+    }
+}
+
 // end of file
--- a/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsroleddigitalclockcontainer.cpp	Tue Jul 06 14:06:53 2010 +0300
+++ b/screensaver/screensaverplugins/snsrbigclockscreensaverplugin/src/snsroleddigitalclockcontainer.cpp	Wed Aug 18 09:40:07 2010 +0300
@@ -22,10 +22,14 @@
 #include <QTime>
 #include <QTimer>
 
-#include <hblabel.h>
-#include <hbextendedlocale.h>
+
+#include <HbExtendedLocale>
+#include <HbMainWindow>
 
+#include "snsrlabel.h"
 #include "snsrindicatorwidget.h"
+#include "snsroledtimelabel.h"
+
 
 /*!
     \class SnsrOledDigitalClockContainer
@@ -41,7 +45,7 @@
 extern const char *gMainContainerName;
 extern const char *gClockContainerName;
 
-extern const char *gTimeLabelName;
+extern const char *gOledTimeLabelName = "oledTimeLabel";
 extern const char *gAmPmLabelName;
 extern const char *gDateLabelName;
 
@@ -54,46 +58,16 @@
 extern const char *gIndicatorWidgetName;
 
 
+
 /*!
     Constructs a new SnsrOledDigitalClockContainer.
  */
 SnsrOledDigitalClockContainer::SnsrOledDigitalClockContainer() :
-    SnsrBigClockContainer(), mClockContainer(0), mTimeLabel(0),
-    mDateLabel(0), mAmPmLabel(0), mDestPosition(QPointF()), mInitialize(false)
+    SnsrBigClockContainer(), mClockContainer(0), mAmPmLabel(0),
+    mTimeLabel(0), mDateLabel(0), mDestPosition(QPointF()),
+    mInitialize(false)
 {
     SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledDigitalClockContainer::SnsrOledDigitalClockContainer")
-
-    bool ok(false);
-    qDebug() << gOledDigitalLayoutDocml;
-
-    // load digital clock
-    mDocumentObjects = mDocumentLoader.load(gOledDigitalLayoutDocml, &ok);
-    Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid DocML file.");
-
-    if (ok) {
-        mMainView = mDocumentLoader.findWidget(gMainViewName);
-        mMainContainer = mDocumentLoader.findWidget(gMainContainerName);
-        mClockContainer = mDocumentLoader.findWidget(gClockContainerName);
-        mDateLabel = qobject_cast<HbLabel *>(
-                mDocumentLoader.findWidget(gDateLabelName));
-        mTimeLabel = qobject_cast<HbLabel *>(
-                mDocumentLoader.findWidget(gTimeLabelName));
-        mAmPmLabel = qobject_cast<HbLabel *>(
-                mDocumentLoader.findWidget(gAmPmLabelName));
-        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
-                mDocumentLoader.findWidget(gIndicatorWidgetName));
-        Q_ASSERT_X(
-                mMainView && mMainContainer && mClockContainer 
-                && mDateLabel && mTimeLabel && mAmPmLabel
-                && mIndicatorWidget,
-                gOledDigitalLayoutDocml, "Objects not found in DocML file."
-                );
-
-        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
-        
-        mBackgroundContainerLayout->addItem(mMainView);
-    }
-
     SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::SnsrOledDigitalClockContainer")
 }
 
@@ -102,6 +76,7 @@
  */
 SnsrOledDigitalClockContainer::~SnsrOledDigitalClockContainer()
 {
+    resetIndicatorConnections();
     //mTimeLabel, mAmPmLabel, mDateLabel, mMoveTimer - deleted by the parent
 }
 
@@ -118,6 +93,11 @@
         containerSize -= mClockContainer->boundingRect().size();
         QRectF containerRect( mMainContainer->pos(), containerSize );
         if ( mInitialize ) {
+            // disconnect container from parent layout,
+            // connected container resets its position to the one defined in docml
+            // after label text updates
+            mClockContainer->setParentLayoutItem(0);
+
             QPointF clockPos = nextRandomPosition( mClockContainer->pos(), mDestPosition, containerRect );
             mClockContainer->setPos( clockPos );
         }
@@ -125,6 +105,8 @@
             mDestPosition = randomPosition( containerRect );
             mInitialize = true;
         }
+        // the active area of power save mode needs to be updated when clock container is moved
+        emit activeAreaMoved();
     }
 }
 
@@ -136,9 +118,11 @@
     SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledDigitalClockContainer::update")
 
     // time
-    mTimeLabel->setPlainText(
+    mTimeLabel->setText(
         HbExtendedLocale().format(QTime::currentTime(), gTimeFormatStr)
         );
+    
+    // if clock type is 24h, this will return an empty string.
     mAmPmLabel->setPlainText(
         HbExtendedLocale().format(QTime::currentTime(), gAmPmFormatStr)
         );
@@ -161,48 +145,87 @@
     SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::update")
 }
 
-/*!
-    Changes screensaver layout basing on orientation changes.
-    \param orientation Current orientation.
- */
-void SnsrOledDigitalClockContainer::changeLayout(Qt::Orientation orientation)
-{
-    SCREENSAVER_TEST_FUNC_ENTRY("SnsrOledDigitalClockContainer::changeLayout")
-
-    if (mCurrentOrientation != orientation) {
-        mCurrentOrientation = orientation;
-
-        // hide controls to avoid screen flickering
-        mMainView->hide();
-
-        QString sectionToLoad("");
-        if (mCurrentOrientation == Qt::Horizontal) {
-            sectionToLoad = gLandscapeSectionName;
-        }
-        qDebug() << "loading: " << gOledDigitalLayoutDocml << ", section: "
-            << sectionToLoad;
-        bool ok(false);
-        mDocumentLoader.load(gOledDigitalLayoutDocml, sectionToLoad, &ok);
-        Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid section in DocML file.");
-
-        // disconnect container from parent layout,
-        // connected container resets its position to the one defined in docml
-        // after label text updates
-        mClockContainer->setParentLayoutItem(0);
-
-        // update labels before showing the view
-        update();
-
-        // view is rebuilt and ready to show
-        mMainView->show();
-    }
-
-    SCREENSAVER_TEST_FUNC_EXIT("SnsrOledDigitalClockContainer::changeLayout")
-}
-
 int SnsrOledDigitalClockContainer::updateIntervalInMilliseconds()
 {
     return 60*1000;
 }
 
+/*!
+    @copydoc SnsrBigClockContainer::getActiveScreenRows()
+ */
+void SnsrOledDigitalClockContainer::getActiveScreenRows(int *firstActiveRow, int *lastActiveRow)
+{
+    if ( mClockContainer ) {
+        QRect clockRect( mClockContainer->pos().toPoint(), 
+                         mClockContainer->size().toSize() );
+        if ( mCurrentOrientation == Qt::Vertical ) {
+            *firstActiveRow = clockRect.top();
+            *lastActiveRow = clockRect.bottom() + 1;
+        }
+        else {
+            *firstActiveRow = clockRect.left();
+            *lastActiveRow = clockRect.right() + 1;
+        }
+    }
+}
+
+/*!
+    Orientation is locked in power save mode as sensors are off anyway,
+    at least after some timeout.
+ */
+bool SnsrOledDigitalClockContainer::isOrientationLocked()
+{
+    return true;
+}
+
+void SnsrOledDigitalClockContainer::loadWidgets()
+{
+    // reset widget pointers, any previous widgets are already deleted by now
+    mMainView = 0;
+    mMainContainer = 0;
+    mClockContainer = 0;
+    mDateLabel = 0;
+    mTimeLabel = 0;
+    mAmPmLabel = 0;
+    mIndicatorWidget = 0;
+    
+    // load widgets from docml
+    bool ok(false);
+    qDebug() << gOledDigitalLayoutDocml;
+    mDocumentObjects = mDocumentLoader.load(gOledDigitalLayoutDocml, &ok);
+    Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid DocML file.");
+
+    if (ok) {
+        mMainView = mDocumentLoader.findWidget(gMainViewName);
+        mMainContainer = mDocumentLoader.findWidget(gMainContainerName);
+        mClockContainer = mDocumentLoader.findWidget(gClockContainerName);
+        mDateLabel = qobject_cast<SnsrLabel *>(
+                mDocumentLoader.findWidget(gDateLabelName));
+        mTimeLabel = qobject_cast<SnsrOledTimeLabel *>(
+                mDocumentLoader.findWidget(gOledTimeLabelName));
+        mAmPmLabel = qobject_cast<SnsrLabel *>(
+                mDocumentLoader.findWidget(gAmPmLabelName));
+        mIndicatorWidget = qobject_cast<SnsrIndicatorWidget *>(
+                mDocumentLoader.findWidget(gIndicatorWidgetName));
+        Q_ASSERT_X(
+                mMainView && mMainContainer && mClockContainer 
+                && mDateLabel && mTimeLabel && mAmPmLabel
+                && mIndicatorWidget,
+                gOledDigitalLayoutDocml, "Objects not found in DocML file."
+                );
+
+        // In case of landscape layout, read also the landscape delta section
+        if ( mCurrentOrientation == Qt::Horizontal ) {
+            qDebug() << "loading: " << gOledDigitalLayoutDocml << ", section: " << gLandscapeSectionName;
+            mDocumentLoader.load(gOledDigitalLayoutDocml, gLandscapeSectionName, &ok);
+            Q_ASSERT_X(ok, gOledDigitalLayoutDocml, "Invalid section in DocML file.");
+        }
+
+        mIndicatorWidget->setLayoutType(SnsrIndicatorWidget::IndicatorsCentered);
+        initIndicatorWidget();
+               
+        mBackgroundContainerLayout->addItem(mMainView);
+    }
+}
+
 // end of file