phonebookui/Phonebook2/GroupExtension/src/CPguGroupNameQueryDlg.cpp
branchRCL_3
changeset 9 0d28c1c5b6dd
parent 6 e8e3147d53eb
equal deleted inserted replaced
8:5586b4d2ec3e 9:0d28c1c5b6dd
    21 // Phonebook 2
    21 // Phonebook 2
    22 #include "Pbk2GroupConsts.h"
    22 #include "Pbk2GroupConsts.h"
    23 #include <MPbk2ContactNameFormatter.h>
    23 #include <MPbk2ContactNameFormatter.h>
    24 #include <Pbk2GroupUIRes.rsg>
    24 #include <Pbk2GroupUIRes.rsg>
    25 #include <Pbk2PresentationUtils.h>
    25 #include <Pbk2PresentationUtils.h>
       
    26 #include <CPbk2AppUiBase.h>
       
    27 #include <MPbk2StartupMonitor.h>
    26 
    28 
    27 // Virtual Phonebook
    29 // Virtual Phonebook
    28 #include <MVPbkContactGroup.h>
    30 #include <MVPbkContactGroup.h>
    29 #include <MVPbkContactStore.h>
    31 #include <MVPbkContactStore.h>
    30 #include <MVPbkContactViewBase.h>
    32 #include <MVPbkContactViewBase.h>
    72 // CPguGroupNameQueryDlg::~CPguGroupNameQueryDlg
    74 // CPguGroupNameQueryDlg::~CPguGroupNameQueryDlg
    73 // --------------------------------------------------------------------------
    75 // --------------------------------------------------------------------------
    74 //
    76 //
    75 CPguGroupNameQueryDlg::~CPguGroupNameQueryDlg()
    77 CPguGroupNameQueryDlg::~CPguGroupNameQueryDlg()
    76     {
    78     {
       
    79     iCoeEnv->RemoveForegroundObserver( *this );
    77     delete iOriginalName;
    80     delete iOriginalName;
    78     }
    81     }
    79 
    82 
    80 // --------------------------------------------------------------------------
    83 // --------------------------------------------------------------------------
    81 // CPguGroupNameQueryDlg::ConstructL
    84 // CPguGroupNameQueryDlg::ConstructL
    91 
    94 
    92     if ( aNameGeneration )
    95     if ( aNameGeneration )
    93         {
    96         {
    94         UpdateGroupTitleL();
    97         UpdateGroupTitleL();
    95         }
    98         }
       
    99     iCoeEnv->AddForegroundObserverL( *this );
    96     }
   100     }
    97 
   101 
    98 // --------------------------------------------------------------------------
   102 // --------------------------------------------------------------------------
    99 // CPguGroupNameQueryDlg::NewL
   103 // CPguGroupNameQueryDlg::NewL
   100 // --------------------------------------------------------------------------
   104 // --------------------------------------------------------------------------
   207         }
   211         }
   208 
   212 
   209     return ret;
   213     return ret;
   210     }
   214     }
   211 
   215 
       
   216 // --------------------------------------------------------------------------
       
   217 // CPguGroupNameQueryDlg::HandleLosingForeground
       
   218 // --------------------------------------------------------------------------
       
   219 //
       
   220 void CPguGroupNameQueryDlg::HandleLosingForeground() 
       
   221     {           
       
   222     }
       
   223 
       
   224 // --------------------------------------------------------------------------
       
   225 // CPguGroupNameQueryDlg::HandleGainingForeground
       
   226 // --------------------------------------------------------------------------
       
   227 //
       
   228 void CPguGroupNameQueryDlg::HandleGainingForeground() 
       
   229     {
       
   230     MPbk2AppUi* pbk2AppUI = NULL;
       
   231     pbk2AppUI = Phonebook2::Pbk2AppUi();
       
   232     
       
   233     if ( pbk2AppUI && pbk2AppUI->Pbk2StartupMonitor() )
       
   234         {
       
   235         TAny* extension = pbk2AppUI->Pbk2StartupMonitor()
       
   236                 ->StartupMonitorExtension( KPbk2StartupMonitorExtensionUid );
       
   237 
       
   238         if( extension )
       
   239             {
       
   240             MPbk2StartupMonitorExtension* startupMonitorExtension =
       
   241                     static_cast<MPbk2StartupMonitorExtension*>( extension );
       
   242 
       
   243             if( startupMonitorExtension )
       
   244                 {
       
   245                 startupMonitorExtension->DisableMonitoring();
       
   246                 }
       
   247             }
       
   248         }
       
   249     }
       
   250 
   212 // End of File
   251 // End of File