idlefw/plugins/mcsplugin/settings/src/mcspluginsettings.cpp
branchRCL_3
changeset 17 cb506ec2d869
parent 16 b276298d5729
child 25 9e077f9a342c
equal deleted inserted replaced
13:c2817bb2a55c 17:cb506ec2d869
     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 
   200     CGSBaseView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
   194     iModel->SetPluginIdL( aCustomMessage );
   201     
   195     iModel->UpdateAppListL( EFalse );
   202     iModel->UpdateSettingsContainerL( aCustomMessage );
   196     iModel->UpdateBkmListL( EFalse );
   203 }
   197     iModel->UpdateSettingsL();
       
   198     CGSBaseView::DoActivateL( aPrevViewId, aCustomMessageId, aCustomMessage );
       
   199     }
   204 
   200 
   205 // ----------------------------------------------------------------------------
   201 // ----------------------------------------------------------------------------
   206 // From CAknView
   202 // From CAknView
   207 // Called by the Avkon view framework when closing.
   203 // Called by the Avkon view framework when closing.
   208 // ----------------------------------------------------------------------------
   204 // ----------------------------------------------------------------------------
   209 //
   205 //
   210 void CMCSPluginSettings::DoDeactivate()
   206 void CMCSPluginSettings::DoDeactivate()
   211 {
   207     {
   212     CGSBaseView::DoDeactivate();
   208     CGSBaseView::DoDeactivate();
   213 
   209     }
   214     iModel->SetContainer(Container());
       
   215 }
       
   216 
   210 
   217 // ----------------------------------------------------------------------------
   211 // ----------------------------------------------------------------------------
   218 // From MEikMenuObserver
   212 // From MEikMenuObserver
   219 // ----------------------------------------------------------------------------
   213 // ----------------------------------------------------------------------------
   220 //
   214 //
   234         }
   228         }
   235     }
   229     }
   236 }
   230 }
   237 
   231 
   238 // ---------------------------------------------------------------------------
   232 // ---------------------------------------------------------------------------
   239 // From CGSPluginInterface. 256
   233 // From CGSPluginInterface
   240 // ---------------------------------------------------------------------------
   234 // ---------------------------------------------------------------------------
   241 //
   235 //
   242 void CMCSPluginSettings::GetCaptionL(TDes& aCaption) const
   236 void CMCSPluginSettings::GetCaptionL(TDes& aCaption) const
   243 {
   237 {
   244     iCoeEnv->ReadResourceL(aCaption, R_AI_MCS_SETTINGS_VIEW_CAPTION);
   238     iCoeEnv->ReadResourceL(aCaption, R_AI_MCS_SETTINGS_VIEW_CAPTION);
   293 void CMCSPluginSettings::HandleListBoxSelectionL()
   287 void CMCSPluginSettings::HandleListBoxSelectionL()
   294 {
   288 {
   295     Container()->HandleChangeCommandL();
   289     Container()->HandleChangeCommandL();
   296 }
   290 }
   297 
   291 
   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.
   292 // End of File.