idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp
branchRCL_3
changeset 14 15e4dd19031c
parent 11 bd874ee5e5e2
child 16 b276298d5729
equal deleted inserted replaced
12:502e5d91ad42 14:15e4dd19031c
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 * Description:  MCS settings plug-in main class.
    14 * Description:  MCS settings plug-in main class.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <ecom/implementationproxy.h>
    18 #include <ecom/implementationproxy.h>
    19 #include <e32std.h>
       
    20 #include <eikmenup.h>
    19 #include <eikmenup.h>
    21 #include <eikbtgpc.h>
    20 #include <eikbtgpc.h>
    22 #include <StringLoader.h>
       
    23 #include <gsfwviewuids.h>
    21 #include <gsfwviewuids.h>
    24 #include <gsprivatepluginproviderids.h>
    22 #include <gsprivatepluginproviderids.h>
    25 #include <bautils.h>
       
    26 #include <pathinfo.h>
    23 #include <pathinfo.h>
    27 #include <featmgr.h>
    24 #include <featmgr.h>
    28 #include <e32property.h>                // For RProperty
    25 
    29 #include <activeidle2domainpskeys.h>    // For KPSUidActiveIdle2
       
    30 
       
    31 #include <avkon.rsg>
       
    32 #include <mcspluginsettingsres.rsg>
    26 #include <mcspluginsettingsres.rsg>
    33 #include <aisystemuids.hrh>
    27 #include <aisystemuids.hrh>
    34 
    28 
    35 #include "mcspluginsettings.hrh"
    29 #include "mcspluginsettings.hrh"
    36 #include "mcspluginsettings.h"
    30 #include "mcspluginsettings.h"
   154         break;
   148         break;
   155 
   149 
   156     case EAknSoftkeyBack:
   150     case EAknSoftkeyBack:
   157         if (iAppUi->View(KGSMainViewUid))
   151         if (iAppUi->View(KGSMainViewUid))
   158         {
   152         {
   159             // if we are in GS activate parent plugin view (standby view)...
   153         // if we are in GS activate parent plugin view (standby view)...
   160             iAppUi->ActivateLocalViewL(KGSPrslnPluginUid);
   154         iAppUi->ActivateLocalViewL(KGSPrslnPluginUid);
   161         }
   155         }
   162         else
   156         else
   163         {
   157         {
   164             iAppUi->ActivateLocalViewL(iPrevViewId.iViewUid);
   158             iAppUi->ActivateLocalViewL(iPrevViewId.iViewUid);
   165         }
   159         }
   179 // From CAknView
   173 // From CAknView
   180 // First method called by the Avkon framwork
   174 // First method called by the Avkon framwork
   181 // ----------------------------------------------------------------------------
   175 // ----------------------------------------------------------------------------
   182 //
   176 //
   183 void CMCSPluginSettings::DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage)
   177 void CMCSPluginSettings::DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage)
   184 {
   178     {
   185     CEikButtonGroupContainer* cba = Cba();
   179     CEikButtonGroupContainer* cba = Cba();
   186 
   180 
   187     if (cba)
   181     if (cba)
   188     {
   182     {
   189         if (aCustomMessageId == KUidAiFwCommon)
   183         if (aCustomMessageId == KUidAiFwCommon)
   194         {
   188         {
   195             cba->SetCommandSetL(R_SCUT_SOFTKEYS_OPTIONS_BACK_CHANGE);
   189             cba->SetCommandSetL(R_SCUT_SOFTKEYS_OPTIONS_BACK_CHANGE);
   196         }
   190         }
   197         cba->DrawDeferred();
   191         cba->DrawDeferred();
   198     }
   192     }
   199     iModel->UpdateSettingModelL( aCustomMessage);
   193     iModel->UpdateAppListL();
   200     CGSBaseView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
   194     iModel->UpdateBkmListL();
   201     
   195     iModel->SetPluginIdL( aCustomMessage );
   202     iModel->UpdateSettingsContainerL( aCustomMessage );
   196     iModel->UpdateSettingsL();
   203 }
   197     CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
       
   198     }
   204 
   199 
   205 // ----------------------------------------------------------------------------
   200 // ----------------------------------------------------------------------------
   206 // From CAknView
   201 // From CAknView
   207 // Called by the Avkon view framework when closing.
   202 // Called by the Avkon view framework when closing.
   208 // ----------------------------------------------------------------------------
   203 // ----------------------------------------------------------------------------
   209 //
   204 //
   210 void CMCSPluginSettings::DoDeactivate()
   205 void CMCSPluginSettings::DoDeactivate()
   211 {
   206     {
   212     CGSBaseView::DoDeactivate();
   207     CGSBaseView::DoDeactivate();
   213 
   208     }
   214     iModel->SetContainer(Container());
       
   215 }
       
   216 
   209 
   217 // ----------------------------------------------------------------------------
   210 // ----------------------------------------------------------------------------
   218 // From MEikMenuObserver
   211 // From MEikMenuObserver
   219 // ----------------------------------------------------------------------------
   212 // ----------------------------------------------------------------------------
   220 //
   213 //
   234         }
   227         }
   235     }
   228     }
   236 }
   229 }
   237 
   230 
   238 // ---------------------------------------------------------------------------
   231 // ---------------------------------------------------------------------------
   239 // From CGSPluginInterface. 256
   232 // From CGSPluginInterface
   240 // ---------------------------------------------------------------------------
   233 // ---------------------------------------------------------------------------
   241 //
   234 //
   242 void CMCSPluginSettings::GetCaptionL(TDes& aCaption) const
   235 void CMCSPluginSettings::GetCaptionL(TDes& aCaption) const
   243 {
   236 {
   244     iCoeEnv->ReadResourceL(aCaption, R_AI_MCS_SETTINGS_VIEW_CAPTION);
   237     iCoeEnv->ReadResourceL(aCaption, R_AI_MCS_SETTINGS_VIEW_CAPTION);
   293 void CMCSPluginSettings::HandleListBoxSelectionL()
   286 void CMCSPluginSettings::HandleListBoxSelectionL()
   294 {
   287 {
   295     Container()->HandleChangeCommandL();
   288     Container()->HandleChangeCommandL();
   296 }
   289 }
   297 
   290 
   298 // ---------------------------------------------------------------------------
       
   299 // Returns if container exists or not
       
   300 // ---------------------------------------------------------------------------
       
   301 //
       
   302 TBool CMCSPluginSettings::Activated() const
       
   303     {
       
   304     return iContainer ? ETrue : EFalse;
       
   305     }
       
   306 
       
   307 // End of File.
   291 // End of File.