|
1 /* |
|
2 * Copyright (c) 2006 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: Dialog for viewing and setting application settings |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "ImpsCSPAllErrors.h" |
|
20 // INCLUDE FILES |
|
21 //#include "CCAAppSettingsSAPExt.h" |
|
22 #include "CCAStatusPaneHandler.h" |
|
23 #include "chatngclient.hrh" |
|
24 #include "ChatDefinitions.h" |
|
25 #include "ChatDebugPrint.h" |
|
26 #include "CCAAppUi.h" |
|
27 #include "IMUtils.h" |
|
28 #include "IMDialogUtils.h" |
|
29 |
|
30 #include "CCAUISessionManager.h" |
|
31 #include "CCAToneSettingItem.h" |
|
32 #include "IMPRivateCRKeys.h" |
|
33 #include "imvariant.hrh" |
|
34 #include "impsbuilddefinitions.h" |
|
35 |
|
36 #include "CCACommandManagerFactory.h" |
|
37 #include "CCACommandManager.h" |
|
38 #include "MCAProcessManager.h" |
|
39 #include "MCACommand.h" |
|
40 #include "MCASettingsCommand.h" |
|
41 #include "MCAUiSettingsDialogCmdCB.h" |
|
42 #include "MCASettingSapExt.h" |
|
43 #include "MCASettingsPC.h" |
|
44 #include "CCAAppSettingsDialog.h" |
|
45 |
|
46 #include <AknColourSelectionGrid.h> |
|
47 #include <csxhelp/imng.hlp.hrh> |
|
48 #include <FeatMgr.h> |
|
49 #include <aknlists.h> |
|
50 #include <aknsettingitemlist.h> |
|
51 #include <akntextsettingpage.h> |
|
52 #include <ChatNG.rsg> |
|
53 #include <centralrepository.h> |
|
54 |
|
55 #include <hlplch.h> |
|
56 |
|
57 #include "CCAColourSettingItem.h" |
|
58 |
|
59 // The Settings have been moved to Cenrep (also retained in the Resource file), |
|
60 // so the enums for keys and central repository header is added here |
|
61 #include "VariantKeys.h" |
|
62 #ifdef IMPS_CONTACT_FETCH_BACKGROUND |
|
63 #include "ccasyncchecker.h" |
|
64 #endif // IMPS_CONTACT_FETCH_BACKGROUND |
|
65 |
|
66 #if defined( IMPS_CONTACT_FETCH_BACKGROUND ) || defined( RD_SETTINGS_FACELIFT ) |
|
67 #include <cimpssapsettings.h> |
|
68 #endif // defined( IMPS_CONTACT_FETCH_BACKGROUND ) || defined( RD_SETTINGS_FACELIFT ) |
|
69 |
|
70 |
|
71 //CONSTANTS |
|
72 const TInt KMessageFlowMin = 1; //Min message flow value |
|
73 const TInt KMessageFlowNormal = 2; //Normal message flow |
|
74 const TInt KMessageFlowMax = 3; //Max message flow value |
|
75 |
|
76 |
|
77 // ================= MEMBER FUNCTIONS ======================= |
|
78 |
|
79 // C++ default constructor can NOT contain any code, that |
|
80 // might leave. |
|
81 // |
|
82 CCAAppSettingsDialog::CCAAppSettingsDialog( CCAStatusPaneHandler& aTitleBar, |
|
83 MCASettingsPC& aSettingsPC, |
|
84 CCAUISessionManager& aUISessionManager, |
|
85 CIMPSSAPSettings* aServer ) |
|
86 : iTitlePane( &aTitleBar ), iUISessionManager( &aUISessionManager ), |
|
87 iDefaultNick( EFalse ), iToneFileNamePtr( NULL, 0 ), iToneFileInUse( EFalse ), |
|
88 iSettingsPC( &aSettingsPC ), iServer( aServer ), iSavingFlag( EFalse ) |
|
89 { |
|
90 } |
|
91 |
|
92 // Destructor |
|
93 CCAAppSettingsDialog::~CCAAppSettingsDialog() |
|
94 { |
|
95 if ( iSettingItemArray ) |
|
96 { |
|
97 iSettingItemArray->ResetAndDestroy(); |
|
98 } |
|
99 |
|
100 delete iSettingItemArray; |
|
101 delete iDefaultNickName; |
|
102 delete iOldDefaultNickName; |
|
103 |
|
104 delete iToneFileName; |
|
105 // delete iSAPExtension; |
|
106 |
|
107 delete iAsyncCallBack; |
|
108 |
|
109 delete iCenRep; |
|
110 delete iCommandSetings; |
|
111 |
|
112 CCoeEnv* env = CCoeEnv::Static(); |
|
113 if ( env->IsActive() ) |
|
114 { |
|
115 env->Cancel(); |
|
116 } |
|
117 } |
|
118 |
|
119 // --------------------------------------------------------- |
|
120 // CCAAppSettingsDialog::ProcessCommandL |
|
121 // Command handler |
|
122 // (other items were commented in a header). |
|
123 // --------------------------------------------------------- |
|
124 // |
|
125 void CCAAppSettingsDialog::ProcessCommandL( TInt aCommand ) |
|
126 { |
|
127 HideMenu(); |
|
128 |
|
129 if ( iSavingFlag ) |
|
130 { |
|
131 return; |
|
132 } |
|
133 |
|
134 switch ( aCommand ) |
|
135 { |
|
136 case EAknSoftkeyEdit: // Flowthrough, MSK command |
|
137 case EChatClientAppSetChange: |
|
138 { |
|
139 SetIsTargetDialogOpened( ETrue ); |
|
140 |
|
141 CEikListBox* listBox = static_cast< CEikListBox* >( |
|
142 Control( EChatClientControlIdAppSettings ) ); |
|
143 HandleListBoxEventL( listBox, EEventEditingStarted ); |
|
144 break; |
|
145 } |
|
146 |
|
147 case EChatClientCmdExit: |
|
148 { |
|
149 TryExitL( EAknSoftkeyExit ); |
|
150 break; |
|
151 } |
|
152 case EChatClientCmdHelp: |
|
153 { |
|
154 HlpLauncher::LaunchHelpApplicationL( CEikonEnv::Static()->WsSession(), |
|
155 ( CCoeEnv::Static()->AppUi() )->AppHelpContextL () ); |
|
156 break; |
|
157 } |
|
158 default: |
|
159 { |
|
160 CEikonEnv::Static()->EikAppUi()->HandleCommandL( aCommand ); |
|
161 break; |
|
162 } |
|
163 } |
|
164 } |
|
165 |
|
166 // --------------------------------------------------------- |
|
167 // CCAAppSettingsDialog::HandleListBoxEventL() |
|
168 // Callback for listbox events |
|
169 // (other items were commented in a header). |
|
170 // --------------------------------------------------------- |
|
171 // |
|
172 void CCAAppSettingsDialog::HandleListBoxEventL( CEikListBox* aListBox, |
|
173 TListBoxEvent aEventType ) |
|
174 { |
|
175 CHAT_DP( D_CHAT_LIT( "CCAAppSettingsDialog::HandleListBoxEvent %d" ), |
|
176 aEventType ); |
|
177 |
|
178 if ( aEventType == EEventEditingStarted || |
|
179 aEventType == EEventEnterKeyPressed || |
|
180 aEventType == EEventItemDoubleClicked ) |
|
181 { |
|
182 #ifdef IMPS_CONTACT_FETCH_BACKGROUND |
|
183 CCAAppUi* appUi = static_cast< CCAAppUi* >( iEikonEnv->AppUi() ); |
|
184 CIMPSSAPSettings* currentSap = appUi->UISessionManager().CurrentSAPLC(); |
|
185 if ( iServer ) // can be NULL |
|
186 { |
|
187 if ( currentSap->SAPName().CompareC( iServer->SAPName(), KCollationLevel, NULL ) == 0 ) |
|
188 { |
|
189 CAknSettingItem* item = iSettingItemArray->At( iEditIndex ); |
|
190 TSettingListLayout identifier = ( TSettingListLayout )item->Identifier(); |
|
191 switch ( identifier ) |
|
192 { |
|
193 case EFriendsListUpdate: |
|
194 case EAuthorizePresence: |
|
195 { |
|
196 // if we're logged in, we must wait for |
|
197 // list synchronization to complete |
|
198 if ( appUi->UISessionManager().IsLoggedIn() && |
|
199 !CCASyncChecker::CheckSyncStateL() ) |
|
200 { |
|
201 CleanupStack::PopAndDestroy( currentSap ); |
|
202 return; |
|
203 } |
|
204 break; |
|
205 } |
|
206 default: |
|
207 { |
|
208 break; |
|
209 } |
|
210 } |
|
211 } |
|
212 } |
|
213 CleanupStack::PopAndDestroy( currentSap ); |
|
214 #endif //IMPS_CONTACT_FETCH_BACKGROUND |
|
215 |
|
216 // Launch dialogs asynchronously, so we can exit this event chain. |
|
217 // If we do this synchronously, a view change (with dialogshutter) |
|
218 // after opening a dialog will crash the application. |
|
219 if ( !iAsyncCallBack->IsActive() ) |
|
220 { |
|
221 iIsPopUp = aEventType == EEventEditingStarted ? ETrue : EFalse; |
|
222 iEditIndex = aListBox->CurrentItemIndex(); |
|
223 iAsyncCallBack->Call(); |
|
224 } |
|
225 } |
|
226 } |
|
227 |
|
228 // --------------------------------------------------------- |
|
229 // CCAAppSettingsDialog::HandleResourceChange |
|
230 // Called when resources change |
|
231 // (other items were commented in a header). |
|
232 // --------------------------------------------------------- |
|
233 // |
|
234 void CCAAppSettingsDialog::HandleResourceChange( TInt aType ) |
|
235 { |
|
236 CCoeControl::HandleResourceChange( aType ); |
|
237 |
|
238 // This is called to update background of slider if skin is |
|
239 // changed while dialog is active |
|
240 TRAP_IGNORE( iSettingItemArray->RecalculateVisibleIndicesL() ); |
|
241 |
|
242 if ( aType == KEikDynamicLayoutVariantSwitch ) |
|
243 { |
|
244 Layout(); |
|
245 } |
|
246 } |
|
247 |
|
248 // --------------------------------------------------------- |
|
249 // CCAAppSettingsDialog::OfferKeyEventL |
|
250 // (other items were commented in a header). |
|
251 // --------------------------------------------------------- |
|
252 // |
|
253 TKeyResponse CCAAppSettingsDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
254 TEventCode aType ) |
|
255 { |
|
256 if ( aKeyEvent.iCode == EKeyEscape ) |
|
257 { |
|
258 // Forced exit by dialog shutter |
|
259 TryExitL( EAknSoftkeyExit ); |
|
260 return EKeyWasConsumed; |
|
261 } |
|
262 |
|
263 return CAknDialog::OfferKeyEventL( aKeyEvent, aType ); |
|
264 } |
|
265 |
|
266 // --------------------------------------------------------- |
|
267 // CCAAppSettingsDialog::DisplayMenuL |
|
268 // Display the option menu |
|
269 // (other items were commented in a header). |
|
270 // --------------------------------------------------------- |
|
271 // |
|
272 void CCAAppSettingsDialog::DisplayMenuL() |
|
273 { |
|
274 if ( !GetIsTargetDialogOpened() ) |
|
275 CAknDialog::DisplayMenuL(); |
|
276 else return; |
|
277 } |
|
278 |
|
279 // --------------------------------------------------------- |
|
280 // CCAAppSettingsDialog::HandleCBAChangeL() |
|
281 // Handles CBA changes |
|
282 // (other items were commented in a header). |
|
283 // --------------------------------------------------------- |
|
284 // |
|
285 void CCAAppSettingsDialog::HandleCBAChangeL( const TInt aResourceId ) |
|
286 { |
|
287 CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); |
|
288 cba->SetCommandSetL( aResourceId ); |
|
289 cba->DrawNow(); |
|
290 } |
|
291 |
|
292 //---------------------------------------------------------- |
|
293 // CCAAppSettingsDialog::AddToneSettingItemL |
|
294 //---------------------------------------------------------- |
|
295 void CCAAppSettingsDialog::AddToneSettingItemL( TBool aBranded ) |
|
296 { |
|
297 iToneFileNamePtr.Set( iToneFileName->Des() ); |
|
298 iSAPExtension->GetToneFileNameL( iToneFileNamePtr ); |
|
299 CAknSettingItem* toneSett = new ( ELeave ) CCAToneSettingItem( EMessageTone, |
|
300 iToneFileNamePtr, *iCenRep, aBranded ); |
|
301 CleanupStack::PushL( toneSett ); |
|
302 HBufC* itemTitle = |
|
303 iEikonEnv->AllocReadResourceLC( R_CHAT_AUDIO_SETTING_TEXT ); |
|
304 toneSett->ConstructL( EFalse, 0, *itemTitle, NULL, NULL, NULL ); |
|
305 iSettingItemArray->AppendL( toneSett ); |
|
306 CleanupStack::PopAndDestroy( itemTitle ); |
|
307 CleanupStack::Pop( toneSett ); |
|
308 } |
|
309 |
|
310 // --------------------------------------------------------- |
|
311 // CCAAppSettingsDialog::DynInitMenuPaneL |
|
312 // Setup the menupane |
|
313 // (other items were commented in a header). |
|
314 // --------------------------------------------------------- |
|
315 // |
|
316 void CCAAppSettingsDialog::DynInitMenuPaneL( TInt aResourceId, |
|
317 CEikMenuPane* aMenuPane ) |
|
318 { |
|
319 // if we're displaying general menu and help feature is not supported.. |
|
320 if ( aResourceId == R_CHATCLIENT_GENERAL_MENU && |
|
321 !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
322 { |
|
323 // dimm the help menu item |
|
324 aMenuPane->SetItemDimmed( EChatClientCmdHelp, ETrue ); |
|
325 } |
|
326 } |
|
327 |
|
328 // --------------------------------------------------------- |
|
329 // CCAAppSettingsDialog::PreLayoutDynInitL |
|
330 // Setup the dialog dynamically |
|
331 // (other items were commented in a header). |
|
332 // --------------------------------------------------------- |
|
333 // |
|
334 void CCAAppSettingsDialog::PreLayoutDynInitL() |
|
335 { |
|
336 iCenRep = CRepository::NewL( KCRUidIM ); |
|
337 |
|
338 CCAAppUi* appUi = static_cast< CCAAppUi* >( iEikonEnv->AppUi() ); |
|
339 MCACommandFactory* commandManager = CCACommandManagerFactory::InstanceL()->GetCommandManager(); |
|
340 iCommandSetings = static_cast< MCASettingsCommand* > ( commandManager->NewCommandL( EChatClientApplicationSettings, appUi->GetProcessManager(), *this ) ); |
|
341 |
|
342 iCommandSetings->ExecuteCommandL(); |
|
343 |
|
344 iSAPExtension = iCommandSetings->GetAppSettingsSAPExt(); |
|
345 |
|
346 CIMPSSAPSettings* server = NULL; |
|
347 |
|
348 #ifdef RD_SETTINGS_FACELIFT |
|
349 server = iServer; |
|
350 iTitlePane->SetTitleL( server->SAPName() ); |
|
351 #else |
|
352 UpdateTitlePaneL( R_CHATCLIENT_APPSETTINGS_TITLE ); |
|
353 #endif //RD_SETTINGS_FACELIFT |
|
354 |
|
355 |
|
356 iDefaultNickName = HBufC::NewL( KNicknameMaxLength ); |
|
357 iOldDefaultNick = iDefaultNick = iSettingsPC->GetBoolValuePC( TEnumsPC::EDefaultScreenNameInUse, server ); |
|
358 |
|
359 |
|
360 iOldAuthorizeIMPr = iAuthorizeIMPr = iSettingsPC->GetIntValuePC( TEnumsPC::EAuthorizeIMPresence, server ); |
|
361 |
|
362 |
|
363 iOldReceiveIMessages = iReceiveIMessages = iSettingsPC->GetIntValuePC( TEnumsPC::EReceiveIMessages, server ); |
|
364 |
|
365 |
|
366 iOldReceiveInvitations = iReceiveInvitations = iSettingsPC->GetIntValuePC( TEnumsPC::EReceiveInvitations, server ); |
|
367 |
|
368 |
|
369 iOldMsgFlow = iMsgFlow = iSettingsPC->GetIntValuePC( TEnumsPC::EMessageFlowSettingLevel, server ); |
|
370 |
|
371 |
|
372 iOldShowTimeStamp = iShowTimeStamp = iSettingsPC->GetBoolValuePC( TEnumsPC::EShowTimeStamps, server ); |
|
373 |
|
374 |
|
375 iOldAutoUpdFriends = iAutoUpdFriends = iSettingsPC->GetBoolValuePC( TEnumsPC::EAutomaticPresenceUpdate, server ); |
|
376 |
|
377 |
|
378 iOldShowOffline = iShowOffline = iSettingsPC->GetBoolValuePC( TEnumsPC::EShowOffline, server ); |
|
379 |
|
380 |
|
381 iOldOrderAlphabetically = iOrderAlphabetically = iSettingsPC->IsAlphabeticalPC( server ); |
|
382 |
|
383 |
|
384 // If this is the first time when settings are opened, then set message |
|
385 // flow to "normal" |
|
386 if ( iMsgFlow < KMessageFlowMin || iMsgFlow > KMessageFlowMax ) |
|
387 { |
|
388 iMsgFlow = iOldMsgFlow = KMessageFlowNormal; |
|
389 } |
|
390 |
|
391 // Set default nickname, if it's used |
|
392 if ( iDefaultNick ) |
|
393 { |
|
394 TPtr nickNamePtr( iDefaultNickName->Des() ); |
|
395 HBufC* screenname = iSettingsPC->GetSapSettingValuePCL( TEnumsPC::EDefaultScreenName, |
|
396 server ); |
|
397 nickNamePtr.Copy( ( *screenname ).Left( nickNamePtr.MaxLength() ) ); |
|
398 delete screenname; |
|
399 iOldDefaultNickName = nickNamePtr.AllocL(); |
|
400 } |
|
401 |
|
402 // Initialize variables needed for adding new items |
|
403 iListbox = static_cast< CAknSettingStyleListBox* >( Control( |
|
404 EChatClientControlIdAppSettings ) ); |
|
405 //2 is array granularity and 1 is first ordinal |
|
406 iSettingItemArray = new ( ELeave ) CAknSettingItemArray( 2, EFalse, 1 ); |
|
407 //2 is array granularity |
|
408 // CodeScanner warning is ignored because array is not used here |
|
409 // and ownership is transferred to list box immediately |
|
410 CArrayPtr< CGulIcon >* icons = new( ELeave ) CArrayPtrFlat< CGulIcon >( 2 ); // CSI: 6 # See comment above |
|
411 // Transfer icons-array ownership to listbox |
|
412 iListbox->ItemDrawer()->ColumnData()->SetIconArray( icons ); |
|
413 |
|
414 // read variation flag values |
|
415 TInt haveScreenName = |
|
416 IMUtils::IntResourceValueL( RSC_CHAT_VARIATION_SCREENNAME_SETTING ); |
|
417 TInt haveGrant = |
|
418 IMUtils::IntResourceValueL( RSC_CHAT_VARIATION_HAVEGRANT ); |
|
419 TInt havePresenceAuth = |
|
420 IMUtils::IntResourceValueL( RSC_CHAT_VARIATION_HAVEPRESENCEAUTH ); |
|
421 // Check this value IM SingleView |
|
422 TInt updateContactsSetting = |
|
423 IMUtils::IntResourceValueL( RSC_CHAT_VARIATION_UPDATE_CONTACTS_SETTING ); |
|
424 |
|
425 |
|
426 |
|
427 // and check dynamic features |
|
428 if ( havePresenceAuth ) |
|
429 { |
|
430 havePresenceAuth = appUi->UISessionManager().IsSupported( |
|
431 CCAUISessionManager::EAttrList ); |
|
432 } |
|
433 |
|
434 TBool groups( appUi->UISessionManager().IsSupported( |
|
435 CCAUISessionManager::EGroup ) ); |
|
436 TBool invitations( appUi->UISessionManager().IsSupported( |
|
437 CCAUISessionManager::EInvite ) ); |
|
438 |
|
439 |
|
440 if ( haveScreenName && groups ) |
|
441 { |
|
442 // Add item for nickname setting |
|
443 AddBinaryItemL( iDefaultNick, |
|
444 ENickName, |
|
445 R_CHATCLIENT_APPSETTINGS_DEFNICK_TITLE, |
|
446 R_CHAT_SET_DEF_NICK, |
|
447 R_CHAT_SET_DEF_NICK_TEXTS ); |
|
448 } |
|
449 |
|
450 |
|
451 if ( havePresenceAuth ) |
|
452 { |
|
453 // Add item for authorize IM presence setting |
|
454 AddEnumTextItemL( iAuthorizeIMPr, |
|
455 EAuthorizePresence, |
|
456 R_CHATCLIENT_APPSETTINGS_AUTHORIZEIMPR_TITLE, |
|
457 R_CHAT_SET_AUTHORIZEIMPR, |
|
458 R_CHAT_SET_AUTHORIZEIMPR_TEXTS ); |
|
459 } |
|
460 |
|
461 if ( haveGrant ) |
|
462 { |
|
463 // Add item for receive instant messages setting |
|
464 AddEnumTextItemL( iReceiveIMessages, |
|
465 EReceiveIMessages, |
|
466 R_CHATCLIENT_APPSETTINGS_RECEIVEIMESSAGES_TITLE, |
|
467 R_CHAT_SET_RECEIVEIMESSAGES, |
|
468 R_CHAT_SET_RECEIVEIMESSAGES_TEXTS ); |
|
469 } |
|
470 |
|
471 if ( groups && invitations ) |
|
472 { |
|
473 // Add item for receive invitations setting |
|
474 AddEnumTextItemL( iReceiveInvitations, |
|
475 EReceiveInvitations, |
|
476 R_CHATCLIENT_APPSETTINGS_RECEIVEINVITATIONS_TITLE, |
|
477 R_CHAT_SET_RECEIVEINVITATIONS, |
|
478 R_CHAT_SET_RECEIVEINVITATIONS_TEXTS ); |
|
479 } |
|
480 |
|
481 |
|
482 // Add item for contact list ordering |
|
483 AddBinaryItemL( iOrderAlphabetically, |
|
484 EContactOrdering, |
|
485 R_CHATCLIENT_APPSETTINGS_ORDERCONTACTS_TITLE, |
|
486 R_CHAT_SET_ORDERCONTACTS, |
|
487 R_CHAT_SET_ORDERCONTACTS_TEXTS ); |
|
488 |
|
489 // Add item for presence automatic update setting |
|
490 if ( updateContactsSetting == 0 ) |
|
491 // 0: automatic and manual modes are supported |
|
492 { |
|
493 AddBinaryItemL( iAutoUpdFriends, |
|
494 EFriendsListUpdate, |
|
495 R_CHATCLIENT_APPSETTINGS_FRIENDUPD_TITLE, |
|
496 R_CHAT_SET_FRIENDUPD, |
|
497 R_CHAT_SET_FRIENDUPD_TEXTS ); |
|
498 } |
|
499 |
|
500 // Add item for "show offline" setting |
|
501 AddBinaryItemL( iShowOffline, |
|
502 EShowOffline, |
|
503 R_QTN_CHAT_SET_SHOW_OFFLINE_CONTACTS, |
|
504 R_CHAT_SET_SHOW_OFFLINE, |
|
505 R_CHAT_SET_SHOW_OFFLINE_TEXTS ); |
|
506 |
|
507 //Tone settings |
|
508 #ifdef RD_30_COMPATIBILITY_MODE |
|
509 |
|
510 iBrandedTones = |
|
511 IMUtils::IntResourceValueL( R_AUDIO_FILELIST_MODEL_ENABLED ); |
|
512 |
|
513 #else // S60 Common |
|
514 |
|
515 // Check CR variation |
|
516 if ( IMUtils::CRKeyL( KCRUidIMVariation, KIMVariationKey ) |
|
517 & EIMFeatBrandableTones ) |
|
518 { |
|
519 // The brandtones setting is fetched only from Resource file, so IntResourceValueFromRssL is used instead of IntResourceValueL (which avoids searching the id in Cenrep) |
|
520 iBrandedTones = |
|
521 IMUtils::IntResourceValueFromRssL( RSC_CHAT_BRANDED_TONES ); |
|
522 } |
|
523 |
|
524 #endif // RD_30_COMPATIBILITY_MODE |
|
525 iToneFileName = HBufC::NewL( KMaxPath ); |
|
526 //Add tone setting item, if curren SAP is valid |
|
527 CIMPSSAPSettings* currSAP = NULL; |
|
528 TRAPD( err, |
|
529 { |
|
530 currSAP = iUISessionManager->CurrentSAPLC(); |
|
531 CleanupStack::PopAndDestroy( currSAP ); |
|
532 } |
|
533 ); |
|
534 |
|
535 if ( !err ) |
|
536 { |
|
537 // the color settings |
|
538 iOwnColorDefined = iSAPExtension->IntValueL( KIMOwnMessageColourKey ) |
|
539 != KErrNotFound; |
|
540 iOthersColorDefined = |
|
541 iSAPExtension->IntValueL( KIMOthersMessageColourKey ) |
|
542 != KErrNotFound; |
|
543 |
|
544 AddColourItemL( |
|
545 KIMOwnMessageColourKey, |
|
546 iOwnColorDefined, |
|
547 EOwnColor, |
|
548 R_QTN_CHAT_SET_FONT_COLOURS_OWN/*, |
|
549 R_CHAT_SET_MESSAGE_COLOR*/ ); |
|
550 |
|
551 AddColourItemL( |
|
552 KIMOthersMessageColourKey, |
|
553 iOthersColorDefined, |
|
554 EOtherColor, |
|
555 R_QTN_CHAT_SET_FONT_COLOURS_OTHER/*, |
|
556 R_CHAT_SET_MESSAGE_COLOR*/ ); |
|
557 } |
|
558 |
|
559 // Add item for "timestamp" setting |
|
560 AddBinaryItemL( iShowTimeStamp, |
|
561 EShowTimeStamp, |
|
562 R_QTN_CHAT_SETTINGS_TIMESTAMP, |
|
563 R_CHAT_SET_TIMESTAMP, |
|
564 R_CHAT_SET_TIMESTAMP_TEXTS ); |
|
565 |
|
566 if ( !err ) |
|
567 { |
|
568 // we have valid SAP |
|
569 AddToneSettingItemL( iBrandedTones ); |
|
570 iToneFileInUse = ETrue; |
|
571 } |
|
572 |
|
573 CTextListBoxModel* model = iListbox->Model(); |
|
574 model->SetItemTextArray( iSettingItemArray ); |
|
575 // Ownership retained by us |
|
576 model->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
577 |
|
578 iSettingItemArray->RecalculateVisibleIndicesL(); |
|
579 iListbox->SetMopParent( this ); |
|
580 iListbox->CreateScrollBarFrameL( ETrue ); |
|
581 iListbox->ScrollBarFrame()->SetScrollBarVisibilityL( |
|
582 CEikScrollBarFrame::EOff, |
|
583 CEikScrollBarFrame::EAuto ); |
|
584 iListbox->HandleItemAdditionL(); |
|
585 iListbox->SetListBoxObserver( this ); |
|
586 iListbox->UpdateScrollBarsL(); |
|
587 |
|
588 // create callback object |
|
589 iAsyncCallBack = new( ELeave )CAsyncCallBack( |
|
590 TCallBack( CallBack, this ), CActive::EPriorityIdle ); |
|
591 } |
|
592 |
|
593 // --------------------------------------------------------- |
|
594 // CCAAppSettingsDialog::OkToExitL |
|
595 // Can exit the dialog or not |
|
596 // (other items were commented in a header). |
|
597 // --------------------------------------------------------- |
|
598 // |
|
599 TBool CCAAppSettingsDialog::OkToExitL( TInt aButtonId ) |
|
600 { |
|
601 |
|
602 |
|
603 // if edit item is ongoing,avoid to shut dialog and destruct. |
|
604 if ( iIsEditItemFlag ) |
|
605 { |
|
606 return EFalse; |
|
607 } |
|
608 |
|
609 if ( aButtonId == EAknSoftkeyOptions ) |
|
610 { |
|
611 DisplayMenuL(); |
|
612 return EFalse; |
|
613 } |
|
614 |
|
615 if ( aButtonId == EAknSoftkeyBack || aButtonId == EAknSoftkeyExit ) |
|
616 { |
|
617 CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); |
|
618 cba->MakeCommandVisible( EAknSoftkeyBack, EFalse ); |
|
619 iSavingFlag = ETrue; |
|
620 } |
|
621 |
|
622 if ( aButtonId == EAknSoftkeyEdit ) |
|
623 { |
|
624 // MSK command |
|
625 HandleListBoxEventL( iListbox, EEventEnterKeyPressed ); |
|
626 return EFalse; |
|
627 } |
|
628 |
|
629 CCAAppUi* appUi = static_cast< CCAAppUi* >( iEikonEnv->AppUi() ); |
|
630 appUi->ShowWaitDialogL( R_QTN_CHAT_WAIT_SAVINGSETTINGS ); |
|
631 |
|
632 |
|
633 TRAPD( leave, StoreValuesL() ); |
|
634 // the dismisswaitdialogL leaves with the error code |
|
635 // and we must trap it to be able to exit the settings |
|
636 TRAPD( leave2, appUi->DismissWaitDialogL( leave ) ); |
|
637 |
|
638 // show any system errors |
|
639 if ( leave2 ) |
|
640 { |
|
641 CActiveScheduler::Current()->Error( leave2 ); |
|
642 } |
|
643 |
|
644 UpdateTitlePaneL( R_CHATCLIEN_SETTINGS_VIEW_TITLE ); |
|
645 |
|
646 if ( ( leave2 == KErrDiskFull || leave2 == KErrNoMemory ) && |
|
647 ( aButtonId != EAknSoftkeyExit && aButtonId != EEikCmdExit |
|
648 && aButtonId != EChatClientCmdExit ) |
|
649 ) |
|
650 { |
|
651 // no memory/disk due to failing network operations, |
|
652 // can't do rollback so we must stay here |
|
653 // BUT if the user really wants exit via Options/Exit then we must |
|
654 // go, no matter what. |
|
655 iSavingFlag = EFalse; |
|
656 return EFalse; |
|
657 } |
|
658 |
|
659 return ETrue; |
|
660 } |
|
661 |
|
662 |
|
663 // --------------------------------------------------------- |
|
664 // CCAAppSettingsDialog::DisplayTextSettingPageL |
|
665 // Launches text-setting page |
|
666 // (other items were commented in a header). |
|
667 // --------------------------------------------------------- |
|
668 // |
|
669 void CCAAppSettingsDialog::DisplayTextSettingPageL() |
|
670 { |
|
671 TPtr defaultNickName( iDefaultNickName->Des() ); |
|
672 CAknSettingPage* dlg = new( ELeave ) CAknTextSettingPage( |
|
673 R_CHAT_SET_DEF_NICK_EDIT, defaultNickName, |
|
674 CAknTextSettingPage::EZeroLengthNotOffered |
|
675 | CAknTextSettingPage::EPredictiveTextEntryPermitted ); |
|
676 |
|
677 dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ); |
|
678 } |
|
679 |
|
680 |
|
681 // --------------------------------------------------------- |
|
682 // CCAAppSettingsDialog::AddBinaryItemL |
|
683 // Add binary-type item to the settings array |
|
684 // (other items were commented in a header). |
|
685 // --------------------------------------------------------- |
|
686 // |
|
687 void CCAAppSettingsDialog::AddBinaryItemL( TBool& aBuffer, TInt aId, |
|
688 TInt aTitleResource, TInt aSettingPageResource, |
|
689 TInt aAssociatedResource ) |
|
690 { |
|
691 // Create new setting item |
|
692 CAknSettingItem* settingItem = |
|
693 new ( ELeave ) CAknBinaryPopupSettingItem( aId, aBuffer ); |
|
694 CleanupStack::PushL( settingItem ); |
|
695 |
|
696 // Construct setting item with parametrized values |
|
697 HBufC* itemTitle = iEikonEnv->AllocReadResourceLC( aTitleResource ); |
|
698 settingItem->ConstructL( EFalse, iOrdinal, *itemTitle, NULL, |
|
699 aSettingPageResource, EAknCtPopupSettingList, NULL, |
|
700 aAssociatedResource ); |
|
701 CleanupStack::PopAndDestroy( itemTitle ); |
|
702 // Append item to settingitem-array |
|
703 iSettingItemArray->AppendL( settingItem ); |
|
704 CleanupStack::Pop( settingItem ); |
|
705 |
|
706 // New item added -> increase item's ordinal value |
|
707 iOrdinal++; |
|
708 } |
|
709 |
|
710 // --------------------------------------------------------- |
|
711 // CCAAppSettingsDialog::AddEnumTextItemL |
|
712 // Add enumerated text-type item to the settings array |
|
713 // (other items were commented in a header). |
|
714 // --------------------------------------------------------- |
|
715 // |
|
716 void CCAAppSettingsDialog::AddEnumTextItemL( |
|
717 TInt& aBuffer, |
|
718 TInt aId, |
|
719 TInt aTitleResource, |
|
720 TInt aSettingPageResource, |
|
721 TInt aAssociatedResource ) |
|
722 { |
|
723 // Create new setting item |
|
724 CAknSettingItem* settingItem = |
|
725 new( ELeave )CAknEnumeratedTextPopupSettingItem( aId, aBuffer ); |
|
726 CleanupStack::PushL( settingItem ); |
|
727 |
|
728 // Construct setting item with parametrized values |
|
729 HBufC* itemTitle = iEikonEnv->AllocReadResourceLC( aTitleResource ); |
|
730 settingItem->ConstructL( EFalse, iOrdinal, *itemTitle, NULL, |
|
731 aSettingPageResource, EAknCtPopupSettingList, |
|
732 NULL, aAssociatedResource ); |
|
733 CleanupStack::PopAndDestroy( itemTitle ); |
|
734 // Append item to settingitem-array |
|
735 iSettingItemArray->AppendL( settingItem ); |
|
736 |
|
737 CleanupStack::Pop( settingItem ); |
|
738 |
|
739 // New item added -> increase item's ordinal value |
|
740 iOrdinal++; |
|
741 } |
|
742 |
|
743 // --------------------------------------------------------- |
|
744 // CCAAppSettingsDialog::AddColourItemL |
|
745 // (other items were commented in a header). |
|
746 // --------------------------------------------------------- |
|
747 // |
|
748 void CCAAppSettingsDialog::AddColourItemL( |
|
749 const TDesC& aKey, |
|
750 TBool& aBuffer, |
|
751 TInt aId, |
|
752 TInt aTitleResource ) |
|
753 { |
|
754 // Create new colour setting item |
|
755 CCAColourSettingItem* settingItem = |
|
756 new ( ELeave ) CCAColourSettingItem( *iSAPExtension, aBuffer, aId ); |
|
757 CleanupStack::PushL( settingItem ); |
|
758 |
|
759 // Construct setting item with parametrized values |
|
760 HBufC* itemTitle = iEikonEnv->AllocReadResourceLC( aTitleResource ); |
|
761 CArrayPtr<CGulIcon>* iconArray = |
|
762 iListbox->ItemDrawer()->ColumnData()->IconArray(); |
|
763 |
|
764 settingItem->ConstructL( |
|
765 aKey, |
|
766 iOrdinal, |
|
767 *itemTitle, |
|
768 iconArray ); |
|
769 |
|
770 CleanupStack::PopAndDestroy( itemTitle ); |
|
771 // Append item to settingitem-array |
|
772 iSettingItemArray->AppendL( settingItem ); |
|
773 |
|
774 CleanupStack::Pop( settingItem ); |
|
775 |
|
776 // New item added -> increase item's ordinal value |
|
777 iOrdinal++; |
|
778 } |
|
779 |
|
780 // --------------------------------------------------------- |
|
781 // CCAAppSettingsDialog::StoreValuesL |
|
782 // Store the setting values to persistent storage |
|
783 // (other items were commented in a header). |
|
784 // --------------------------------------------------------- |
|
785 // |
|
786 void CCAAppSettingsDialog::StoreValuesL() |
|
787 { |
|
788 StoreAllL(); |
|
789 // Attention /////////////////////////////////////////// |
|
790 // Store first all settings that don't cause any network operations |
|
791 // |
|
792 CIMPSSAPSettings* server = NULL; |
|
793 |
|
794 #ifdef RD_SETTINGS_FACELIFT |
|
795 server = iServer; |
|
796 #endif //RD_SETTINGS_FACELIFT |
|
797 // nickname |
|
798 if ( iDefaultNick && iDefaultNickName->Length() > 0 ) |
|
799 { |
|
800 iSettingsPC->SetBoolValuePCL( TEnumsPC::EDefaultScreenNameInUse, ETrue, NULL, server ); |
|
801 iSettingsPC->SetSapSettingValuePCL( TEnumsPC::EDefaultScreenName, *iDefaultNickName, NULL, server ); |
|
802 } |
|
803 else |
|
804 { |
|
805 iSettingsPC->SetBoolValuePCL( TEnumsPC::EDefaultScreenNameInUse, EFalse, NULL, server ); |
|
806 |
|
807 if ( iOldDefaultNick ) |
|
808 { |
|
809 CCAAppUi* appUi = static_cast< CCAAppUi* >( iEikonEnv->AppUi() ); |
|
810 TPtr ptr( appUi->ScreenNamePtr()->Des() ); |
|
811 ptr.Copy( KNullDesC() ); |
|
812 } |
|
813 } |
|
814 |
|
815 // flow control |
|
816 iSettingsPC->SetIntValuePCL( TEnumsPC::EMessageFlowSettingLevel, iMsgFlow, NULL, server ); |
|
817 |
|
818 // contact list ordering |
|
819 TInt order( TEnumsPC::EPresence ); |
|
820 if ( iOrderAlphabetically ) |
|
821 { |
|
822 order = TEnumsPC::EAlphabetical; |
|
823 } |
|
824 iSettingsPC->SetIntValuePCL( TEnumsPC::EFriendsListOrdering, order, NULL, server ); |
|
825 |
|
826 // "show offline contacts" |
|
827 iSettingsPC->SetBoolValuePCL( TEnumsPC::EShowOffline, iShowOffline, NULL, server ); |
|
828 |
|
829 // receive invitations - this is currently handled locally, |
|
830 // so no network operations needed for changing this |
|
831 iSettingsPC->SetIntValuePCL( TEnumsPC::EReceiveInvitations, |
|
832 iReceiveInvitations, NULL, server ); |
|
833 |
|
834 // Show "timestamp" setting |
|
835 iSettingsPC->SetBoolValuePCL( TEnumsPC::EShowTimeStamps, |
|
836 iShowTimeStamp, NULL, server ); |
|
837 |
|
838 // Attention////////// |
|
839 // The following setting items might require a network operation |
|
840 // |
|
841 |
|
842 RArray<TInt> ignoreRollback; |
|
843 CleanupClosePushL( ignoreRollback ); |
|
844 // ignore rollback operation of settings manager |
|
845 // in following error situations |
|
846 User::LeaveIfError( ignoreRollback.Append( ECSPPartiallySuccessful ) ); |
|
847 User::LeaveIfError( ignoreRollback.Append( ECSPUnknownUserId ) ); |
|
848 |
|
849 // receive IMessages from |
|
850 TRAPD( errReceiveIMsg, iSettingsPC->SetIntValuePCL( TEnumsPC::EReceiveIMessages, |
|
851 iReceiveIMessages, &ignoreRollback, server ); ); |
|
852 HandleErrorL( errReceiveIMsg ); |
|
853 |
|
854 // authorize IM presence to |
|
855 TRAPD( errAuthorize, iSettingsPC->SetIntValuePCL( |
|
856 TEnumsPC::EAuthorizeIMPresence, iAuthorizeIMPr, &ignoreRollback, server ); ); |
|
857 HandleErrorL( errAuthorize ); |
|
858 |
|
859 // automatic presence update |
|
860 TRAPD( errAutoUpd, iSettingsPC->SetBoolValuePCL( |
|
861 TEnumsPC::EAutomaticPresenceUpdate, |
|
862 iAutoUpdFriends, &ignoreRollback, server ); ); |
|
863 |
|
864 HandleErrorL( errAutoUpd ); |
|
865 |
|
866 if ( iToneFileInUse ) |
|
867 { |
|
868 iSAPExtension->SetToneFileNameL( *iToneFileName ); //;SetToneFileNameL( *iToneFileName ); |
|
869 } |
|
870 |
|
871 // Flush data to persistent storage |
|
872 iSettingsPC->FlushDataPC(); |
|
873 |
|
874 if ( errReceiveIMsg || errAuthorize || errAutoUpd ) |
|
875 { |
|
876 CHAT_DP_TXT( "**Settings not updated properly**" ); |
|
877 // something went wrong, leave with general server error code |
|
878 // unless it's partially succesful |
|
879 if ( errReceiveIMsg != ECSPPartiallySuccessful && |
|
880 errAuthorize != ECSPPartiallySuccessful && |
|
881 errAutoUpd != ECSPPartiallySuccessful ) |
|
882 { |
|
883 CHAT_DP_TXT( "**leaving**" ); |
|
884 User::Leave( EGeneralServerError ); |
|
885 } |
|
886 } |
|
887 |
|
888 CleanupStack::PopAndDestroy(); // ignoreRollback.Close() |
|
889 } |
|
890 |
|
891 // --------------------------------------------------------- |
|
892 // CCAAppSettingsDialog::HandleErrorL |
|
893 // (other items were commented in a header). |
|
894 // --------------------------------------------------------- |
|
895 // |
|
896 void CCAAppSettingsDialog::HandleErrorL( TInt aErrorCode ) |
|
897 { |
|
898 CHAT_DP( D_CHAT_LIT( "CCAAppSettingsDialog::HandleErrorL %d" ), aErrorCode ); |
|
899 if ( ( aErrorCode < KErrNone ) && ( aErrorCode > Imps_ERROR_BASE ) ) |
|
900 { |
|
901 // leave on everything but IMPS errors |
|
902 User::Leave( aErrorCode ); |
|
903 } |
|
904 } |
|
905 |
|
906 // --------------------------------------------------------- |
|
907 // CCAAppSettingsDialog::StoreAllL |
|
908 // Externalizes the values of setting items' iternal buffers |
|
909 // (other items were commented in a header). |
|
910 // --------------------------------------------------------- |
|
911 // |
|
912 void CCAAppSettingsDialog::StoreAllL() const |
|
913 { |
|
914 TInt settingCount( iSettingItemArray->Count() ); |
|
915 for ( TInt ii( 0 ); ii < settingCount ; ++ii ) |
|
916 { |
|
917 ( *iSettingItemArray )[ii]->StoreL(); |
|
918 } |
|
919 } |
|
920 |
|
921 // --------------------------------------------------------- |
|
922 // CCAAppSettingsDialog::UpdateTitlePaneL |
|
923 // Updates title-pane text with text found from given resource id |
|
924 // (other items were commented in a header). |
|
925 // --------------------------------------------------------- |
|
926 // |
|
927 void CCAAppSettingsDialog::UpdateTitlePaneL( const TInt aResourceId ) |
|
928 { |
|
929 iTitlePane->SetTitleL( iEikonEnv, aResourceId ); |
|
930 } |
|
931 |
|
932 // --------------------------------------------------------- |
|
933 // CCAAppSettingsDialog::LaunchDialog |
|
934 // (other items were commented in a header). |
|
935 // --------------------------------------------------------- |
|
936 // |
|
937 TInt CCAAppSettingsDialog::CallBack( TAny* aInstance ) |
|
938 { |
|
939 TInt retVal( EFalse ); |
|
940 TRAPD( error, static_cast<CCAAppSettingsDialog*>( aInstance )->DoHandleCallBackL(); ); |
|
941 if ( error ) |
|
942 { |
|
943 CActiveScheduler::Current()->Error( error ); |
|
944 } |
|
945 |
|
946 static_cast<CCAAppSettingsDialog*>( aInstance )->SetIsTargetDialogOpened( EFalse ); |
|
947 |
|
948 return retVal; |
|
949 } |
|
950 |
|
951 // --------------------------------------------------------- |
|
952 // CCAAppSettingsDialog::DoHandleCallBackL |
|
953 // (other items were commented in a header). |
|
954 // --------------------------------------------------------- |
|
955 // |
|
956 TInt CCAAppSettingsDialog::DoHandleCallBackL() |
|
957 { |
|
958 // If one item is in editing, just return |
|
959 if ( iIsEditItemFlag ) |
|
960 return EFalse; |
|
961 |
|
962 __ASSERT_ALWAYS( iEditIndex >= 0 && |
|
963 iEditIndex < iSettingItemArray->MdcaCount(), |
|
964 User::Leave( KErrArgument ) ); |
|
965 |
|
966 // Check disk space before editing |
|
967 IMUtils::FFSSpaceBelowCriticalLevelL(); |
|
968 |
|
969 TBool reload( EFalse ); |
|
970 |
|
971 CAknSettingItem* item = iSettingItemArray->At( iEditIndex ); |
|
972 TSettingListLayout identifier = ( TSettingListLayout )item->Identifier(); |
|
973 |
|
974 // edit it |
|
975 // lock edit item operationto to avoid OkToExit() invoke |
|
976 // before EditItem() function finished. |
|
977 iIsEditItemFlag = ETrue; |
|
978 TRAPD( err, item->EditItemL( iIsPopUp ) ); |
|
979 iIsEditItemFlag = EFalse; |
|
980 if ( err == KErrCancel ) |
|
981 { |
|
982 // if canceled return immediately. |
|
983 return EFalse; |
|
984 } |
|
985 item->StoreL(); |
|
986 |
|
987 iListbox->DrawItem( iEditIndex ); |
|
988 |
|
989 // Do special settings handling for certain items |
|
990 switch ( identifier ) |
|
991 { |
|
992 case ENickName: |
|
993 { |
|
994 if ( iDefaultNick ) |
|
995 { |
|
996 DisplayTextSettingPageL(); |
|
997 // If user did not give default nickname, then turn default |
|
998 // nickname option off |
|
999 if ( iDefaultNickName->Length() == 0 ) |
|
1000 { |
|
1001 iDefaultNick = EFalse; |
|
1002 reload = ETrue; |
|
1003 } |
|
1004 } |
|
1005 break; |
|
1006 } |
|
1007 case EFriendsListUpdate: |
|
1008 { |
|
1009 if ( !iAutoUpdFriends ) |
|
1010 { |
|
1011 IMDialogUtils::DisplayInformationNoteL( R_QTN_CHAT_SET_WATCH_DEACTIVATED ); |
|
1012 } |
|
1013 break; |
|
1014 } |
|
1015 |
|
1016 default: |
|
1017 { |
|
1018 // avkon handles other items |
|
1019 break; |
|
1020 } |
|
1021 } |
|
1022 |
|
1023 if ( reload ) |
|
1024 { |
|
1025 // reload and update item |
|
1026 item->LoadL(); |
|
1027 item->UpdateListBoxTextL(); |
|
1028 iListbox->DrawItem( iEditIndex ); |
|
1029 } |
|
1030 |
|
1031 HandleCBAChangeL( R_CHAT_SOFTKEYS_OPTIONS_BACK__CHANGE ); |
|
1032 return EFalse; |
|
1033 } |
|
1034 |
|
1035 //----------------------------------------------------------------------------- |
|
1036 |
|
1037 //----------------------------------------------------------------------------- |
|
1038 |
|
1039 void CCAAppSettingsDialog::GetParameters( MCAUiSettingsDialogCmdCB::TSettingsDialogParams& aSettingsDialogParams ) |
|
1040 { |
|
1041 |
|
1042 aSettingsDialogParams.iPreserveSessionIdInExit = EFalse; |
|
1043 |
|
1044 aSettingsDialogParams.iSap = iServer; |
|
1045 } |
|
1046 |
|
1047 |
|
1048 |
|
1049 /** |
|
1050 * Help Key Support |
|
1051 * This function is called by the Framework to get the context to launch |
|
1052 * Help |
|
1053 * |
|
1054 * @param aContext The context that contains the appid and the help id. |
|
1055 */ |
|
1056 void CCAAppSettingsDialog::GetHelpContext( |
|
1057 TCoeHelpContext& aContext ) const |
|
1058 { |
|
1059 aContext.iMajor = KUidChatClient; |
|
1060 aContext.iContext = KIMNG_HLP_APPSETT; |
|
1061 } |
|
1062 |
|
1063 // --------------------------------------------------------- |
|
1064 // CCAAppSettingsDialog::SetIsTargetDialogOpened |
|
1065 // (other items were commented in a header). |
|
1066 // --------------------------------------------------------- |
|
1067 // |
|
1068 void CCAAppSettingsDialog::SetIsTargetDialogOpened( TBool aBool ) |
|
1069 { |
|
1070 iIsTargetDialogOpened = aBool; |
|
1071 } |
|
1072 |
|
1073 // --------------------------------------------------------- |
|
1074 // CCAAppSettingsDialog::GetIsTargetDialogOpened |
|
1075 // (other items were commented in a header). |
|
1076 // --------------------------------------------------------- |
|
1077 // |
|
1078 TBool CCAAppSettingsDialog::GetIsTargetDialogOpened() |
|
1079 { |
|
1080 return iIsTargetDialogOpened; |
|
1081 } |
|
1082 |
|
1083 // End of File |