226 void CRingingToneBioControl::SetMenuCommandSetL( CEikMenuPane& aMenuPane ) |
226 void CRingingToneBioControl::SetMenuCommandSetL( CEikMenuPane& aMenuPane ) |
227 { |
227 { |
228 // if playing, do not show context sensitive menu. |
228 // if playing, do not show context sensitive menu. |
229 if ( iPlayerState != EMsgAsyncControlStatePlaying ) |
229 if ( iPlayerState != EMsgAsyncControlStatePlaying ) |
230 { |
230 { |
231 AddMenuItemL(aMenuPane, R_SM_PLAYBACK, ERingtPlayback, EFirstMenuItem); |
231 //removing the playback option from options menu, single click will do the playing |
|
232 //AddMenuItemL(aMenuPane, R_SM_PLAYBACK, ERingtPlayback, EFirstMenuItem); |
232 AddMenuItemL(aMenuPane, |
233 AddMenuItemL(aMenuPane, |
233 R_SM_ADD_COMPOSER, ERingtAddComposer, ESecondMenuItem); |
234 R_SM_ADD_COMPOSER, ERingtAddComposer, ESecondMenuItem); |
234 } |
235 } |
235 } |
236 } |
236 |
237 |
1176 |
1177 |
1177 |
1178 |
1178 #ifdef RD_SCALABLE_UI_V2 |
1179 #ifdef RD_SCALABLE_UI_V2 |
1179 void CRingingToneBioControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
1180 void CRingingToneBioControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) |
1180 { |
1181 { |
|
1182 |
|
1183 |
1181 if ( AknLayoutUtils::PenEnabled() ) |
1184 if ( AknLayoutUtils::PenEnabled() ) |
1182 { |
1185 { |
1183 switch ( aPointerEvent.iType ) |
1186 switch ( aPointerEvent.iType ) |
1184 { |
1187 { |
1185 case TPointerEvent::EButton1Down: |
1188 case TPointerEvent::EButton1Down: |
1186 { |
1189 { |
1187 TBool hitted = iAudioControl->HitRegionContains( |
1190 //nothing to do here |
1188 aPointerEvent.iPosition, *this ); |
1191 } |
|
1192 break; |
|
1193 case TPointerEvent::EButton1Up: |
|
1194 { |
|
1195 TBool hitted = iAudioControl->HitRegionContains( aPointerEvent.iPosition, *this ); |
1189 if( hitted ) |
1196 if( hitted ) |
1190 { |
1197 { |
1191 if( !iAudioControl->IsFocused() ) |
1198 if ( iPlayerState != EMsgAsyncControlStatePlaying ) |
1192 { |
1199 { |
1193 //stylus touch to audio control sets it focused |
1200 //playback is triggered when focused control is touched with stylus |
1194 iAudioControl->SetFocus( IsFocused() ); |
1201 iAudioControl->SetFocus(EFalse); |
1195 } |
1202 PlaybackL(); |
1196 else if ( iPlayerState != EMsgAsyncControlStatePlaying && iAudioControl->IsFocused() ) |
1203 } |
1197 { |
1204 else if ( iPlayerState == EMsgAsyncControlStatePlaying ) |
1198 //playback is triggered when focused control is touched with stylus |
1205 { |
1199 PlaybackL(); |
1206 //stylus hit to audio control when playback is in |
1200 } |
1207 //progress stops the playing |
1201 else if ( iPlayerState == EMsgAsyncControlStatePlaying && iAudioControl->IsFocused() ) |
1208 StopPlayback(); |
1202 { |
1209 } |
1203 //stylus hit to audio control when playback is in |
|
1204 //progress stops the playing |
|
1205 StopPlayback(); |
|
1206 } |
|
1207 } |
1210 } |
1208 else if ( iAudioControl->IsFocused() ) |
|
1209 { |
|
1210 //hitting anywhere else than the control removes the focus from it |
|
1211 iAudioControl->SetFocus( EFalse ); |
|
1212 } |
|
1213 break; |
|
1214 } |
1211 } |
|
1212 break; |
1215 default: |
1213 default: |
1216 break; |
1214 break; |
1217 } |
1215 } |
1218 } |
1216 } |
1219 |
|
1220 } |
1217 } |
1221 #else |
1218 #else |
1222 void CRingingToneBioControl::HandlePointerEventL( const TPointerEvent& /*aPointerEvent*/ ) |
1219 void CRingingToneBioControl::HandlePointerEventL( const TPointerEvent& /*aPointerEvent*/ ) |
1223 { |
1220 { |
1224 //no op |
1221 //no op |