idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp
branchRCL_3
changeset 93 b01126ce0bec
parent 88 3321d3e205b6
child 102 ba63c83f4716
equal deleted inserted replaced
88:3321d3e205b6 93:b01126ce0bec
   352         else if( aEvent.iInfo.iType == EMediaNotPresent )
   352         else if( aEvent.iInfo.iType == EMediaNotPresent )
   353             {
   353             {
   354             TRAP_IGNORE( RemovableDiskRemovedL() ); 
   354             TRAP_IGNORE( RemovableDiskRemovedL() ); 
   355             }
   355             }
   356         }
   356         }
       
   357     else if( aEvent.iType == MDiskNotifyHandlerCallback::EDiskAdded )
       
   358         {
       
   359         if( aEvent.iInfo.iType == EMediaHardDisk )
       
   360             {
       
   361             TRAP_IGNORE( RemovableDiskInsertedL() ); 
       
   362             }
       
   363         }
       
   364     else if( aEvent.iType == MDiskNotifyHandlerCallback::EDiskRemoved )
       
   365         {
       
   366         if( aEvent.iInfo.iType == EMediaNotPresent )
       
   367             {
       
   368             TRAP_IGNORE( RemovableDiskRemovedL() ); 
       
   369             }
       
   370         }
   357     }
   371     }
   358 
   372 
   359 // -----------------------------------------------------------------------------
   373 // -----------------------------------------------------------------------------
   360 // CXnBackgroundManager::ConstructWallpaper
   374 // CXnBackgroundManager::ConstructWallpaper
   361 // -----------------------------------------------------------------------------
   375 // -----------------------------------------------------------------------------
  1133         CXnViewData& activeView = iViewManager.ActiveViewData();
  1147         CXnViewData& activeView = iViewManager.ActiveViewData();
  1134         const TDesC& path( activeView.WallpaperImagePath() );
  1148         const TDesC& path( activeView.WallpaperImagePath() );
  1135         RFs& fs( CEikonEnv::Static()->FsSession() );
  1149         RFs& fs( CEikonEnv::Static()->FsSession() );
  1136         if ( path != KNullDesC && BaflUtils::FileExists( fs, path ) )
  1150         if ( path != KNullDesC && BaflUtils::FileExists( fs, path ) )
  1137             {
  1151             {
       
  1152 
  1138             iIntUpdate++;
  1153             iIntUpdate++;
  1139             TInt err( AknsWallpaperUtils::SetIdleWallpaper( path, NULL ) ); 
  1154             TInt err( AknsWallpaperUtils::SetIdleWallpaper( path, NULL ) );
  1140                   
       
  1141             if( err )
  1155             if( err )
  1142                 {
  1156                 {
  1143                 iIntUpdate--;
  1157                 iIntUpdate--;
  1144                 
  1158                 
  1145                 if ( err == KErrCANoRights )
  1159                 if ( err == KErrCANoRights )
  1158             iIntUpdate++;
  1172             iIntUpdate++;
  1159             TInt err( AknsWallpaperUtils::SetIdleWallpaper( KNullDesC, NULL ) ); 
  1173             TInt err( AknsWallpaperUtils::SetIdleWallpaper( KNullDesC, NULL ) ); 
  1160             if( err )
  1174             if( err )
  1161                 {
  1175                 {
  1162                 iIntUpdate--;
  1176                 iIntUpdate--;
  1163                 }       
  1177                 }
  1164             }
  1178 
       
  1179             // If the drive was formatted or temporarily detached or the image was removed            
       
  1180             if( path.Length() )
       
  1181                 {
       
  1182                 iViewManager.ActiveViewData().SetWallpaperImage( NULL );
       
  1183                 iSkinSrv.RemoveWallpaper( path );
       
  1184                 DrawNow();
       
  1185                 }                        
       
  1186             }        
  1165         }       
  1187         }       
  1166     }
  1188     }
  1167 
  1189 
  1168 // -----------------------------------------------------------------------------
  1190 // -----------------------------------------------------------------------------
  1169 // CXnBackgroundManager::UpdateStatuspaneMaskL
  1191 // CXnBackgroundManager::UpdateStatuspaneMaskL