securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp
branchRCL_3
changeset 9 6e226572c5f0
parent 0 164170e6151a
child 13 bbcfd14ce6a7
equal deleted inserted replaced
5:3b17fc5c9564 9:6e226572c5f0
    49 CAutoLockSettingPage::CAutoLockSettingPage(TInt aResourceId, TInt& aCurrentSelectionItem, CDesCArrayFlat* aItemArray, TInt& aAutoLockValue) : 
    49 CAutoLockSettingPage::CAutoLockSettingPage(TInt aResourceId, TInt& aCurrentSelectionItem, CDesCArrayFlat* aItemArray, TInt& aAutoLockValue) : 
    50 					CAknRadioButtonSettingPage(aResourceId, aCurrentSelectionItem, aItemArray),iAutoLockValue(aAutoLockValue)
    50 					CAknRadioButtonSettingPage(aResourceId, aCurrentSelectionItem, aItemArray),iAutoLockValue(aAutoLockValue)
    51 
    51 
    52 	{
    52 	{
    53         iOriginalIndex = aCurrentSelectionItem;
    53         iOriginalIndex = aCurrentSelectionItem;
    54 	iPrevSelectionItem = aCurrentSelectionItem;
       
    55 	}
    54 	}
    56 
    55 
    57 //
    56 //
    58 // ----------------------------------------------------------
    57 // ----------------------------------------------------------
    59 // CAutoLockSettingPage::ConstructL()
    58 // CAutoLockSettingPage::ConstructL()
   166         	TInt cur = ListBoxControl()->CurrentItemIndex();
   165         	TInt cur = ListBoxControl()->CurrentItemIndex();
   167          	CAknRadioButtonSettingPage::HandlePointerEventL(aPointerEvent);
   166          	CAknRadioButtonSettingPage::HandlePointerEventL(aPointerEvent);
   168          	//only take into account the "Up" event. Otherwise we'll end up having 2 dialogs.
   167          	//only take into account the "Up" event. Otherwise we'll end up having 2 dialogs.
   169          	if(aPointerEvent.iType == TPointerEvent::EButton1Up)
   168          	if(aPointerEvent.iType == TPointerEvent::EButton1Up)
   170          	{
   169          	{
   171 		if(iPrevSelectionItem!=cur)
   170 
   172 			iPrevSelectionItem=cur;
       
   173 		else
       
   174          	{
       
   175          	    //only react to the event if the pen is actually inside the dialog.
   171          	    //only react to the event if the pen is actually inside the dialog.
   176          	    if(ListBoxControl()->Rect().Contains(aPointerEvent.iPosition))
   172          	    if(ListBoxControl()->Rect().Contains(aPointerEvent.iPosition))
   177          	        {
   173          	        {
   178          	            // autolock off
   174          	            // autolock off
   179         				if (cur == 0)
   175         				if (cur == 0)
   211          		
   207          		
   212 				}
   208 				}
   213 		    }
   209 		    }
   214          	}
   210          	}
   215         }
   211         }
   216     }
       
   217 //
   212 //
   218 // ---------------------------------------------------------
   213 // ---------------------------------------------------------
   219 // CAutolockQuery::CAutolockQuery()
   214 // CAutolockQuery::CAutolockQuery()
   220 // 
   215 // 
   221 // ---------------------------------------------------------
   216 // ---------------------------------------------------------