idlehomescreen/widgetmanager/src/wmwidgetloaderao.cpp
changeset 5 c743ef5928ba
parent 2 08c6ee43b396
child 9 f966699dea19
equal deleted inserted replaced
4:4d54b72983ae 5:c743ef5928ba
    21 #include "wmplugin.h"
    21 #include "wmplugin.h"
    22 #include "wmresourceloader.h"
    22 #include "wmresourceloader.h"
    23 #include "wmpersistentwidgetorder.h"
    23 #include "wmpersistentwidgetorder.h"
    24 #include "wmlistbox.h"
    24 #include "wmlistbox.h"
    25 #include "wmwidgetloaderao.h"
    25 #include "wmwidgetloaderao.h"
       
    26 #include "wminstaller.h"
    26 
    27 
    27 #include <hscontentcontroller.h> // content control api
    28 #include <hscontentcontroller.h> // content control api
    28 #include <hscontentinfoarray.h> // content control api
    29 #include <hscontentinfoarray.h> // content control api
    29 #include <widgetregistryclient.h> // widget reqistry
    30 #include <widgetregistryclient.h> // widget reqistry
    30 #include <avkon.rsg> // avkon resources
    31 #include <avkon.rsg> // avkon resources
   121 // CWmWidgetLoaderAo::DoLoadWidgetsL
   122 // CWmWidgetLoaderAo::DoLoadWidgetsL
   122 // ---------------------------------------------------------
   123 // ---------------------------------------------------------
   123 //
   124 //
   124 void CWmWidgetLoaderAo::DoLoadWidgetsL()
   125 void CWmWidgetLoaderAo::DoLoadWidgetsL()
   125     {
   126     {
       
   127     // Check if unistallation is ongoing for for some widget
       
   128 	// iUninstallUid is null no uninstallation is ongoing
       
   129     iUninstallUid = iWmPlugin.WmInstaller().UninstallUid();
       
   130     
   126     // 1. load the widgets array
   131     // 1. load the widgets array
   127     MHsContentController& controller = iWmPlugin.ContentController();    
   132     MHsContentController& controller = iWmPlugin.ContentController();    
   128     CHsContentInfoArray* contentInfoArray = CHsContentInfoArray::NewL();
   133     CHsContentInfoArray* contentInfoArray = CHsContentInfoArray::NewL();
   129     CleanupStack::PushL( contentInfoArray );
   134     CleanupStack::PushL( contentInfoArray );
   130     controller.WidgetListL( *contentInfoArray );
   135     controller.WidgetListL( *contentInfoArray );
   255             iWmPlugin.ResourceLoader(),
   260             iWmPlugin.ResourceLoader(),
   256             aContentInfo, iWidgetRegistry );
   261             aContentInfo, iWidgetRegistry );
   257     widgetData->SetPersistentWidgetOrder( iWidgetOrder );
   262     widgetData->SetPersistentWidgetOrder( iWidgetOrder );
   258     widgetData->SetValid( ETrue );
   263     widgetData->SetValid( ETrue );
   259     iWidgetsList.AddWidgetDataL( widgetData, EFalse );
   264     iWidgetsList.AddWidgetDataL( widgetData, EFalse );
       
   265     if ( iUninstallUid != KNullUid 
       
   266             && iUninstallUid == widgetData->PublisherUid() )
       
   267         {
       
   268         widgetData->VisualizeUninstallL();
       
   269         }
       
   270     
   260     CleanupStack::Pop( widgetData );
   271     CleanupStack::Pop( widgetData );
   261     }
   272     }
   262 
   273 
   263 // ---------------------------------------------------------------------------
   274 // ---------------------------------------------------------------------------
   264 // CWmWidgetLoaderAo::Cleanup
   275 // CWmWidgetLoaderAo::Cleanup