calendarui/views/src/calenmissedeventview.cpp
branchRCL_3
changeset 13 1984aceb8774
parent 0 f979ecb2b13e
child 15 9711e452b5e9
equal deleted inserted replaced
11:0f07cd1b5772 13:1984aceb8774
   232             }
   232             }
   233         CleanupStack::PopAndDestroy( temp );
   233         CleanupStack::PopAndDestroy( temp );
   234         }
   234         }
   235     
   235     
   236     UpdateCbaL();
   236     UpdateCbaL();
   237     
   237     //no tool bar in missed event view
   238     // Draw even viewer toolbar by adding Edit, Delete and Send buttons
   238     MCalenToolbar* toolbar = iServices.ToolbarOrNull(); 
   239 	AddToolbarButtonsL();
   239     if(toolbar)
   240 	
   240       {
       
   241       toolbar->SetToolbarVisibilityL(EFalse);  
       
   242       } 
       
   243    
   241     TRACE_EXIT_POINT;
   244     TRACE_EXIT_POINT;
   242     }
   245     }
   243 
   246 
   244 // ----------------------------------------------------------------------------
   247 // ----------------------------------------------------------------------------
   245 // CCalenMissedEventView::DoDeactivateImpl
   248 // CCalenMissedEventView::DoDeactivateImpl
   250     {
   253     {
   251     TRACE_ENTRY_POINT;
   254     TRACE_ENTRY_POINT;
   252     
   255     
   253     iPreviousViewId.iViewUid = KNullUid;
   256     iPreviousViewId.iViewUid = KNullUid;
   254 
   257 
   255     // Remove the toolbar buttons for event viewer before exiting from event view
   258         
   256     TRAP_IGNORE(RemoveToolbarButtonsL());
       
   257     
       
   258     TRACE_EXIT_POINT;
   259     TRACE_EXIT_POINT;
   259     }
   260     }
   260 
   261 
   261 // ----------------------------------------------------------------------------
   262 // ----------------------------------------------------------------------------
   262 // CCalenMissedEventView::OnLocaleChangedL
   263 // CCalenMissedEventView::OnLocaleChangedL
   313         	}
   314         	}
   314             break;
   315             break;
   315         case EAknSoftkeyClose:   
   316         case EAknSoftkeyClose:   
   316         case EAknSoftkeyBack:
   317         case EAknSoftkeyBack:
   317 			{
   318 			{
       
   319 			MCalenToolbar* toolbar = iServices.ToolbarOrNull(); 
       
   320             if(toolbar)
       
   321              {
       
   322              toolbar->SetToolbarVisibilityL(ETrue);  
       
   323              } 
   318 	        iServices.IssueNotificationL(ECalenNotifyMissedEventViewClosed);
   324 	        iServices.IssueNotificationL(ECalenNotifyMissedEventViewClosed);
   319 			break;
   325 			break;
   320 			}
   326 			}
       
   327         case EAknSoftkeyExit: 
       
   328             {
       
   329             MCalenToolbar* toolbar = iServices.ToolbarOrNull(); 
       
   330             if(toolbar)
       
   331              {
       
   332              toolbar->SetToolbarVisibilityL(ETrue);  
       
   333              }             
       
   334             CCalenNativeView::HandleCommandL(aCommand);
       
   335             }
       
   336             break;
   321         default:
   337         default:
   322             if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand))
   338             if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand))
   323                 {
   339                 {
   324                 cnt->GetFindItemMenu()->HandleItemFinderCommandL(aCommand);
   340                 cnt->GetFindItemMenu()->HandleItemFinderCommandL(aCommand);
   325                 return;
   341                 return;
   370 		  	 
   386 		  	 
   371 		  	 if(CCalenLocationUtil::IsMapProviderAvailableL())
   387 		  	 if(CCalenLocationUtil::IsMapProviderAvailableL())
   372             	{
   388             	{
   373 	            if(cnt->IsEventHasMapLocationL() || cnt->IsEventHasNoLocationTextL())
   389 	            if(cnt->IsEventHasMapLocationL() || cnt->IsEventHasNoLocationTextL())
   374 		            {
   390 		            {
   375 		            aMenuPane->DeleteMenuItem( ECalenGetLocationAndSave );
   391 		            aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace );
   376 		            }
   392 		            }
   377 		        if(!cnt->IsEventHasMapLocationL())
   393 		        if(!cnt->IsEventHasMapLocationL())
   378 			        {
   394 			        {
   379 			        aMenuPane->DeleteMenuItem( ECalenShowLocation );	
   395 			        aMenuPane->DeleteMenuItem( ECalenShowLocation );	
   380 			        }	
   396 			        }	
   382             else // No map provider available, remove both option items
   398             else // No map provider available, remove both option items
   383 	            {
   399 	            {
   384 	            aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace );
   400 	            aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace );
   385 	            aMenuPane->DeleteMenuItem( ECalenShowLocation );	
   401 	            aMenuPane->DeleteMenuItem( ECalenShowLocation );	
   386 	            }
   402 	            }
       
   403 			//as no toolbar in missedeventview no need to handle thees commands
       
   404 		  	aMenuPane->DeleteMenuItem( ECalenCmdPromptThenEdit );
       
   405 		  	aMenuPane->DeleteMenuItem( ECalenDeleteCurrentEntry ); 
       
   406 		  	aMenuPane->DeleteMenuItem( ECalenSend );
   387 		    break;
   407 		    break;
   388 		  	}
   408 		  	}
   389 		 default:
   409 		 default:
   390 		    {
   410 		    {
   391 		      cnt->GetFindItemMenu()->UpdateItemFinderMenuL(aResourceId,aMenuPane); 
   411 		      cnt->GetFindItemMenu()->UpdateItemFinderMenuL(aResourceId,aMenuPane);