emailservices/emailserver/cmailhandlerplugin/src/cmailcpsif.cpp
changeset 2 5253a20d2a1e
parent 1 12c456ceeff2
child 4 e7aa27f58ae1
equal deleted inserted replaced
1:12c456ceeff2 2:5253a20d2a1e
   766                                  iInactive[widgetInstance] = EFalse;
   766                                  iInactive[widgetInstance] = EFalse;
   767                                  }
   767                                  }
   768                              else
   768                              else
   769                                  {
   769                                  {
   770                                  iInstIdList.AppendL( contentid.AllocL() );
   770                                  iInstIdList.AppendL( contentid.AllocL() );
       
   771                                  iMailCpsHandler->ManualAccountSelectionL(cid->Des());                                 
   771                                  }
   772                                  }
   772 /*                             if (!alreadyAssociated)
       
   773                                 {
       
   774                                 iMailCpsHandler->LaunchWidgetSettingsL(cid->Des());
       
   775                                 }*/
       
   776                              CleanupStack::PopAndDestroy( cid );
   773                              CleanupStack::PopAndDestroy( cid );
   777                              }
   774                              }
   778                          else if (trigger.Compare(KDeActive16) == 0)
   775                          else if (trigger.Compare(KDeActive16) == 0)
   779                              {                            
   776                              {                            
   780                              // Widget removed from homescreen.
   777                              // Widget removed from homescreen.
   781                              HBufC* cid = contentid.AllocLC();
   778                              HBufC* cid = contentid.AllocLC();
   782                              TInt widgetInstance = FindWidgetInstanceId(cid->Des());                            
   779                              TInt widgetInstance = FindWidgetInstanceId(cid->Des());                            
   783                              if (!iInactive[widgetInstance])
   780                              if (!iInactive[widgetInstance])
   784                                  {
   781                                  {
   785                                  iMailCpsHandler->DissociateWidgetFromSetting( cid->Des() );                                 
   782                                  iMailCpsHandler->DissociateWidgetFromSettingL( cid->Des() );                                 
   786                                  iInstIdList.Remove(widgetInstance);                                 
   783                                  iInstIdList.Remove(widgetInstance);                                 
   787                                  }
   784                                  }
   788                              iAllowedToPublish[widgetInstance] = EFalse;
   785                              iAllowedToPublish[widgetInstance] = EFalse;
   789                              CleanupStack::PopAndDestroy( cid );
   786                              CleanupStack::PopAndDestroy( cid );
   790                              }
   787                              }
   798                                  ( trigger.Compare(KSettings16) == 0))
   795                                  ( trigger.Compare(KSettings16) == 0))
   799                              {
   796                              {
   800                              // If no accounts are created launch email wizard
   797                              // If no accounts are created launch email wizard
   801                              // otherwice launch widget settings app                             
   798                              // otherwice launch widget settings app                             
   802                              if (iMailCpsHandler->GetMailboxCount())
   799                              if (iMailCpsHandler->GetMailboxCount())
   803                                  {                                
   800                                  {
   804                                  HBufC* cid = contentid.AllocLC();
   801                                  HBufC* cid = contentid.AllocLC();
   805                                  iMailCpsHandler->LaunchWidgetSettingsL(cid->Des());
   802                                  iMailCpsHandler->LaunchWidgetSettingsL(cid->Des());
   806                                  CleanupStack::PopAndDestroy( cid );                                 
   803                                  CleanupStack::PopAndDestroy( cid );                                 
   807                                  }
   804                                  }
   808                              else
   805                              else