diff -r 05bc53fe583b -r 83ca720e2b9a connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ChangeConnectionDlg.cpp --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ChangeConnectionDlg.cpp Tue Aug 31 15:35:44 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/ChangeConnectionDlg.cpp Wed Sep 01 12:23:51 2010 +0100 @@ -27,7 +27,8 @@ #include #include -#include +#include +#include #include "ChangeConnectionDlg.h" #include "ActiveCChangeConnectionDlg.h" @@ -36,10 +37,18 @@ // CONSTANTS +// ROM folder +_LIT( KDriveZ, "z:" ); + +// Name of the MBM file containing icons +_LIT( KFileIcons, "ApSettings.mbm" ); + #if defined(_DEBUG) _LIT( KErrNullPointer, "NULL pointer" ); #endif +LOCAL_D const TInt KIconsGranularity = 4; + // ================= MEMBER FUNCTIONS ======================= @@ -52,8 +61,7 @@ iIAPId( aIAPId ), iConnectionName( aConnectionName ), iIsWLANFeatureSupported( EFalse ), - iActiveDlg( aActiveDlg ), - iExpiryTimer( NULL ) + iActiveDlg( aActiveDlg ) { } @@ -158,6 +166,8 @@ SetItemTextArray( iActiveDlg->ActIAPs() ); SetOwnershipType( ELbmDoesNotOwnItemArray ); + SetIconsL(); + // Timer not in use due the unresolved crash //iExpiryTimer = CExpiryTimer::NewL( *this ); //iExpiryTimer->Start(); @@ -186,6 +196,67 @@ } +// --------------------------------------------------------- +// CChangeConnectionDlg::SetIconsL() +// --------------------------------------------------------- +// +void CChangeConnectionDlg::SetIconsL() + { + CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( + KIconsGranularity ); + CleanupStack::PushL( icons ); + + MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); + + TFileName iconsFileName; + + iconsFileName.Append( KDriveZ ); + + iconsFileName.Append( KDC_APP_BITMAP_DIR ); + + iconsFileName.Append( KFileIcons ); + + icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, + KAknsIIDQgnPropWmlGprs, + iconsFileName, + EMbmApsettingsQgn_prop_wml_gprs, + EMbmApsettingsQgn_prop_wml_gprs_mask ) ); + + icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, + KAknsIIDQgnPropWmlCsd, + iconsFileName, + EMbmApsettingsQgn_prop_wml_csd, + EMbmApsettingsQgn_prop_wml_csd_mask ) ); + + icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, + KAknsIIDQgnPropWmlHscsd, + iconsFileName, + EMbmApsettingsQgn_prop_wml_hscsd, + EMbmApsettingsQgn_prop_wml_hscsd_mask ) ); + + if ( iIsWLANFeatureSupported ) + { + icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, + KAknsIIDQgnPropWlanEasy, + iconsFileName, + EMbmApsettingsQgn_prop_wlan_easy, + EMbmApsettingsQgn_prop_wlan_easy_mask ) ); + + icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, + KAknsIIDQgnPropWlanBearer, + iconsFileName, + EMbmApsettingsQgn_prop_wlan_bearer, + EMbmApsettingsQgn_prop_wlan_bearer_mask ) ); + } + + SetIconArrayL( icons ); + + CleanupStack::Pop( icons ); + } + + + + // ---------------------------------------------------------------------------- // void CChangeConnectionDlg::HandleResourceChange( TInt aType ) // Handle resource change events. @@ -197,6 +268,7 @@ { CAknListQueryDialog::HandleResourceChange( aType ); + TRAP_IGNORE( SetIconsL() ); SizeChanged(); } else