presencesettingsui/src/psuigspluginsettingview.cpp
changeset 13 b7e70c0792e6
parent 0 c8caa15ef882
equal deleted inserted replaced
12:e6a66db4e9d0 13:b7e70c0792e6
    69 // ---------------------------------------------------------------------------
    69 // ---------------------------------------------------------------------------
    70 //
    70 //
    71 void CPSUIGSPluginSettingView::ConstructL()
    71 void CPSUIGSPluginSettingView::ConstructL()
    72     {
    72     {
    73     // base construct
    73     // base construct
    74     BaseConstructL( R_PSUI_SETTING_VIEW );
       
    75     iAppUi = AppUi();
    74     iAppUi = AppUi();
    76     }
    75     }
    77 
    76 
    78 // ---------------------------------------------------------------------------
    77 // ---------------------------------------------------------------------------
    79 // CPSUIGSPluginSettingView::NewL()
    78 // CPSUIGSPluginSettingView::NewL()
   223     
   222     
   224     // compulsory-field handling
   223     // compulsory-field handling
   225     if ( !psModel->AllCompulsoryFieldsFilled())
   224     if ( !psModel->AllCompulsoryFieldsFilled())
   226         {// empty compulsory fields found
   225         {// empty compulsory fields found
   227         okToSave = EFalse;
   226         okToSave = EFalse;
   228         HBufC* string = StringLoader::LoadLC( 
       
   229             R_QTN_PRESENCE_SETTINGS_NOT_FILLED );
       
   230         CAknQueryDialog* query = CAknQueryDialog::NewL( 
       
   231             CAknQueryDialog::EConfirmationTone );        
       
   232         if ( !query->ExecuteLD( R_PSUI_CONF_QUERY,  *string ))
       
   233             {
       
   234             okToGoBack = EFalse;
       
   235             }
       
   236         CleanupStack::PopAndDestroy( string );// string         
       
   237         }
   227         }
   238         
   228         
   239     // same name checking        
   229     // same name checking        
   240     if ( okToSave && HandleDuplicatePSNamesL() )
   230     if ( okToSave && HandleDuplicatePSNamesL() )
   241         {// same name found
   231         {// same name found
   292 // ---------------------------------------------------------------------------
   282 // ---------------------------------------------------------------------------
   293 // 
   283 // 
   294 TBool CPSUIGSPluginSettingView::HandleDuplicatePSNamesL()
   284 TBool CPSUIGSPluginSettingView::HandleDuplicatePSNamesL()
   295     {
   285     {
   296     TBool found = iMainView->PSModel()->IsItDuplicatePSName();
   286     TBool found = iMainView->PSModel()->IsItDuplicatePSName();
   297     if ( found )
       
   298         {
       
   299         HBufC* fullText = StringLoader::LoadLC( 
       
   300             R_QTN_PRESENCE_SETTINGS_NAME_EXISTS, 
       
   301             iMainView->PSModel()->SettingsSet().iSetName );
       
   302         CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); //wait-flag on
       
   303         note->ExecuteLD( *fullText );
       
   304         CleanupStack::PopAndDestroy( fullText );
       
   305         }
       
   306     return found;
   287     return found;
   307     }
   288     }
   308 
   289 
   309 // ---------------------------------------------------------------------------
   290 // ---------------------------------------------------------------------------
   310 // CPSUIGSPluginSettingView::MainView()
   291 // CPSUIGSPluginSettingView::MainView()