phoneuis/dialer/src/cdialer.cpp
branchRCL_3
changeset 12 b68fcd923911
parent 10 ba54057fe027
child 23 40a3f856b14d
equal deleted inserted replaced
10:ba54057fe027 12:b68fcd923911
    24 #include <eikspane.h>
    24 #include <eikspane.h>
    25 #include <aknenv.h>                         // AKN_LAF_COLOR
    25 #include <aknenv.h>                         // AKN_LAF_COLOR
    26 #include <AknUtils.h>
    26 #include <AknUtils.h>
    27 #include <AknsUtils.h>
    27 #include <AknsUtils.h>
    28 #include <aknappui.h>
    28 #include <aknappui.h>
       
    29 #include <aknsoundsystem.h>
    29 #include <aknlayoutscalable_apps.cdl.h>
    30 #include <aknlayoutscalable_apps.cdl.h>
    30 #include <layoutmetadata.cdl.h>
    31 #include <layoutmetadata.cdl.h>
    31 #include <data_caging_path_literals.hrh>    // for KDC_APP_RESOURCE_DIR
    32 #include <data_caging_path_literals.hrh>    // for KDC_APP_RESOURCE_DIR
    32 #include <bautils.h>                        // for BaflUtils
    33 #include <bautils.h>                        // for BaflUtils
    33 #include <aknedsts.h>
    34 #include <aknedsts.h>
    34 #include <spsettings.h>
    35 #include <spsettings.h>
    35 #include <dialingextensioninterface.h>
    36 #include <dialingextensioninterface.h>
    36 #include <easydialingcommands.hrh>
    37 #include <easydialingcommands.hrh>
    37 #include <dialer.rsg>
    38 #include <dialer.rsg>
       
    39 #include <phoneui.rsg>
    38 #include <featmgr.h>
    40 #include <featmgr.h>
    39 
    41 
    40 #include "cdialer.h"
    42 #include "cdialer.h"
    41 #include "dialercommon.h"
    43 #include "dialercommon.h"
    42 #include "dialer.hrh"
    44 #include "dialer.hrh"
   135     UpdateToolbar();
   137     UpdateToolbar();
   136 
   138 
   137     SetRect( aRect );
   139     SetRect( aRect );
   138     
   140     
   139     SetComponentsToInheritVisibility( EFalse );
   141     SetComponentsToInheritVisibility( EFalse );
       
   142     
       
   143     // By default, numeric keysounds are disabled.
       
   144     DisableNumericKeySounds( ETrue );
   140 
   145 
   141     ActivateL();
   146     ActivateL();
   142     #ifdef RD_SCALABLE_UI_V2
   147     #ifdef RD_SCALABLE_UI_V2
   143     if ( AknLayoutUtils::PenEnabled() )
   148     if ( AknLayoutUtils::PenEnabled() )
   144         {
   149         {
   258             editorType = EAlphanumericEditor;
   263             editorType = EAlphanumericEditor;
   259             }
   264             }
   260         }
   265         }
   261     
   266     
   262     UpdateEdwinState( editorType );
   267     UpdateEdwinState( editorType );
       
   268     
       
   269     // Numeric keysound are disabled in if not in alpha mode. 
       
   270     // In numeric mode numeric keys should play DTMF only.
       
   271     DisableNumericKeySounds( editorType != EAlphanumericEditor );
   263     }
   272     }
   264 
   273 
   265 // ---------------------------------------------------------------------------
   274 // ---------------------------------------------------------------------------
   266 // CDialer::RelayoutAndDraw
   275 // CDialer::RelayoutAndDraw
   267 // ---------------------------------------------------------------------------
   276 // ---------------------------------------------------------------------------
   829         DIALER_PRINTF( "CDialer::ConfigureEditorSettings, RESULT: %d", result )
   838         DIALER_PRINTF( "CDialer::ConfigureEditorSettings, RESULT: %d", result )
   830         }
   839         }
   831     }
   840     }
   832 
   841 
   833 // ---------------------------------------------------------------------------
   842 // ---------------------------------------------------------------------------
       
   843 // CDialer::SetNumericKeySounds
       
   844 // ---------------------------------------------------------------------------
       
   845 //
       
   846 void CDialer::DisableNumericKeySounds( TBool aDisable )
       
   847     {
       
   848     CAknAppUi *appUi = static_cast<CAknAppUi*>( ControlEnv()->AppUi() );
       
   849     CAknKeySoundSystem* keySounds = appUi->KeySounds();
       
   850     
       
   851     if ( aDisable && !iNumericKeySoundsDisabled )
       
   852         {
       
   853         // Disable numeric key sounds. This is done only if key sounds were not disabled previously,
       
   854         // to avoid situation that there were multiple key sound contexts in the stack. 
       
   855         TRAP_IGNORE( keySounds->PushContextL( R_PHONEUI_DEFAULT_SKEY_LIST ) );
       
   856         }
       
   857     else if ( !aDisable && iNumericKeySoundsDisabled )
       
   858         {
       
   859         // Remove numeric key sound disabling.
       
   860         keySounds->PopContext();
       
   861         }
       
   862 
       
   863     iNumericKeySoundsDisabled = aDisable;
       
   864     }
       
   865 
       
   866 // ---------------------------------------------------------------------------
   834 // CDialer::LoadEasyDialingPlugin
   867 // CDialer::LoadEasyDialingPlugin
   835 // ---------------------------------------------------------------------------
   868 // ---------------------------------------------------------------------------
   836 //
   869 //
   837 void CDialer::LoadEasyDialingPlugin()
   870 void CDialer::LoadEasyDialingPlugin()
   838     {
   871     {