comparison src/ui/bmi/mmiSatMenu.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 d715ee726526
comparison
equal deleted inserted replaced
91:c3d28a37caad 92:c0052fe355d3
1 1
2 /******************************************************************************* 2 /*******************************************************************************
3 3
4 CONDAT (UK) 4 CONDAT (UK)
5 5
6 ******************************************************************************** 6 ********************************************************************************
7 7
8 This software product is the property of Condat (UK) Ltd and may not be 8 This software product is the property of Condat (UK) Ltd and may not be
9 disclosed to any third party without the express permission of the owner. 9 disclosed to any third party without the express permission of the owner.
10 10
11 ******************************************************************************** 11 ********************************************************************************
12 12
13 $Project name: Basic MMI 13 $Project name: Basic MMI
14 $Project code: BMI (6349) 14 $Project code: BMI (6349)
15 $Module: MMI 15 $Module: MMI
16 $File: MmiSatMenu.c 16 $File: MmiSatMenu.c
17 $Revision: 1.0 17 $Revision: 1.0
18 18
19 $Author: Condat(UK) 19 $Author: Condat(UK)
20 $Date: 25/10/00 20 $Date: 25/10/00
21 21
22 ******************************************************************************** 22 ********************************************************************************
23 23
24 Description: 24 Description:
25 25
26 Implementation of MMI SIM Application Toolkit (SAT) 26 Implementation of MMI SIM Application Toolkit (SAT)
27 27
28 ******************************************************************************** 28 ********************************************************************************
29 29
30 $History: MmiSatMenu.c 30 $History: MmiSatMenu.c
31 31
32 32
33 33
34 34
35 Jun 06, 2006 DR: OMAPS00080543 - xreddymn 35 Jun 06, 2006 DR: OMAPS00080543 - xreddymn
36 Description: Default item is not being highlighted for SELECT ITEM command. 36 Description: Default item is not being highlighted for SELECT ITEM command.
37 Solution: Change list menu highlight index based on the default item provided 37 Solution: Change list menu highlight index based on the default item provided
38 in the SELECT ITEM command. 38 in the SELECT ITEM command.
39 39
50 Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462 50 Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462
51 Icon support for SetupMenu & Select item. 51 Icon support for SetupMenu & Select item.
52 52
53 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 53 xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
54 Using the MenuSelect Key for requesting the help info in STK menu. 54 Using the MenuSelect Key for requesting the help info in STK menu.
55 55
56 May 24, 2005 REF: CRR 29358 x0021334 56 May 24, 2005 REF: CRR 29358 x0021334
57 Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response 57 Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response
58 Fix: The implementation is now based on timer. After the specified timeout period 58 Fix: The implementation is now based on timer. After the specified timeout period
59 the control comes back to SAT main menu, if there is no selection done by the user. 59 the control comes back to SAT main menu, if there is no selection done by the user.
60 60
61 Aug 16, 2004 REF: CRR 24323 Deepa M.D 61 Aug 16, 2004 REF: CRR 24323 Deepa M.D
62 Bug:Clenup of sprintf used for tracing 62 Bug:Clenup of sprintf used for tracing
63 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX 63 Fix:Replace the char buf[]; sprintf (buf, "...", ...); TRACE_EVENT (buf); statements by TRACE_EVENT_PX
64 64
65 25/10/00 Original Condat(UK) BMI version. 65 25/10/00 Original Condat(UK) BMI version.
66 66
67 $End 67 $End
68 68
69 *******************************************************************************/ 69 *******************************************************************************/
70 70
71 71
72 72
73 /******************************************************************************* 73 /*******************************************************************************
74 74
75 Include Files 75 Include Files
76 76
77 *******************************************************************************/ 77 *******************************************************************************/
78 #define ENTITY_MFW 78 #define ENTITY_MFW
79 79
80 /* includes */ 80 /* includes */
81 #include <string.h> 81 #include <string.h>
196 static int sat_select_TimerCb (T_MFW_EVENT event, T_MFW_TIM *timer); 196 static int sat_select_TimerCb (T_MFW_EVENT event, T_MFW_TIM *timer);
197 197
198 static MfwMnuAttr sat_setup_menuAttrib = 198 static MfwMnuAttr sat_setup_menuAttrib =
199 { 199 {
200 &sat_setup_menuArea, 200 &sat_setup_menuArea,
201 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, 201 MNU_LEFT | MNU_LIST | MNU_CUR_LINE,
202 /* x0045876, 14-Aug-2006 (WR - integer conversion resulted in a change of sign) */ 202 /* x0045876, 14-Aug-2006 (WR - integer conversion resulted in a change of sign) */
203 (UBYTE) -1, /* use default font */ 203 (UBYTE) -1, /* use default font */
204 NULL, /* with these items */ 204 NULL, /* with these items */
205 0 , /* number of items */ 205 0 , /* number of items */
206 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE, 206 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE,
210 }; 210 };
211 211
212 static MfwMnuAttr sat_select_menuAttrib = 212 static MfwMnuAttr sat_select_menuAttrib =
213 { 213 {
214 &sat_select_menuArea, 214 &sat_select_menuArea,
215 MNU_LEFT | MNU_LIST | MNU_CUR_LINE, 215 MNU_LEFT | MNU_LIST | MNU_CUR_LINE,
216 /* x0045876, 14-Aug-2006 (WR - integer conversion resulted in a change of sign) */ 216 /* x0045876, 14-Aug-2006 (WR - integer conversion resulted in a change of sign) */
217 (UBYTE) -1, /* use default font */ 217 (UBYTE) -1, /* use default font */
218 NULL, /* with these items */ 218 NULL, /* with these items */
219 0, /* number of items */ 219 0, /* number of items */
220 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE, 220 COLOUR_LIST_XX, TxtNull, NULL, MNUATTRSPARE,
241 TRACE_FUNCTION ("sat_setup_menu_start()"); 241 TRACE_FUNCTION ("sat_setup_menu_start()");
242 /***************************Go-lite Optimization changes Start***********************/ 242 /***************************Go-lite Optimization changes Start***********************/
243 //Aug 16, 2004 REF: CRR 24323 Deepa M.D 243 //Aug 16, 2004 REF: CRR 24323 Deepa M.D
244 TRACE_EVENT_P1("MFW Memory Left after starting SAT %d",mfwCheckMemoryLeft()); 244 TRACE_EVENT_P1("MFW Memory Left after starting SAT %d",mfwCheckMemoryLeft());
245 /***************************Go-lite Optimization changes end***********************/ 245 /***************************Go-lite Optimization changes end***********************/
246 246
247 win = sat_setup_menu_create (NULL); 247 win = sat_setup_menu_create (NULL);
248 248
249 if (win NEQ NULL) 249 if (win NEQ NULL)
250 { 250 {
251 SEND_EVENT (win, SAT_SETUP_MENU, 0, sat_command); 251 SEND_EVENT (win, SAT_SETUP_MENU, 0, sat_command);
252 } 252 }
253 return win; 253 return win;
254 } 254 }
255 255
256 static T_MFW_HND sat_setup_menu_create(MfwHnd parent_window) 256 static T_MFW_HND sat_setup_menu_create(MfwHnd parent_window)
270 if (data->win EQ NULL) 270 if (data->win EQ NULL)
271 { 271 {
272 return NULL; 272 return NULL;
273 } 273 }
274 274
275 /* 275 /*
276 * connect the dialog data to the MFW-window 276 * connect the dialog data to the MFW-window
277 */ 277 */
278 278
279 data->mmi_control.dialog = (T_DIALOG_FUNC)sat_setup_menu_exec; 279 data->mmi_control.dialog = (T_DIALOG_FUNC)sat_setup_menu_exec;
280 data->mmi_control.data = data; 280 data->mmi_control.data = data;
281 win = ((T_MFW_HDR *)data->win)->data; 281 win = ((T_MFW_HDR *)data->win)->data;
282 win->user = (MfwUserDataPtr)data; 282 win->user = (MfwUserDataPtr)data;
283 283
284 data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ 284 data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */
285 285
286 /* 286 /*
287 * return window handle 287 * return window handle
288 */ 288 */
289 289
290 290
311 311
312 if (data) 312 if (data)
313 { 313 {
314 /* 314 /*
315 * Delete WIN handler 315 * Delete WIN handler
316 */ 316 */
317 win_delete (data->win); 317 win_delete (data->win);
318 318
319 /* 319 /*
320 * Free Memory 320 * Free Memory
321 */ 321 */
322 322
323 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 323 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
324 #ifdef FF_MMI_SAT_ICON 324 #ifdef FF_MMI_SAT_ICON
325 /* Free the memory allocated for Item icon data. */ 325 /* Free the memory allocated for Item icon data. */
326 if(setupMenuItemIconData.dst != NULL) 326 if(setupMenuItemIconData.dst != NULL)
327 { 327 {
328 FREE_MEMORY((U8 *)setupMenuItemIconData.dst, setupMenuItemIconData.width * 328 FREE_MEMORY((U8 *)setupMenuItemIconData.dst, setupMenuItemIconData.width *
329 setupMenuItemIconData.height); 329 setupMenuItemIconData.height);
330 setupMenuItemIconData.dst = NULL; 330 setupMenuItemIconData.dst = NULL;
331 } 331 }
332 332
333 /* Free the memory allocated for Header icon data. */ 333 /* Free the memory allocated for Header icon data. */
334 if(setupMenuHeaderIconData.dst != NULL) 334 if(setupMenuHeaderIconData.dst != NULL)
335 { 335 {
336 FREE_MEMORY((U8 *)setupMenuHeaderIconData.dst, setupMenuHeaderIconData.width * 336 FREE_MEMORY((U8 *)setupMenuHeaderIconData.dst, setupMenuHeaderIconData.width *
337 setupMenuHeaderIconData.height); 337 setupMenuHeaderIconData.height);
338 setupMenuHeaderIconData.dst = NULL; 338 setupMenuHeaderIconData.dst = NULL;
339 339
340 //Apr 24, 2006 REF: DRT OMAPS00075832 x0039928 340 //Apr 24, 2006 REF: DRT OMAPS00075832 x0039928
341 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 341 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
342 if(data->list_menu_data.Attr->icon != NULL) 342 if(data->list_menu_data.Attr->icon != NULL)
343 { 343 {
344 FREE_MEMORY((U8 *)data->list_menu_data.Attr->icon, sizeof (MfwIcnAttr)); 344 FREE_MEMORY((U8 *)data->list_menu_data.Attr->icon, sizeof (MfwIcnAttr));
345 data->list_menu_data.Attr->icon = NULL; 345 data->list_menu_data.Attr->icon = NULL;
346 } 346 }
347 } 347 }
348 #endif 348 #endif
349 349
350 for (i=0; i < data->list_menu_data.ListLength; i++) 350 for (i=0; i < data->list_menu_data.ListLength; i++)
351 { 351 {
352 sat_destroy_ITEM_ASCIIZ (data->list_menu_data.List[i].str); 352 sat_destroy_ITEM_ASCIIZ (data->list_menu_data.List[i].str);
353 353
354 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 354 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
356 if(data->list_menu_data.List[i].icon != NULL) 356 if(data->list_menu_data.List[i].icon != NULL)
357 { 357 {
358 FREE_MEMORY((U8 *)data->list_menu_data.List[i].icon, sizeof (MfwIcnAttr)); 358 FREE_MEMORY((U8 *)data->list_menu_data.List[i].icon, sizeof (MfwIcnAttr));
359 data->list_menu_data.List[i].icon = NULL; 359 data->list_menu_data.List[i].icon = NULL;
360 } 360 }
361 #endif 361 #endif
362 } 362 }
363 FREE_MEMORY ((U8 *)data->list_menu_data.List, 363 FREE_MEMORY ((U8 *)data->list_menu_data.List,
364 (data->list_menu_data.ListLength * sizeof (MfwMnuItem))); 364 (data->list_menu_data.ListLength * sizeof (MfwMnuItem)));
365 data->list_menu_data.List = NULL; 365 data->list_menu_data.List = NULL;
366 FREE_MEMORY ((U8 *)data, sizeof (T_sat_setup_menu)); 366 FREE_MEMORY ((U8 *)data, sizeof (T_sat_setup_menu));
367 367
368 /* SPR#2492 - DS - Free SAT menu header if it exists */ 368 /* SPR#2492 - DS - Free SAT menu header if it exists */
369 if (menuHdr) 369 if (menuHdr)
370 { 370 {
371 TRACE_EVENT_P2("Destroy menuHdr %d with size %d", menuHdr, *(menuHdr -(U16)sizeof(U16)) ); 371 TRACE_EVENT_P2("Destroy menuHdr %d with size %d", menuHdr, *(menuHdr -(U16)sizeof(U16)) );
372 sat_destroy_TEXT_ASCIIZ(menuHdr); 372 sat_destroy_TEXT_ASCIIZ(menuHdr);
373 menuHdr = NULL; /* dsm 01/12/03 - Added to explicitly set menuHdr to NULL */ 373 menuHdr = NULL; /* dsm 01/12/03 - Added to explicitly set menuHdr to NULL */
374 374
375 } 375 }
376 376
377 sat_set_setup_menu_win(NULL); // c030 rsa 377 sat_set_setup_menu_win(NULL); // c030 rsa
378 } 378 }
379 else 379 else
380 { 380 {
381 TRACE_EVENT ("sat_setup_menu_destroy() called twice"); 381 TRACE_EVENT ("sat_setup_menu_destroy() called twice");
421 #ifdef FF_MMI_SAT_ICON 421 #ifdef FF_MMI_SAT_ICON
422 if(data->sat_command->c.menu.itemIconQual != 0xFF) 422 if(data->sat_command->c.menu.itemIconQual != 0xFF)
423 { 423 {
424 /* We have icon to be displayed*/ 424 /* We have icon to be displayed*/
425 /* Copy the icon data to the editor attributes*/ 425 /* Copy the icon data to the editor attributes*/
426 setupMenuItemIconData.width = data->sat_command->c.menu.items[0].iconInfo.width; 426 setupMenuItemIconData.width = data->sat_command->c.menu.items[0].iconInfo.width;
427 setupMenuItemIconData.height = data->sat_command->c.menu.items[0].iconInfo.height; 427 setupMenuItemIconData.height = data->sat_command->c.menu.items[0].iconInfo.height;
428 428
429 icon_length = data->sat_command->c.menu.items[0].iconInfo.width * data->sat_command->c.menu.items[0].iconInfo.height; 429 icon_length = data->sat_command->c.menu.items[0].iconInfo.width * data->sat_command->c.menu.items[0].iconInfo.height;
430 430
431 setupMenuItemIconData.dst = (char *)ALLOC_MEMORY (icon_length); 431 setupMenuItemIconData.dst = (char *)ALLOC_MEMORY (icon_length);
432 432
433 memcpy(setupMenuItemIconData.dst, data->sat_command->c.menu.items[0].iconInfo.dst, icon_length); 433 memcpy(setupMenuItemIconData.dst, data->sat_command->c.menu.items[0].iconInfo.dst, icon_length);
434 434
435 /* Icon is self-explanatory. No need to display text for this case.*/ 435 /* Icon is self-explanatory. No need to display text for this case.*/
436 if(data->sat_command->c.menu.itemIconQual == 0x00) 436 if(data->sat_command->c.menu.itemIconQual == 0x00)
437 { 437 {
438 /* Icon is self-explanatory. Do not display the text*/ 438 /* Icon is self-explanatory. Do not display the text*/
439 setupMenuItemIconData.selfExplanatory = TRUE; 439 setupMenuItemIconData.selfExplanatory = TRUE;
455 else 455 else
456 { 456 {
457 setupMenuItemIconData.width = 0; 457 setupMenuItemIconData.width = 0;
458 setupMenuItemIconData.height = 0; 458 setupMenuItemIconData.height = 0;
459 setupMenuItemIconData.dst = NULL; 459 setupMenuItemIconData.dst = NULL;
460 setupMenuItemIconData.selfExplanatory = FALSE; 460 setupMenuItemIconData.selfExplanatory = FALSE;
461 } 461 }
462 #endif 462 #endif
463 463
464 for (i=0; i < data->list_menu_data.ListLength; i++) /* Fill Menu List */ 464 for (i=0; i < data->list_menu_data.ListLength; i++) /* Fill Menu List */
465 { 465 {
466 mnuInitDataItem(&data->list_menu_data.List[i]); 466 mnuInitDataItem(&data->list_menu_data.List[i]);
467 467
468 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 468 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
469 #ifdef FF_MMI_SAT_ICON 469 #ifdef FF_MMI_SAT_ICON
470 if(data->sat_command->c.menu.itemIconQual != 0xFF) 470 if(data->sat_command->c.menu.itemIconQual != 0xFF)
471 { 471 {
472 /* Populate the Icon attributes. 472 /* Populate the Icon attributes.
473 We assume that we have the same icon for all elements in the item list. */ 473 We assume that we have the same icon for all elements in the item list. */
474 data->list_menu_data.List[i].icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr)); 474 data->list_menu_data.List[i].icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr));
475 475
476 data->list_menu_data.List[i].icon->icons = setupMenuItemIconData.dst; 476 data->list_menu_data.List[i].icon->icons = setupMenuItemIconData.dst;
477 data->list_menu_data.List[i].icon->nIcons = 1; 477 data->list_menu_data.List[i].icon->nIcons = 1;
478 data->list_menu_data.List[i].icon->icnType = BMP_FORMAT_256_COLOUR; 478 data->list_menu_data.List[i].icon->icnType = BMP_FORMAT_256_COLOUR;
479 data->list_menu_data.List[i].icon->area.px = 1; 479 data->list_menu_data.List[i].icon->area.px = 1;
480 data->list_menu_data.List[i].icon->area.py = menuHeight + 1; 480 data->list_menu_data.List[i].icon->area.py = menuHeight + 1;
486 } 486 }
487 487
488 /* get the correct entry in list of setup_menuList */ 488 /* get the correct entry in list of setup_menuList */
489 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]); 489 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]);
490 if (data->list_menu_data.List[i].str[0] == (char)0x80)/*MC, SPR 940/2 check for unicode tag*/ 490 if (data->list_menu_data.List[i].str[0] == (char)0x80)/*MC, SPR 940/2 check for unicode tag*/
491 Unicode_menu = TRUE; 491 Unicode_menu = TRUE;
492 #else 492 #else
493 /* get the correct entry in list of setup_menuList */ 493 /* get the correct entry in list of setup_menuList */
494 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]); 494 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]);
495 if (data->list_menu_data.List[i].str[0] == 0x80)/*MC, SPR 940/2 check for unicode tag*/ 495 if (data->list_menu_data.List[i].str[0] == 0x80)/*MC, SPR 940/2 check for unicode tag*/
496 Unicode_menu = TRUE; 496 Unicode_menu = TRUE;
497 #endif 497 #endif
498 data->list_menu_data.List[i].flagFunc = (FlagFunc)item_flag_none; 498 data->list_menu_data.List[i].flagFunc = (FlagFunc)item_flag_none;
499 } 499 }
500 } 500 }
501 data->list_menu_data.autoDestroy = TRUE; 501 data->list_menu_data.autoDestroy = TRUE;
502 502
512 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 512 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
513 #ifdef FF_MMI_SAT_ICON 513 #ifdef FF_MMI_SAT_ICON
514 /* Free the memory allocated for Header icon data. */ 514 /* Free the memory allocated for Header icon data. */
515 if(setupMenuHeaderIconData.dst != NULL) 515 if(setupMenuHeaderIconData.dst != NULL)
516 { 516 {
517 FREE_MEMORY((U8 *)setupMenuHeaderIconData.dst, setupMenuHeaderIconData.width * 517 FREE_MEMORY((U8 *)setupMenuHeaderIconData.dst, setupMenuHeaderIconData.width *
518 setupMenuHeaderIconData.height); 518 setupMenuHeaderIconData.height);
519 setupMenuHeaderIconData.dst = NULL; 519 setupMenuHeaderIconData.dst = NULL;
520 } 520 }
521 #endif 521 #endif
522 sat_destroy_TEXT_ASCIIZ(menuHdr); 522 sat_destroy_TEXT_ASCIIZ(menuHdr);
523 menuHdr = NULL; /* dsm 01/12/03 - Added to explicitly set menuHdr to NULL */ 523 menuHdr = NULL; /* dsm 01/12/03 - Added to explicitly set menuHdr to NULL */
524 } 524 }
525 525
526 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 526 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
527 #ifdef FF_MMI_SAT_ICON 527 #ifdef FF_MMI_SAT_ICON
528 if(data->sat_command->c.menu.header.icon.qual != 0xFF) 528 if(data->sat_command->c.menu.header.icon.qual != 0xFF)
529 { 529 {
530 /* We have icon to be displayed*/ 530 /* We have icon to be displayed*/
531 /* Copy the icon data to the editor attributes*/ 531 /* Copy the icon data to the editor attributes*/
532 setupMenuHeaderIconData.width = data->sat_command->c.menu.header.iconInfo.width; 532 setupMenuHeaderIconData.width = data->sat_command->c.menu.header.iconInfo.width;
533 setupMenuHeaderIconData.height = data->sat_command->c.menu.header.iconInfo.height; 533 setupMenuHeaderIconData.height = data->sat_command->c.menu.header.iconInfo.height;
534 534
535 icon_length = data->sat_command->c.menu.header.iconInfo.width * data->sat_command->c.menu.header.iconInfo.height; 535 icon_length = data->sat_command->c.menu.header.iconInfo.width * data->sat_command->c.menu.header.iconInfo.height;
536 536
537 setupMenuHeaderIconData.dst = (char *)ALLOC_MEMORY (icon_length); 537 setupMenuHeaderIconData.dst = (char *)ALLOC_MEMORY (icon_length);
538 538
539 memcpy(setupMenuHeaderIconData.dst, data->sat_command->c.menu.header.iconInfo.dst, icon_length); 539 memcpy(setupMenuHeaderIconData.dst, data->sat_command->c.menu.header.iconInfo.dst, icon_length);
540 540
541 /* Icon is self-explanatory. No need to display text for this case.*/ 541 /* Icon is self-explanatory. No need to display text for this case.*/
542 if(data->sat_command->c.menu.header.icon.qual == 0x00) 542 if(data->sat_command->c.menu.header.icon.qual == 0x00)
543 { 543 {
544 /* Icon is self-explanatory. Do not display the text*/ 544 /* Icon is self-explanatory. Do not display the text*/
545 setupMenuHeaderIconData.selfExplanatory = TRUE; 545 setupMenuHeaderIconData.selfExplanatory = TRUE;
554 else 554 else
555 { 555 {
556 setupMenuHeaderIconData.width = 0; 556 setupMenuHeaderIconData.width = 0;
557 setupMenuHeaderIconData.height = 0; 557 setupMenuHeaderIconData.height = 0;
558 setupMenuHeaderIconData.dst = NULL; 558 setupMenuHeaderIconData.dst = NULL;
559 setupMenuHeaderIconData.selfExplanatory = FALSE; 559 setupMenuHeaderIconData.selfExplanatory = FALSE;
560 } 560 }
561 #endif 561 #endif
562 562
563 menuHdr = sat_create_TEXT_ASCIIZ(&menu->header); 563 menuHdr = sat_create_TEXT_ASCIIZ(&menu->header);
564 TRACE_EVENT_P1("SAT menu header: %s", menuHdr); 564 TRACE_EVENT_P1("SAT menu header: %s", menuHdr);
575 575
576 TRACE_EVENT_P1("mode map after: %04x", data->list_menu_data.Attr->mode); 576 TRACE_EVENT_P1("mode map after: %04x", data->list_menu_data.Attr->mode);
577 577
578 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 578 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
579 #ifdef FF_MMI_SAT_ICON 579 #ifdef FF_MMI_SAT_ICON
580 /* We allow the Header text to be created. We send the icon data with self-explanatory status.*/ 580 /* We allow the Header text to be created. We send the icon data with self-explanatory status.*/
581 if(setupMenuHeaderIconData.dst != NULL) 581 if(setupMenuHeaderIconData.dst != NULL)
582 { 582 {
583 data->list_menu_data.Attr->icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr)); 583 data->list_menu_data.Attr->icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr));
584 584
585 data->list_menu_data.Attr->icon->icons = setupMenuHeaderIconData.dst; 585 data->list_menu_data.Attr->icon->icons = setupMenuHeaderIconData.dst;
586 data->list_menu_data.Attr->icon->nIcons = 1; 586 data->list_menu_data.Attr->icon->nIcons = 1;
587 data->list_menu_data.Attr->icon->icnType = BMP_FORMAT_256_COLOUR; 587 data->list_menu_data.Attr->icon->icnType = BMP_FORMAT_256_COLOUR;
588 data->list_menu_data.Attr->icon->area.px = 1; 588 data->list_menu_data.Attr->icon->area.px = 1;
589 data->list_menu_data.Attr->icon->area.py = 1; 589 data->list_menu_data.Attr->icon->area.py = 1;
590 data->list_menu_data.Attr->icon->area.sx = setupMenuHeaderIconData.width; 590 data->list_menu_data.Attr->icon->area.sx = setupMenuHeaderIconData.width;
591 data->list_menu_data.Attr->icon->area.sy = setupMenuHeaderIconData.height; 591 data->list_menu_data.Attr->icon->area.sy = setupMenuHeaderIconData.height;
592 data->list_menu_data.Attr->icon->selfExplanatory = setupMenuHeaderIconData.selfExplanatory; 592 data->list_menu_data.Attr->icon->selfExplanatory = setupMenuHeaderIconData.selfExplanatory;
593 } 593 }
594 #endif 594 #endif
595 } 595 }
596 } 596 }
597 597
598 retVal = listDisplayListMenu(data->win, &data->list_menu_data, (ListCbFunc)sat_setup_menu_listmnu_cb,Unicode_menu/*MC*/); 598 retVal = listDisplayListMenu(data->win, &data->list_menu_data, (ListCbFunc)sat_setup_menu_listmnu_cb,Unicode_menu/*MC*/);
599 // xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 599 // xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
600 // Displaying '?' to indicate to the user that help is available for a menu 600 // Displaying '?' to indicate to the user that help is available for a menu
601 if(data->sat_command->qual & SAT_M_SELECT_HELP_AVAIL) 601 if(data->sat_command->qual & SAT_M_SELECT_HELP_AVAIL)
602 { 602 {
622 TRACE_FUNCTION ("sat_setup_menu_exec()"); 622 TRACE_FUNCTION ("sat_setup_menu_exec()");
623 623
624 switch (event) 624 switch (event)
625 { 625 {
626 case SAT_SETUP_MENU: 626 case SAT_SETUP_MENU:
627 627
628 TRACE_EVENT("sat_setup_menu_exec() SAT_SETUP_MENU"); 628 TRACE_EVENT("sat_setup_menu_exec() SAT_SETUP_MENU");
629 629
630 /* initialization of administrative data */ 630 /* initialization of administrative data */
631 631
632 data->sat_command = sat_command; /* save a pointer to the parameter for later use in callbacks */ 632 data->sat_command = sat_command; /* save a pointer to the parameter for later use in callbacks */
633 633
634 /* initialization of the dialog data */ 634 /* initialization of the dialog data */
650 #ifdef FF_MMI_SAT_ICON 650 #ifdef FF_MMI_SAT_ICON
651 /*Initialize the data members of Icon attributes */ 651 /*Initialize the data members of Icon attributes */
652 setupMenuItemIconData.width = 0; 652 setupMenuItemIconData.width = 0;
653 setupMenuItemIconData.height = 0; 653 setupMenuItemIconData.height = 0;
654 setupMenuItemIconData.dst = NULL; 654 setupMenuItemIconData.dst = NULL;
655 setupMenuItemIconData.selfExplanatory = FALSE; 655 setupMenuItemIconData.selfExplanatory = FALSE;
656 setupMenuHeaderIconData.width = 0; 656 setupMenuHeaderIconData.width = 0;
657 setupMenuHeaderIconData.height = 0; 657 setupMenuHeaderIconData.height = 0;
658 setupMenuHeaderIconData.dst = NULL; 658 setupMenuHeaderIconData.dst = NULL;
659 setupMenuHeaderIconData.selfExplanatory = FALSE; 659 setupMenuHeaderIconData.selfExplanatory = FALSE;
660 #endif 660 #endif
661 661
662 // c030 rsa 662 // c030 rsa
663 /* NOBREAK */ 663 /* NOBREAK */
664 case SAT_RETURN: 664 case SAT_RETURN:
665 665
666 if (event == SAT_RETURN) 666 if (event == SAT_RETURN)
667 TRACE_EVENT("sat_setup_menu_exec() SAT_RETURN"); 667 TRACE_EVENT("sat_setup_menu_exec() SAT_RETURN");
668 668
669 // end c030 rsa 669 // end c030 rsa
670 if (sat_get_setup_menu_listmnu_win() == NULL) 670 if (sat_get_setup_menu_listmnu_win() == NULL)
671 { 671 {
672 /* (re)create the dialog handler */ 672 /* (re)create the dialog handler */
673 if (sat_setup_menu_recreate(data) == LISTS_FAIL) 673 if (sat_setup_menu_recreate(data) == LISTS_FAIL)
681 break; 681 break;
682 682
683 /* sbh - all window types are being provided with this event to destroy the window */ 683 /* sbh - all window types are being provided with this event to destroy the window */
684 case SAT_DESTROY_WINDOW: 684 case SAT_DESTROY_WINDOW:
685 /* ...sbh */ 685 /* ...sbh */
686 686
687 case SAT_EXIT: 687 case SAT_EXIT:
688 sat_setup_menu_destroy (data->win); 688 sat_setup_menu_destroy (data->win);
689 break; 689 break;
690 690
691 default: 691 default:
705 705
706 TRACE_FUNCTION ("sat_setup_menu_listmnu_cb()"); 706 TRACE_FUNCTION ("sat_setup_menu_listmnu_cb()");
707 707
708 if ((win EQ NULL) || (win_data EQ NULL) || (data EQ NULL)) 708 if ((win EQ NULL) || (win_data EQ NULL) || (data EQ NULL))
709 return; 709 return;
710 710
711 switch (ListData->Reason) 711 switch (ListData->Reason)
712 { 712 {
713 case E_MNU_SELECT: 713 case E_MNU_SELECT:
714 case LISTS_REASON_SELECT: 714 case LISTS_REASON_SELECT:
715 715
734 break; 734 break;
735 case LISTS_REASON_TIMEOUT: // c015 rsa 735 case LISTS_REASON_TIMEOUT: // c015 rsa
736 case LISTS_REASON_BACK: /* back to previous menu */ 736 case LISTS_REASON_BACK: /* back to previous menu */
737 case LISTS_REASON_HANGUP: // sbh - added so hangup key exits 737 case LISTS_REASON_HANGUP: // sbh - added so hangup key exits
738 case LISTS_REASON_CLEAR: 738 case LISTS_REASON_CLEAR:
739 739
740 /* 740 /*
741 * we don't need to signal <SAT_RES_USER_BACK> here, since the session itself 741 * we don't need to signal <SAT_RES_USER_BACK> here, since the session itself
742 * has been finished immediately after sat_setup_menu_proc(). 742 * has been finished immediately after sat_setup_menu_proc().
743 * Furthermore the entering of the menu has not been signalled to the SIM... 743 * Furthermore the entering of the menu has not been signalled to the SIM...
744 */ 744 */
745 745
746 /* 746 /*
771 T_MFW_HND win; 771 T_MFW_HND win;
772 772
773 /* associated handlers */ 773 /* associated handlers */
774 774
775 T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ 775 T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */
776 776
777 /* internal data */ 777 /* internal data */
778 T_SAT_CMD *sat_command; /* pointer to sat_command in parent */ 778 T_SAT_CMD *sat_command; /* pointer to sat_command in parent */
779 ListMenuData_t list_menu_data; 779 ListMenuData_t list_menu_data;
780 T_MFW_HND sat_timer; // May 24, 2005 REF: CRR 29358 x0021334 780 T_MFW_HND sat_timer; // May 24, 2005 REF: CRR 29358 x0021334
781 ULONG sat_timeout; // May 24, 2005 REF: CRR 29358 x0021334 781 ULONG sat_timeout; // May 24, 2005 REF: CRR 29358 x0021334
809 if (data->win EQ NULL) 809 if (data->win EQ NULL)
810 { 810 {
811 return NULL; 811 return NULL;
812 } 812 }
813 813
814 /* 814 /*
815 * connect the dialog data to the MFW-window 815 * connect the dialog data to the MFW-window
816 */ 816 */
817 817
818 data->mmi_control.dialog = (T_DIALOG_FUNC)sat_select_item_exec; 818 data->mmi_control.dialog = (T_DIALOG_FUNC)sat_select_item_exec;
819 data->mmi_control.data = data; 819 data->mmi_control.data = data;
824 824
825 /* 825 /*
826 * return window handle 826 * return window handle
827 */ 827 */
828 828
829 829
830 win_show(data->win); 830 win_show(data->win);
831 return data->win; 831 return data->win;
832 } 832 }
833 833
834 static void sat_select_item_destroy(MfwHnd own_window) 834 static void sat_select_item_destroy(MfwHnd own_window)
846 846
847 if (data) 847 if (data)
848 { 848 {
849 /* 849 /*
850 * Delete WIN handler 850 * Delete WIN handler
851 */ 851 */
852 win_delete (data->win); 852 win_delete (data->win);
853 853
854 /* 854 /*
855 * Free Memory 855 * Free Memory
856 */ 856 */
857 857
858 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 858 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
859 #ifdef FF_MMI_SAT_ICON 859 #ifdef FF_MMI_SAT_ICON
860 /* Free the memory allocated for Item icon data. */ 860 /* Free the memory allocated for Item icon data. */
861 if(selectItemIconData.dst != NULL) 861 if(selectItemIconData.dst != NULL)
862 { 862 {
863 FREE_MEMORY((U8 *)selectItemIconData.dst, selectItemIconData.width * 863 FREE_MEMORY((U8 *)selectItemIconData.dst, selectItemIconData.width *
864 selectItemIconData.height); 864 selectItemIconData.height);
865 selectItemIconData.dst = NULL; 865 selectItemIconData.dst = NULL;
866 } 866 }
867 867
868 /* Free the memory allocated for Header icon data. */ 868 /* Free the memory allocated for Header icon data. */
869 if(selectItemHeaderIconData.dst != NULL) 869 if(selectItemHeaderIconData.dst != NULL)
870 { 870 {
871 FREE_MEMORY((U8 *)selectItemHeaderIconData.dst, selectItemHeaderIconData.width * 871 FREE_MEMORY((U8 *)selectItemHeaderIconData.dst, selectItemHeaderIconData.width *
872 selectItemHeaderIconData.height); 872 selectItemHeaderIconData.height);
873 selectItemHeaderIconData.dst = NULL; 873 selectItemHeaderIconData.dst = NULL;
874 874
875 // Apr 24, 2006 REF: DRT OMAPS00075832 x0039928 875 // Apr 24, 2006 REF: DRT OMAPS00075832 x0039928
876 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 876 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
894 FREE_MEMORY((U8 *)data->list_menu_data.List[i].icon, sizeof (MfwIcnAttr)); 894 FREE_MEMORY((U8 *)data->list_menu_data.List[i].icon, sizeof (MfwIcnAttr));
895 data->list_menu_data.List[i].icon = NULL; 895 data->list_menu_data.List[i].icon = NULL;
896 } 896 }
897 #endif 897 #endif
898 } 898 }
899 FREE_MEMORY ((U8 *)data->list_menu_data.List, 899 FREE_MEMORY ((U8 *)data->list_menu_data.List,
900 (data->list_menu_data.ListLength * sizeof (MfwMnuItem))); 900 (data->list_menu_data.ListLength * sizeof (MfwMnuItem)));
901 data->list_menu_data.List = NULL; 901 data->list_menu_data.List = NULL;
902 FREE_MEMORY ((U8 *)data, sizeof (T_sat_select_item)); 902 FREE_MEMORY ((U8 *)data, sizeof (T_sat_select_item));
903 903
904 /* SPR#2492 - DS - Free SAT menu header if it exists */ 904 /* SPR#2492 - DS - Free SAT menu header if it exists */
905 if (menuHdr) 905 if (menuHdr)
906 { 906 {
907 TRACE_EVENT_P2("Destroy menuHdr %d with size %d", menuHdr, *(menuHdr -(U16)sizeof(U16)) ); 907 TRACE_EVENT_P2("Destroy menuHdr %d with size %d", menuHdr, *(menuHdr -(U16)sizeof(U16)) );
908 sat_destroy_TEXT_ASCIIZ(menuHdr); 908 sat_destroy_TEXT_ASCIIZ(menuHdr);
909 menuHdr = NULL; /* dsm 01/12/03 - Added to explicitly set menuHdr to NULL */ 909 menuHdr = NULL; /* dsm 01/12/03 - Added to explicitly set menuHdr to NULL */
910 910
911 } 911 }
912 } 912 }
913 else 913 else
914 { 914 {
915 TRACE_EVENT ("sat_select_item_destroy() called twice"); 915 TRACE_EVENT ("sat_select_item_destroy() called twice");
921 { 921 {
922 int i; 922 int i;
923 int Unicode_menu = FALSE; /*MC, SPR 940/2 flag to lay-out as Unicode*/ 923 int Unicode_menu = FALSE; /*MC, SPR 940/2 flag to lay-out as Unicode*/
924 //May 24, 2005 REF: CRR 29358 x0021334 924 //May 24, 2005 REF: CRR 29358 x0021334
925 // Added this variable to store return value from listDisplayListMenu 925 // Added this variable to store return value from listDisplayListMenu
926 T_MFW sat_select_item_status; 926 T_MFW sat_select_item_status;
927 927
928 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 928 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
929 #ifdef FF_MMI_SAT_ICON 929 #ifdef FF_MMI_SAT_ICON
930 USHORT icon_length; 930 USHORT icon_length;
931 USHORT fontHeight = 0, menuHeight = 0, titleHeight; 931 USHORT fontHeight = 0, menuHeight = 0, titleHeight;
932 #endif 932 #endif
933 933
934 SatMenu * menu = &data->sat_command->c.menu; 934 SatMenu * menu = &data->sat_command->c.menu;
935 TRACE_FUNCTION ("sat_select_item_recreate()"); 935 TRACE_FUNCTION ("sat_select_item_recreate()");
936 936
937 #ifdef __COMPLETE_LIST_SUPPORT__ /* ??? rsa for future extension */ 937 #ifdef __COMPLETE_LIST_SUPPORT__ /* ??? rsa for future extension */
954 #ifdef FF_MMI_SAT_ICON 954 #ifdef FF_MMI_SAT_ICON
955 if(menu->itemIconQual != 0xFF) 955 if(menu->itemIconQual != 0xFF)
956 { 956 {
957 /* We have icon to be displayed*/ 957 /* We have icon to be displayed*/
958 /* Copy the icon data to the editor attributes*/ 958 /* Copy the icon data to the editor attributes*/
959 selectItemIconData.width = menu->items[0].iconInfo.width; 959 selectItemIconData.width = menu->items[0].iconInfo.width;
960 selectItemIconData.height = menu->items[0].iconInfo.height; 960 selectItemIconData.height = menu->items[0].iconInfo.height;
961 961
962 icon_length = menu->items[0].iconInfo.width * menu->items[0].iconInfo.height; 962 icon_length = menu->items[0].iconInfo.width * menu->items[0].iconInfo.height;
963 963
964 selectItemIconData.dst = (char *)ALLOC_MEMORY (icon_length); 964 selectItemIconData.dst = (char *)ALLOC_MEMORY (icon_length);
965 965
966 memcpy(selectItemIconData.dst, menu->items[0].iconInfo.dst, icon_length); 966 memcpy(selectItemIconData.dst, menu->items[0].iconInfo.dst, icon_length);
967 967
968 /* Icon is self-explanatory. No need to display text for this case.*/ 968 /* Icon is self-explanatory. No need to display text for this case.*/
969 if(menu->itemIconQual == 0x00) 969 if(menu->itemIconQual == 0x00)
970 { 970 {
971 /* Icon is self-explanatory. Do not display the text*/ 971 /* Icon is self-explanatory. Do not display the text*/
972 selectItemIconData.selfExplanatory = TRUE; 972 selectItemIconData.selfExplanatory = TRUE;
988 else 988 else
989 { 989 {
990 selectItemIconData.width = 0; 990 selectItemIconData.width = 0;
991 selectItemIconData.height = 0; 991 selectItemIconData.height = 0;
992 selectItemIconData.dst = NULL; 992 selectItemIconData.dst = NULL;
993 selectItemIconData.selfExplanatory = FALSE; 993 selectItemIconData.selfExplanatory = FALSE;
994 } 994 }
995 #endif 995 #endif
996 996
997 for (i=0; i < data->list_menu_data.ListLength; i++) /* Fill Menu List */ 997 for (i=0; i < data->list_menu_data.ListLength; i++) /* Fill Menu List */
998 { 998 {
1000 1000
1001 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1001 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1002 #ifdef FF_MMI_SAT_ICON 1002 #ifdef FF_MMI_SAT_ICON
1003 if(data->sat_command->c.menu.itemIconQual != 0xFF) 1003 if(data->sat_command->c.menu.itemIconQual != 0xFF)
1004 { 1004 {
1005 /* Populate the Icon attributes. 1005 /* Populate the Icon attributes.
1006 We assume that we have the same icon for all elements in the item list. */ 1006 We assume that we have the same icon for all elements in the item list. */
1007 data->list_menu_data.List[i].icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr)); 1007 data->list_menu_data.List[i].icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr));
1008 1008
1009 data->list_menu_data.List[i].icon->icons = selectItemIconData.dst; 1009 data->list_menu_data.List[i].icon->icons = selectItemIconData.dst;
1010 data->list_menu_data.List[i].icon->nIcons = 1; 1010 data->list_menu_data.List[i].icon->nIcons = 1;
1011 data->list_menu_data.List[i].icon->icnType = BMP_FORMAT_256_COLOUR; 1011 data->list_menu_data.List[i].icon->icnType = BMP_FORMAT_256_COLOUR;
1012 data->list_menu_data.List[i].icon->area.px = 1; 1012 data->list_menu_data.List[i].icon->area.px = 1;
1013 data->list_menu_data.List[i].icon->area.py = menuHeight + 1; 1013 data->list_menu_data.List[i].icon->area.py = menuHeight + 1;
1018 menuHeight += fontHeight; 1018 menuHeight += fontHeight;
1019 } 1019 }
1020 /* get the correct entry in list of select_itemList */ 1020 /* get the correct entry in list of select_itemList */
1021 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]); 1021 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]);
1022 if (data->list_menu_data.List[i].str[0] == (char)0x80)/*MC, SPR 940/2 check for unicode tag*/ 1022 if (data->list_menu_data.List[i].str[0] == (char)0x80)/*MC, SPR 940/2 check for unicode tag*/
1023 Unicode_menu = TRUE; 1023 Unicode_menu = TRUE;
1024 #else 1024 #else
1025 /* get the correct entry in list of select_itemList */ 1025 /* get the correct entry in list of select_itemList */
1026 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]); 1026 data->list_menu_data.List[i].str = sat_create_ITEM_ASCIIZ (&menu->items[i]);
1027 if (data->list_menu_data.List[i].str[0] == 0x80)/*MC, SPR 940/2 check for unicode tag*/ 1027 if (data->list_menu_data.List[i].str[0] == 0x80)/*MC, SPR 940/2 check for unicode tag*/
1028 Unicode_menu = TRUE; 1028 Unicode_menu = TRUE;
1029 #endif 1029 #endif
1030 1030
1031 data->list_menu_data.List[i].flagFunc = (FlagFunc)item_flag_none; 1031 data->list_menu_data.List[i].flagFunc = (FlagFunc)item_flag_none;
1032 1032
1033 /* xreddymn OMAPS00080543 Jun-05-2006 1033 /* xreddymn OMAPS00080543 Jun-05-2006
1034 * A flag bit in item.action is set to TRUE for default item in decDefItem. 1034 * A flag bit in item.action is set to TRUE for default item in decDefItem.
1051 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1051 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1052 #ifdef FF_MMI_SAT_ICON 1052 #ifdef FF_MMI_SAT_ICON
1053 /* Free the memory allocated for Header icon data. */ 1053 /* Free the memory allocated for Header icon data. */
1054 if(selectItemHeaderIconData.dst != NULL) 1054 if(selectItemHeaderIconData.dst != NULL)
1055 { 1055 {
1056 FREE_MEMORY((U8 *)selectItemHeaderIconData.dst, selectItemHeaderIconData.width * 1056 FREE_MEMORY((U8 *)selectItemHeaderIconData.dst, selectItemHeaderIconData.width *
1057 selectItemHeaderIconData.height); 1057 selectItemHeaderIconData.height);
1058 selectItemHeaderIconData.dst = NULL; 1058 selectItemHeaderIconData.dst = NULL;
1059 } 1059 }
1060 #endif 1060 #endif
1061 sat_destroy_TEXT_ASCIIZ(menuHdr); 1061 sat_destroy_TEXT_ASCIIZ(menuHdr);
1066 #ifdef FF_MMI_SAT_ICON 1066 #ifdef FF_MMI_SAT_ICON
1067 if(data->sat_command->c.menu.header.icon.qual != 0xFF) 1067 if(data->sat_command->c.menu.header.icon.qual != 0xFF)
1068 { 1068 {
1069 /* We have icon to be displayed*/ 1069 /* We have icon to be displayed*/
1070 /* Copy the icon data to the editor attributes*/ 1070 /* Copy the icon data to the editor attributes*/
1071 selectItemHeaderIconData.width = data->sat_command->c.menu.header.iconInfo.width; 1071 selectItemHeaderIconData.width = data->sat_command->c.menu.header.iconInfo.width;
1072 selectItemHeaderIconData.height = data->sat_command->c.menu.header.iconInfo.height; 1072 selectItemHeaderIconData.height = data->sat_command->c.menu.header.iconInfo.height;
1073 1073
1074 icon_length = data->sat_command->c.menu.header.iconInfo.width * data->sat_command->c.menu.header.iconInfo.height; 1074 icon_length = data->sat_command->c.menu.header.iconInfo.width * data->sat_command->c.menu.header.iconInfo.height;
1075 1075
1076 selectItemHeaderIconData.dst = (char *)ALLOC_MEMORY (icon_length); 1076 selectItemHeaderIconData.dst = (char *)ALLOC_MEMORY (icon_length);
1077 1077
1078 memcpy(selectItemHeaderIconData.dst, data->sat_command->c.menu.header.iconInfo.dst, icon_length); 1078 memcpy(selectItemHeaderIconData.dst, data->sat_command->c.menu.header.iconInfo.dst, icon_length);
1079 1079
1080 /* Icon is self-explanatory. No need to display text for this case.*/ 1080 /* Icon is self-explanatory. No need to display text for this case.*/
1081 if(data->sat_command->c.menu.header.icon.qual == 0x00) 1081 if(data->sat_command->c.menu.header.icon.qual == 0x00)
1082 { 1082 {
1083 /* Icon is self-explanatory. Do not display the text*/ 1083 /* Icon is self-explanatory. Do not display the text*/
1084 selectItemHeaderIconData.selfExplanatory = TRUE; 1084 selectItemHeaderIconData.selfExplanatory = TRUE;
1093 else 1093 else
1094 { 1094 {
1095 selectItemHeaderIconData.width = 0; 1095 selectItemHeaderIconData.width = 0;
1096 selectItemHeaderIconData.height = 0; 1096 selectItemHeaderIconData.height = 0;
1097 selectItemHeaderIconData.dst = NULL; 1097 selectItemHeaderIconData.dst = NULL;
1098 selectItemHeaderIconData.selfExplanatory = FALSE; 1098 selectItemHeaderIconData.selfExplanatory = FALSE;
1099 } 1099 }
1100 #endif 1100 #endif
1101 1101
1102 1102
1103 menuHdr = sat_create_TEXT_ASCIIZ(&menu->header); 1103 menuHdr = sat_create_TEXT_ASCIIZ(&menu->header);
1115 1115
1116 TRACE_EVENT_P1("mode map after: %04x", data->list_menu_data.Attr->mode); 1116 TRACE_EVENT_P1("mode map after: %04x", data->list_menu_data.Attr->mode);
1117 1117
1118 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1118 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1119 #ifdef FF_MMI_SAT_ICON 1119 #ifdef FF_MMI_SAT_ICON
1120 /* We allow the Header text to be created. We send the icon data with self-explanatory status.*/ 1120 /* We allow the Header text to be created. We send the icon data with self-explanatory status.*/
1121 if(selectItemHeaderIconData.dst != NULL) 1121 if(selectItemHeaderIconData.dst != NULL)
1122 { 1122 {
1123 data->list_menu_data.Attr->icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr)); 1123 data->list_menu_data.Attr->icon = (MfwIcnAttr *)ALLOC_MEMORY (sizeof (MfwIcnAttr));
1124 1124
1125 data->list_menu_data.Attr->icon->icons = selectItemHeaderIconData.dst; 1125 data->list_menu_data.Attr->icon->icons = selectItemHeaderIconData.dst;
1126 data->list_menu_data.Attr->icon->nIcons = 1; 1126 data->list_menu_data.Attr->icon->nIcons = 1;
1127 data->list_menu_data.Attr->icon->icnType = BMP_FORMAT_256_COLOUR; 1127 data->list_menu_data.Attr->icon->icnType = BMP_FORMAT_256_COLOUR;
1128 data->list_menu_data.Attr->icon->area.px = 1; 1128 data->list_menu_data.Attr->icon->area.px = 1;
1129 data->list_menu_data.Attr->icon->area.py = 1; 1129 data->list_menu_data.Attr->icon->area.py = 1;
1135 } 1135 }
1136 } 1136 }
1137 1137
1138 // May 24, 2005 REF: CRR 29358 x0021334 1138 // May 24, 2005 REF: CRR 29358 x0021334
1139 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response 1139 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response
1140 // Now the list will be displayed, so start the timer. 1140 // Now the list will be displayed, so start the timer.
1141 sat_select_item_status = listDisplayListMenu(data->win, &data->list_menu_data, (ListCbFunc)sat_select_item_listmnu_cb,Unicode_menu/*MC*/); 1141 sat_select_item_status = listDisplayListMenu(data->win, &data->list_menu_data, (ListCbFunc)sat_select_item_listmnu_cb,Unicode_menu/*MC*/);
1142 // xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 1142 // xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
1143 // Displaying '?' to indicate to the user that help is available for a menu 1143 // Displaying '?' to indicate to the user that help is available for a menu
1144 if(data->sat_command->qual & SAT_M_SELECT_HELP_AVAIL) 1144 if(data->sat_command->qual & SAT_M_SELECT_HELP_AVAIL)
1145 { 1145 {
1146 displayHelpSymbol(); 1146 displayHelpSymbol();
1147 } 1147 }
1148 tim_start(data->sat_timer); 1148 tim_start(data->sat_timer);
1149 return sat_select_item_status; 1149 return sat_select_item_status;
1150 } 1150 }
1151 1151
1152 static void sat_select_item_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command) 1152 static void sat_select_item_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command)
1153 /* callback handler for events sent from parents or childs to to trigger some execution */ 1153 /* callback handler for events sent from parents or childs to to trigger some execution */
1154 { 1154 {
1178 data->list_menu_data.Attr = &sat_select_menuAttrib; 1178 data->list_menu_data.Attr = &sat_select_menuAttrib;
1179 data->list_menu_data.autoDestroy = TRUE; 1179 data->list_menu_data.autoDestroy = TRUE;
1180 1180
1181 // May 24, 2005 REF: CRR 29358 x0021334 1181 // May 24, 2005 REF: CRR 29358 x0021334
1182 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response 1182 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response
1183 // Fix: Set Timeout period to 20 seconds and create the timer. 1183 // Fix: Set Timeout period to 20 seconds and create the timer.
1184 data->sat_timeout = TWENTY_SECS; 1184 data->sat_timeout = TWENTY_SECS;
1185 data->sat_timer = tim_create(data->win, data->sat_timeout, (T_MFW_CB)sat_select_TimerCb); 1185 data->sat_timer = tim_create(data->win, data->sat_timeout, (T_MFW_CB)sat_select_TimerCb);
1186 g_sat_scroll_status = TRUE; 1186 g_sat_scroll_status = TRUE;
1187 1187
1188 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462 1188 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
1189 #ifdef FF_MMI_SAT_ICON 1189 #ifdef FF_MMI_SAT_ICON
1190 /*Initialize the data members of Icon attributes */ 1190 /*Initialize the data members of Icon attributes */
1191 selectItemIconData.width = 0; 1191 selectItemIconData.width = 0;
1192 selectItemIconData.height = 0; 1192 selectItemIconData.height = 0;
1193 selectItemIconData.dst = NULL; 1193 selectItemIconData.dst = NULL;
1194 selectItemIconData.selfExplanatory = FALSE; 1194 selectItemIconData.selfExplanatory = FALSE;
1195 selectItemHeaderIconData.width = 0; 1195 selectItemHeaderIconData.width = 0;
1196 selectItemHeaderIconData.height = 0; 1196 selectItemHeaderIconData.height = 0;
1197 selectItemHeaderIconData.dst = NULL; 1197 selectItemHeaderIconData.dst = NULL;
1198 selectItemHeaderIconData.selfExplanatory = FALSE; 1198 selectItemHeaderIconData.selfExplanatory = FALSE;
1199 #endif 1199 #endif
1200 1200
1201 /* (re)create the dialog handler */ 1201 /* (re)create the dialog handler */
1202 if (sat_select_item_recreate(data) == LISTS_FAIL) 1202 if (sat_select_item_recreate(data) == LISTS_FAIL)
1203 { 1203 {
1219 tim_delete (data->sat_timer); 1219 tim_delete (data->sat_timer);
1220 g_sat_scroll_status = FALSE; 1220 g_sat_scroll_status = FALSE;
1221 sat_select_item_destroy (data->win); 1221 sat_select_item_destroy (data->win);
1222 break; 1222 break;
1223 /* ...sbh */ 1223 /* ...sbh */
1224 1224
1225 // May 24, 2005 REF: CRR 29358 x0021334 1225 // May 24, 2005 REF: CRR 29358 x0021334
1226 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response 1226 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response
1227 // Fix: Timeout has occured. Used existing LISTS_REASON_TIMEOUT event for the same 1227 // Fix: Timeout has occured. Used existing LISTS_REASON_TIMEOUT event for the same
1228 case LISTS_REASON_TIMEOUT: 1228 case LISTS_REASON_TIMEOUT:
1229 sat_res[SAT_ERR_INDEX] = SAT_RES_USER_NO_RESP; // set no response from user 1229 sat_res[SAT_ERR_INDEX] = SAT_RES_USER_NO_RESP; // set no response from user
1230 sat_res[SAT_AI_INDEX] = SatResAiNoCause; 1230 sat_res[SAT_AI_INDEX] = SatResAiNoCause;
1231 sat_done (data->sat_command, sat_res); 1231 sat_done (data->sat_command, sat_res);
1232 tim_stop(data->sat_timer); // stop the timer 1232 tim_stop(data->sat_timer); // stop the timer
1233 tim_delete(data->sat_timer); // delete the timer 1233 tim_delete(data->sat_timer); // delete the timer
1236 break; 1236 break;
1237 1237
1238 // May 24, 2005 REF: CRR 29358 x0021334 1238 // May 24, 2005 REF: CRR 29358 x0021334
1239 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response 1239 // Description: CT_PTCRB 27.22.4.9.8 fails: wrong terminal response
1240 // Fix: User has scrolled up/down. Used existing LISTS_REASON_SCROLL event for the same 1240 // Fix: User has scrolled up/down. Used existing LISTS_REASON_SCROLL event for the same
1241 case LISTS_REASON_SCROLL: 1241 case LISTS_REASON_SCROLL:
1242 tim_stop(data->sat_timer); // stop the timer 1242 tim_stop(data->sat_timer); // stop the timer
1243 tim_start(data->sat_timer); // start the timer again for 20 seconds 1243 tim_start(data->sat_timer); // start the timer again for 20 seconds
1244 break; 1244 break;
1245 default: 1245 default:
1246 TRACE_EVENT ("sim_select_item_exec() unexpected event"); 1246 TRACE_EVENT ("sim_select_item_exec() unexpected event");
1263 TRACE_FUNCTION ("sat_select_item_listmnu_cb()"); 1263 TRACE_FUNCTION ("sat_select_item_listmnu_cb()");
1264 1264
1265 switch (ListData->Reason) 1265 switch (ListData->Reason)
1266 { 1266 {
1267 case E_MNU_SELECT: 1267 case E_MNU_SELECT:
1268 case LISTS_REASON_SELECT: 1268 case LISTS_REASON_SELECT:
1269 index = ListData->ListPosition; /* index of selected item */ 1269 index = ListData->ListPosition; /* index of selected item */
1270 item = &data->sat_command->c.menu.items[index]; /* selected item */ 1270 item = &data->sat_command->c.menu.items[index]; /* selected item */
1271 /* CQ 16307 - Start */ 1271 /* CQ 16307 - Start */
1272 if (data->sat_command->c.menu.itemIconQual == 0xFF) 1272 if (data->sat_command->c.menu.itemIconQual == 0xFF)
1273 sat_res[SAT_ERR_INDEX] = SatResSuccess; 1273 sat_res[SAT_ERR_INDEX] = SatResSuccess;
1274 else 1274 else
1275 { 1275 {
1276 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 1276 // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460
1277 #ifdef FF_MMI_SAT_ICON 1277 #ifdef FF_MMI_SAT_ICON
1278 sat_res[SAT_ERR_INDEX] = SatResSuccess; 1278 sat_res[SAT_ERR_INDEX] = SatResSuccess;
1279 #else 1279 #else
1280 sat_res[SAT_ERR_INDEX] = SatResNoIcon; 1280 sat_res[SAT_ERR_INDEX] = SatResNoIcon;
1281 /* CQ 16307 - End */ 1281 /* CQ 16307 - End */
1282 #endif 1282 #endif
1283 } 1283 }
1284 1284
1285 1285
1286 // xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357 1286 // xrashmic 5 Oct, 2005 MMI-SPR-29356, MMI-SPR-29357
1287 // Using the MenuSelect Key for requesting the help info in STK menu. 1287 // Using the MenuSelect Key for requesting the help info in STK menu.
1290 sat_res[SAT_ERR_INDEX] = SatResUserHelp; 1290 sat_res[SAT_ERR_INDEX] = SatResUserHelp;
1291 ListData->selectKey = FALSE; 1291 ListData->selectKey = FALSE;
1292 } 1292 }
1293 sat_res[SAT_AI_INDEX] = SatResAiNoCause; 1293 sat_res[SAT_AI_INDEX] = SatResAiNoCause;
1294 satItem (data->sat_command, item->id, sat_res, sizeof(T_SAT_RES)); /* issue the answering envelope */ 1294 satItem (data->sat_command, item->id, sat_res, sizeof(T_SAT_RES)); /* issue the answering envelope */
1295 1295
1296 1296
1297 // May 24, 2005 REF: CRR 29358 x0021334 1297 // May 24, 2005 REF: CRR 29358 x0021334
1298 // Stop and delete the timer. Also, set scrolling status to FALSE 1298 // Stop and delete the timer. Also, set scrolling status to FALSE
1299 tim_stop(data->sat_timer); 1299 tim_stop(data->sat_timer);
1300 tim_delete(data->sat_timer); 1300 tim_delete(data->sat_timer);
1301 g_sat_scroll_status = FALSE; 1301 g_sat_scroll_status = FALSE;
1302 sat_select_item_destroy(data->win); 1302 sat_select_item_destroy(data->win);
1303 break; 1303 break;
1304 // c015 rsa 1304 // c015 rsa
1305 case LISTS_REASON_TIMEOUT: 1305 case LISTS_REASON_TIMEOUT:
1306 sat_res[SAT_ERR_INDEX] = SAT_RES_USER_NO_RESP; 1306 sat_res[SAT_ERR_INDEX] = SAT_RES_USER_NO_RESP;
1307 sat_res[SAT_AI_INDEX] = SatResAiNoCause; 1307 sat_res[SAT_AI_INDEX] = SatResAiNoCause;
1308 sat_done (data->sat_command, sat_res); 1308 sat_done (data->sat_command, sat_res);
1309 sat_select_item_destroy(data->win); 1309 sat_select_item_destroy(data->win);
1310 break; 1310 break;