calendarui/settings/settingsui/src/calensettingsuicontainer.cpp
branchRCL_3
changeset 31 97232defd20e
parent 30 bd7edf625bdd
equal deleted inserted replaced
30:bd7edf625bdd 31:97232defd20e
  1001     TInt index( iListBox.CurrentItemIndex() );
  1001     TInt index( iListBox.CurrentItemIndex() );
  1002 
  1002 
  1003     if ( index >= 0 )   // index is -1 if there are no items in the list
  1003     if ( index >= 0 )   // index is -1 if there are no items in the list
  1004         {
  1004         {
  1005         CAknSettingItem* item;
  1005         CAknSettingItem* item;
  1006         TDay day = static_cast<TDay>( iWeekFormat );
  1006         //Listbox will return the visible index
  1007 
  1007         //So get the actual item index from visible index to get the correct item
  1008         // If the starting day of a week is other than Monday, "Title of week view" setting item 
  1008         TInt itemIndex = iSettingItemArray->ItemIndexFromVisibleIndex(index);
  1009         // is  not displayed. For the item below "Week Format", the index in iSettingItemArray
  1009         item = iSettingItemArray->At( itemIndex );          
  1010         // is one more than CurrentItemIndex().
  1010 
  1011         if( ( day != EMonday && index >= 4 ) )
       
  1012             {
       
  1013             item = iSettingItemArray->At( index + 1);
       
  1014             }
       
  1015         else
       
  1016             {
       
  1017             item = iSettingItemArray->At( index );          
       
  1018             }
       
  1019          // Open edit dialog if EAknCmdOpen, invert the value otherwise
  1011          // Open edit dialog if EAknCmdOpen, invert the value otherwise
  1020         aPageStatus = ETrue;
  1012         aPageStatus = ETrue;
  1021         iPageStatus = aPageStatus;
  1013         iPageStatus = aPageStatus;
  1022         // for week title only two options available
  1014         // for week title only two options available
  1023         // so let's toggle instead of opening setting page
  1015         // so let's toggle instead of opening setting page