XDMSettingsUI/src/XDMPluginSLContainer.cpp
branchRCL_3
changeset 11 b4758b4b2d20
parent 7 895b8e06c769
child 18 52d91a16fec3
equal deleted inserted replaced
10:96b99892dd80 11:b4758b4b2d20
    34 #include    <StringLoader.h>
    34 #include    <StringLoader.h>
    35 #include    <XdmSettingsCollection.h>
    35 #include    <XdmSettingsCollection.h>
    36 #include    <AknQueryDialog.h>
    36 #include    <AknQueryDialog.h>
    37 #include    <aknnotewrappers.h>
    37 #include    <aknnotewrappers.h>
    38 #include    <aknnotedialog.h>
    38 #include    <aknnotedialog.h>
       
    39 #include    <escapeutils.h>
    39 
    40 
    40 #include    "XDMPluginSLContainer.h"
    41 #include    "XDMPluginSLContainer.h"
    41 #include    "XDMPluginSettinglist.h"
    42 #include    "XDMPluginSettinglist.h"
    42 #include    "SettingsData.h"
    43 #include    "SettingsData.h"
    43 
    44 
   232     iSettingList->GetAccessPointNameL(iData->iAccessPoint, iData->iAccessPointName);
   233     iSettingList->GetAccessPointNameL(iData->iAccessPoint, iData->iAccessPointName);
   233     if ( (iData->iAccessPointName) == KNullDesC) // if name is not found
   234     if ( (iData->iAccessPointName) == KNullDesC) // if name is not found
   234         {
   235         {
   235         iData->iAccessPoint = -1;
   236         iData->iAccessPoint = -1;
   236         }
   237         }
   237 
   238     
   238     iData->iUserID = xDMSet->Property(EXdmPropAuthName);
   239     TBuf<KMaxUserIDLength> username = xDMSet->Property( EXdmPropAuthName );
       
   240     
       
   241     // to show special chars in UI correctly
       
   242     _LIT( KProcent, "%" );
       
   243     if ( username.Find( KProcent ) != KErrNotFound )
       
   244         {
       
   245         // convert to 8 bit
       
   246         HBufC8* tmp = HBufC8::NewLC( username.Length() );
       
   247         tmp->Des().Copy( username );
       
   248         
       
   249         // Decode encoded username
       
   250         HBufC8* decodedUsername = EscapeUtils::EscapeDecodeL( *tmp );
       
   251         CleanupStack::PopAndDestroy( tmp );
       
   252         CleanupStack::PushL( decodedUsername );
       
   253         
       
   254         // convert to unicode
       
   255         HBufC* userName16 =
       
   256              EscapeUtils::ConvertToUnicodeFromUtf8L( decodedUsername->Des() );
       
   257         CleanupStack::PopAndDestroy( decodedUsername );        
       
   258         username = userName16->Des();
       
   259         delete userName16;
       
   260         }
       
   261     
       
   262     iData->iUserID = username;
   239     iData->iPassword = xDMSet->Property(EXdmPropAuthSecret);
   263     iData->iPassword = xDMSet->Property(EXdmPropAuthSecret);
   240     
   264     
   241     CleanupStack::PopAndDestroy(1); //xDMSet
   265     CleanupStack::PopAndDestroy(1); //xDMSet
   242     iSettingList->LoadSettingsL();
   266     iSettingList->LoadSettingsL();
   243     SetTitlePaneTextL(iData->iSettingName);
   267     SetTitlePaneTextL(iData->iSettingName);