FreeCalypso > hg > fc-magnetite
comparison src/ui3/bmi/mmiSettings.c @ 421:6a4d9f47793e
src/ui3/bmi: file renames to make the case consistent
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 21 Jan 2018 03:28:53 +0000 |
parents | src/ui3/bmi/MmiSettings.c@e8ddbb0837ed |
children | 293c7db5f10f |
comparison
equal
deleted
inserted
replaced
420:e8ddbb0837ed | 421:6a4d9f47793e |
---|---|
1 /******************************************************************************* | |
2 | |
3 CONDAT (UK) | |
4 | |
5 ******************************************************************************** | |
6 | |
7 This software product is the property of Condat (UK) Ltd and may not be | |
8 disclosed to any third party without the express permission of the owner. | |
9 | |
10 ******************************************************************************** | |
11 | |
12 $Project name: Basic MMI | |
13 $Project code: BMI (6349) | |
14 $Module: Settings | |
15 $File: MmiSettings.c | |
16 $Revision: 1.0 | |
17 | |
18 $Author: Condat(UK) | |
19 $Date: 25/10/00 | |
20 | |
21 ******************************************************************************** | |
22 | |
23 Description: | |
24 | |
25 | |
26 ******************************************************************************** | |
27 $History: MmiSettings.c | |
28 | |
29 Mar 28, 2007 DR: OMAPS00122762 x0039928 | |
30 Description: MM: Deleting a PCM Voice Memo message in one particular memory, | |
31 delete them in all memories | |
32 Solution: voice memo position and pcm voice memo position is provided for all the devices. | |
33 | |
34 Oct 30 2006, OMAPS00098881 x0039928(sumanth) | |
35 Removal of power variant | |
36 | |
37 xashmic 27 Sep 2006, OMAPS00096389 | |
38 ENH - a) Providing static menu for re-selection of enum options for enumeration | |
39 b) Popup menu displayed on connect event, can be enabled or disabled via menu option | |
40 | |
41 xashmic 9 Sep 2006, OMAPS00092732 | |
42 USBMS ER | |
43 | |
44 May 30, 2006 DR: OMAPS00070657 x0pleela | |
45 Description: CPHS feature on Locosto-Lite | |
46 Solution: For ALS feature, | |
47 a) Updating function "setUserSettings2Default ()" to memset Line1 and line2 | |
48 fields of FFS_flashData | |
49 | |
50 Apr 06, 2006 ERT: OMAPS00070660 x0039928(sumanth) | |
51 Description: Need to reduce flash foot-print for Locosto Lite | |
52 Solution: Voice Memo feature is put under the flag #ifndef FF_NO_VOICE_MEMO to compile | |
53 out voice memo feature if the above flag is enabled. | |
54 | |
55 May 04, 2005 REF: CRR 30285 x0021334 | |
56 Description: SMS Status Request in idle and dedicated mode (using Menu) setting does not work | |
57 Solution: status of sms status request is read and focus is set accrodingly. | |
58 | |
59 March 2, 2005 REF: CRR 11536 x0018858 | |
60 Description: Reply path not supported while sending a reply. | |
61 Solution: Added menu option for the reply path. | |
62 | |
63 Aug 25, 2004 REF: CRR 24904 Deepa M.D | |
64 Bug:cleanup compile switches used for Go-lite | |
65 Fix:COLOURDISPLAY compiler switch has been added to the functions which are | |
66 used only for the normal color build. | |
67 | |
68 xrashmic 7 Dec, 2004 MMI-SPR-23965 | |
69 Description: Not able to extract the objects in EMS message | |
70 Solution: Extract and store the objects in the Object Manager | |
71 | |
72 xrashmic 29 Nov, 2004 MMI-SPR-26161 | |
73 Description: The downloaded object through wap was not visible to the MMI | |
74 Solution: The downloaded wap object is available in the object manager | |
75 and can be used by the MMS | |
76 | |
77 Jul 28, 2004 REF: CRR 20899 xkundadu | |
78 Description: No identification for user whether 'Any-key-Answer' is On/Off | |
79 Solution: The menu focus will be on the 'On' menu if the 'Any key | |
80 answer' is enabled, otherwise focus will be on 'Off' menu item. | |
81 Changed "submenu" to "menuItem" to call a function, to set focus to | |
82 the selected option.Added function settingsFocusCurSelAnyKeyAns() | |
83 to set the focus to selected item. | |
84 | |
85 | |
86 Jul 29, 2004 REF: CRR 20898 xkundadu | |
87 Description: No identification for user whether 'Auto-Answer' is On/Off | |
88 Solution: The menu focus will be on the 'On' menu if the 'Auto | |
89 answer' is enabled, otherwise focus will be on 'Off' menu item. | |
90 Changed 'submenu' to 'menuItem' to call a function, which sets the | |
91 focus to the selected option. Added the function | |
92 settingsFocusCurSelAutoAns() to set the focus to selected item. | |
93 | |
94 | |
95 Jul 22,2004 CRR:20896 xrashmic - SASKEN | |
96 Description: The current time format is not highlighted | |
97 Fix: Instead of providing the submenu directly we call a function | |
98 where we set the menu and also higlight the previously selected menu item | |
99 | |
100 // Issue Number : SPR#12822 on 31/03/04 by vvadiraj | |
101 May 10, 2004 REF: CRR 15753 Deepa M.D | |
102 Menuitem provided to set the validity period to maximum. | |
103 $End | |
104 *******************************************************************************/ | |
105 | |
106 | |
107 /******************************************************************************* | |
108 | |
109 Include Files | |
110 | |
111 *******************************************************************************/ | |
112 | |
113 #define ENTITY_MFW | |
114 | |
115 /* includes */ | |
116 #include <string.h> | |
117 #include <stdio.h> | |
118 #include <stdlib.h> | |
119 | |
120 #if defined (NEW_FRAME) | |
121 | |
122 #include "typedefs.h" | |
123 #include "vsi.h" | |
124 #include "pei.h" | |
125 #include "custom.h" | |
126 #include "gsm.h" | |
127 | |
128 #else | |
129 | |
130 #include "STDDEFS.H" | |
131 #include "custom.h" | |
132 #include "gsm.h" | |
133 #include "vsi.h" | |
134 | |
135 #endif | |
136 #include "mfw_sys.h" | |
137 | |
138 #include "prim.h" | |
139 | |
140 #include "mfw_mfw.h" | |
141 #include "mfw_win.h" | |
142 #include "mfw_kbd.h" | |
143 /* SPR#1428 - SH - New Editor changes */ | |
144 #ifndef NEW_EDITOR | |
145 #include "mfw_edt.h" | |
146 #endif | |
147 #include "mfw_lng.h" | |
148 #include "mfw_tim.h" | |
149 #include "mfw_icn.h" | |
150 #include "mfw_mnu.h" | |
151 #include "mfw_phb.h" | |
152 #include "mfw_cm.h" | |
153 #include "mfw_sim.h" | |
154 #include "mfw_nm.h" | |
155 #include "mfw_sat.h" | |
156 #include "mfw_phb.h" | |
157 #include "ksd.h" | |
158 #include "psa.h" | |
159 #include "mfw_sms.h" | |
160 #include "mfw_cphs.h" | |
161 #include "mfw_sat.h" | |
162 #include "Mfw_td.h" | |
163 | |
164 #include "mfw_mme.h"//xashmic 27 Sep 2006, OMAPS00096389 | |
165 | |
166 #include "dspl.h" | |
167 | |
168 #include "MmiMmi.h" | |
169 #include "MmiDummy.h" | |
170 #include "MmiDialogs.h" | |
171 #include "MmiLists.h" | |
172 #include "MmiIdle.h" | |
173 #include "MmiSoftKeys.h" | |
174 #include "Mmiicons.h" | |
175 #include "MmiSounds.h" | |
176 #include "MmiMenu.h" | |
177 #include "MmiMain.h" | |
178 #include "MmiStart.h" | |
179 #include "MmiPins.h" | |
180 #include "MmiSettings.h" | |
181 | |
182 #ifndef FF_NO_VOICE_MEMO | |
183 #include "MmiVoiceMemo.h" | |
184 #endif | |
185 | |
186 #include "mfw_ffs.h" | |
187 #include "MmiTimers.h" | |
188 #include "MmiResources.h" | |
189 | |
190 #include "cus_aci.h" | |
191 | |
192 | |
193 #include "mmiColours.h" | |
194 | |
195 #define CLEAR_BOTTOM_ZONE dspl_Clear( KEY_AREA ); | |
196 T_MFW_SMS_INFO SmsConfigData; | |
197 | |
198 //ADDED BY RAVI - 28-11-2005 | |
199 extern UBYTE SmsSend_get_config_data (T_MFW_SMS_INFO *config_data); | |
200 // END ADD BY RAVI | |
201 | |
202 static int winEvent (MfwEvt e, MfwWin *w); | |
203 | |
204 void confirm (T_MFW_HND win, USHORT event, SHORT value, void * parameter); | |
205 void confirm_dialog_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason); | |
206 static void confirm_dialog(void); | |
207 static int confirm_win_cb (T_MFW_EVENT event, T_MFW_WIN * win); | |
208 void confirm_destroy (T_MFW_HND own_window); | |
209 T_MFW_HND confirm_create (T_MFW_HND parent_window); | |
210 void confirm_Exit (T_MFW_HND own_window); | |
211 T_MFW_HND confirm_Init (T_MFW_HND parent_window); | |
212 void setUserSettings2Default (void); | |
213 | |
214 | |
215 static void (*show) (void); | |
216 | |
217 static MfwHnd win; /* our window */ | |
218 /* static MmiState nextState; // next state when finished x0039928 - Lint warning fix */ | |
219 /* static DisplayData DisplayInfo; x0039928 - Lint warning fix */ | |
220 | |
221 | |
222 | |
223 #define SHOW_CONFIRM 3 | |
224 #define ACTIVATE_CONFIRM 4 | |
225 #define DEACTIVATE_CONFIRM 5 | |
226 #define FACTORY_RESET 6 | |
227 | |
228 UBYTE reply_path_bit =0; | |
229 | |
230 typedef struct | |
231 { | |
232 T_MMI_CONTROL mmi_control; | |
233 T_MFW_HND confirm_win; /* MFW win handler */ | |
234 UBYTE local_status; | |
235 } T_confirm; | |
236 | |
237 T_confirm confirm_data; | |
238 | |
239 | |
240 /* | |
241 * Settings menu subs: | |
242 */ | |
243 | |
244 | |
245 | |
246 | |
247 #define ON 0 | |
248 #define OFF 1 | |
249 #define CLEAR 2 | |
250 | |
251 | |
252 typedef struct | |
253 { | |
254 UBYTE setting; | |
255 UBYTE status; | |
256 } T_settings; | |
257 | |
258 //GW Added for settings not stored in FFS | |
259 static unsigned int BMIsettings=0; /* x0039928 - Lint warning fix */ | |
260 | |
261 typedef enum | |
262 { | |
263 ENGLISH = 0, | |
264 GERMAN, | |
265 AUTOREDIAL, | |
266 AUTOANSWER, | |
267 ANYKEYANSWER, | |
268 CALLTIMERS, | |
269 KEYPAD_CLICK, | |
270 KEYPAD_DTMF, | |
271 KEYPAD_SILENT, | |
272 #ifndef FF_NO_VOICE_MEMO | |
273 VOICE_MEMO, | |
274 #endif | |
275 #ifdef FF_POWER_MANAGEMENT | |
276 LCD_REFRESH, /*OMAPS00098881 (removing power variant) a0393213(Prabakar)*/ | |
277 #endif | |
278 MAX | |
279 }T_FACTORY_RESET_LIST; | |
280 | |
281 | |
282 | |
283 T_settings DEFAULT_SETTINGS[] = | |
284 { | |
285 {ENGLISH, ON}, //select the Language:English as a default | |
286 {GERMAN, OFF}, | |
287 {AUTOREDIAL, OFF}, | |
288 {AUTOANSWER, OFF}, | |
289 {ANYKEYANSWER, OFF}, | |
290 {CALLTIMERS, CLEAR}, | |
291 {KEYPAD_CLICK, ON}, //only one of the Keypads are eligible | |
292 {KEYPAD_DTMF, OFF}, | |
293 {KEYPAD_SILENT, OFF}, | |
294 #ifndef FF_NO_VOICE_MEMO | |
295 {VOICE_MEMO, CLEAR}, | |
296 #endif | |
297 #ifdef FF_POWER_MANAGEMENT | |
298 {LCD_REFRESH, ON}, /*OMAPS00098881 (removing power variant) a0393213(Prabakar)*/ | |
299 #endif | |
300 {MAX, 0xFF} | |
301 }; | |
302 | |
303 /******************************************************************************* | |
304 | |
305 $Function: SmsValidityPeriod | |
306 | |
307 $Description: Store the validity period information, selected by the user. | |
308 | |
309 | |
310 $Returns: Execution status | |
311 | |
312 $Arguments: m - menu handler | |
313 i - Menu item selected | |
314 | |
315 *******************************************************************************/ | |
316 int SmsValidityPeriod(MfwMnu* m, MfwMnuItem* i) | |
317 { | |
318 T_MFW_SMS_INFO sms_parameter; | |
319 UBYTE index = 0; // RAVI - Assigned 0. | |
320 T_DISPLAY_DATA DisplayInfo; | |
321 int txtId = 0; // RAVI - Assigned 0. | |
322 | |
323 T_MFW_HND win = mfwParent(mfw_header()); | |
324 | |
325 TRACE_FUNCTION(">>>> SmsValidityPeriod()"); | |
326 | |
327 /*SPR#1952 - DS - Show the new period setting on pop-up dialog */ | |
328 switch (m->lCursor[m->level]) | |
329 { | |
330 case 0: | |
331 txtId = Txt1Hour; | |
332 index = VP_REL_1_HOUR; | |
333 break; | |
334 case 1: | |
335 txtId = Txt12Hours; | |
336 index = VP_REL_12_HOURS; | |
337 break; | |
338 case 2: | |
339 txtId = Txt24Hours; | |
340 index = VP_REL_24_HOURS; | |
341 break; | |
342 case 3: | |
343 txtId = Txt1Week; | |
344 index = VP_REL_1_WEEK; | |
345 break; | |
346 case 4: | |
347 txtId = TxtMaxTime; | |
348 index = VP_REL_MAXIMUM; // May 10, 2004 REF: CRR 15753 Deepa M.D | |
349 break; | |
350 | |
351 } | |
352 | |
353 /* API - 28/07/03 - CQ10203 - Read the Data and then set the REL VP identifier*/ | |
354 SmsSend_get_config_data(&sms_parameter); | |
355 | |
356 FFS_flashData.vp_rel = index; | |
357 flash_write(); | |
358 | |
359 sms_parameter.vp_rel = FFS_flashData.vp_rel; | |
360 TRACE_EVENT_P1("sms_parameter.vp_rel = %d", sms_parameter.vp_rel); | |
361 /*API - CQ10203 END*/ | |
362 | |
363 if (sms_set_val_period(&sms_parameter) == MFW_SMS_OK) | |
364 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtCancel,TxtSmsValidityPeriodSet, txtId /*SPR#1952*/, COLOUR_STATUS); | |
365 else | |
366 dlg_initDisplayData_TextId( &DisplayInfo, TxtNull, TxtCancel,TxtFailed, TxtNull, COLOUR_STATUS); | |
367 | |
368 dlg_initDisplayData_events( &DisplayInfo, (T_VOID_FUNC)NULL, THREE_SECS, KEY_RIGHT|KEY_CLEAR ); | |
369 | |
370 // Display confirmation screen. | |
371 info_dialog(win,&DisplayInfo); | |
372 | |
373 return 1; | |
374 } | |
375 | |
376 | |
377 /* Marcus: Issue 1170: 30/09/2002: Start */ | |
378 /******************************************************************************* | |
379 | |
380 $Function: SmsStatusReportRequest | |
381 | |
382 $Description: Activate/Deactivate SRR, selected by the user. | |
383 | |
384 $Returns: Execution status | |
385 | |
386 $Arguments: m - menu handler | |
387 i - Menu item selected | |
388 | |
389 *******************************************************************************/ | |
390 int SmsStatusReportRequest(MfwMnu* m, MfwMnuItem* i) | |
391 { | |
392 int index = m->lCursor[m->level]; | |
393 T_DISPLAY_DATA DisplayInfo; | |
394 T_MFW_SMS_INFO sms_info; | |
395 T_MFW_HND win = mfwParent(mfw_header()); | |
396 int TextId2; | |
397 TRACE_FUNCTION(">>>> SmsStatusReportRequest()"); | |
398 | |
399 if (sms_parameter(&sms_info, TRUE) == MFW_SMS_OK) | |
400 { | |
401 if (index == 0) | |
402 sms_info.srr = SMS_NOT_REQUESTED_SRR; | |
403 else | |
404 sms_info.srr = SMS_REQUESTED_SRR; | |
405 | |
406 if (sms_parameter(&sms_info, FALSE) == MFW_SMS_OK) | |
407 { | |
408 | |
409 if (index == 0) | |
410 TextId2 = TxtOff; | |
411 else | |
412 TextId2 = TxtOn; | |
413 | |
414 dlg_initDisplayData_TextId( &DisplayInfo, TxtSoftOK, TxtNull,TxtSRR, TextId2, COLOUR_POPUP); | |
415 dlg_initDisplayData_events( &DisplayInfo, (T_VOID_FUNC)NULL, THREE_SECS, KEY_RIGHT | KEY_LEFT ); | |
416 | |
417 info_dialog(win,&DisplayInfo); | |
418 } | |
419 } | |
420 return 1; | |
421 } | |
422 /* Marcus: Issue 1170: 30/09/2002: End */ | |
423 | |
424 /* | |
425 March 2, 2005 REF: CRR 11536 x0018858 | |
426 Added a function to set the Reply path | |
427 */ | |
428 //begin -11536 | |
429 /******************************************************************************* | |
430 | |
431 $Function: SmsReplyPathRequest | |
432 | |
433 $Description: Activate/Deactivate reply path, selected by the user. | |
434 | |
435 $Returns: Execution status | |
436 | |
437 $Arguments: m - menu handler | |
438 i - Menu item selected | |
439 | |
440 | |
441 *******************************************************************************/ | |
442 | |
443 int SmsReplyPathRequest(MfwMnu* m, MfwMnuItem* i) | |
444 { | |
445 int index = m->lCursor[m->level]; | |
446 T_DISPLAY_DATA DisplayInfo; | |
447 T_MFW_SMS_INFO sms_info; | |
448 T_MFW_HND win = mfwParent(mfw_header()); | |
449 int TextId2; | |
450 TRACE_FUNCTION(">>>> SmsReplyPathRequest()"); | |
451 | |
452 if (sms_parameter(&sms_info, TRUE) == MFW_SMS_OK) | |
453 { | |
454 if (index == 0) | |
455 reply_path_bit= SMS_UNSET_RP; | |
456 else | |
457 reply_path_bit= SMS_SET_RP; | |
458 | |
459 TRACE_EVENT_P1("The reply paTH BIT IS = %d", reply_path_bit); | |
460 | |
461 if (index == 0) | |
462 TextId2 = TxtOff; | |
463 else | |
464 TextId2 = TxtOn; | |
465 | |
466 dlg_initDisplayData_TextId( &DisplayInfo, TxtSoftOK, TxtNull,TxtRP, TextId2, COLOUR_POPUP); | |
467 dlg_initDisplayData_events( &DisplayInfo, (T_VOID_FUNC)NULL, THREE_SECS, KEY_RIGHT | KEY_LEFT ); | |
468 | |
469 info_dialog(win,&DisplayInfo); | |
470 | |
471 } | |
472 return 1; | |
473 } | |
474 // End --11536 | |
475 | |
476 | |
477 /******************************************************************************* | |
478 | |
479 $Function: settingsVoiceMail | |
480 | |
481 $Description: menu entry function | |
482 | |
483 $Returns: | |
484 | |
485 $Arguments: | |
486 | |
487 *******************************************************************************/ | |
488 int settingsVoiceMail(MfwMnu* m, MfwMnuItem* i) | |
489 | |
490 { | |
491 | |
492 cphs_get_mailbox (); | |
493 | |
494 | |
495 return 0; | |
496 } | |
497 | |
498 /******************************************************************************* | |
499 | |
500 $Function: settingsVoiceMail | |
501 | |
502 $Description: menu entry function | |
503 | |
504 $Returns: | |
505 | |
506 $Arguments: | |
507 | |
508 *******************************************************************************/ | |
509 int settingsScNumber(MfwMnu* m, MfwMnuItem* i) | |
510 { | |
511 | |
512 return 0; | |
513 } | |
514 /******************************************************************************* | |
515 | |
516 $Function: settingsInit | |
517 | |
518 $Description: init settings handling | |
519 | |
520 $Returns: | |
521 | |
522 $Arguments: | |
523 | |
524 *******************************************************************************/ | |
525 void settingsInit (void) | |
526 { | |
527 | |
528 TRACE_EVENT ("settingsInit()"); | |
529 | |
530 /* nextState = 0; x0039928 - Lint warning fix */ | |
531 | |
532 win = winCreate(0,0,MfwWinVisible,(MfwCb)winEvent); | |
533 winShow(win); | |
534 } | |
535 | |
536 /******************************************************************************* | |
537 | |
538 $Function: settingsExit | |
539 | |
540 $Description: exit settings handling | |
541 | |
542 $Returns: | |
543 | |
544 $Arguments: | |
545 | |
546 *******************************************************************************/ | |
547 void settingsExit (void) | |
548 { | |
549 TRACE_FUNCTION ("settingsExit()"); | |
550 | |
551 /* nextState = 0; x0039928 - Lint warning fix */ | |
552 winDelete(win); win = 0; | |
553 } | |
554 | |
555 | |
556 /******************************************************************************* | |
557 | |
558 $Function: winEvent | |
559 | |
560 $Description: window event handler | |
561 | |
562 $Returns: | |
563 | |
564 $Arguments: | |
565 | |
566 *******************************************************************************/ | |
567 static int winEvent (MfwEvt e, MfwWin *w) | |
568 { | |
569 TRACE_EVENT ("MmiSettings :: winEvent()"); | |
570 | |
571 switch (e) | |
572 { | |
573 case MfwWinVisible: | |
574 if (w->flags & MfwWinVisible) | |
575 show(); | |
576 break; | |
577 default: | |
578 return 0; | |
579 } | |
580 | |
581 return 1; | |
582 } | |
583 /******************************************************************************* | |
584 | |
585 $Function: settingsGetStatus | |
586 | |
587 $Description: Function to return the status of various BMI settings | |
588 | |
589 $Returns: Non-zero number if setting is ON | |
590 Zero if the setting is OFF | |
591 | |
592 $Arguments: flagBit - value indicating which setting is to be changed. | |
593 | |
594 *******************************************************************************/ | |
595 int settingsGetStatus(int flagBit) | |
596 { | |
597 if (flagBit & SettingsKeyPadLockOn) | |
598 { | |
599 return(BMIsettings & flagBit); | |
600 } | |
601 else | |
602 { | |
603 return(FFS_flashData.settings_status & flagBit); | |
604 } | |
605 } | |
606 /******************************************************************************* | |
607 | |
608 $Function: settingsSetStatus | |
609 | |
610 $Description: Function to set or clear the status of various BMI settings | |
611 | |
612 $Returns: None. | |
613 | |
614 $Arguments: flagBit - value indicating which setting is to be changed. | |
615 state - SET_SETTING - set the value | |
616 - CLEAR_SETTING - clear the value. | |
617 GW SPR#2470 Created | |
618 *******************************************************************************/ | |
619 void settingsSetStatus(unsigned int flagBit, int value) | |
620 { | |
621 if (flagBit & SettingsKeyPadLockOn) | |
622 { | |
623 if (value == SET_SETTING) | |
624 BMIsettings = BMIsettings | flagBit; | |
625 else | |
626 BMIsettings = BMIsettings & (~flagBit); | |
627 } | |
628 else | |
629 { | |
630 if (value == SET_SETTING) | |
631 FFS_flashData.settings_status = FFS_flashData.settings_status | flagBit; | |
632 else | |
633 FFS_flashData.settings_status = FFS_flashData.settings_status & (~flagBit); | |
634 } | |
635 flash_write(); | |
636 } | |
637 /******************************************************************************* | |
638 | |
639 $Function: settingsAutoRedialOn | |
640 | |
641 $Description: auto redial switch on | |
642 | |
643 $Returns: | |
644 | |
645 $Arguments: | |
646 | |
647 *******************************************************************************/ | |
648 int settingsAutoRedialOn(MfwMnu* m, MfwMnuItem* i) | |
649 { | |
650 | |
651 T_MFW_HND win = mfw_parent(mfw_header()); | |
652 | |
653 confirm_Init(win); | |
654 | |
655 cm_set_redial(CM_REDIAL_AUTO); | |
656 | |
657 | |
658 confirm_data.local_status = ACTIVATE_CONFIRM; | |
659 | |
660 SEND_EVENT (confirm_data.confirm_win, SHOW_CONFIRM, 0, 0); | |
661 | |
662 return 0; | |
663 } | |
664 /******************************************************************************* | |
665 | |
666 $Function: settingsAutoRedialOff | |
667 | |
668 $Description: auto redial switch off | |
669 | |
670 $Returns: | |
671 | |
672 $Arguments: | |
673 | |
674 *******************************************************************************/ | |
675 int settingsAutoRedialOff(MfwMnu* m, MfwMnuItem* i) | |
676 { | |
677 T_MFW_HND win = mfw_parent(mfw_header()); | |
678 confirm_Init(win); | |
679 | |
680 cm_set_redial(CM_REDIAL_OFF); | |
681 | |
682 confirm_data.local_status = DEACTIVATE_CONFIRM; | |
683 | |
684 SEND_EVENT (confirm_data.confirm_win, SHOW_CONFIRM, 0, 0); | |
685 | |
686 | |
687 | |
688 return 0; | |
689 } | |
690 /******************************************************************************* | |
691 | |
692 $Function: settingsSilentModeOn | |
693 | |
694 $Description: Activate the silent Mode | |
695 | |
696 $Returns: | |
697 | |
698 $Arguments: | |
699 | |
700 *******************************************************************************/ | |
701 int settingsSilentModeOn(void) | |
702 { | |
703 TRACE_FUNCTION(">> settingsSilentModeOn()"); | |
704 FFS_flashData.settings_status |= SettingsSilentMode; | |
705 flash_write(); | |
706 setSilentModeVolume(); | |
707 iconsSetState(iconIdSilRin); | |
708 return 0; | |
709 } | |
710 /******************************************************************************* | |
711 | |
712 $Function: settingsSilentModeOff | |
713 | |
714 $Description: Deactivate the silent Mode | |
715 | |
716 $Returns: | |
717 | |
718 $Arguments: | |
719 | |
720 *******************************************************************************/ | |
721 int settingsSilentModeOff(void) | |
722 { | |
723 TRACE_EVENT(">> settingsSilentModeOff()"); | |
724 FFS_flashData.settings_status &= ~SettingsSilentMode; | |
725 flash_write(); | |
726 restoreSilentModeVolume(); | |
727 iconsDeleteState(iconIdSilRin); | |
728 return 0; | |
729 } | |
730 | |
731 /******************************************************************************* | |
732 | |
733 $Function: settingsKeyPadLockOn | |
734 | |
735 $Description: | |
736 | |
737 $Returns: | |
738 | |
739 $Arguments: | |
740 | |
741 *******************************************************************************/ | |
742 int settingsKeyPadLockOn(void) | |
743 { | |
744 BMIsettings = BMIsettings | SettingsKeyPadLockOn; | |
745 iconsSetState(iconIdKeyplock); | |
746 idleEvent(IdleActiveKeyPadLocked); | |
747 return 0; | |
748 } | |
749 /******************************************************************************* | |
750 | |
751 $Function: settingsKeyPadLockOff | |
752 | |
753 $Description: | |
754 | |
755 $Returns: | |
756 | |
757 $Arguments: | |
758 | |
759 *******************************************************************************/ | |
760 int settingsKeyPadLockOff(void) | |
761 { | |
762 BMIsettings = BMIsettings & ~SettingsKeyPadLockOn; | |
763 iconsDeleteState(iconIdKeyplock); | |
764 | |
765 return 0; | |
766 } | |
767 /******************************************************************************* | |
768 | |
769 $Function: settingsAutoAnswerOn | |
770 | |
771 $Description: | |
772 | |
773 $Returns: | |
774 | |
775 $Arguments: | |
776 | |
777 *******************************************************************************/ | |
778 int settingsAutoAnswerOn(MfwMnu* m, MfwMnuItem* i) | |
779 { | |
780 T_MFW_HND win = mfw_parent(mfw_header()); | |
781 | |
782 confirm_Init(win); | |
783 | |
784 FFS_flashData.settings_status |= SettingsAutoAnswerOn; | |
785 flash_write(); | |
786 confirm_data.local_status = ACTIVATE_CONFIRM; | |
787 | |
788 SEND_EVENT (confirm_data.confirm_win, SHOW_CONFIRM, 0, 0); | |
789 | |
790 return 0; | |
791 } | |
792 /******************************************************************************* | |
793 | |
794 $Function: settingsAutoAnswerOff | |
795 | |
796 $Description: | |
797 | |
798 $Returns: | |
799 | |
800 $Arguments: | |
801 | |
802 *******************************************************************************/ | |
803 int settingsAutoAnswerOff(MfwMnu* m, MfwMnuItem* i) | |
804 { | |
805 T_MFW_HND win = mfw_parent(mfw_header()); | |
806 | |
807 confirm_Init(win); | |
808 | |
809 FFS_flashData.settings_status &= ~SettingsAutoAnswerOn; | |
810 flash_write(); | |
811 confirm_data.local_status = DEACTIVATE_CONFIRM; | |
812 | |
813 SEND_EVENT (confirm_data.confirm_win, SHOW_CONFIRM, 0, 0); | |
814 | |
815 | |
816 | |
817 return 0; | |
818 } | |
819 | |
820 | |
821 /******************************************************************************* | |
822 | |
823 $Function: settingsAnyKeyAnswerOn | |
824 | |
825 $Description: | |
826 | |
827 $Returns: | |
828 | |
829 $Arguments: | |
830 | |
831 *******************************************************************************/ | |
832 int settingsAnyKeyAnswerOn(MfwMnu* m, MfwMnuItem* i) | |
833 { | |
834 T_MFW_HND win = mfw_parent(mfw_header()); | |
835 | |
836 confirm_Init(win); | |
837 | |
838 FFS_flashData.settings_status |= SettingsAnyKeyAnswerOn; | |
839 flash_write(); | |
840 confirm_data.local_status = ACTIVATE_CONFIRM; | |
841 | |
842 SEND_EVENT (confirm_data.confirm_win, SHOW_CONFIRM, 0, 0); | |
843 return 0; | |
844 } | |
845 /******************************************************************************* | |
846 | |
847 $Function: settingsAnyKeyAnswerOff | |
848 | |
849 $Description: | |
850 | |
851 $Returns: | |
852 | |
853 $Arguments: | |
854 | |
855 *******************************************************************************/ | |
856 int settingsAnyKeyAnswerOff(MfwMnu* m, MfwMnuItem* i) | |
857 { | |
858 | |
859 T_MFW_HND win = mfw_parent(mfw_header()); | |
860 | |
861 confirm_Init(win); | |
862 | |
863 FFS_flashData.settings_status &= ~SettingsAnyKeyAnswerOn; | |
864 flash_write(); | |
865 confirm_data.local_status = DEACTIVATE_CONFIRM; | |
866 | |
867 SEND_EVENT (confirm_data.confirm_win, SHOW_CONFIRM, 0, 0); | |
868 | |
869 return 0; | |
870 } | |
871 | |
872 /******************************************************************************* | |
873 | |
874 $Function: factoryReset | |
875 | |
876 $Description: Reset all the user-settings, | |
877 At first it show up a confirmation screen | |
878 $Returns: | |
879 | |
880 $Arguments: | |
881 | |
882 *******************************************************************************/ | |
883 int factoryReset(MfwMnu* m, MfwMnuItem* i) | |
884 { | |
885 | |
886 T_MFW_HND win = mfw_parent(mfw_header()); | |
887 | |
888 confirm_Init(win); | |
889 | |
890 confirm_data.local_status = FACTORY_RESET; | |
891 | |
892 SEND_EVENT (confirm_data.confirm_win, FACTORY_RESET, 0, 0); | |
893 return 0; | |
894 } | |
895 | |
896 | |
897 | |
898 /******************************************************************************* | |
899 | |
900 $Function: setUserSettings2Default | |
901 | |
902 $Description: The user confirm to delete the user-settings. | |
903 | |
904 $Returns: | |
905 | |
906 $Arguments: | |
907 | |
908 *******************************************************************************/ | |
909 void setUserSettings2Default (void) | |
910 { | |
911 //char buf[30]; // RAVI | |
912 | |
913 | |
914 | |
915 if (DEFAULT_SETTINGS[ENGLISH].status EQ ON) | |
916 { | |
917 // set the language :ENGLISH | |
918 MmiRsrcSetLang(ENGLISH_LANGUAGE);/*MC, SPR 1242 - changed to new function*/ | |
919 } | |
920 | |
921 | |
922 if (DEFAULT_SETTINGS[GERMAN].status EQ ON) | |
923 { | |
924 // set the language :GERMAN | |
925 MmiRsrcSetLang(GERMAN_LANGUAGE); /*MC, SPR 1242 - changed to new function*/ | |
926 } | |
927 | |
928 | |
929 if (DEFAULT_SETTINGS[AUTOREDIAL].status EQ ON) | |
930 { | |
931 // set the Auto-redial | |
932 cm_set_redial(CM_REDIAL_AUTO); | |
933 } | |
934 else | |
935 { | |
936 cm_set_redial(CM_REDIAL_OFF); | |
937 } | |
938 | |
939 | |
940 if (DEFAULT_SETTINGS[AUTOANSWER].status EQ ON) | |
941 { | |
942 // set the Autoanswer | |
943 FFS_flashData.settings_status |= SettingsAutoAnswerOn; | |
944 } | |
945 else | |
946 { | |
947 //switch off the Autoanswer | |
948 FFS_flashData.settings_status &= ~SettingsAutoAnswerOn; | |
949 } | |
950 | |
951 | |
952 if (DEFAULT_SETTINGS[ANYKEYANSWER].status EQ ON) | |
953 { | |
954 // set the Anykeyanswer | |
955 FFS_flashData.settings_status |= SettingsAnyKeyAnswerOn; | |
956 } | |
957 else | |
958 { | |
959 //switch off the Anykeyanswer | |
960 FFS_flashData.settings_status &= ~SettingsAnyKeyAnswerOn; | |
961 } | |
962 | |
963 if (DEFAULT_SETTINGS[CALLTIMERS].status EQ CLEAR) | |
964 { | |
965 //reset here the call timers | |
966 //incoming, outgoing & last calls | |
967 } | |
968 | |
969 | |
970 if (DEFAULT_SETTINGS[KEYPAD_CLICK].status EQ ON) | |
971 { | |
972 // set the Keypad click | |
973 | |
974 if (FFS_flashData.settings_status & SettingsKeypadDTMF) | |
975 { | |
976 FFS_flashData.settings_status &= ~SettingsKeypadDTMF; | |
977 } | |
978 | |
979 FFS_flashData.settings_status |= SettingsKeypadClick; | |
980 } | |
981 | |
982 | |
983 if (DEFAULT_SETTINGS[KEYPAD_DTMF].status EQ ON) | |
984 { | |
985 // set the Keypad DTMF | |
986 | |
987 if (FFS_flashData.settings_status & SettingsKeypadClick) | |
988 { | |
989 FFS_flashData.settings_status &= ~SettingsKeypadClick; | |
990 } | |
991 | |
992 FFS_flashData.settings_status |= SettingsKeypadDTMF; | |
993 } | |
994 | |
995 | |
996 if (DEFAULT_SETTINGS[KEYPAD_SILENT].status EQ ON) | |
997 { | |
998 // set the Keypad silence | |
999 | |
1000 if (FFS_flashData.settings_status & SettingsKeypadClick) | |
1001 { | |
1002 FFS_flashData.settings_status &= ~SettingsKeypadClick; | |
1003 } | |
1004 else if (FFS_flashData.settings_status & SettingsKeypadDTMF) | |
1005 { | |
1006 FFS_flashData.settings_status &= ~SettingsKeypadDTMF; | |
1007 } | |
1008 | |
1009 } | |
1010 | |
1011 //GW-SPR#1018- Trace is too big for the buffer and is causing a crash. | |
1012 // sprintf (buf, " FFS_flashData.settings_status %d", FFS_flashData.settings_status); | |
1013 // TRACE_EVENT (buf); | |
1014 | |
1015 //xrashmic 7 Dec, 2004 MMI-SPR-26161 and MMI-SPR-23965 | |
1016 // Resetting the downloaded and extracted wap objects | |
1017 FFS_flashData.image_usr_obj=0; | |
1018 FFS_flashData.audio_usr_obj =0; | |
1019 | |
1020 #ifndef FF_NO_VOICE_MEMO | |
1021 if (DEFAULT_SETTINGS[VOICE_MEMO].status EQ CLEAR) | |
1022 { | |
1023 /* Mar 28, 2007 DR: OMAPS00122762 x0039928 */ | |
1024 #ifndef FF_MMI_FILEMANAGER | |
1025 // clear the voice memo | |
1026 FFS_flashData.voice_memo_position = 0; | |
1027 #endif | |
1028 | |
1029 } | |
1030 #endif | |
1031 | |
1032 /*OMAPS00098881(removing power variant) a0393213(Prabakar)*/ | |
1033 #ifdef FF_POWER_MANAGEMENT | |
1034 if(DEFAULT_SETTINGS[LCD_REFRESH].status EQ ON) | |
1035 { | |
1036 FFS_flashData.refresh=1; /*lcd refresh needed*/ | |
1037 } | |
1038 else | |
1039 { | |
1040 FFS_flashData.refresh=0; /*lcd refresh not needed*/ | |
1041 } | |
1042 #endif | |
1043 | |
1044 //x0pleela 25 May, 2006 DR: OMAPS00070657 | |
1045 #ifdef FF_CPHS | |
1046 memset(FFS_flashData.line1,'\0', sizeof(FFS_flashData.line1)); | |
1047 memset(FFS_flashData.line2,'\0', sizeof(FFS_flashData.line2)); | |
1048 #endif | |
1049 | |
1050 //reset the call timers | |
1051 setLastCallDuration(0, MFW_CM_INV_DIR); | |
1052 resetIncomingCallsDuration(); | |
1053 resetOutgoingCallsDuration(); | |
1054 //set clock format to twenty-four hour | |
1055 setClockFormat(MFW_TIME_FORMAT_24HOUR);/*SPR 1725, changed macro*/ | |
1056 | |
1057 // API/GW - On factory reset save the original colours to the flash. | |
1058 resetFactoryColour(); | |
1059 //API - 1550 - Added code to reset the backgrounds to defaults | |
1060 resetFactoryBackground(); | |
1061 | |
1062 /*API - 28/07/03 - CQ10203 - Add a call to set the validity period to default on Factory Reset*/ | |
1063 resetSMSValidityPeriod(); | |
1064 /*API - CQ10203 - END*/ | |
1065 | |
1066 // PCM | |
1067 // here should also update the user-data-settings !! | |
1068 // in PCM | |
1069 //xashmic 27 Sep 2006, OMAPS00096389 | |
1070 //xashmic 9 Sep 2006, OMAPS00092732 | |
1071 //By default PS shutdown is disabled | |
1072 #ifdef FF_MMI_USBMS | |
1073 FFS_flashData.usb_ms_flags=MFW_USBMS_DEFAULT; | |
1074 #endif | |
1075 | |
1076 flash_write(); | |
1077 | |
1078 | |
1079 } | |
1080 | |
1081 /******************************************************************************* | |
1082 | |
1083 $Function: confirm_Init | |
1084 | |
1085 $Description: | |
1086 | |
1087 $Returns: | |
1088 | |
1089 $Arguments: | |
1090 | |
1091 *******************************************************************************/ | |
1092 T_MFW_HND confirm_Init (T_MFW_HND parent_window) | |
1093 { | |
1094 return (confirm_create (parent_window)); | |
1095 } | |
1096 /******************************************************************************* | |
1097 | |
1098 $Function: confirm_Exit | |
1099 | |
1100 $Description: | |
1101 | |
1102 $Returns: | |
1103 | |
1104 $Arguments: | |
1105 | |
1106 *******************************************************************************/ | |
1107 void confirm_Exit (T_MFW_HND own_window) | |
1108 { | |
1109 | |
1110 T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data; | |
1111 T_confirm * data = (T_confirm *)win_data->user; | |
1112 | |
1113 confirm_destroy (data->confirm_win); | |
1114 } | |
1115 | |
1116 /******************************************************************************* | |
1117 | |
1118 $Function: confirm_create | |
1119 | |
1120 $Description: | |
1121 | |
1122 $Returns: | |
1123 | |
1124 $Arguments: | |
1125 | |
1126 *******************************************************************************/ | |
1127 T_MFW_HND confirm_create (T_MFW_HND parent_window) | |
1128 { | |
1129 T_confirm * data = &confirm_data; | |
1130 T_MFW_WIN * win; | |
1131 | |
1132 TRACE_FUNCTION ("confirm_create()"); | |
1133 | |
1134 data->confirm_win = win_create (parent_window, 0, 0, (T_MFW_CB)confirm_win_cb); | |
1135 | |
1136 if (data->confirm_win EQ 0) | |
1137 return 0; | |
1138 | |
1139 /* | |
1140 * Create window handler | |
1141 */ | |
1142 data->mmi_control.dialog = (T_DIALOG_FUNC)confirm; | |
1143 data->mmi_control.data = data; | |
1144 win = ((T_MFW_HDR *)data->confirm_win)->data; | |
1145 win->user = (void *) data; | |
1146 | |
1147 | |
1148 winShow(data->confirm_win); | |
1149 /* | |
1150 * return window handle | |
1151 */ | |
1152 return data->confirm_win; | |
1153 } | |
1154 | |
1155 /******************************************************************************* | |
1156 | |
1157 $Function: confirm_destroy | |
1158 | |
1159 $Description: | |
1160 | |
1161 $Returns: | |
1162 | |
1163 $Arguments: | |
1164 | |
1165 *******************************************************************************/ | |
1166 void confirm_destroy (T_MFW_HND own_window) | |
1167 { | |
1168 T_MFW_WIN * win; | |
1169 T_confirm * data; | |
1170 | |
1171 TRACE_FUNCTION ("confirm_destroy()"); | |
1172 | |
1173 if (own_window) | |
1174 { | |
1175 win = ((T_MFW_HDR *)own_window)->data; | |
1176 data = (T_confirm *)win->user; | |
1177 | |
1178 if (data) | |
1179 { | |
1180 | |
1181 /* | |
1182 * Delete WIN handler | |
1183 */ | |
1184 win_delete (data->confirm_win); | |
1185 data->confirm_win = 0; | |
1186 } | |
1187 } | |
1188 } | |
1189 /******************************************************************************* | |
1190 | |
1191 $Function: confirm_win_cb | |
1192 | |
1193 $Description: | |
1194 | |
1195 $Returns: | |
1196 | |
1197 $Arguments: | |
1198 | |
1199 *******************************************************************************/ | |
1200 static int confirm_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) | |
1201 { | |
1202 /* | |
1203 * Top Window has no output | |
1204 */ | |
1205 return 1; | |
1206 } | |
1207 | |
1208 | |
1209 /******************************************************************************* | |
1210 | |
1211 $Function: confirm_dialog | |
1212 | |
1213 $Description: | |
1214 | |
1215 $Returns: | |
1216 | |
1217 $Arguments: | |
1218 | |
1219 *******************************************************************************/ | |
1220 static void confirm_dialog(void) | |
1221 { | |
1222 T_DISPLAY_DATA display_info; | |
1223 | |
1224 TRACE_FUNCTION ("confirm_dialog()"); | |
1225 | |
1226 | |
1227 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull,TxtNull, TxtNull , COLOUR_STATUS); | |
1228 dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)confirm_dialog_cb, THREE_SECS, KEY_CLEAR | KEY_RIGHT | KEY_LEFT ); | |
1229 | |
1230 if (confirm_data.local_status EQ ACTIVATE_CONFIRM) | |
1231 { | |
1232 display_info.TextId = TxtActivated; | |
1233 } | |
1234 else if (confirm_data.local_status EQ DEACTIVATE_CONFIRM) | |
1235 { | |
1236 display_info.TextId = TxtDeActivated; | |
1237 } | |
1238 else if (confirm_data.local_status EQ FACTORY_RESET) | |
1239 { | |
1240 display_info.TextId = TxtPressOk; | |
1241 display_info.TextId2 = TxtReset; | |
1242 display_info.Time = TEN_SECS; | |
1243 display_info.LeftSoftKey = TxtSoftOK; | |
1244 display_info.RightSoftKey = TxtSoftBack; | |
1245 | |
1246 } | |
1247 | |
1248 /* | |
1249 * Call Info Screen | |
1250 */ | |
1251 info_dialog (confirm_data.confirm_win, &display_info); | |
1252 | |
1253 } | |
1254 /******************************************************************************* | |
1255 | |
1256 $Function: confirm_dialog_cb | |
1257 | |
1258 $Description: | |
1259 | |
1260 $Returns: | |
1261 | |
1262 $Arguments: | |
1263 | |
1264 *******************************************************************************/ | |
1265 void confirm_dialog_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) | |
1266 { | |
1267 TRACE_FUNCTION ("confirm_dialog_cb()"); | |
1268 | |
1269 switch (reason) | |
1270 { | |
1271 case INFO_KCD_LEFT: | |
1272 // user confirm to reset all the user settings ! | |
1273 setUserSettings2Default (); | |
1274 confirm_Exit(win); | |
1275 break; | |
1276 | |
1277 case INFO_TIMEOUT: | |
1278 /* no break; */ | |
1279 case INFO_KCD_HUP: | |
1280 /* no break; */ | |
1281 case INFO_KCD_RIGHT: | |
1282 /* no break; */ | |
1283 case INFO_KCD_CLEAR: | |
1284 confirm_Exit(win); | |
1285 break; | |
1286 } | |
1287 } | |
1288 | |
1289 /******************************************************************************* | |
1290 | |
1291 $Function: confirm | |
1292 | |
1293 $Description: | |
1294 | |
1295 $Returns: | |
1296 | |
1297 $Arguments: | |
1298 | |
1299 *******************************************************************************/ | |
1300 void confirm (T_MFW_HND win, USHORT event, SHORT value, void * parameter) | |
1301 { | |
1302 // T_MFW_WIN * win_data = ((T_MFW_HDR *) win)->data; // RAVI | |
1303 // T_confirm * data = (T_confirm *)win_data->user; // RAVI | |
1304 | |
1305 TRACE_FUNCTION("confirm()"); | |
1306 | |
1307 switch (event) | |
1308 { | |
1309 case SHOW_CONFIRM: | |
1310 confirm_dialog(); | |
1311 break; | |
1312 case FACTORY_RESET: | |
1313 confirm_dialog(); | |
1314 break; | |
1315 | |
1316 } | |
1317 | |
1318 } | |
1319 static void showSet (void) | |
1320 { | |
1321 | |
1322 T_DISPLAY_DATA display_info; | |
1323 | |
1324 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtActivated, TxtNull, COLOUR_STATUS); | |
1325 dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_HUP| KEY_LEFT ); | |
1326 | |
1327 info_dialog ( NULL, &display_info); | |
1328 } | |
1329 | |
1330 static void showClear (void) | |
1331 { | |
1332 | |
1333 T_DISPLAY_DATA display_info; | |
1334 | |
1335 dlg_initDisplayData_TextId( &display_info, TxtSoftOK, TxtNull, TxtDeActivated, TxtNull, COLOUR_STATUS); | |
1336 dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_HUP| KEY_LEFT ); | |
1337 | |
1338 info_dialog ( NULL, &display_info); | |
1339 } | |
1340 | |
1341 // MENU_ITEM ( TxtCheckStatus, servicesDivertCheck, item_flag_none ), | |
1342 void settingsShowStateAnykeyAnswer (void) | |
1343 { | |
1344 if (settingsGetStatus(SettingsAnyKeyAnswerOn)) | |
1345 showSet(); | |
1346 else | |
1347 showClear(); | |
1348 } | |
1349 void settingsShowStateAutoAnswer (void) | |
1350 { | |
1351 if (settingsGetStatus(SettingsAutoAnswerOn)) | |
1352 showSet(); | |
1353 else | |
1354 showClear(); | |
1355 } | |
1356 void settingsShowStateAutoRedial(void) | |
1357 { | |
1358 if (FFS_flashData.redial_mode == CM_REDIAL_AUTO) | |
1359 showSet(); | |
1360 else | |
1361 showClear(); | |
1362 } | |
1363 /*GW SPR#2470 Created*/ | |
1364 void settingsShowStateCBDisable(void) | |
1365 { | |
1366 if (settingsGetStatus(SettingsCBDisable)) | |
1367 showClear(); | |
1368 else | |
1369 showSet(); | |
1370 } | |
1371 | |
1372 // change by Sasken (VVADIRAJ) on March 31th 2004 | |
1373 // Issue Number : MMI-SPR-12822 | |
1374 // Subject: Highlighting the previously selected menu item. | |
1375 // Bug : Not highlighting the previously selected menu item.Selecting first item always. | |
1376 // Solution: Instead of providing the submenu directly we call this function | |
1377 // where we set the menu and also higlight the previously selected menu item. | |
1378 | |
1379 /***************************Go-lite Optimization changes Start***********************/ | |
1380 //Aug 25, 2004 REF: CRR 24904 Deepa M.D | |
1381 //This function is used only for the Color build.Hence it is put under the | |
1382 //COLOURDISPLAY compiler switch | |
1383 #ifdef COLOURDISPLAY | |
1384 void settingsFocusNwIconCurSel(void) | |
1385 { | |
1386 UBYTE SaveNwIcon; | |
1387 T_MFW_HND setting_win; | |
1388 T_MFW_HND win = mfw_parent(mfw_header()); | |
1389 | |
1390 setting_win= bookMenuStart(win, NWIconAttributes(), 0); | |
1391 SaveNwIcon=(FFS_flashData.ProviderNetworkShow == TRUE)?0:1; | |
1392 SEND_EVENT(setting_win, DEFAULT_OPTION, NULL, &SaveNwIcon); | |
1393 } | |
1394 #endif | |
1395 /***************************Go-lite Optimization changes Start***********************/ | |
1396 //SPR 12822:VVADIRAJ | |
1397 | |
1398 // Jul 29, 2004 REF = CRR 20898 xkundadu | |
1399 /******************************************************************************* | |
1400 $Function: settingsFocusCurSelAutoAns | |
1401 | |
1402 $Description: This function sets the focus to the On or Off menu item of the | |
1403 'Auto Answer' menu in the Phone Settings main menu. | |
1404 Check whether the 'Auto Answer' is enabled by reading the data | |
1405 stored in the FFS. Depending on that, set the focus to the menu | |
1406 item. | |
1407 | |
1408 $Returns: void | |
1409 | |
1410 $Arguments: void | |
1411 *******************************************************************************/ | |
1412 | |
1413 | |
1414 void settingsFocusCurSelAutoAns(void) | |
1415 { | |
1416 // Points to the index of the menuitem to be selected | |
1417 // If it is 1, 'Off' menuItem will be selected, else 'On' menuitem | |
1418 // will be selected. | |
1419 UBYTE menuItemIndex = 1; | |
1420 | |
1421 T_MFW_HND setting_win; | |
1422 T_MFW_HND win = mfw_parent(mfw_header()); | |
1423 | |
1424 TRACE_FUNCTION ("settingsFocusCurSelAutoAns() "); | |
1425 | |
1426 // Starting the menu corresponding to AutoAnswer. | |
1427 setting_win = bookMenuStart(win, GetAutoAnswerMenu(), 0); | |
1428 | |
1429 //Checking whether the 'Auto Answer' is enabled or not | |
1430 //Reading the value from FFS. | |
1431 if( (FFS_flashData.settings_status & SettingsAutoAnswerOn) | |
1432 EQ SettingsAutoAnswerOn) | |
1433 { | |
1434 menuItemIndex = 0; | |
1435 } | |
1436 | |
1437 // Send the event to display the menu item and appropriate menuitem | |
1438 // selected. | |
1439 SEND_EVENT(setting_win, DEFAULT_OPTION, NULL, &menuItemIndex); | |
1440 | |
1441 } | |
1442 | |
1443 // Jul 22,2004 CRR:20896 xrashmic - SASKEN | |
1444 // Description: The time current time format is not highlighted | |
1445 // Fix: Instead of showing the submenu directly we call this function | |
1446 // where we set the menu and also higlight the previously selected menu item | |
1447 void settingsFocusTimeFormatCurSel(void) | |
1448 { | |
1449 UBYTE CurSel; | |
1450 T_MFW_HND setting_win; | |
1451 T_MFW_HND win = mfw_parent(mfw_header()); | |
1452 | |
1453 setting_win= bookMenuStart(win, TimeFormatAttributes(), 0); | |
1454 CurSel = FFS_flashData.time_format; | |
1455 SEND_EVENT(setting_win, DEFAULT_OPTION, NULL, &CurSel); | |
1456 } | |
1457 | |
1458 /******************************************************************************* | |
1459 $Function: settingsFocusCurSelAnyKeyAns | |
1460 $Description: This function sets the focus to the On or Off menu item of the | |
1461 'AnyKey Answer' menu in the Phone Settings main menu. | |
1462 Check whether the 'Any Key Answer' is enabled by reading the data | |
1463 stored in the FFS. Depending on that, set the focus to the menu | |
1464 item | |
1465 $Returns: void | |
1466 $Arguments: void | |
1467 *******************************************************************************/ | |
1468 // Jul 28, 2004 REF: CRR 20899 xkundadu | |
1469 void settingsFocusCurSelAnyKeyAns(void) | |
1470 { | |
1471 // Points to the index of the menuitem to be selected | |
1472 // If it is 1, 'Off' menuItem will be selected, else 'On' menuitem | |
1473 // will be selected. | |
1474 UBYTE menuItemIndex = 1; | |
1475 | |
1476 T_MFW_HND setting_win; | |
1477 T_MFW_HND win = mfw_parent(mfw_header()); | |
1478 | |
1479 TRACE_FUNCTION ("settingsFocusCurSelAnyKeyAns() "); | |
1480 | |
1481 // Starting the menu corresponding to AnyKeyanswer. | |
1482 setting_win = bookMenuStart(win, GetAnyKeyAnswerMenu(), 0); | |
1483 | |
1484 //Checking whether the 'Any key answer is enabled or not | |
1485 //Reading the value from FFS. | |
1486 if( (FFS_flashData.settings_status & SettingsAnyKeyAnswerOn) | |
1487 EQ SettingsAnyKeyAnswerOn) | |
1488 { | |
1489 //Set the focus to the 'On' menu item. | |
1490 menuItemIndex = 0; | |
1491 } | |
1492 | |
1493 // Send the event to display the menu items and set focus to appropriate | |
1494 // menuitem. | |
1495 SEND_EVENT(setting_win, DEFAULT_OPTION, NULL, &menuItemIndex); | |
1496 | |
1497 } | |
1498 | |
1499 // May 04, 2005 REF: CRR 30285 x0021334 | |
1500 /******************************************************************************* | |
1501 $Function: settingsSmsStatusReportCurSel | |
1502 $Description: This function sets the focus to the On or Off menu item of the | |
1503 'Status Report' submenu menu in the Messages Settings menu. | |
1504 $Returns: void | |
1505 $Arguments: void | |
1506 *******************************************************************************/ | |
1507 void settingsSmsStatusReportCurSel(void) | |
1508 { | |
1509 T_MFW_HND setting_win; | |
1510 T_MFW_SMS_INFO sms_info; | |
1511 T_MFW_HND win = mfw_parent(mfw_header()); | |
1512 | |
1513 setting_win = bookMenuStart(win, SmsStatusReportAttributes(), 0); | |
1514 if (sms_parameter(&sms_info, TRUE) == MFW_SMS_OK) | |
1515 { | |
1516 // Send the event to set focus to appropriate option. | |
1517 SEND_EVENT(setting_win, DEFAULT_OPTION, NULL, &sms_info.srr); | |
1518 } | |
1519 else | |
1520 { | |
1521 TRACE_FUNCTION("sms info could not be retrieved "); | |
1522 } | |
1523 | |
1524 | |
1525 } | |
1526 |