cmmanager/cmmgr/Framework/Src/cmdlg.cpp
branchRCL_3
changeset 13 c14618f9de99
parent 10 ea6e024ea6f9
child 14 22c3c67e5001
equal deleted inserted replaced
12:4dc3bb0099b0 13:c14618f9de99
   105                 CDestDlg* aDestDlg )
   105                 CDestDlg* aDestDlg )
   106     : iModelPassed( EFalse )
   106     : iModelPassed( EFalse )
   107     , iCmManager( aCmManager )
   107     , iCmManager( aCmManager )
   108     , iDestUid ( aDestUid )
   108     , iDestUid ( aDestUid )
   109     , iPrioritising ( EFalse )
   109     , iPrioritising ( EFalse )
   110     , iExitReason( KDialogUserBack )
   110     , iExitReason( KDialogUserExit )
   111     , iEscapeArrived( EFalse )
   111     , iEscapeArrived( EFalse )
   112     , iExitduringProcessing( EFalse )
   112     , iExitduringProcessing( EFalse )
   113     , iBackduringProcessing( EFalse )
   113     , iBackduringProcessing( EFalse )
   114     , iDestDlg( aDestDlg )
   114     , iDestDlg( aDestDlg )
   115     {
   115     {
   134     if ( iTitlePane )
   134     if ( iTitlePane )
   135         {
   135         {
   136         // set old text back, if we have it...
   136         // set old text back, if we have it...
   137         if ( iOldTitleText )
   137         if ( iOldTitleText )
   138             {
   138             {
   139             TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
   139             if ( iExitReason == KDialogUserBack )
       
   140                 {
       
   141                 TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) );
       
   142                 }
   140             delete iOldTitleText; iOldTitleText = NULL;
   143             delete iOldTitleText; iOldTitleText = NULL;
   141             }
   144             }
   142         }    
   145         }    
   143         
   146         
   144     delete iOldTitleText;
   147     delete iOldTitleText;
   444             break;
   447             break;
   445             }
   448             }
   446         case EAknSoftkeyBack:
   449         case EAknSoftkeyBack:
   447             {
   450             {
   448             iCmManager->WatcherUnRegister();
   451             iCmManager->WatcherUnRegister();
       
   452             iExitReason = KDialogUserBack;
   449             
   453             
   450             if ( !iProcessing )
   454             if ( !iProcessing )
   451                 {
   455                 {
   452                 *iSelected = 0;
   456                 *iSelected = 0;
   453                 TryExitL( iExitReason );
   457                 TryExitL( iExitReason );
   630             break;
   634             break;
   631             }
   635             }
   632             
   636             
   633         case ECmManagerUiCmdCmUserExit:
   637         case ECmManagerUiCmdCmUserExit:
   634             {
   638             {
   635             iExitReason = KDialogUserExit;
   639             if (!iProcessing)
       
   640                 {
       
   641                 *iSelected = 0;
       
   642                 iExitReason = KDialogUserExit;
       
   643                 TryExitL( iExitReason );
       
   644                 }
       
   645             break;
   636             }
   646             }
   637             
   647             
   638         case EAknSoftkeyBack:
   648         case EAknSoftkeyBack:
   639             {
   649             {
   640             if (!iProcessing)
   650             if (!iProcessing)
   641                 {
   651                 {
   642                 *iSelected = 0;
   652                 *iSelected = 0;
       
   653                 iExitReason = KDialogUserBack;
   643                 TryExitL( iExitReason );
   654                 TryExitL( iExitReason );
   644                 }
   655                 }
   645             break;
   656             break;
   646             }
   657             }
   647         case EAknCmdHelp:
   658         case EAknCmdHelp:
   838                 if (iCmManager->IsDefConnSupported())
   849                 if (iCmManager->IsDefConnSupported())
   839                     {
   850                     {
   840                     iDestDlg->ShowDefaultConnectionNoteL( oldConn );
   851                     iDestDlg->ShowDefaultConnectionNoteL( oldConn );
   841                     }
   852                     }
   842                 HandleListboxDataChangeL();
   853                 HandleListboxDataChangeL();
       
   854                 iListbox->HandleItemRemovalL();
   843                 }
   855                 }
   844                 break;
   856                 break;
   845 
   857 
   846             default:
   858             default:
   847                 {
   859                 {
  1977         // If the destination that is currently working on disappears
  1989         // If the destination that is currently working on disappears
  1978         // with some reason then go back to parent view
  1990         // with some reason then go back to parent view
  1979         if( !iCmManager->DestinationStillExistedL( iCmDestinationImpl ) )
  1991         if( !iCmManager->DestinationStillExistedL( iCmDestinationImpl ) )
  1980             {
  1992             {
  1981             iCmManager->WatcherUnRegister();
  1993             iCmManager->WatcherUnRegister();
       
  1994             iExitReason = KDialogUserBack;
  1982             TryExitL( iExitReason );
  1995             TryExitL( iExitReason );
  1983             return;
  1996             return;
  1984             }
  1997             }
  1985         }
  1998         }
  1986     
  1999