emailuis/nmailui/src/nmsendserviceinterface.cpp
changeset 65 478bc57ad291
parent 54 997a02608b3a
child 68 83cc6bae1de8
equal deleted inserted replaced
59:16ed8d08d0b1 65:478bc57ad291
   373             if (!mSelectionDialog) {
   373             if (!mSelectionDialog) {
   374                 mSelectionDialog =
   374                 mSelectionDialog =
   375                     new NmMailboxSelectionDialog(mUiEngine.mailboxListModel());
   375                     new NmMailboxSelectionDialog(mUiEngine.mailboxListModel());
   376             }
   376             }
   377 
   377 
       
   378             if (!XQServiceUtil::isEmbedded()) {
       
   379                 XQServiceUtil::toBackground(false);
       
   380             }
       
   381             
   378             connect(mSelectionDialog, SIGNAL(selectionDialogClosed(NmId&)),
   382             connect(mSelectionDialog, SIGNAL(selectionDialogClosed(NmId&)),
   379                     this, SLOT(selectionDialogClosed(NmId&)));
   383                     this, SLOT(selectionDialogClosed(NmId&)));
   380             mSelectionDialog->open();
   384             mSelectionDialog->open();
   381 
   385 
   382             // launch the editor when the dialog is closed
   386             // launch the editor when the dialog is closed
   398         mCurrentView->show();
   402         mCurrentView->show();
   399         mCurrentView = NULL;
   403         mCurrentView = NULL;
   400     }
   404     }
   401 
   405 
   402     if (mStartParam) {
   406     if (mStartParam) {
       
   407         // Make sure the NMail application is in the foreground
       
   408         if (!XQServiceUtil::isEmbedded()) {
       
   409             XQServiceUtil::toBackground(false);    
       
   410         }
       
   411         
   403         mStartParam->setMailboxId(mailboxId);
   412         mStartParam->setMailboxId(mailboxId);
   404         mApplication->enterNmUiView(mStartParam);
   413         mApplication->enterNmUiView(mStartParam);
   405         mStartParam = NULL; // ownership passed
   414         mStartParam = NULL; // ownership passed
   406     }
   415     }
   407     completeRequest(mAsyncReqId, 1);
   416     completeRequest(mAsyncReqId, 1);