emailuis/emailui/src/ncscomposeview.cpp
branchRCL_3
changeset 52 efd4f1afd43e
parent 29 6b8f3b30d0ec
child 60 d620048b4810
equal deleted inserted replaced
29:6b8f3b30d0ec 52:efd4f1afd43e
   744     FUNC_LOG;
   744     FUNC_LOG;
   745     if ( iContainer )
   745     if ( iContainer )
   746         {
   746         {
   747         // Hide toolbar if remotesearch is in progress, 
   747         // Hide toolbar if remotesearch is in progress, 
   748         // because it takes you into a different view
   748         // because it takes you into a different view
   749         TBool hideToolbar = iContainer->IsRemoteSearchInprogress();
   749         TBool hideToolbar = ( iContainer->IsRemoteSearchInprogress() 
       
   750                 || iAddingAttachmentDialogOpened );
   750         SetToolbarItemDimmed( EFsEmailUiTbCmdSend, iContainer->AreAddressFieldsEmpty() );
   751         SetToolbarItemDimmed( EFsEmailUiTbCmdSend, iContainer->AreAddressFieldsEmpty() );
   751      
   752      
   752         CAknToolbar* toolbar(Toolbar());
   753         CAknToolbar* toolbar(Toolbar());
   753         if (toolbar)
   754         if (toolbar)
   754             {
   755             {
   755             toolbar->SetToolbarVisibility(!hideToolbar);
   756             toolbar->SetToolbarVisibility(!hideToolbar);
       
   757             // If toolbar is not hidden, redraw it (otherwise only dimmed/undimmed button will be redrawn)
       
   758             if(!hideToolbar)
       
   759             	{
       
   760                 toolbar->DrawDeferred();
       
   761             	}
   756             }
   762             }
   757         }
   763         }
   758     }
   764     }
   759 
   765 
   760 // -----------------------------------------------------------------------------
   766 // -----------------------------------------------------------------------------
  1394     CAknToolbar* toolbar = self->Toolbar();
  1400     CAknToolbar* toolbar = self->Toolbar();
  1395     if ( !toolbar->IsDimmed() )
  1401     if ( !toolbar->IsDimmed() )
  1396         {
  1402         {
  1397         toolbar->SetDimmed(ETrue); 
  1403         toolbar->SetDimmed(ETrue); 
  1398         }
  1404         }
  1399 
  1405     
       
  1406     self->iAddingAttachmentDialogOpened = ETrue;
  1400     self->iContainer->SwitchChangeMskOff( ETrue );
  1407     self->iContainer->SwitchChangeMskOff( ETrue );
  1401     TRAP( error, ok = attachmentControl->AppendAttachmentToListL(
  1408     TRAP( error, ok = attachmentControl->AppendAttachmentToListL(
  1402                 self->iAttachmentAddType) );
  1409                 self->iAttachmentAddType) );
  1403     self->iContainer->SwitchChangeMskOff( EFalse );
  1410     self->iContainer->SwitchChangeMskOff( EFalse );
  1404 
  1411     self->iAddingAttachmentDialogOpened = EFalse;
       
  1412     
  1405     if ( ok && error == KErrNone )
  1413     if ( ok && error == KErrNone )
  1406         {
  1414         {
  1407         TRAP( error, self->SetAttachmentLabelContentL() );
  1415         TRAP( error, self->SetAttachmentLabelContentL() );
  1408         }
  1416         }
  1409 
  1417