emailuis/nmailui/src/nmapplication.cpp
changeset 51 d845db10c0d4
parent 49 00c7ae862740
child 56 15bc1d5d6267
equal deleted inserted replaced
49:00c7ae862740 51:d845db10c0d4
   219     mViewReady = true;
   219     mViewReady = true;
   220     if (mViewStack && !mViewStack->isEmpty()) {
   220     if (mViewStack && !mViewStack->isEmpty()) {
   221     	NmBaseView *currentView = mViewStack->top();
   221     	NmBaseView *currentView = mViewStack->top();
   222         if (currentView) {
   222         if (currentView) {
   223             currentView->viewReady();
   223             currentView->viewReady();
       
   224             emit applicationReady();
   224         }
   225         }
   225     }
   226     }
   226 }
   227 }
   227 
   228 
   228 /*!
   229 /*!
   315     // If the view stack is now empty quit the app. This happens also when
   316     // If the view stack is now empty quit the app. This happens also when
   316     // the app has been started as a service
   317     // the app has been started as a service
   317     else if (mViewStack && mViewStack->size() == 0) {
   318     else if (mViewStack && mViewStack->size() == 0) {
   318         exitApplication();
   319         exitApplication();
   319     }
   320     }
       
   321 }
       
   322 
       
   323 /*!
       
   324      Hide the application
       
   325 */
       
   326 void NmApplication::hideApplication()
       
   327 {
       
   328     // Hide the application
       
   329     XQServiceUtil::toBackground(true);
       
   330 
       
   331     // hide the sync indicator as well
       
   332     mUiEngine->enableSyncIndicator(false);
   320 }
   333 }
   321 
   334 
   322 /*!
   335 /*!
   323     Pop view from view stack. View object is deleted.
   336     Pop view from view stack. View object is deleted.
   324 */
   337 */
   338 				if (!mBackButtonPressed) {
   351 				if (!mBackButtonPressed) {
   339 					mEffects->prepareEffect(NmUiEffects::NmEditorSendMessageAnimation);
   352 					mEffects->prepareEffect(NmUiEffects::NmEditorSendMessageAnimation);
   340 				}
   353 				}
   341 	        }
   354 	        }
   342             mBackButtonPressed = false;
   355             mBackButtonPressed = false;
       
   356 
       
   357             // Move the application to background if closing the message list view
       
   358             if (topViewId == NmUiViewMessageList && mViewStack->size() == 1) {
       
   359                 hideApplication();
       
   360                 return;
       
   361             }
       
   362 
   343             mViewStack->pop();
   363             mViewStack->pop();
   344             // Call custom exit function.
   364             // Call custom exit function.
   345             view->aboutToExitView();
   365             view->aboutToExitView();
   346             // Remove view from stack.
   366             // Remove view from stack.
   347             mMainWindow->removeView(view);
   367             mMainWindow->removeView(view);