comparison src/ui/bmi/mmiBookMenuWindow.c @ 92:c0052fe355d3

src/ui/bmi/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 08 Nov 2020 06:39:16 +0000
parents 67bfe9f274f6
children ec9f955fc487
comparison
equal deleted inserted replaced
91:c3d28a37caad 92:c0052fe355d3
1 /******************************************************************************* 1 /*******************************************************************************
2 2
3 CONDAT (UK) 3 CONDAT (UK)
4 4
5 ******************************************************************************** 5 ********************************************************************************
6 6
7 This software product is the property of Condat (UK) Ltd and may not be 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. 8 disclosed to any third party without the express permission of the owner.
9 9
10 ******************************************************************************** 10 ********************************************************************************
11 11
12 $Project name: Basic MMI 12 $Project name: Basic MMI
13 $Project code: BMI (6349) 13 $Project code: BMI (6349)
14 $Module: PhoneBook 14 $Module: PhoneBook
15 $File: MmiBookMenuWindow.c 15 $File: MmiBookMenuWindow.c
16 $Revision: 1.0 16 $Revision: 1.0
17 17
18 $Author: Condat(UK) 18 $Author: Condat(UK)
19 $Date: 25/10/00 19 $Date: 25/10/00
20 20
21 ******************************************************************************** 21 ********************************************************************************
22 22
23 Description: 23 Description:
24 24
25 Menu handling for the phone book 25 Menu handling for the phone book
26 26
27 ******************************************************************************** 27 ********************************************************************************
28 $History: MmiBookMenuWindow.c 28 $History: MmiBookMenuWindow.c
29 Mar 30, 2007 OMAPS00123019 a0393213(R.Prabakar) 29 Mar 30, 2007 OMAPS00123019 a0393213(R.Prabakar)
30 Description : Reboot of the target when you unplug/plug USB cable using camera application 30 Description : Reboot of the target when you unplug/plug USB cable using camera application
31 31
32 xrashmic 28 Jun 2006, OMAPS00084172 32 xrashmic 28 Jun 2006, OMAPS00084172
33 On pressing back from options menu in camera, the midi stopped playing. 33 On pressing back from options menu in camera, the midi stopped playing.
34 Hence added stopRingerVolSettingInactivityTimer under the if(getSoundsReason() == SettingVolume) 34 Hence added stopRingerVolSettingInactivityTimer under the if(getSoundsReason() == SettingVolume)
35 35
36 Sep 01, 2005 REF: CRR 32707 x0021334 36 Sep 01, 2005 REF: CRR 32707 x0021334
37 Description: Select Softkey dosen't work for the second time on choosing Volume option in Ringer menu 37 Description: Select Softkey dosen't work for the second time on choosing Volume option in Ringer menu
38 Fix: Select soft key operation in volume menu has been modified to fix this problem. 38 Fix: Select soft key operation in volume menu has been modified to fix this problem.
39 39
40 Apr 05, 2005 REF: ENH 29994 xdeepadh 40 Apr 05, 2005 REF: ENH 29994 xdeepadh
41 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application 41 Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application
42 Solution: Generic Midi Ringer and Midi Test Application were implemented. 42 Solution: Generic Midi Ringer and Midi Test Application were implemented.
43 43
44 25/10/00 Original Condat(UK) BMI version. 44 25/10/00 Original Condat(UK) BMI version.
45 45
46 $End 46 $End
47 47
48 *******************************************************************************/ 48 *******************************************************************************/
49 49
50 /******************************************************************************* 50 /*******************************************************************************
51 51
52 Include Files 52 Include Files
53 53
54 *******************************************************************************/ 54 *******************************************************************************/
55 #define ENTITY_MFW 55 #define ENTITY_MFW
56 56
57 /* includes */ 57 /* includes */
58 #include <string.h> 58 #include <string.h>
135 #include "MmiSounds.h" 135 #include "MmiSounds.h"
136 #include "MmiIdle.h" 136 #include "MmiIdle.h"
137 137
138 extern UBYTE HUPKeyOrigin; // Variable to indicate that long end key press is coming from menu 138 extern UBYTE HUPKeyOrigin; // Variable to indicate that long end key press is coming from menu
139 139
140 /******************************************************************************* 140 /*******************************************************************************
141 External Function Prototype 141 External Function Prototype
142 142
143 *******************************************************************************/ 143 *******************************************************************************/
144 /* Fix for the melody and volume settings. 3/4/01 MZ */ 144 /* Fix for the melody and volume settings. 3/4/01 MZ */
145 extern BOOL getScrollSelectMenuItem(void); 145 extern BOOL getScrollSelectMenuItem(void);
146 extern clearScrollSelectMenuItem(void); 146 extern clearScrollSelectMenuItem(void);
147 extern void volMenuItemSelected(void); 147 extern void volMenuItemSelected(void);
153 #ifdef FF_MIDI_RINGER 153 #ifdef FF_MIDI_RINGER
154 extern MfwHnd hPlayerStartTimer; /* timeout till start of midi file */ 154 extern MfwHnd hPlayerStartTimer; /* timeout till start of midi file */
155 #endif 155 #endif
156 156
157 /******************************************************************************* 157 /*******************************************************************************
158 158
159 Private Methods 159 Private Methods
160 160
161 *******************************************************************************/ 161 *******************************************************************************/
162 162
163 163
164 164
165 /******************************************************************************* 165 /*******************************************************************************
166 166
167 $Function: bookMenuMenuCB 167 $Function: bookMenuMenuCB
168 168
169 $Description: Menu handler for the menu window 169 $Description: Menu handler for the menu window
170 170
171 $Returns: MFW_EVENT_CONSUMED if event handled, otherwise 171 $Returns: MFW_EVENT_CONSUMED if event handled, otherwise
172 MFW_EVENT_PASSED 172 MFW_EVENT_PASSED
173 173
174 $Arguments: e, event, m, menu handle 174 $Arguments: e, event, m, menu handle
175 175
176 *******************************************************************************/ 176 *******************************************************************************/
177 177
178 static int bookMenuMenuCB( MfwEvt e, MfwMnu *m ) 178 static int bookMenuMenuCB( MfwEvt e, MfwMnu *m )
179 { 179 {
180 T_MFW_HND window = mfwParent( mfw_header() ); 180 T_MFW_HND window = mfwParent( mfw_header() );
224 /******************************************************************************* 224 /*******************************************************************************
225 225
226 $Function: bookMenuDialog 226 $Function: bookMenuDialog
227 227
228 $Description: Menu window dialog function 228 $Description: Menu window dialog function
229 229
230 $Returns: none 230 $Returns: none
231 231
232 $Arguments: win, window handle 232 $Arguments: win, window handle
233 event, event to be handled 233 event, event to be handled
234 value, not used 234 value, not used
235 parameter, not used 235 parameter, not used
236 236
237 *******************************************************************************/ 237 *******************************************************************************/
238 238
239 void bookMenuDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) 239 void bookMenuDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter )
240 { 240 {
241 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; 241 T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data;
242 tBookStandard *data = (tBookStandard *) win_data->user; 242 tBookStandard *data = (tBookStandard *) win_data->user;
243 /* MfwMnu *mnu; */ /* RAVI */ 243 /* MfwMnu *mnu; */ /* RAVI */
244 244
245 TRACE_FUNCTION( "bookMenuDialog()" ); 245 TRACE_FUNCTION( "bookMenuDialog()" );
246 246
247 /* The menu dialog function has to deal with initialisation 247 /* The menu dialog function has to deal with initialisation
248 and responses from the PIN2 validation methods 248 and responses from the PIN2 validation methods
249 */ 249 */
274 /* 274 /*
275 The ringer volume settings dialog has been invoked, create and start the 275 The ringer volume settings dialog has been invoked, create and start the
276 4 second time out. 276 4 second time out.
277 */ 277 */
278 /* RAVI - 20-1-2006 */ 278 /* RAVI - 20-1-2006 */
279 #ifdef NEPTUNE_BOARD 279 #ifdef NEPTUNE_BOARD
280 setSoundsReason(SettingVolume); 280 setSoundsReason(SettingVolume);
281 #endif 281 #endif
282 /* END RAVI */ 282 /* END RAVI */
283 startRingerVolSettingInactivityTimer(); 283 startRingerVolSettingInactivityTimer();
284 } 284 }
285 285
286 } 286 }
287 break; 287 break;
288 288
289 case ADD_CALLBACK: 289 case ADD_CALLBACK:
290 { 290 {
295 break; 295 break;
296 296
297 case DEFAULT_OPTION: 297 case DEFAULT_OPTION:
298 { 298 {
299 /* Highlight an option in the menu when it is opened. Parameter points to a UBYTE. */ 299 /* Highlight an option in the menu when it is opened. Parameter points to a UBYTE. */
300 300
301 mnuChooseVisibleItem(data->menu, *((UBYTE *)parameter)); 301 mnuChooseVisibleItem(data->menu, *((UBYTE *)parameter));
302 } 302 }
303 break; 303 break;
304 304
305 case PIN2_OK: 305 case PIN2_OK:
306 { 306 {
307 /* We have received a PIN2 authorisation, so we can execute the 307 /* We have received a PIN2 authorisation, so we can execute the
308 the requested function 308 the requested function
309 */ 309 */
310 310
311 TRACE_EVENT("PIN2_OK: Should carry on to perform phonebook op"); 311 TRACE_EVENT("PIN2_OK: Should carry on to perform phonebook op");
312 (data->phbk->pin2_next)( data->phbk->menu, data->phbk->item); 312 (data->phbk->pin2_next)( data->phbk->menu, data->phbk->item);
313 313
314 } 314 }
315 break; 315 break;
336 /******************************************************************************* 336 /*******************************************************************************
337 337
338 $Function: bookMenuTimCB 338 $Function: bookMenuTimCB
339 339
340 $Description: Menu tim handler 340 $Description: Menu tim handler
341 341
342 $Returns: 342 $Returns:
343 343
344 $Arguments: 344 $Arguments:
345 345
346 *******************************************************************************/ 346 *******************************************************************************/
347 347
348 static int bookMenuTimCB (T_MFW_EVENT event, T_MFW_TIM *tc) 348 static int bookMenuTimCB (T_MFW_EVENT event, T_MFW_TIM *tc)
349 { 349 {
350 T_MFW_HND window = mfwParent( mfw_header() ); 350 T_MFW_HND window = mfwParent( mfw_header() );
367 /******************************************************************************* 367 /*******************************************************************************
368 368
369 $Function: bookMenuWindowCB 369 $Function: bookMenuWindowCB
370 370
371 $Description: Menu window handler 371 $Description: Menu window handler
372 372
373 $Returns: MFW_EVENT_CONSUMED if event handled, otherwise 373 $Returns: MFW_EVENT_CONSUMED if event handled, otherwise
374 MFW_EVENT_PASSED 374 MFW_EVENT_PASSED
375 375
376 $Arguments: e, event, m, window handle 376 $Arguments: e, event, m, window handle
377 377
378 *******************************************************************************/ 378 *******************************************************************************/
379 379
380 static int bookMenuWindowCB( MfwEvt e, MfwWin *w ) 380 static int bookMenuWindowCB( MfwEvt e, MfwWin *w )
381 { 381 {
382 tBookStandard * data = (tBookStandard *)w->user; 382 tBookStandard * data = (tBookStandard *)w->user;
401 { 401 {
402 if (mnu->curAttr) 402 if (mnu->curAttr)
403 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); 403 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour);
404 else 404 else
405 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); 405 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU);
406 406
407 } 407 }
408 else 408 else
409 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); 409 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU);
410 } 410 }
411 break; 411 break;
433 /******************************************************************************* 433 /*******************************************************************************
434 434
435 $Function: bookMenuKbdCB 435 $Function: bookMenuKbdCB
436 436
437 $Description: tbd 437 $Description: tbd
438 438
439 $Returns: MFW_EVENT_CONSUMED always 439 $Returns: MFW_EVENT_CONSUMED always
440 440
441 $Arguments: e, event, k, key handle 441 $Arguments: e, event, k, key handle
442 442
443 *******************************************************************************/ 443 *******************************************************************************/
444 444
445 static int bookMenuKbdCB( MfwEvt e, MfwKbd *k ) 445 static int bookMenuKbdCB( MfwEvt e, MfwKbd *k )
446 { 446 {
447 static BOOL storeSelectedItemToPcm=FALSE; 447 static BOOL storeSelectedItemToPcm=FALSE;
458 switch (k->code) 458 switch (k->code)
459 { 459 {
460 case KCD_MNUUP: 460 case KCD_MNUUP:
461 { 461 {
462 // keypadLock will not activate anymore 462 // keypadLock will not activate anymore
463 data->status_of_timer = TRUE; 463 data->status_of_timer = TRUE;
464 /* Update the window with the previous element 464 /* Update the window with the previous element
465 */ 465 */
466 mnuUp( data->menu ); 466 mnuUp( data->menu );
467 /* 467 /*
468 Special case when setting up ringer volume, the current ringer 468 Special case when setting up ringer volume, the current ringer
469 is played as user scrolls the volume settings Silent -> cresendo. 469 is played as user scrolls the volume settings Silent -> cresendo.
470 MZ. 470 MZ.
471 */ 471 */
472 /* RAVI - 20-1-2006 */ 472 /* RAVI - 20-1-2006 */
473 #ifdef NEPTUNE_BOARD 473 #ifdef NEPTUNE_BOARD
474 if (getSoundsReason () == SettingVolume) 474 if (getSoundsReason () == SettingVolume)
475 { 475 {
476 volumeMenuScrollUp(); 476 volumeMenuScrollUp();
477 } 477 }
478 #endif 478 #endif
479 /* END RAVI */ 479 /* END RAVI */
480 480
481 if(getScrollSelectMenuItem() == TRUE ||(getSoundsReason() == SettingVolume) ) 481 if(getScrollSelectMenuItem() == TRUE ||(getSoundsReason() == SettingVolume) )
482 { 482 {
483 mnuSelect(data->menu); 483 mnuSelect(data->menu);
484 /* Scroll up in volume setting */ 484 /* Scroll up in volume setting */
485 restartVolSettingInactivityTimer(); 485 restartVolSettingInactivityTimer();
486 } 486 }
487 } 487 }
488 break; 488 break;
489 489
490 case KCD_MNUDOWN: 490 case KCD_MNUDOWN:
491 { 491 {
492 // keypadLock will not activate anymore 492 // keypadLock will not activate anymore
493 data->status_of_timer = TRUE; 493 data->status_of_timer = TRUE;
494 /* Update the window with the next element 494 /* Update the window with the next element
495 */ 495 */
496 mnuDown( data->menu ); 496 mnuDown( data->menu );
497 497
498 /* 498 /*
499 Special case when setting up ringer volume, the current ringer 499 Special case when setting up ringer volume, the current ringer
500 is played as user scrolls the volume settings Silent -> cresendo. 500 is played as user scrolls the volume settings Silent -> cresendo.
501 MZ. 501 MZ.
502 */ 502 */
503 /* RAVI - 20-1-2006 */ 503 /* RAVI - 20-1-2006 */
504 #ifdef NEPTUNE_BOARD 504 #ifdef NEPTUNE_BOARD
505 if (getSoundsReason () == SettingVolume) 505 if (getSoundsReason () == SettingVolume)
506 { 506 {
507 volumeMenuScrollDown(); 507 volumeMenuScrollDown();
508 } 508 }
509 #endif 509 #endif
510 /* END RAVI */ 510 /* END RAVI */
511 511
512 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) 512 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume))
513 { 513 {
514 mnuSelect(data->menu); 514 mnuSelect(data->menu);
515 restartVolSettingInactivityTimer(); 515 restartVolSettingInactivityTimer();
516 } 516 }
517 517
518 } 518 }
519 break; 519 break;
520 520
521 case KCD_MNUSELECT: 521 case KCD_MNUSELECT:
522 case KCD_LEFT: 522 case KCD_LEFT:
523 { 523 {
524 // keypadLock will not activate anymore 524 // keypadLock will not activate anymore
525 data->status_of_timer = TRUE; 525 data->status_of_timer = TRUE;
526 526
527 // Select this element 527 // Select this element
528 mnuSelect( data->menu ); 528 mnuSelect( data->menu );
529 /*30 Mar 2007 a0393213 (R.Prabakar) 529 /*30 Mar 2007 a0393213 (R.Prabakar)
530 OMAPS00123019 ( Reboot of the target when you unplug/plug USB cable using camera application) 530 OMAPS00123019 ( Reboot of the target when you unplug/plug USB cable using camera application)
536 #ifdef FF_MMI_USBMS 536 #ifdef FF_MMI_USBMS
537 if(usb_opt_win && 537 if(usb_opt_win &&
538 data->menu==((tBookStandard*)(((MfwWin*)(((T_MFW_HDR *)usb_opt_win)->data))->user))->menu) 538 data->menu==((tBookStandard*)(((MfwWin*)(((T_MFW_HDR *)usb_opt_win)->data))->user))->menu)
539 { 539 {
540 bookMenuDestroy(usb_opt_win); 540 bookMenuDestroy(usb_opt_win);
541 usb_opt_win=NULL; 541 usb_opt_win=NULL;
542 break; 542 break;
543 } 543 }
544 #endif 544 #endif
545 mnu = (MfwMnu *) mfwControl( data->menu ); 545 mnu = (MfwMnu *) mfwControl( data->menu );
546 546
551 // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check 551 // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check
552 if( winIsFocussed(window) ) 552 if( winIsFocussed(window) )
553 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); 553 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour);
554 } 554 }
555 } 555 }
556 556
557 // A volume or tone setting menu has been entered. MZ 2/4/01 557 // A volume or tone setting menu has been entered. MZ 2/4/01
558 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) 558 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume))
559 { 559 {
560 TRACE_FUNCTION("@@@@ A volume or tone settin"); 560 TRACE_FUNCTION("@@@@ A volume or tone settin");
561 561
562 /* 562 /*
563 First time pcm flag is false, subsequent selection of menu item 563 First time pcm flag is false, subsequent selection of menu item
564 will select and terminate the volume settings menu. 3/4/01 MZ. 564 will select and terminate the volume settings menu. 3/4/01 MZ.
565 */ 565 */
566 if(storeSelectedItemToPcm ==TRUE || getSoundsReason() == SettingVolume ) 566 if(storeSelectedItemToPcm ==TRUE || getSoundsReason() == SettingVolume )
567 { 567 {
570 storeSelectedItemToPcm =FALSE; 570 storeSelectedItemToPcm =FALSE;
571 mnuEscape( data->menu ); 571 mnuEscape( data->menu );
572 if(getSoundsReason() == SettingVolume) 572 if(getSoundsReason() == SettingVolume)
573 { 573 {
574 setSoundsReason(SoundsNone); 574 setSoundsReason(SoundsNone);
575 stopRingerVolSettingInactivityTimer(); 575 stopRingerVolSettingInactivityTimer();
576 } 576 }
577 //Apr 05, 2005 REF: ENH 29994 xdeepadh 577 //Apr 05, 2005 REF: ENH 29994 xdeepadh
578 #ifdef FF_MIDI_RINGER 578 #ifdef FF_MIDI_RINGER
579 //Delete the timer for volume scrolling 579 //Delete the timer for volume scrolling
580 if(hPlayerStartTimer!=NULL) 580 if(hPlayerStartTimer!=NULL)
581 timDelete(hPlayerStartTimer); 581 timDelete(hPlayerStartTimer);
582 #endif 582 #endif
583 break; 583 break;
584 } 584 }
585 /* 585 /*
586 Second time the left soft key is used, store the setting in pcm and terminate the 586 Second time the left soft key is used, store the setting in pcm and terminate the
587 volume settings menu. 587 volume settings menu.
588 */ 588 */
589 storeSelectedItemToPcm =TRUE; 589 storeSelectedItemToPcm =TRUE;
590 590
591 } 591 }
592 } 592 }
593 break; 593 break;
594 594
595 // POWER key takes us to idle screen. 595 // POWER key takes us to idle screen.
596 case KCD_POWER: 596 case KCD_POWER:
597 data->status_of_timer = TRUE; 597 data->status_of_timer = TRUE;
598 598
599 HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away 599 HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away
600 600
601 //return to idle screen 601 //return to idle screen
602 602
603 if (data->Callback) 603 if (data->Callback)
604 (data->Callback) (data->parent_win, NULL, NULL); 604 (data->Callback) (data->parent_win, NULL, NULL);
605 605
606 bookMenuDestroy(data->win); 606 bookMenuDestroy(data->win);
607 stopRingerVolSettingInactivityTimer(); 607 stopRingerVolSettingInactivityTimer();
608 608
609 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0); 609 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0);
610 break; 610 break;
611 611
612 case KCD_RIGHT: 612 case KCD_RIGHT:
613 case KCD_HUP: 613 case KCD_HUP:
614 { 614 {
615 // keypadLock will not activate anymore 615 // keypadLock will not activate anymore
616 data->status_of_timer = TRUE; 616 data->status_of_timer = TRUE;
619 // Set storeSelectedItemToPcm to FALSE to enable proper operation every time instead of 619 // Set storeSelectedItemToPcm to FALSE to enable proper operation every time instead of
620 // handling it in alterate attempts. 620 // handling it in alterate attempts.
621 storeSelectedItemToPcm = FALSE; 621 storeSelectedItemToPcm = FALSE;
622 622
623 HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away 623 HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away
624 624
625 /* get us out of here 625 /* get us out of here
626 */ 626 */
627 mnuEscape( data->menu ); 627 mnuEscape( data->menu );
628 mnu = (MfwMnu *) mfwControl( data->menu ); 628 mnu = (MfwMnu *) mfwControl( data->menu );
629 if (mnu != NULL) 629 if (mnu != NULL)
630 { 630 {
631 if (mnu->curAttr != NULL) 631 if (mnu->curAttr != NULL)
632 { 632 {
633 // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check 633 // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check
634 if( winIsFocussed(window) ) 634 if( winIsFocussed(window) )
635 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); 635 softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour);
636 } 636 }
637 } 637 }
638 638
639 // Return the menu scroll behavior to normal. 639 // Return the menu scroll behavior to normal.
640 if(getScrollSelectMenuItem() == TRUE) 640 if(getScrollSelectMenuItem() == TRUE)
641 { 641 {
642 clearScrollSelectMenuItem(); 642 clearScrollSelectMenuItem();
643 } 643 }
644 /* 644 /*
645 If user exits the volume settings menu from the Idle or Incoming call screen. 645 If user exits the volume settings menu from the Idle or Incoming call screen.
646 clear the soundsReason. 646 clear the soundsReason.
647 */ 647 */
648 if(getSoundsReason() == SettingVolume) 648 if(getSoundsReason() == SettingVolume)
649 { 649 {
650 /* RAVI - 20-1-2006 */ 650 /* RAVI - 20-1-2006 */
651 #ifdef NEPTUNE_BOARD 651 #ifdef NEPTUNE_BOARD
652 /* Restore the volume setting */ 652 /* Restore the volume setting */
653 restorePreviousVolumeSetting (); 653 restorePreviousVolumeSetting ();
654 #endif 654 #endif
655 /* END RAVI */ 655 /* END RAVI */
656 stopRingerVolSettingInactivityTimer(); 656 stopRingerVolSettingInactivityTimer();
657 setSoundsReason(SoundsNone); 657 setSoundsReason(SoundsNone);
658 //Apr 05, 2005 REF: ENH 29994 xdeepadh 658 //Apr 05, 2005 REF: ENH 29994 xdeepadh
659 #ifdef FF_MIDI_RINGER 659 #ifdef FF_MIDI_RINGER
660 //Delete teh timer for volume scrolling 660 //Delete teh timer for volume scrolling
661 if(hPlayerStartTimer!=NULL) 661 if(hPlayerStartTimer!=NULL)
662 timDelete(hPlayerStartTimer); 662 timDelete(hPlayerStartTimer);
663 #endif 663 #endif
664 } 664 }
665 665
666 } 666 }
667 break; 667 break;
668 668
669 case KCD_STAR: 669 case KCD_STAR:
670 { 670 {
671 671
672 /* 672 /*
673 * Keypadlock will lock only 673 * Keypadlock will lock only
674 * within two seconds by press "*" 674 * within two seconds by press "*"
675 */ 675 */
676 676
677 if(data->status_of_timer EQ FALSE) 677 if(data->status_of_timer EQ FALSE)
678 { 678 {
679 TRACE_EVENT ("activate KEYpadLOCK"); 679 TRACE_EVENT ("activate KEYpadLOCK");
680 mnuEscape( data->menu ); 680 mnuEscape( data->menu );
681 settingsKeyPadLockOn (); 681 settingsKeyPadLockOn ();
682 } 682 }
683 683
684 /* SPR#1608 - SH - Otherwise, send '*' keypress to idle screen */ 684 /* SPR#1608 - SH - Otherwise, send '*' keypress to idle screen */
685 685
686 else if (window == data->phbk->menu_main_win) 686 else if (window == data->phbk->menu_main_win)
687 { 687 {
688 /* Number key presses in phonebook menu returns user to idle screen, 688 /* Number key presses in phonebook menu returns user to idle screen,
689 add key press to Idle edit screen. */ 689 add key press to Idle edit screen. */
690 690
691 keycode = k->code; 691 keycode = k->code;
692 692
693 bookMenuDestroy(data->win); 693 bookMenuDestroy(data->win);
696 } 696 }
697 } 697 }
698 break; 698 break;
699 699
700 case KCD_HASH: 700 case KCD_HASH:
701 { 701 {
702 /* 702 /*
703 * Keypadlock will lock only 703 * Keypadlock will lock only
704 * within two seconds by press "*" 704 * within two seconds by press "*"
705 */ 705 */
706 if(data->status_of_timer EQ FALSE) 706 if(data->status_of_timer EQ FALSE)
707 { 707 {
708 TRACE_EVENT ("activate Silent mode"); 708 TRACE_EVENT ("activate Silent mode");
709 709
710 if(FFS_flashData.settings_status & SettingsSilentMode) 710 if(FFS_flashData.settings_status & SettingsSilentMode)
717 } 717 }
718 mnuEscape( data->menu ); 718 mnuEscape( data->menu );
719 } 719 }
720 720
721 /* SPR#1608 - SH - Otherwise, send '#' keypress to idle screen */ 721 /* SPR#1608 - SH - Otherwise, send '#' keypress to idle screen */
722 722
723 else if (window == data->phbk->menu_main_win) 723 else if (window == data->phbk->menu_main_win)
724 { 724 {
725 /* Number key presses in phonebook menu returns user to idle screen, 725 /* Number key presses in phonebook menu returns user to idle screen,
726 add key press to Idle edit screen. */ 726 add key press to Idle edit screen. */
727 727
728 keycode = k->code; 728 keycode = k->code;
729 729
730 bookMenuDestroy(data->win); 730 bookMenuDestroy(data->win);
731 731
732 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); 732 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode);
733 } 733 }
734 } 734 }
735 break; 735 break;
736 736
737 default: 737 default:
738 { 738 {
739 TRACE_EVENT("bookMenuKbdCb - DEFAULT!"); 739 TRACE_EVENT("bookMenuKbdCb - DEFAULT!");
740 /* SH - only allow dialling if we are in the main menu */ 740 /* SH - only allow dialling if we are in the main menu */
741 if (window == data->phbk->menu_main_win) 741 if (window == data->phbk->menu_main_win)
742 { 742 {
743 /* keypadLock will not activate anymore */ 743 /* keypadLock will not activate anymore */
744 data->status_of_timer = TRUE; 744 data->status_of_timer = TRUE;
745 745
746 /* Number key presses in phonebook menu returns user to idle screen, 746 /* Number key presses in phonebook menu returns user to idle screen,
747 add key press to Idle edit screen. */ 747 add key press to Idle edit screen. */
748 748
749 keycode = k->code; 749 keycode = k->code;
750 750
751 bookMenuDestroy(data->win); 751 bookMenuDestroy(data->win);
754 /* if ((k->code>=KCD_0 && k->code<=KCD_9)) */ 754 /* if ((k->code>=KCD_0 && k->code<=KCD_9)) */
755 if (k->code<=KCD_9) 755 if (k->code<=KCD_9)
756 { 756 {
757 TRACE_EVENT("Idle Editor Start!"); 757 TRACE_EVENT("Idle Editor Start!");
758 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); 758 SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode);
759 } 759 }
760 } 760 }
761 } 761 }
762 break; 762 break;
763 } 763 }
764 764
776 /******************************************************************************* 776 /*******************************************************************************
777 777
778 $Function: bookMenuKbdLongCB 778 $Function: bookMenuKbdLongCB
779 779
780 $Description: keyboard long press event handler 780 $Description: keyboard long press event handler
781 781
782 $Returns: MFW_EVENT_CONSUMED always 782 $Returns: MFW_EVENT_CONSUMED always
783 783
784 $Arguments: e, event, k, key handle 784 $Arguments: e, event, k, key handle
785 785
786 *******************************************************************************/ 786 *******************************************************************************/
787 787
788 static int bookMenuKbdLongCB( MfwEvt e, MfwKbd *k ) 788 static int bookMenuKbdLongCB( MfwEvt e, MfwKbd *k )
789 { 789 {
790 T_MFW_HND window = mfwParent( mfw_header() ); 790 T_MFW_HND window = mfwParent( mfw_header() );
796 if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) ) 796 if ( ( e & KEY_CLEAR ) && ( e & KEY_LONG ) )
797 { mnuEscape( data->menu ); 797 { mnuEscape( data->menu );
798 return MFW_EVENT_CONSUMED; 798 return MFW_EVENT_CONSUMED;
799 } 799 }
800 /*if long press on END key*/ 800 /*if long press on END key*/
801 if ( ( e & KEY_HUP) && ( e & KEY_LONG ) ) 801 if ( ( e & KEY_HUP) && ( e & KEY_LONG ) )
802 { 802 {
803 U8 keycode; 803 U8 keycode;
804 U8 uMode; 804 U8 uMode;
805 uMode = dspl_Enable(0); 805 uMode = dspl_Enable(0);
806 806
807 // keypadLock will not activate anymore 807 // keypadLock will not activate anymore
808 data->status_of_timer = TRUE; 808 data->status_of_timer = TRUE;
809 809
810 //return to idle screen 810 //return to idle screen
811 811
812 keycode = k->code; 812 keycode = k->code;
813 813
814 if (data->Callback) 814 if (data->Callback)
815 (data->Callback) (data->parent_win, NULL, NULL); 815 (data->Callback) (data->parent_win, NULL, NULL);
816 816
817 bookMenuDestroy(data->win); 817 bookMenuDestroy(data->win);
818 stopRingerVolSettingInactivityTimer(); 818 stopRingerVolSettingInactivityTimer();
819 819
820 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, &keycode); 820 SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, &keycode);
821 821
822 dspl_Enable(uMode); 822 dspl_Enable(uMode);
823 } 823 }
824 824
825 return MFW_EVENT_CONSUMED; 825 return MFW_EVENT_CONSUMED;
826 } 826 }
827 827
828 828
829 829
833 /******************************************************************************* 833 /*******************************************************************************
834 834
835 $Function: bookMenuCreate 835 $Function: bookMenuCreate
836 836
837 $Description: Create the menu window 837 $Description: Create the menu window
838 838
839 $Returns: handle of newly created window, or NULL if error 839 $Returns: handle of newly created window, or NULL if error
840 840
841 $Arguments: parent, handle of the parent window 841 $Arguments: parent, handle of the parent window
842 842
843 *******************************************************************************/ 843 *******************************************************************************/
844 844
845 static T_MFW_HND bookMenuCreate( MfwHnd parent ) 845 static T_MFW_HND bookMenuCreate( MfwHnd parent )
846 { 846 {
847 T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data; 847 T_MFW_WIN *parent_win_data = ( (T_MFW_HDR *) parent )->data;
879 data->kbd = kbdCreate ( data->win, KEY_ALL, (MfwCb) bookMenuKbdCB ); 879 data->kbd = kbdCreate ( data->win, KEY_ALL, (MfwCb) bookMenuKbdCB );
880 data->kbd_long = kbdCreate ( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookMenuKbdLongCB ); 880 data->kbd_long = kbdCreate ( data->win, KEY_ALL | KEY_LONG, (MfwCb) bookMenuKbdLongCB );
881 data->menu_tim = tim_create (data->win, THREE_SECS, (MfwCb) bookMenuTimCB); 881 data->menu_tim = tim_create (data->win, THREE_SECS, (MfwCb) bookMenuTimCB);
882 882
883 data->Callback = NULL; // Use standard menu callback (changed by sending event ADD_CALLBACK) 883 data->Callback = NULL; // Use standard menu callback (changed by sending event ADD_CALLBACK)
884 884
885 /* And return the handle of the newly created window 885 /* And return the handle of the newly created window
886 */ 886 */
887 return data->win; 887 return data->win;
888 } 888 }
889 889
890 890
891 891
892 892
893 893
894 /******************************************************************************* 894 /*******************************************************************************
895 895
896 Public Methods 896 Public Methods
897 897
898 *******************************************************************************/ 898 *******************************************************************************/
899 899
900 /******************************************************************************* 900 /*******************************************************************************
901 901
902 $Function: bookMenuStart 902 $Function: bookMenuStart
903 903
904 $Description: tbd 904 $Description: tbd
905 905
906 $Returns: tbd 906 $Returns: tbd
907 907
908 $Arguments: tbd 908 $Arguments: tbd
909 909
910 *******************************************************************************/ 910 *******************************************************************************/
911 911
912 T_MFW_HND bookMenuStart( MfwHnd parent, MfwMnuAttr *menuAttr,SHORT reason ) 912 T_MFW_HND bookMenuStart( MfwHnd parent, MfwMnuAttr *menuAttr,SHORT reason )
913 { 913 {
914 T_MFW_HND win; 914 T_MFW_HND win;
924 924
925 /******************************************************************************* 925 /*******************************************************************************
926 926
927 $Function: bookMenuDestroy 927 $Function: bookMenuDestroy
928 928
929 $Description: Destroy the menu window 929 $Description: Destroy the menu window
930 930
931 $Returns: none 931 $Returns: none
932 932
933 $Arguments: window, handle of the window being destroyed 933 $Arguments: window, handle of the window being destroyed
934 934
935 *******************************************************************************/ 935 *******************************************************************************/
936 936
937 void bookMenuDestroy( MfwHnd window ) 937 void bookMenuDestroy( MfwHnd window )
938 { 938 {
939 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data; 939 T_MFW_WIN *win_data = ((T_MFW_HDR *)window)->data;
988 988
989 989
990 990
991 991
992 /******************************************************************************* 992 /*******************************************************************************
993 993
994 End of File 994 End of File
995 995
996 *******************************************************************************/ 996 *******************************************************************************/