idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp
changeset 2 08c6ee43b396
parent 0 f72a12da539e
child 9 f966699dea19
--- a/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp	Thu Jan 07 12:39:41 2010 +0200
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp	Mon Jan 18 20:10:36 2010 +0200
@@ -196,8 +196,11 @@
         
         iManager.Parser().DestroyView( *this );
         }
-    
-    Flush();    
+    delete iBgImage;
+    iBgImage = NULL;
+    Flush();  
+    delete iBgImagePath;
+    iBgImagePath = NULL;
     }
 
 // -----------------------------------------------------------------------------
@@ -274,6 +277,51 @@
     }
 
 // -----------------------------------------------------------------------------
+// CXnViewData::SetWallpaperImage
+// Store background image. Ownership is transferred.
+// -----------------------------------------------------------------------------
+//
+void CXnViewData::SetWallpaperImage( CFbsBitmap* aBitmap )
+    {
+    delete iBgImage;
+    iBgImage = aBitmap;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnViewData::WallpaperImage
+// Get wallpaper image.
+// -----------------------------------------------------------------------------
+//
+CFbsBitmap* CXnViewData::WallpaperImage() const
+    {
+    return iBgImage;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnViewData::SetWallpaperImagePathL
+// -----------------------------------------------------------------------------
+//
+void CXnViewData::SetWallpaperImagePathL( const TDesC& aFileName )
+    {
+    delete iBgImagePath;
+    iBgImagePath = NULL;
+    iBgImagePath = aFileName.AllocL();
+    }
+
+// -----------------------------------------------------------------------------
+// CXnViewData::WallpaperImagePath
+// -----------------------------------------------------------------------------
+//
+const TDesC& CXnViewData::WallpaperImagePath() const
+    {
+    if( iBgImagePath )
+        {
+        return *iBgImagePath;        
+        }
+    return KNullDesC;
+    }
+
+// -----------------------------------------------------------------------------
 // CXnViewData::ResourcesL()
 // Gets this view data's resources
 // -----------------------------------------------------------------------------