|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: MsgEditorBaseUi implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ========== INCLUDE FILES ================================ |
|
21 #include "MsgEditorBaseUi.h" |
|
22 |
|
23 #include <centralrepository.h> |
|
24 #include <messaginginternalcrkeys.h> |
|
25 #include <MessagingSDKCRKeys.h> |
|
26 #include <messagingvariant.hrh> // for KMsgEditorFeatureIdStayInViewerAfterReply |
|
27 |
|
28 // ========== EXTERNAL DATA STRUCTURES ===================== |
|
29 |
|
30 // ========== EXTERNAL FUNCTION PROTOTYPES ================= |
|
31 |
|
32 // ========== CONSTANTS ==================================== |
|
33 |
|
34 // ========== MACROS ======================================= |
|
35 |
|
36 // ========== LOCAL CONSTANTS AND MACROS =================== |
|
37 |
|
38 // ========== MODULE DATA STRUCTURES ======================= |
|
39 |
|
40 // ========== LOCAL FUNCTION PROTOTYPES ==================== |
|
41 |
|
42 // ========== LOCAL FUNCTIONS ============================== |
|
43 |
|
44 // ========== MEMBER FUNCTIONS ============================= |
|
45 |
|
46 // --------------------------------------------------------- |
|
47 // CMsgEditorAppUi::CMsgEditorAppUi |
|
48 // |
|
49 // Constructor. |
|
50 // --------------------------------------------------------- |
|
51 // |
|
52 EXPORT_C CMsgEditorBaseUi::CMsgEditorBaseUi() |
|
53 { |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------- |
|
57 // CMsgEditorAppUi::ConstructL |
|
58 // |
|
59 // 2nd phase constructor. |
|
60 // --------------------------------------------------------- |
|
61 // |
|
62 void CMsgEditorBaseUi::ConstructL() |
|
63 { |
|
64 // must set the local zoom factor before BaseConstructL to |
|
65 // avoid an unnecessary layout switch, but therefore we also must |
|
66 // avoid leaving. |
|
67 CRepository* repository = NULL; |
|
68 TRAPD( err, repository = CRepository::NewL( KCRUidMessagingUiSettings ) ); |
|
69 if( !err ) |
|
70 { |
|
71 TInt localZoom = EAknUiZoomAutomatic; |
|
72 TInt err = repository->Get( KMessagingEditorLocalUiZoom, localZoom ); |
|
73 if( !err ) |
|
74 { |
|
75 TAknUiZoom zoom = static_cast<TAknUiZoom>( localZoom ); |
|
76 CAknAppUiBase::SetLocalUiZoom( zoom ); // this is safe, as it doesn't leave before BaseConstructL is called |
|
77 // CAknAppUiBase::SetLocalUiZoom(EAknUiZoomLarge);//testcode - remove |
|
78 } |
|
79 delete repository; |
|
80 } |
|
81 |
|
82 TRAP( err, repository = CRepository::NewL( KCRUidMuiuVariation ) ); |
|
83 if( !err ) |
|
84 { |
|
85 TInt flag; |
|
86 TInt err = repository->Get( KMuiuMsgEditorFeatures, flag ); |
|
87 if( !err ) |
|
88 { |
|
89 if ( flag & KMsgEditorFeatureIdStayInViewerAfterReply) |
|
90 { |
|
91 iEditorBaseFeatures |= EStayInViewerAfterReply; |
|
92 } |
|
93 } |
|
94 delete repository; |
|
95 } |
|
96 |
|
97 |
|
98 if ( iEditorBaseFeatures & EDisableMSKSupport ) |
|
99 { |
|
100 BaseConstructL( EAknEnableSkin | EAknSingleClickCompatible ); |
|
101 } |
|
102 else |
|
103 { |
|
104 BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible ); |
|
105 } |
|
106 } |
|
107 |
|
108 // --------------------------------------------------------- |
|
109 // CMsgEditorAppUi::~CMsgEditorAppUi |
|
110 // |
|
111 // Destructor. |
|
112 // --------------------------------------------------------- |
|
113 // |
|
114 EXPORT_C CMsgEditorBaseUi::~CMsgEditorBaseUi() |
|
115 { |
|
116 } |
|
117 |
|
118 |
|
119 // End of File |