# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271420515 -10800 # Node ID b7e70c0792e6a4ecb2b256fb305adc72e6e4ef00 # Parent e6a66db4e9d01a187c749957e60b75ff91cb7f6a Revision: 201011 Kit: 201015 diff -r e6a66db4e9d0 -r b7e70c0792e6 XDMSettingsUI/data/10207428.rss --- a/XDMSettingsUI/data/10207428.rss Fri Mar 19 09:37:41 2010 +0200 +++ b/XDMSettingsUI/data/10207428.rss Fri Apr 16 15:21:55 2010 +0300 @@ -47,4 +47,4 @@ } }; } - \ No newline at end of file + diff -r e6a66db4e9d0 -r b7e70c0792e6 XDMSettingsUI/inc/XDMPlugin.h --- a/XDMSettingsUI/inc/XDMPlugin.h Fri Mar 19 09:37:41 2010 +0200 +++ b/XDMSettingsUI/inc/XDMPlugin.h Fri Apr 16 15:21:55 2010 +0300 @@ -25,7 +25,6 @@ #include #include #include -#include #include "XDMPlugin.hrh" @@ -48,7 +47,7 @@ * * This is XDM GS plugin. */ -class CXDMPlugin : public CGSPluginInterface +class CXDMPlugin { public: // Constructors and destructor @@ -136,24 +135,6 @@ */ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - public: // From CGSPluginInterface - - /** - * See CGSPluginInterface - */ - void GetCaptionL( TDes& aCaption ) const; - - /** - * See CGSPluginInterface - */ - TInt PluginProviderCategory() const; - - /** - * @see CGSPluginInterface - */ - CGulIcon* CreateIconL( const TUid aIconType ); - - protected: //Data // Reference to application UI - not owned. diff -r e6a66db4e9d0 -r b7e70c0792e6 XDMSettingsUI/src/XDMPlugin.cpp --- a/XDMSettingsUI/src/XDMPlugin.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/XDMSettingsUI/src/XDMPlugin.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -42,11 +41,9 @@ // Constants -_LIT( KGSXDMPluginResourceFileName, "z:\\resource\\XDMPluginRsc.rsc" ); #ifdef __SCALABLE_ICONS // bitmap -_LIT( KGSXDMPluginIconFileName, "\\resource\\apps\\GSXDMplugin.mif"); #else //__SCALABLE_ICONS // svg file _LIT( KGSXDMPluginIconFileName, "\\resource\\apps\\GSXDMplugin.mbm"); @@ -62,7 +59,7 @@ // --------------------------------------------------------------------------- // CXDMPlugin::CXDMPlugin( ) - : iAppUi( CAknView::AppUi() ), iResources( *CCoeEnv::Static() ) + : iResources( *CCoeEnv::Static() ) { } @@ -76,9 +73,6 @@ { if (iCurrentContainer) { - if(iAppUi) - iAppUi->RemoveFromViewStack( *this, iCurrentContainer ); - iCurrentContainer = NULL; } if( iMainListContainer ) @@ -111,14 +105,7 @@ #ifdef _DEBUG RDebug::Print(_L("[CXDMPlugin] ConstructL()" )); RDebug::Print( _L( "[CXDMPlugin] Loading resource from :" ) ); - RDebug::Print( KGSXDMPluginResourceFileName ); #endif - - TFileName fileName( KGSXDMPluginResourceFileName ); - BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); - iResources.OpenL( fileName ); - BaseConstructL( R_GS_XDM_MAIN_VIEW ); - } // --------------------------------------------------------------------------- @@ -151,12 +138,10 @@ { if ( iMainListContainer->IsVisible() ) { - iMainListContainer->SetRect( ClientRect() ); } if ( iSettingListContainer->IsVisible() ) { - iSettingListContainer->SetRect( ClientRect() ); } } @@ -171,7 +156,6 @@ iPrevViewId = aPrevViewId; if (iCurrentContainer) { - iAppUi->RemoveFromViewStack( *this, iCurrentContainer ); iCurrentContainer = NULL; } @@ -188,30 +172,9 @@ iSettingListContainer = NULL; } - iMainListContainer = new( ELeave ) CXDMPluginContainer(this); - iMainListContainer->SetMopParent(this); - TRAPD( error, iMainListContainer->ConstructL( ClientRect() ) ); - if (error) - { - delete iMainListContainer; - iMainListContainer = NULL; - User::Leave( error ); - } - - iSettingListContainer = new( ELeave ) CXDMPluginSLContainer(this); - iSettingListContainer->SetMopParent(this); - TRAPD( error1, iSettingListContainer->ConstructL( ClientRect())); - if (error1) - { - delete iSettingListContainer; - iSettingListContainer = NULL; - User::Leave( error1 ); - } - // switching control iSettingListContainer->MakeVisible(EFalse); iCurrentContainer = iMainListContainer; - iAppUi->AddToViewStackL( *this, iCurrentContainer ); UpdateMSK(); } @@ -225,8 +188,6 @@ TInt err; if (iCurrentContainer == iSettingListContainer) TRAP(err, iSettingListContainer->SaveSettingsIfPossibleL()); - if (iCurrentContainer) - iAppUi->RemoveFromViewStack( *this, iCurrentContainer ); iCurrentContainer = NULL; if( iMainListContainer ) @@ -277,7 +238,6 @@ UpdateMSK(); break; case EAknCmdHelp: - HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL ()); break; case EGSXDMPluginCmdExitFromSL: if (iCurrentContainer == iSettingListContainer) @@ -299,24 +259,6 @@ } // --------------------------------------------------------------------------- -// CXDMPlugin::GetCaptionL() -// --------------------------------------------------------------------------- -// -void CXDMPlugin::GetCaptionL( TDes& aCaption ) const - { - StringLoader::Load( aCaption, R_STR_XDM_SETTINGS ); - } - -// --------------------------------------------------------------------------- -// CXDMPlugin::PluginProviderCategory() -// --------------------------------------------------------------------------- -// -TInt CXDMPlugin::PluginProviderCategory() const - { - return KGSPluginProviderInternal; - } - -// --------------------------------------------------------------------------- // CXDMPlugin::LoadSettingsViewL() // --------------------------------------------------------------------------- // @@ -336,10 +278,7 @@ default: break; } - if (iCurrentContainer) - iAppUi->RemoveFromViewStack( *this, iCurrentContainer ); iCurrentContainer = iSettingListContainer; - iAppUi->AddToViewStackL( *this, iCurrentContainer ); iMainListContainer->MakeVisible(EFalse); iSettingListContainer->MakeVisible(ETrue); UpdateMSK(); @@ -353,10 +292,7 @@ { TInt err(KErrNone); TRAP(err,iMainListContainer->LoadSettingsListArrayL()); // update main container - if (iCurrentContainer) - iAppUi->RemoveFromViewStack( *this, iCurrentContainer ); iCurrentContainer = iMainListContainer; - iAppUi->AddToViewStackL( *this, iCurrentContainer ); iMainListContainer->SetFocusIfExist(iSettingListContainer->GetCurrentSetName()); @@ -412,36 +348,12 @@ // void CXDMPlugin::HandleResourceChangeManual(TInt aType) { - if (iMainListContainer) + if ( iSettingListContainer ) iSettingListContainer->HandleResourceChangeManual(aType); - if (iSettingListContainer) + if ( iMainListContainer ) iMainListContainer->HandleResourceChangeManual(aType); } -// --------------------------------------------------------------------------- -// CXDMPlugin::CreateIconL -// --------------------------------------------------------------------------- -// -CGulIcon* CXDMPlugin::CreateIconL( const TUid aIconType ) - { - CGulIcon* icon; - - if( aIconType == KGSIconTypeLbxItem ) - { - icon = AknsUtils::CreateGulIconL( - AknsUtils::SkinInstance(), - KAknsIIDQgnPropSetConnXdm, - KGSXDMPluginIconFileName, - EMbmGsxdmpluginQgn_prop_set_conn_xdm, - EMbmGsxdmpluginQgn_prop_set_conn_xdm_mask); - } - else - { - icon = CGSPluginInterface::CreateIconL( aIconType ); - } - - return icon; - } // --------------------------------------------------------------------------- // CXDMPlugin::UpdateMSK() @@ -449,19 +361,6 @@ // void CXDMPlugin::UpdateMSK() { - CEikCba* cba = static_cast< CEikCba* >( Cba()->ButtonGroup() ); - if(iCurrentContainer==iMainListContainer) - { - TBool showEdit = !(iMainListContainer->IsListEmpty()); - cba->SetCommandSetL(R_XDMUI_MAINVIEW_SOFTKEYS); - cba->MakeCommandVisible( EGSXDMPluginCmdEdit, showEdit ); - } - else if(iCurrentContainer==iSettingListContainer) - { - cba->SetCommandSetL(R_XDMUI_MAINVIEW_SOFTKEYS_SL); - cba->MakeCommandVisible( EGSXDMPluginCmdChange, ETrue); - } - cba->DrawNow(); } // End of file diff -r e6a66db4e9d0 -r b7e70c0792e6 XDMSettingsUI/src/XDMPluginContainer.cpp --- a/XDMSettingsUI/src/XDMPluginContainer.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/XDMSettingsUI/src/XDMPluginContainer.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -165,8 +165,6 @@ TPtrC16 xDMSetNameClipped; xDMSetName.Set(iSettingListArray->MdcaPoint(iMainList->CurrentItemIndex())); xDMSetNameClipped.Set(xDMSetName.Mid(1)); // remove '/t' from the begining - CXDMPlugin* iTempView = static_cast (iView); - iTempView->LoadSettingsViewL(EEditExisting, xDMSetNameClipped); } // --------------------------------------------------------------------------- @@ -202,8 +200,6 @@ { if(!IsListEmpty()) DeleteSetProcedureL(); - CXDMPlugin* iTempView = static_cast (iView); - iTempView->UpdateMSK(); return EKeyWasConsumed; } else @@ -246,7 +242,6 @@ void CXDMPluginContainer::LoadSettingsListArrayL() { iTitlePane->SetTextL(iTitle); - _LIT (KStringHeader, "\t%S"); TBuf myString; // maximum name + \t RArray settingIds; CleanupClosePushL(settingIds); @@ -262,9 +257,6 @@ iSettingListArray->Reset(); for (TInt i = 0; i< xdmSetListCount; i++) { - myString.Format(KStringHeader, &(xdmSetList->MdcaPoint(i))); - AknTextUtils::LanguageSpecificNumberConversion(myString); - iSettingListArray->AppendL (myString); } iSettingListArray->Sort(ECmpCollated); CleanupStack::PopAndDestroy(2); //xdmSetList,settingIds @@ -397,8 +389,6 @@ if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch ) { - CXDMPlugin* iTempView = static_cast (iView); - iTempView->HandleResourceChangeManual(aType); } CCoeControl::HandleResourceChange( aType ); } diff -r e6a66db4e9d0 -r b7e70c0792e6 XDMSettingsUI/src/XDMPluginSLContainer.cpp --- a/XDMSettingsUI/src/XDMPluginSLContainer.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/XDMSettingsUI/src/XDMPluginSLContainer.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -714,8 +714,6 @@ if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch ) { - CXDMPlugin* iTempView = static_cast (iView); - iTempView->HandleResourceChangeManual(aType); } } diff -r e6a66db4e9d0 -r b7e70c0792e6 XDMSettingsUI/src/XDMPluginSettinglist.cpp --- a/XDMSettingsUI/src/XDMPluginSettinglist.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/XDMSettingsUI/src/XDMPluginSettinglist.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -243,21 +242,6 @@ // void CXDMPluginSettinglist::EditAccessPointL() { - TCmSettingSelection selectionUid; - CCmApplicationSettingsUi* settingsUi = CCmApplicationSettingsUi::NewLC(); - // All Connection Methods will be listed if bearerFilter array has no element. - TBearerFilterArray bearerFilter; - CleanupClosePushL( bearerFilter ); - settingsUi->RunApplicationSettingsL( selectionUid , - CMManager::EShowConnectionMethods, - bearerFilter ); - CleanupStack::PopAndDestroy( &bearerFilter ); - CleanupStack::PopAndDestroy( settingsUi ); - - if ( selectionUid.iResult == CMManager::EConnectionMethod ) - { - iSettingsData.iAccessPoint = selectionUid.iId; - } } // ----------------------------------------------------------------------------- diff -r e6a66db4e9d0 -r b7e70c0792e6 package_definition.xml --- a/package_definition.xml Fri Mar 19 09:37:41 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/data/psuigspluginrsc.rss --- a/presencesettingsui/data/psuigspluginrsc.rss Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/data/psuigspluginrsc.rss Fri Apr 16 15:21:55 2010 +0300 @@ -31,7 +31,6 @@ #include #include #include -#include // Common GS resource structures #include #include #include "psuigsplugin.hrh" diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/inc/psuigsplugin.h --- a/presencesettingsui/inc/psuigsplugin.h Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/inc/psuigsplugin.h Fri Apr 16 15:21:55 2010 +0300 @@ -23,13 +23,14 @@ // INCLUDES #include -#include +#include // FORWARD DECLARATIONS class CPSUIGSPluginContainer; class CPSUIGSPluginModel; // CLASS DECLARATION +class CEikMenuPane; /** * Header of CPSUIGSPlugin which implements the CGSPluginInterface. @@ -37,8 +38,7 @@ * @lib PSUIGSPlugin.lib * @since Series60_3.2 */ -class CPSUIGSPlugin : - public CGSBaseView, +class CPSUIGSPlugin : public MCoeViewDeactivationObserver { @@ -83,36 +83,6 @@ void HandleCommandL( TInt aCommand ); /** - * From CGSBaseView - * See base class. - */ - void NewContainerL(); - - /** - * From CGSBaseView - * See base class. - */ - void HandleListBoxSelectionL(); - - /** - * From CGSPluginInterface - * See base class. - */ - void GetCaptionL( TDes& aCaption ) const; - - /** - * From CGSPluginInterface - * See base class. - */ - TInt PluginProviderCategory() const; - - /** - * From CGSPluginInterface - * See base class. - */ - CGulIcon* CreateIconL( const TUid aIconType ); - - /** * From MEikMenuObserver * See base class. */ @@ -201,8 +171,7 @@ // Presence UI model CPSUIGSPluginModel* iPSModel; - // Presence Setting view - CAknView* iSettingView; + // Indicates when PSUIGSPlugin's views are closed TBool iClosing; // Previous view diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/inc/psuigsplugincontainer.h --- a/presencesettingsui/inc/psuigsplugincontainer.h Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/inc/psuigsplugincontainer.h Fri Apr 16 15:21:55 2010 +0300 @@ -22,7 +22,6 @@ #define PSUIGSPLUGINCONTAINER_H // INCLUDES -#include // FORWARD DECLARATIONS class CPSUIGSPlugin; @@ -33,7 +32,7 @@ * CPSUIGSPluginContainer container class * @since Series60_3.2 */ -class CPSUIGSPluginContainer : public CGSBaseContainer +class CPSUIGSPluginContainer { public: // Constructors and destructor @@ -47,21 +46,7 @@ */ ~CPSUIGSPluginContainer(); - private: // Functions from base classes - - /** - * From CGSBaseContainer - * See base class. - */ - void ConstructListBoxL( TInt aResLbxId ); - - /** - * From CGSBaseContainer - * See base class. - */ - TKeyResponse OfferKeyEventL( - const TKeyEvent& aKeyEvent, - TEventCode aType ); + private: // Functions from base classes /** * From CCoeControl diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/src/psuigsplugin.cpp --- a/presencesettingsui/src/psuigsplugin.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/src/psuigsplugin.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -20,11 +20,8 @@ // INCLUDE FILES #include -#include -#include #include #include -#include #include #include #include @@ -44,11 +41,9 @@ #include "psuigspluginsettingview.h" // CONSTANTS -_LIT( KPSUIGSPluginResourceFileName, "z:\\resource\\psuigspluginrsc.rsc" ); #ifdef __SCALABLE_ICONS // bitmap -_LIT( KPSUIGSPluginIconFileName, "\\resource\\apps\\psuigsplugin.mif"); #else //__SCALABLE_ICONS // svg file _LIT( KPSUIGSPluginIconFileName, "\\resource\\apps\\psuigsplugin.mbm"); @@ -85,13 +80,6 @@ // void CPSUIGSPlugin::ConstructL() { - // preparing resources for use - TFileName fileName( KPSUIGSPluginResourceFileName ); - BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName ); - iResourceLoader.OpenL( fileName ); - // base construct (base needs the resources to be loaded 1st) - BaseConstructL( R_PSUI_MAIN_VIEW ); - FeatureManager::InitializeLibL(); } // --------------------------------------------------------------------------- @@ -119,23 +107,13 @@ } // --------------------------------------------------------------------------- -// CPSUIGSPlugin::NewContainerL() -// See header for details. -// --------------------------------------------------------------------------- -// -void CPSUIGSPlugin::NewContainerL() - { - iContainer = new ( ELeave ) CPSUIGSPluginContainer( this ); - } - -// --------------------------------------------------------------------------- // CPSUIGSPlugin::DoActivateL() // See header for details. // --------------------------------------------------------------------------- // void CPSUIGSPlugin::DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ) + TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/ ) { if ( KPreSettingViewId != aPrevViewId.iViewUid ) { @@ -145,18 +123,15 @@ // model & observer constructed only when needed if ( !iPSModel ) { - iPSModel = CPSUIGSPluginModel::NewL(); - iAppUi->AddViewDeactivationObserverL( this ); + iPSModel = CPSUIGSPluginModel::NewL(); } const TInt id = iPSModel->SettingsId(); if ( id ) {// readjust the focus - SetCurrentItem( iPSModel->SettingsIDArray().Find( id )); } iClosing = EFalse; - CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage ); UpdateMSK(); } @@ -167,13 +142,10 @@ // void CPSUIGSPlugin::DoDeactivate() { - CGSBaseView::DoDeactivate(); if ( iClosing ) {// PSUI plugin is going to be closed so it is safe to free some memory delete iPSModel; iPSModel = NULL; - delete iSettingView; - iSettingView = NULL; } } @@ -190,7 +162,6 @@ iPSUIGSPrevViewId.iViewUid == aNewlyActivatedViewId.iViewUid ) { iClosing = ETrue; - iAppUi->RemoveViewDeactivationObserver( this ); } } @@ -206,12 +177,10 @@ case EAknSoftkeyBack: { RemoveSettingView(); - iAppUi->ActivateLocalViewL( iPSUIGSPrevViewId.iViewUid ); break; } case EPSUICmdEdit: { - HandleListBoxSelectionL(); break; } case EPSUICmdDelete: @@ -233,14 +202,11 @@ { if( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) { - HlpLauncher::LaunchHelpApplicationL( - iEikonEnv->WsSession(), iAppUi->AppHelpContextL() ); } break; } default: { - iAppUi->HandleCommandL( aCommand ); break; } } @@ -251,30 +217,9 @@ // See header for details. // --------------------------------------------------------------------------- // -TInt CPSUIGSPlugin::SettingCountAndIndex( TInt& aIndex ) +TInt CPSUIGSPlugin::SettingCountAndIndex( TInt& /*aIndex*/ ) { - CEikTextListBox* listbox = Container()->iListBox;// not owned - TInt count = listbox->Model()->NumberOfItems(); - aIndex = count ? listbox->CurrentItemIndex() : KErrNotFound; - - return count; - } - -// --------------------------------------------------------------------------- -// CPSUIGSPlugin::HandleListBoxSelectionL() -// See header for details. -// --------------------------------------------------------------------------- -// -void CPSUIGSPlugin::HandleListBoxSelectionL() - { - TInt index = KErrNotFound; - if ( SettingCountAndIndex( index )) - { - iPSModel->EditSettingsL( index ); - - ConstructSettingViewL(); - iAppUi->ActivateLocalViewL( KPreSettingViewId ); - } + return KErrNone; } // --------------------------------------------------------------------------- @@ -291,10 +236,6 @@ if ( AcceptDeletionL( count, index )) { iPSModel->DeleteSettingsL( index, ETrue ); - CEikTextListBox* listbox = Container()->iListBox;// not owned - AknListBoxUtils::HandleItemRemovalAndPositionHighlightL( - listbox, index, ETrue ); - listbox->DrawNow(); UpdateMSK(); } } @@ -308,18 +249,15 @@ TBool CPSUIGSPlugin::AcceptDeletionL( TInt aCount, TInt aIndex ) { HBufC* currentName = iPSModel->SettingNameLC( aIndex ); - HBufC* string = NULL; if ( aCount == 1 ) { - string = StringLoader::LoadLC( R_QTN_PRESENCE_SETTINGS_DELETE_LAST, *currentName ); } else { - string = StringLoader::LoadLC( R_QTN_QUERY_COMMON_CONF_DELETE, *currentName ); } CAknQueryDialog* query = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt ok = query->ExecuteLD( R_PSUI_CONF_QUERY, *string ); + TInt ok = KErrNone; CleanupStack::PopAndDestroy( 2, currentName );//currentName, string @@ -327,77 +265,12 @@ } // --------------------------------------------------------------------------- -// CPSUIGSPlugin::GetCaptionL() -// See header for details. -// --------------------------------------------------------------------------- -// -void CPSUIGSPlugin::GetCaptionL( TDes& aCaption ) const - { - StringLoader::Load( aCaption, R_QTN_SET_FOLDER_PRESENCE ); - } - -// --------------------------------------------------------------------------- -// CPSUIGSPlugin::PluginProviderCategory() -// See header for details. -// --------------------------------------------------------------------------- -// -TInt CPSUIGSPlugin::PluginProviderCategory() const - { - return KGSPluginProviderInternal; - } - -// --------------------------------------------------------------------------- -// CPSUIGSPlugin::CreateIconL() -// See header for details. -// --------------------------------------------------------------------------- -// -CGulIcon* CPSUIGSPlugin::CreateIconL( const TUid aIconType ) - { - CGulIcon* icon = NULL; - if( aIconType == KGSIconTypeLbxItem ) - { - icon = AknsUtils::CreateGulIconL( - AknsUtils::SkinInstance(), - KAknsIIDQgnPropSetConnPresence, - KPSUIGSPluginIconFileName, - EMbmPsuigspluginQgn_prop_set_conn_presence, - EMbmPsuigspluginQgn_prop_set_conn_presence_mask ); - } - else - { - icon = CGSPluginInterface::CreateIconL( aIconType ); - } - - return icon; - } - -// --------------------------------------------------------------------------- // CPSUIGSPlugin::DynInitMenuPaneL() // See header for details. // --------------------------------------------------------------------------- // -void CPSUIGSPlugin::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane *aMenuPane ) +void CPSUIGSPlugin::DynInitMenuPaneL( TInt /*aResourceId*/, CEikMenuPane */*aMenuPane*/ ) { - // remove some of the items if no settings available - const TInt count = Container()->iListBox->Model()->NumberOfItems(); - if ( aResourceId == R_PSUI_MAINVIEW_MENUPANE && - 0 == count ) - { - aMenuPane->DeleteMenuItem( EPSUICmdEdit ); - aMenuPane->DeleteMenuItem( EPSUICmdDelete ); - } - if ( aResourceId == R_PSUI_NEWSETTINGS_MENU && - 0 == count ) - { - aMenuPane->DeleteMenuItem( EPSUICmdNewSettingsExisting ); - } - - // help-item handling - if ( aResourceId == R_PSUI_MAINVIEW_MENUPANE && - !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } } // --------------------------------------------------------------------------- @@ -418,14 +291,6 @@ // void CPSUIGSPlugin::ConstructSettingViewL() { - if ( !iSettingView ) - {// no view yet, construct it - CAknView* view = CPSUIGSPluginSettingView::NewL( this ); - CleanupStack::PushL( view ); - iAppUi->AddViewL( view ); - CleanupStack::Pop( view ); - iSettingView = view; - } } // --------------------------------------------------------------------------- @@ -435,12 +300,6 @@ // void CPSUIGSPlugin::RemoveSettingView() { - // Remove view from iAppUi -> View is deleted by iAppUi automatically. - if ( iSettingView ) - { - iAppUi->RemoveView( KPreSettingViewId ); - iSettingView = NULL; - } } // --------------------------------------------------------------------------- @@ -452,7 +311,6 @@ { iPSModel->CreateDefaultSettingsL(); ConstructSettingViewL(); - iAppUi->ActivateLocalViewL( KPreSettingViewId ); } // --------------------------------------------------------------------------- @@ -470,9 +328,6 @@ CAknPopupList::NewL( list, R_AVKON_SOFTKEYS_OK_CANCEL ); CleanupStack::PushL( popupList ); - HBufC* title = StringLoader::LoadLC( R_QTN_PRESENCE_PROPMT_USE_EXIST ); - popupList->SetTitleL( *title ); - CleanupStack::PopAndDestroy( title ); list->ConstructL( popupList, CEikListBox::ELeftDownInViewRect ); list->CreateScrollBarFrameL( ETrue ); @@ -492,7 +347,6 @@ { iPSModel->DuplicateExistingSettingsL( list->CurrentItemIndex() ); ConstructSettingViewL(); - iAppUi->ActivateLocalViewL( KPreSettingViewId ); } CleanupStack::PopAndDestroy( list ); @@ -505,10 +359,6 @@ // void CPSUIGSPlugin::UpdateMSK() { - TBool showEdit = ( 0 < Container()->iListBox->Model()->NumberOfItems()); - CEikCba* cba = static_cast< CEikCba* >( Cba()->ButtonGroup() ); - cba->MakeCommandVisible( EPSUICmdEdit, showEdit ); - cba->DrawNow(); } // End of file diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/src/psuigsplugincontainer.cpp --- a/presencesettingsui/src/psuigsplugincontainer.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/src/psuigsplugincontainer.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -21,7 +21,6 @@ // INCLUDE FILES #include #include -#include #include "psuigsplugincontainer.h" #include "psuigspluginmodel.h" #include "psuigsplugin.h" @@ -45,10 +44,8 @@ // Symbian OS phase 2 constructor // --------------------------------------------------------------------------- // -void CPSUIGSPluginContainer::ConstructL( const TRect& aRect ) +void CPSUIGSPluginContainer::ConstructL( const TRect& /*aRect*/ ) { - iListBox = new ( ELeave ) CAknSingleStyleListBox();// base needs the iListBox to be prepared 1st - BaseConstructL( aRect, R_PSUI_MAINVIEW_TITLE, 0 );// last parameter 0, since dynamic listbox } // --------------------------------------------------------------------------- @@ -61,66 +58,12 @@ } // --------------------------------------------------------------------------- -// CPSUIGSPluginContainer::ConstructListBoxL() -// See header for details. -// --------------------------------------------------------------------------- -// -void CPSUIGSPluginContainer::ConstructListBoxL( TInt /*aResLbxId*/ ) - { - // listbox creation and initialization - iListBox->SetContainerWindowL( *this ); - iListBox->ConstructL( this, EAknListBoxLoopScrolling ); - iListBox->CreateScrollBarFrameL( ETrue ); - iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( - CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); - - SetEmptyTextsToListboxL(); - - CPSUIGSPluginModel* psuiModel = iView->PSModel();// not owned - CTextListBoxModel* model = iListBox->Model(); - model->SetItemTextArray( psuiModel ); - model->SetOwnershipType( ELbmDoesNotOwnItemArray ); - } - -// --------------------------------------------------------------------------- // CPSUIGSPluginContainer::SetEmptyTextsToListboxL() // See header for details. // --------------------------------------------------------------------------- // void CPSUIGSPluginContainer::SetEmptyTextsToListboxL() { - // empty texts - _LIT ( KPSUIEmptyStringHeader, "%S\n%S" ); - HBufC* emptyText = iEikonEnv->AllocReadResourceLC( - R_QTN_PRESENCE_SETTINGS_EMPTY_PRIMARY ); - HBufC* emptyText2 = iEikonEnv->AllocReadResourceLC( - R_QTN_PRESENCE_SETTINGS_EMPTY_SECONDARY ); - HBufC* emptyFinal = HBufC::NewLC( - emptyText->Length() + emptyText2->Length() + 2 );// 2 is length of "\n" - emptyFinal->Des().Format( KPSUIEmptyStringHeader, emptyText, emptyText2 ); - iListBox->View()->SetListEmptyTextL( *emptyFinal ); - CleanupStack::PopAndDestroy( 3, emptyText );// emptyText, emptyText2, emptyFinal - } - -// --------------------------------------------------------------------------- -// CPSUIGSPluginContainer::OfferKeyEventL() -// See header for details. -// --------------------------------------------------------------------------- -// -TKeyResponse CPSUIGSPluginContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, - TEventCode aType ) - { - if ( iView && aType == EEventKey - && aKeyEvent.iCode == EKeyBackspace ) - { - iView->DeleteSettingsL(); - return EKeyWasConsumed; - } - else - { - return iListBox->OfferKeyEventL( aKeyEvent, aType ); - } } // ----------------------------------------------------------------------------- diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/src/psuigspluginmodel.cpp --- a/presencesettingsui/src/psuigspluginmodel.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/src/psuigspluginmodel.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -353,9 +353,7 @@ const TInt KPSUIFormattingExtraLength = 6; // prepare - HBufC* settingName = aOriginalName ? - aOriginalName : - StringLoader::LoadL( R_QTN_PRESENCE_NAME_DEFAULT ); + HBufC* settingName = aOriginalName; if ( settingName->Length() + KPSUIFormattingExtraLength > KPresSetNameMaxLength ) {//if there is no room for duplicate-numbering, let user take care of that when saving settings @@ -388,7 +386,6 @@ } else {// aOriginalName not given - tempSetName = StringLoader::LoadLC( R_QTN_PRESENCE_NAME_DEFAULT_NUMBER ); } } StringLoader::Format( ptr, *tempSetName, -1, index ); diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/src/psuigspluginsettingview.cpp --- a/presencesettingsui/src/psuigspluginsettingview.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/src/psuigspluginsettingview.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -71,7 +71,6 @@ void CPSUIGSPluginSettingView::ConstructL() { // base construct - BaseConstructL( R_PSUI_SETTING_VIEW ); iAppUi = AppUi(); } @@ -225,15 +224,6 @@ if ( !psModel->AllCompulsoryFieldsFilled()) {// empty compulsory fields found okToSave = EFalse; - HBufC* string = StringLoader::LoadLC( - R_QTN_PRESENCE_SETTINGS_NOT_FILLED ); - CAknQueryDialog* query = CAknQueryDialog::NewL( - CAknQueryDialog::EConfirmationTone ); - if ( !query->ExecuteLD( R_PSUI_CONF_QUERY, *string )) - { - okToGoBack = EFalse; - } - CleanupStack::PopAndDestroy( string );// string } // same name checking @@ -294,15 +284,6 @@ TBool CPSUIGSPluginSettingView::HandleDuplicatePSNamesL() { TBool found = iMainView->PSModel()->IsItDuplicatePSName(); - if ( found ) - { - HBufC* fullText = StringLoader::LoadLC( - R_QTN_PRESENCE_SETTINGS_NAME_EXISTS, - iMainView->PSModel()->SettingsSet().iSetName ); - CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); //wait-flag on - note->ExecuteLD( *fullText ); - CleanupStack::PopAndDestroy( fullText ); - } return found; } diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/src/psuigspluginsettingviewcontainer.cpp --- a/presencesettingsui/src/psuigspluginsettingviewcontainer.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/src/psuigspluginsettingviewcontainer.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -55,7 +55,6 @@ { UpdateTitleL(); CreateWindowL(); - ConstructFromResourceL( R_PSUI_SETTING_ITEMS ); SetRect( aRect ); ActivateL(); } diff -r e6a66db4e9d0 -r b7e70c0792e6 presencesettingsui/src/psuisipxdmsettingitem.cpp --- a/presencesettingsui/src/psuisipxdmsettingitem.cpp Fri Mar 19 09:37:41 2010 +0200 +++ b/presencesettingsui/src/psuisipxdmsettingitem.cpp Fri Apr 16 15:21:55 2010 +0300 @@ -175,19 +175,8 @@ // See header for details. // --------------------------------------------------------------------------- // -void CPSUISipXdmSettingItem::LaunchSettingDlgL( TInt& aIndex, CDesCArray* aArray ) +void CPSUISipXdmSettingItem::LaunchSettingDlgL( TInt& /*aIndex*/, CDesCArray* /*aArray*/ ) { - CAknRadioButtonSettingPage* dlg = new (ELeave ) CAknRadioButtonSettingPage( - R_RADIOBUTTON_SETTING_PAGE, - aIndex, - aArray ); - CleanupStack::PushL( dlg ); - dlg->SetSettingTextL( SettingName() ); - SetSettingPage( dlg ); - SettingPage()->SetSettingPageObserver( this ); - CleanupStack::Pop( dlg ); // dlg - SettingPage()->ExecuteLD( CAknSettingPage::EUpdateWhenAccepted ); - SetSettingPage( 0 ); // dlg deleted } // End of File