calendarui/settings/settingsui/src/calensettingsuicontainer.cpp
branchRCL_3
changeset 48 bf573002ff72
parent 13 0f07cd1b5772
child 67 1539a383d7b6
equal deleted inserted replaced
36:9c5b1510919f 48:bf573002ff72
   786                          R_CALEN_SETTING_WEEKFORMAT_TITLE,
   786                          R_CALEN_SETTING_WEEKFORMAT_TITLE,
   787                          R_CALEN_SETTING_WEEKFORMAT,
   787                          R_CALEN_SETTING_WEEKFORMAT,
   788                          R_CALEN_WEEKFORMAT_TEXTS,
   788                          R_CALEN_WEEKFORMAT_TEXTS,
   789                          ordinal++ );
   789                          ordinal++ );
   790 
   790 
       
   791     AddEnumerationItemL( iWeekNumberEnable,
       
   792                          ECalenWeekNumberItemId,
       
   793                          R_CALEN_SETTING_WEEKNUMBER_TITLE,
       
   794                          R_CALEN_SETTING_WEEKNUMBER,
       
   795                          R_CALEN_WEEKNUMBER_TEXTS,
       
   796                          ordinal++ );
   791 
   797 
   792     // Always add this in. We will set it hidden when it's not needed (i.e. when the
   798     // Always add this in. We will set it hidden when it's not needed (i.e. when the
   793     // week start is set to anything other than "Monday") at the bottom of this function.
   799     // week start is set to anything other than "Monday") at the bottom of this function.
   794     AddEnumerationItemL( iWeekTitle,
   800     AddEnumerationItemL( iWeekTitle,
   795                          ECalenWeekTitleItemId,
   801                          ECalenWeekTitleItemId,
   837     AddCustomSettingsItemsL( ordinal );
   843     AddCustomSettingsItemsL( ordinal );
   838     ++ordinal;
   844     ++ordinal;
   839 
   845 
   840     // Hide the week title setting if the week start is anything other than Monday.
   846     // Hide the week title setting if the week start is anything other than Monday.
   841     Item( ECalenWeekTitleItemId )->SetHidden( !ShouldShowWeekTitleItem() );
   847     Item( ECalenWeekTitleItemId )->SetHidden( !ShouldShowWeekTitleItem() );
       
   848     Item( ECalenWeekNumberItemId )->SetHidden( !ShouldShowWeekTitleItem() );
   842 
   849 
   843     TRACE_EXIT_POINT;
   850     TRACE_EXIT_POINT;
   844     }
   851     }
   845 
   852 
   846 // ----------------------------------------------------------------------------
   853 // ----------------------------------------------------------------------------
   933     TBool doShow = ShouldShowWeekTitleItem();
   940     TBool doShow = ShouldShowWeekTitleItem();
   934 
   941 
   935     if ( wasShown != doShow )
   942     if ( wasShown != doShow )
   936         {
   943         {
   937         Item( ECalenWeekTitleItemId )->SetHidden( !doShow );
   944         Item( ECalenWeekTitleItemId )->SetHidden( !doShow );
       
   945         Item( ECalenWeekNumberItemId )->SetHidden( !doShow );
   938 
   946 
   939         if ( !doShow )
   947         if ( !doShow )
   940             {
   948             {
   941             Item( ECalenWeekTitleItemId )->LoadL();
   949             Item( ECalenWeekTitleItemId )->LoadL();
       
   950             Item( ECalenWeekNumberItemId )->LoadL();            
   942             }
   951             }
   943 
   952 
   944         iSettingItemArray->RecalculateVisibleIndicesL();
   953         iSettingItemArray->RecalculateVisibleIndicesL();
   945         iListBox.HandleItemAdditionL();
   954         iListBox.HandleItemAdditionL();
   946         iListBox.UpdateScrollBarsL();
   955         iListBox.UpdateScrollBarsL();
  1010          // Open edit dialog if EAknCmdOpen, invert the value otherwise
  1019          // Open edit dialog if EAknCmdOpen, invert the value otherwise
  1011         aPageStatus = ETrue;
  1020         aPageStatus = ETrue;
  1012         iPageStatus = aPageStatus;
  1021         iPageStatus = aPageStatus;
  1013         // for week title only two options available
  1022         // for week title only two options available
  1014         // so let's toggle instead of opening setting page
  1023         // so let's toggle instead of opening setting page
  1015         if( item->Identifier() != ECalenWeekTitleItemId )
  1024         if( (item->Identifier() != ECalenWeekTitleItemId) && (item->Identifier() != ECalenWeekNumberItemId))
  1016             {
  1025             {
  1017             item->EditItemL( aCommand == EAknCmdOpen );
  1026             item->EditItemL( aCommand == EAknCmdOpen );
  1018             }
  1027             }
  1019         aPageStatus = EFalse;
  1028         aPageStatus = EFalse;
  1020         iPageStatus = aPageStatus;
  1029         iPageStatus = aPageStatus;
  1047 					//item->StoreL();
  1056 					//item->StoreL();
  1048                     // toggling option done here
  1057                     // toggling option done here
  1049                     iSetting->SetWeekTitle( static_cast<TCalenWeekTitle>( iWeekTitle ) == EWeekTitleNumber ?
  1058                     iSetting->SetWeekTitle( static_cast<TCalenWeekTitle>( iWeekTitle ) == EWeekTitleNumber ?
  1050                             EWeekTitleDuration  : EWeekTitleNumber );
  1059                             EWeekTitleDuration  : EWeekTitleNumber );
  1051                     iWeekTitle = iSetting->WeekTitle();
  1060                     iWeekTitle = iSetting->WeekTitle();
       
  1061                     item->LoadL();
       
  1062                     item->UpdateListBoxTextL();
       
  1063                     break;
       
  1064                 case ECalenWeekNumberItemId:
       
  1065                     // toggling option done here
       
  1066                     iSetting->SetWeekNumber( static_cast<TCalenWeekNumber>( iWeekNumberEnable ) == EWeekNumberOn ?
       
  1067                         EWeekNumberOff : EWeekNumberOn );
       
  1068                     iWeekNumberEnable = iSetting->WeekNumberEnable();
  1052                     item->LoadL();
  1069                     item->LoadL();
  1053                     item->UpdateListBoxTextL();
  1070                     item->UpdateListBoxTextL();
  1054                     break;
  1071                     break;
  1055                 case ECalenDefaultMailboxId:
  1072                 case ECalenDefaultMailboxId:
  1056                     item->StoreL();
  1073                     item->StoreL();
  1265     iSetting->LoadL();
  1282     iSetting->LoadL();
  1266     
  1283     
  1267     iDefView = iSetting->DefaultView().iUid;
  1284     iDefView = iSetting->DefaultView().iUid;
  1268     iWeekFormat = iSetting->WeekFormat();
  1285     iWeekFormat = iSetting->WeekFormat();
  1269     iWeekTitle = iSetting->WeekTitle();
  1286     iWeekTitle = iSetting->WeekTitle();
       
  1287     iWeekNumberEnable = iSetting->WeekNumberEnable();
  1270     iSnoozeTime = iSetting->SnoozeTime();
  1288     iSnoozeTime = iSetting->SnoozeTime();
  1271 #ifdef RD_SCALABLE_UI_V2_NO_TOOLBAR_SETTING
  1289 #ifdef RD_SCALABLE_UI_V2_NO_TOOLBAR_SETTING
  1272     iToolbar = iSetting->Toolbar();
  1290     iToolbar = iSetting->Toolbar();
  1273 #endif
  1291 #endif
  1274 
  1292