phonebookui/Phonebook2/UIControls/src/CPbk2SettingsListControl.cpp
branchRCL_3
changeset 18 d4f567ce2e7c
parent 0 e686773b3f54
equal deleted inserted replaced
17:2666d9724c76 18:d4f567ce2e7c
    36 
    36 
    37 #include <StringLoader.h>
    37 #include <StringLoader.h>
    38 #include <centralrepository.h>
    38 #include <centralrepository.h>
    39 #include <featmgr.h>
    39 #include <featmgr.h>
    40 #include <AknFepInternalCRKeys.h>
    40 #include <AknFepInternalCRKeys.h>
       
    41 #include <akncheckboxsettingpage.h>
       
    42 #include <sysutil.h>
    41 
    43 
    42 //Pbk2Debug
    44 //Pbk2Debug
    43 #include "Pbk2Debug.h"
    45 #include "Pbk2Debug.h"
    44 
    46 
    45 
    47 
   307     do
   309     do
   308         {
   310         {
   309         //Edit selection setting item 
   311         //Edit selection setting item 
   310         //result is ETrue if OK pressed
   312         //result is ETrue if OK pressed
   311         result = iSelectionSettingItem->EditItemL();
   313         result = iSelectionSettingItem->EditItemL();
       
   314         
       
   315         TBool driveSpaceFull( EFalse );
       
   316         driveSpaceFull = SysUtil::FFSSpaceBelowCriticalLevelL( &CCoeEnv::Static()->FsSession() );
       
   317         if ( driveSpaceFull )
       
   318             {
       
   319             //If the disk is full, a write operation cannot complete. So restore 
       
   320             //the previous state.
       
   321             iEikonEnv->HandleError(KErrDiskFull);
       
   322             CSelectionItemList& oldItem( iSettingListState->ItemListState() );
       
   323             CSelectionItemList& item( iSettingListState->SelectionItemList() );
       
   324             TInt count = item.Count();
       
   325             for ( TInt i(0); i < count; ++i )
       
   326                 {
       
   327                 TBool select = oldItem.At(i)->SelectionStatus();
       
   328                 item.At(i)->SetSelectionStatus( select );
       
   329                 }
       
   330             iSelectionSettingItem->RestoreStateL();
       
   331             result = EFalse;
       
   332             }
       
   333         
   312         if ( result )
   334         if ( result )
   313             {
   335             {
   314             //Is selection setting list changed by user
   336             //Is selection setting list changed by user
   315             //result is ETrue if it is changed
   337             //result is ETrue if it is changed
   316             result = iSettingListState->IsChanged();
   338             result = iSettingListState->IsChanged();