1059 case EAknSoftkeyExit: |
1059 case EAknSoftkeyExit: |
1060 OnCmdExitL(aCommandId); |
1060 OnCmdExitL(aCommandId); |
1061 break; |
1061 break; |
1062 case EAknCmdHelp: |
1062 case EAknCmdHelp: |
1063 OnCmdHelpL(); |
1063 OnCmdHelpL(); |
1064 break; |
|
1065 case ECalenSend: |
|
1066 OnCmdSendL( aCommandId ); |
|
1067 break; |
1064 break; |
1068 case ECalenGetLocation: |
1065 case ECalenGetLocation: |
1069 { |
1066 { |
1070 ReadPlaceFromEditorL(); // to remove any picture characters in location string |
1067 ReadPlaceFromEditorL(); // to remove any picture characters in location string |
1071 TBuf<ECalenAbsoluteMaxTextEditorLength> location; |
1068 TBuf<ECalenAbsoluteMaxTextEditorLength> location; |
1361 { |
1356 { |
1362 TRACE_ENTRY_POINT; |
1357 TRACE_ENTRY_POINT; |
1363 |
1358 |
1364 TryToDeleteNoteL( ETrue ); |
1359 TryToDeleteNoteL( ETrue ); |
1365 |
1360 |
1366 TRACE_EXIT_POINT; |
|
1367 } |
|
1368 |
|
1369 // ----------------------------------------------------------------------------- |
|
1370 // CCalenUnifiedEditor::OnCmdSendL |
|
1371 // Handles the send command. This function differs from the ViewerBase version |
|
1372 // in that the ViewerBase does not attempt to save or delete the entry first. |
|
1373 // ----------------------------------------------------------------------------- |
|
1374 // |
|
1375 void CCalenUnifiedEditor::OnCmdSendL( TInt aCommandId ) |
|
1376 { |
|
1377 TRACE_ENTRY_POINT; |
|
1378 |
|
1379 // Show menu to user |
|
1380 // CCalenSend handles selection internally, so we don't get anything in return |
|
1381 iGlobalData->CalenSendL().DisplaySendCascadeMenuL(); |
|
1382 |
|
1383 // Try to send |
|
1384 if ( iGlobalData->CalenSendL().CanSendL(aCommandId) ) |
|
1385 { |
|
1386 TBool canSend(ETrue); |
|
1387 |
|
1388 const TBool continueOnError = EFalse; |
|
1389 iUnifiedEditorControl->ReadDataFromEditorL( continueOnError ); |
|
1390 CCalenEditorDataHandler::TAction action = |
|
1391 EditorDataHandler().ShouldSaveOrDeleteOrDoNothingL(); |
|
1392 if( action == CCalenEditorDataHandler::EActionSave ) |
|
1393 { |
|
1394 canSend = TryToSaveNoteL(); |
|
1395 } |
|
1396 |
|
1397 if ( canSend ) |
|
1398 { |
|
1399 iGlobalData->CalenSendL().SendAsVCalendarL( aCommandId, EditorDataHandler().Entry() ); |
|
1400 } |
|
1401 } |
|
1402 TRACE_EXIT_POINT; |
1361 TRACE_EXIT_POINT; |
1403 } |
1362 } |
1404 |
1363 |
1405 // ----------------------------------------------------------------------------- |
1364 // ----------------------------------------------------------------------------- |
1406 // CCalenUnifiedEditor::OnCmdHelpL |
1365 // CCalenUnifiedEditor::OnCmdHelpL |
1462 // FIXME. With new MAgnEntryUi we could use MAgnEntryUi::EInstanceDeleted |
1421 // FIXME. With new MAgnEntryUi we could use MAgnEntryUi::EInstanceDeleted |
1463 iEntryUpdater->TryDeleteInstanceWithUiL( EditorDataHandler().Entry() , |
1422 iEntryUpdater->TryDeleteInstanceWithUiL( EditorDataHandler().Entry() , |
1464 EditorDataHandler().InstanceDateTime() , |
1423 EditorDataHandler().InstanceDateTime() , |
1465 iRepeatType, *iServices ); |
1424 iRepeatType, *iServices ); |
1466 } |
1425 } |
1467 TRACE_EXIT_POINT; |
|
1468 } |
|
1469 |
|
1470 // ----------------------------------------------------------------------------- |
|
1471 // CCalenUnifiedEditor::TryInsertSendMenuL |
|
1472 // Inserts the send menu, if needed. |
|
1473 // (other items were commented in a header). |
|
1474 // ----------------------------------------------------------------------------- |
|
1475 // |
|
1476 void CCalenUnifiedEditor::TryInsertSendMenuL( TInt /*aResourceId*/, CEikMenuPane* aMenuPane ) |
|
1477 { |
|
1478 TRACE_ENTRY_POINT; |
|
1479 |
|
1480 // Only insert if there is some summary (or location) |
|
1481 // Changes done to remove Lunar calendar item from options menu |
|
1482 if( EditorDataHandler().AreTextFieldsEmptyL() ) |
|
1483 { |
|
1484 // Delete Send Menu item if exists |
|
1485 aMenuPane->DeleteMenuItem( ECalenSend ); |
|
1486 } |
|
1487 |
|
1488 TRACE_EXIT_POINT; |
1426 TRACE_EXIT_POINT; |
1489 } |
1427 } |
1490 |
1428 |
1491 // ----------------------------------------------------------------------------- |
1429 // ----------------------------------------------------------------------------- |
1492 // CCalenUnifiedEditor::CloseFormWithoutActionsL |
1430 // CCalenUnifiedEditor::CloseFormWithoutActionsL |