# HG changeset patch # User Mychaela Falconia # Date 1605743887 0 # Node ID 6b740edabc07528e1e93ef3a66cfe6a7c84179b6 # Parent 0b8ebd4dd2ef7c2bee5e583634a5fa4d765a9458 mmiSatInput.c: bogotab fixes diff -r 0b8ebd4dd2ef -r 6b740edabc07 src/ui/bmi/mmiSatInput.c --- a/src/ui/bmi/mmiSatInput.c Wed Nov 18 23:24:36 2020 +0000 +++ b/src/ui/bmi/mmiSatInput.c Wed Nov 18 23:58:07 2020 +0000 @@ -1,6 +1,6 @@ /******************************************************************************* - CONDAT (UK) + CONDAT (UK) ******************************************************************************** @@ -11,12 +11,12 @@ $Project name: Basic MMI $Project code: BMI - $Module: SMS - $File: mmiSatInput.c - $Revision: 1.0 + $Module: SMS + $File: mmiSatInput.c + $Revision: 1.0 - $Author: Condat(UK) - $Date: 25/10/00 + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -159,13 +159,13 @@ T_MFW_HND win; T_SAT_CMD *sat_command; /* pointer to sat_command in parent */ #ifdef NEW_EDITOR - T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ + T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ #else T_EDITOR_DATA editor_data; #endif char *edt_buffer; /* buffer for editor */ - T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ - T_MFW_HND win_editor; /* SPR#2490 - DS - Store editor window */ + T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ + T_MFW_HND win_editor; /* SPR#2490 - DS - Store editor window */ } T_sat_get_key; #if (BOARD==61) @@ -182,10 +182,10 @@ $Function: sat_get_key_create $Description: Creation of an instance for the SAT GET KEY dialog.Window must - be available after reception of SAT command,only one instance. + be available after reception of SAT command,only one instance. - $Returns: mfw window handler + $Returns: mfw window handler $Arguments: parent_window - Parent window handler @@ -209,7 +209,7 @@ win = ((T_MFW_HDR *)data->win)->data; win->user = (MfwUserDataPtr)data; - data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ + data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ /* * return window handle @@ -224,8 +224,7 @@ $Description: Destroy the sat get inkey dialog. - - $Returns: none + $Returns: none $Arguments: own_window - window handler @@ -236,11 +235,11 @@ T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data; T_sat_get_key * data = (T_sat_get_key *)win_data->user; - if (own_window == NULL) - { - TRACE_EVENT ("Error : sat_get_key_destroy called with NULL Pointer"); - return; - } + if (own_window == NULL) + { + TRACE_EVENT ("Error : sat_get_key_destroy called with NULL Pointer"); + return; + } if (data) { @@ -252,7 +251,7 @@ * Free Memory */ FREE_MEMORY ((U8 *)data->edt_buffer, - SAT_GET_KEY_BUFFER_SIZE * sizeof(char)); + SAT_GET_KEY_BUFFER_SIZE * sizeof(char)); // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON @@ -265,13 +264,13 @@ #endif /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - sat_destroy_TEXT_ASCIIZ ((char *)data->editor_data.TitleString); /* label */ + sat_destroy_TEXT_ASCIIZ ((char *)data->editor_data.TitleString); /* label */ - if (data->win_editor) - { - AUI_edit_Destroy(data->win_editor); /* SPR#2490 - DS - Destroy editor */ - data->win_editor = NULL; - } + if (data->win_editor) + { + AUI_edit_Destroy(data->win_editor); /* SPR#2490 - DS - Destroy editor */ + data->win_editor = NULL; + } #else /* NEW_EDITOR */ sat_destroy_TEXT_ASCIIZ (data->editor_data.TextString); /* label */ #endif /* NEW_EDITOR */ @@ -285,13 +284,12 @@ $Description: Dialog function for sat_get_key_exec window. - - $Returns: none + $Returns: none $Arguments: win - window handler - event -window event - value - unique id - sat_command - Sat command info + event -window event + value - unique id + sat_command - Sat command info *******************************************************************************/ @@ -305,13 +303,13 @@ /* SPR#1428 - SH - New Editor: we'll put data in these, for efficiency */ #ifdef NEW_EDITOR - USHORT leftSK, rightSK, mode, cursor; - UBYTE *textStr; + USHORT leftSK, rightSK, mode, cursor; + UBYTE *textStr; #endif // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - USHORT icon_length; + USHORT icon_length; #endif TRACE_FUNCTION ("sat_get_key_exec()"); @@ -324,11 +322,11 @@ /* allocate a buffer to hold the edited chars */ data->edt_buffer = (char *)ALLOC_MEMORY ( - SAT_GET_KEY_BUFFER_SIZE * sizeof(char)); + SAT_GET_KEY_BUFFER_SIZE * sizeof(char)); - /* SPR#1428 - SH - New Editor changes */ + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR - /* + /* * Setup an Editor to get a single key */ @@ -349,10 +347,10 @@ if ((sat_command->qual & SAT_M_INKEY_YES_NO) NEQ 0) { /* yes/no decision */ - leftSK = TxtYes; + leftSK = TxtYes; rightSK = TxtNo; - mode = ED_MODE_READONLY; /* treat as read-only, thus ignoring normal keys */ - cursor = ED_CURSOR_NONE; + mode = ED_MODE_READONLY; /* treat as read-only, thus ignoring normal keys */ + cursor = ED_CURSOR_NONE; } else { @@ -362,7 +360,7 @@ if ((sat_command->qual & SAT_M_INKEY_ALPHA) EQ 0) /* 0=digits, 1=alpha */ { mode = 0; /* Digits mode */ - cursor = ED_CURSOR_UNDERLINE; + cursor = ED_CURSOR_UNDERLINE; } else { @@ -373,18 +371,17 @@ if (txt->len > 0) { - textStr = (UBYTE *)sat_create_TEXT_ASCIIZ (txt); /* label */ - + textStr = (UBYTE *)sat_create_TEXT_ASCIIZ (txt); /* label */ } else { textStr = NULL; /* no label */ } - AUI_edit_SetTextStr(&data->editor_data, leftSK, rightSK, TxtNull, textStr); + AUI_edit_SetTextStr(&data->editor_data, leftSK, rightSK, TxtNull, textStr); AUI_edit_SetEvents(&data->editor_data, event, FALSE /*SPR#2490 - DS*/, TWENTY_SECS, (T_AUI_EDIT_CB)sat_editor_cb); - AUI_edit_SetMode(&data->editor_data, mode, cursor); + AUI_edit_SetMode(&data->editor_data, mode, cursor); if ((sat_command->qual & SAT_M_INKEY_HELP_AVAIL) NEQ 0) { @@ -394,7 +391,7 @@ /* provide an empty zero terminated buffer */ data->edt_buffer[0] = '\0'; - /* SPR#1559 - SH - Set appropriate editor size */ + /* SPR#1559 - SH - Set appropriate editor size */ AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE *)data->edt_buffer, strlen(data->edt_buffer)+1+1 /* SPR#2321 - DS - Display key */); // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON @@ -493,7 +490,6 @@ } data->editor_data.hide = FALSE; - /* provide an empty zero terminated buffer */ data->edt_buffer[0] = '\0'; @@ -510,10 +506,10 @@ #endif /* NEW_EDITOR */ break; - /* sbh - all window types are being provided with this event to destroy the window */ - case SAT_DESTROY_WINDOW: - sat_get_key_destroy (data->win); - break; + /* sbh - all window types are being provided with this event to destroy the window */ + case SAT_DESTROY_WINDOW: + sat_get_key_destroy (data->win); + break; /* ...sbh */ default: @@ -534,15 +530,15 @@ T_MFW_HND win; T_SAT_CMD *sat_command; /* pointer to sat_command in parent */ #ifdef NEW_EDITOR - T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ + T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ #else T_EDITOR_DATA editor_data; #endif char *edt_buffer; /* buffer for editor */ U16 max_chars; - T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ - T_MFW_HND chinese_edit_win; /* SPR#1700 - DS - Chinese editor window reference */ - T_MFW_HND win_editor; /* SPR#2490 - DS - Store editor window */ + T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ + T_MFW_HND chinese_edit_win; /* SPR#1700 - DS - Chinese editor window reference */ + T_MFW_HND win_editor; /* SPR#2490 - DS - Store editor window */ } T_sat_get_string; @@ -555,16 +551,14 @@ static void sat_get_string_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command); - /******************************************************************************* $Function: sat_get_string_create $Description: Creation of an instance for the SAT GET STRING dialog.Window must - be available after reception of SAT command,only one instance. + be available after reception of SAT command,only one instance. - - $Returns: window + $Returns: window $Arguments: parent_window - parent window *******************************************************************************/ @@ -586,8 +580,7 @@ win = ((T_MFW_HDR *)data->win)->data; win->user = (MfwUserDataPtr)data; - - data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ + data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ /* * return window handle @@ -602,8 +595,7 @@ $Description: Destroy the sat get string dialog. - - $Returns: none + $Returns: none $Arguments: own_window - current window. *******************************************************************************/ @@ -612,11 +604,11 @@ T_MFW_WIN * win_data = ((T_MFW_HDR *)own_window)->data; T_sat_get_string * data = (T_sat_get_string *)win_data->user; - if (own_window == NULL) - { - TRACE_EVENT ("Error : sat_get_string_destroy called with NULL Pointer"); - return; - } + if (own_window == NULL) + { + TRACE_EVENT ("Error : sat_get_string_destroy called with NULL Pointer"); + return; + } TRACE_FUNCTION("sat_get_string_destroy()"); @@ -683,13 +675,12 @@ $Description: Dialog function for sat_get_string window. - - $Returns: none + $Returns: none $Arguments: win - window handle - event - window event - value - unique id - sat_command - Sat Command info. + event - window event + value - unique id + sat_command - Sat Command info. *******************************************************************************/ static void sat_get_string_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command) { @@ -701,13 +692,13 @@ UBYTE firstDefRespChar; /* SPR#2321 - DS - First character in default response */ /* SPR#1428 - SH - New Editor: store data in these, for efficiency */ #ifdef NEW_EDITOR - USHORT mode; - UBYTE *textStr; + USHORT mode; + UBYTE *textStr; #endif // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - USHORT icon_length; + USHORT icon_length; #endif TRACE_FUNCTION ("sat_get_string_exec()"); @@ -722,19 +713,19 @@ data->sat_command = sat_command; /* save a pointer to the parameter for later use in callbacks */ inp = (T_SAT_INPUT *)&sat_command->c.inp; - /* SPR#2321 - DS - Max buffer size of 160 chars for SAT STRING (Get Input) */ - if ((U16)inp->rspMax > 160) - { - TRACE_EVENT("SAT supplied max is bigger than supported string size. Set to supported max 160"); - data->max_chars = (U16)160+1; - } - else - { - data->max_chars = (U16)(inp->rspMax)+1; - } + /* SPR#2321 - DS - Max buffer size of 160 chars for SAT STRING (Get Input) */ + if ((U16)inp->rspMax > 160) + { + TRACE_EVENT("SAT supplied max is bigger than supported string size. Set to supported max 160"); + data->max_chars = (U16)160+1; + } + else + { + data->max_chars = (U16)(inp->rspMax)+1; + } /* allocate a buffer to hold the edited chars + terminator */ - if (((data->sat_command->qual & SAT_M_INPUT_ALPHA) == 1) /* 0=digits, 1=alpha */ + if (((data->sat_command->qual & SAT_M_INPUT_ALPHA) == 1) /* 0=digits, 1=alpha */ && (data->sat_command->qual & SAT_M_INPUT_UCS2) /* Unicode input requested */ && (Mmi_getCurrentLanguage() == CHINESE_LANGUAGE)) { @@ -998,12 +989,12 @@ T_MFW_HND win; T_SAT_CMD *sat_command; /* pointer to sat_command in parent */ #ifdef NEW_EDITOR - T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ + T_AUI_EDITOR_DATA editor_data; /* SPR#1428 - SH - New Editor data */ #else - T_EDITOR_DATA editor_data; + T_EDITOR_DATA editor_data; #endif char *info_buffer; /* buffer for info */ - T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ + T_MFW_HND kbd; /* sbh - keyboard handler, so window can be destroyed by user */ } T_sat_display_text; //Nov 09, 2005 REF: OMAPS00043190 - x0018858 @@ -1019,9 +1010,9 @@ $Function: sat_display_text_create $Description: Creation of an instance for the SAT DISPLAY TEXT dialog.Window - must be available after reception of SAT command,only one instance. + must be available after reception of SAT command,only one instance. - $Returns: Window handle + $Returns: Window handle $Arguments: parent_window - parent window *******************************************************************************/ @@ -1046,7 +1037,7 @@ win = ((T_MFW_HDR *)data->win)->data; win->user = (MfwUserDataPtr)data; - data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ + data->kbd = kbdCreate( data->win, KEY_ALL, (T_MFW_CB) sat_kbd_cb); /* sbh - add keyboard handler */ /* * return window handle @@ -1062,7 +1053,7 @@ $Description: Destroy the sat play tone dialog. - $Returns: none + $Returns: none $Arguments: own_window - current window *******************************************************************************/ @@ -1072,11 +1063,11 @@ T_sat_display_text * data = (T_sat_display_text *)win_data->user; TRACE_FUNCTION("sat_display_text_destroy"); - if (own_window == NULL) - { - TRACE_EVENT ("Error : Called with NULL Pointer"); - return; - } + if (own_window == NULL) + { + TRACE_EVENT ("Error : Called with NULL Pointer"); + return; + } if (data) { @@ -1097,8 +1088,8 @@ } #endif - sat_destroy_TEXT_ASCIIZ (data->info_buffer); /* displayed text */ - FREE_MEMORY ((U8 *)data, sizeof (T_sat_display_text)); + sat_destroy_TEXT_ASCIIZ (data->info_buffer); /* displayed text */ + FREE_MEMORY ((U8 *)data, sizeof (T_sat_display_text)); } } @@ -1108,25 +1099,24 @@ $Description: Dialog function for sat_display_text_exec window. - $Returns: none + $Returns: none $Arguments: win - window - event - window event - value - unique id - sat_command - sat command data. + event - window event + value - unique id + sat_command - sat command data. *******************************************************************************/ static void sat_display_text_exec (T_MFW_HND win, USHORT event, SHORT value, T_SAT_CMD * sat_command) { T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; - T_sat_display_text * data = (T_sat_display_text *)win_data->user; + T_sat_display_text * data = (T_sat_display_text *)win_data->user; T_SAT_RES sat_res; - // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - USHORT icon_length; + USHORT icon_length; #endif TRACE_FUNCTION ("sat_display_text_exec()"); @@ -1136,7 +1126,7 @@ case SAT_DISPLAY_TEXT: data->sat_command = sat_command; - /* SPR#1428 - SH - New Editor changes */ + /* SPR#1428 - SH - New Editor changes */ #ifdef NEW_EDITOR /* * Setup an Editor to display a string @@ -1160,46 +1150,46 @@ // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON /*Check if the SAT command has icon*/ - if(sat_command->c.text.icon.qual != 0xFF) + if(sat_command->c.text.icon.qual != 0xFF) + { + /* Icon is self-explanatory. No need to display text for this case.*/ + if(sat_command->c.text.icon.qual == 0x00) { - /* Icon is self-explanatory. No need to display text for this case.*/ - if(sat_command->c.text.icon.qual == 0x00) - { - /* Icon is self-explanatory. Do not display the text. - Only for SAT commands that use ATB editor directly, - we pass NULL as the text string, i.e., there is no Title string. - The string is embedded as part of ATB string in these cases. - For commands using AUI editor for Title string display, - we pass the string & it is not displayed based on 'selfExplanatory' flag. - */ - data->editor_data.editor_attr.TitleIcon.selfExplanatory = TRUE; - data->info_buffer = NULL; - } - else - /* provide a buffer, containing the string to be displayed */ - data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text); - - /* Copy the icon data to the editor*/ - data->editor_data.editor_attr.TitleIcon.width = sat_command->c.text.iconInfo.width; - data->editor_data.editor_attr.TitleIcon.height = sat_command->c.text.iconInfo.height; - - icon_length = sat_command->c.inp.prompt.iconInfo.width * sat_command->c.inp.prompt.iconInfo.height; - - data->editor_data.editor_attr.TitleIcon.data = (char *)ALLOC_MEMORY (icon_length); - - memcpy(data->editor_data.editor_attr.TitleIcon.data, sat_command->c.inp.prompt.iconInfo.dst, icon_length); - data->editor_data.editor_attr.TitleIcon.isTitle = FALSE; - data->editor_data.editor_attr.TitleIcon.display_type = SAT_ICON_DISPLAY_TEXT; - - /* Free the memory of icon data that we got through the SATK command*/ - mfwFree((U8 *)sat_command->c.inp.prompt.iconInfo.dst, icon_length); - sat_command->c.inp.prompt.iconInfo.dst = NULL; + /* Icon is self-explanatory. Do not display the text. + Only for SAT commands that use ATB editor directly, + we pass NULL as the text string, i.e., there is no Title string. + The string is embedded as part of ATB string in these cases. + For commands using AUI editor for Title string display, + we pass the string & it is not displayed based on 'selfExplanatory' flag. + */ + data->editor_data.editor_attr.TitleIcon.selfExplanatory = TRUE; + data->info_buffer = NULL; } else - { - /* provide a buffer, containing the string to be displayed */ - data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text); - } + /* provide a buffer, containing the string to be displayed */ + data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text); + + /* Copy the icon data to the editor*/ + data->editor_data.editor_attr.TitleIcon.width = sat_command->c.text.iconInfo.width; + data->editor_data.editor_attr.TitleIcon.height = sat_command->c.text.iconInfo.height; + + icon_length = sat_command->c.inp.prompt.iconInfo.width * sat_command->c.inp.prompt.iconInfo.height; + + data->editor_data.editor_attr.TitleIcon.data = (char *)ALLOC_MEMORY (icon_length); + + memcpy(data->editor_data.editor_attr.TitleIcon.data, sat_command->c.inp.prompt.iconInfo.dst, icon_length); + data->editor_data.editor_attr.TitleIcon.isTitle = FALSE; + data->editor_data.editor_attr.TitleIcon.display_type = SAT_ICON_DISPLAY_TEXT; + + /* Free the memory of icon data that we got through the SATK command*/ + mfwFree((U8 *)sat_command->c.inp.prompt.iconInfo.dst, icon_length); + sat_command->c.inp.prompt.iconInfo.dst = NULL; + } + else + { + /* provide a buffer, containing the string to be displayed */ + data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text); + } #else /* provide a buffer, containing the string to be displayed */ data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text); @@ -1210,41 +1200,41 @@ TRACE_EVENT_P2("SAT info_buffer[%d]: 0x%02x", i, data->info_buffer[i]); #endif - /* + /* * Start the Editor */ - /* SPR#1559 - SH - Check for unicode strings */ + /* SPR#1559 - SH - Check for unicode strings */ - /*Oct 09, 2006 DRT: OMAPS00092083 - x0047075(Archana) - Descrption:CT-PTCRB[27.22.4.1.5]-MS Resets while Icon Display - Solution : If the sat icon is present which is self explanatory then editor buffer is intialized to blank.*/ - if(data->info_buffer == NULL) - { - AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE*)"", 1); - } - else if (data->info_buffer[0]== (char)0x80) /* x0039928 - Lint warning fix */ - { - /* SPR#2340 - DS - Len is number of characters, NOT number of bytes */ - AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_UNICODE, (UBYTE *)&data->info_buffer[2], ( (sat_command->c.text.len)/2+1 )); - } - else - { - AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE *)data->info_buffer, sat_command->c.text.len+1); - } + /*Oct 09, 2006 DRT: OMAPS00092083 - x0047075(Archana) + Descrption:CT-PTCRB[27.22.4.1.5]-MS Resets while Icon Display + Solution : If the sat icon is present which is self explanatory then editor buffer is intialized to blank.*/ + if(data->info_buffer == NULL) + { + AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE*)"", 1); + } + else if (data->info_buffer[0]== (char)0x80) /* x0039928 - Lint warning fix */ + { + /* SPR#2340 - DS - Len is number of characters, NOT number of bytes */ + AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_UNICODE, (UBYTE *)&data->info_buffer[2], ( (sat_command->c.text.len)/2+1 )); + } + else + { + AUI_edit_SetBuffer(&data->editor_data, ATB_DCS_ASCII, (UBYTE *)data->info_buffer, sat_command->c.text.len+1); + } - TRACE_EVENT_P2("Editor len: %d, size: %d", data->editor_data.editor_attr.text.len, data->editor_data.editor_attr.size); + TRACE_EVENT_P2("Editor len: %d, size: %d", data->editor_data.editor_attr.text.len, data->editor_data.editor_attr.size); //Nov 09, 2005 REF: OMAPS00043190 - x0018858 // Store the handle of the editor in a globale variable for further use. A global variable has to be used here // since there is no other way to access this element in the other applications. - satDisplayTextWin=AUI_edit_Start(win, &data->editor_data); - if ( satDisplayTextWin == NULL) - { - sat_res[SAT_ERR_INDEX] = SAT_RES_IMPOSSIBLE; - sat_res[SAT_AI_INDEX] = SatResAiNoCause; - sat_done (sat_command, sat_res); - sat_display_text_destroy (satDisplayTextWin); - } + satDisplayTextWin=AUI_edit_Start(win, &data->editor_data); + if ( satDisplayTextWin == NULL) + { + sat_res[SAT_ERR_INDEX] = SAT_RES_IMPOSSIBLE; + sat_res[SAT_AI_INDEX] = SatResAiNoCause; + sat_done (sat_command, sat_res); + sat_display_text_destroy (satDisplayTextWin); + } break; #else /* NEW_EDITOR */ /* @@ -1271,24 +1261,24 @@ /* provide a buffer, containing the string to be displayed */ data->info_buffer = sat_create_TEXT_ASCIIZ (&sat_command->c.text); - /* + /* * Start the Editor */ - if (editor_start_common (win, data->info_buffer, sat_command->c.text.len+1, &data->editor_data, (T_EDIT_CB)sat_editor_cb) == NULL) + if (editor_start_common (win, data->info_buffer, sat_command->c.text.len+1, &data->editor_data, (T_EDIT_CB)sat_editor_cb) == NULL) { - sat_res[SAT_ERR_INDEX] = SAT_RES_IMPOSSIBLE; - sat_res[SAT_AI_INDEX] = SatResAiNoCause; - sat_done (sat_command, sat_res); - sat_display_text_destroy (data->win); - } + sat_res[SAT_ERR_INDEX] = SAT_RES_IMPOSSIBLE; + sat_res[SAT_AI_INDEX] = SatResAiNoCause; + sat_done (sat_command, sat_res); + sat_display_text_destroy (data->win); + } break; #endif /* NEW_EDITOR */ - /* SH - all window types are being provided with this event to destroy the window */ - case SAT_DESTROY_WINDOW: - sat_display_text_destroy (data->win); - break; + /* SH - all window types are being provided with this event to destroy the window */ + case SAT_DESTROY_WINDOW: + sat_display_text_destroy (data->win); + break; default: TRACE_EVENT ("sim_display_text_exec() unexpected event"); @@ -1302,13 +1292,13 @@ $Function: sat_ASCII_to_TEXT $Description: This routine converts an ASCIIZ string into an MFW SAT text - descriptor the coding scheme is taken accordign to the code in + descriptor the coding scheme is taken accordign to the code in - $Returns: none + $Returns: none $Arguments: txt - text info - destination - text destination - source - text source + destination - text destination + source - text source *******************************************************************************/ @@ -1344,14 +1334,14 @@ $Function: sat_UCODE_to_TEXT $Description: This routine converts an UCODE string into an MFW SAT text descriptor - the coding scheme is taken accordign to the code in + the coding scheme is taken accordign to the code in - $Returns: none + $Returns: none $Arguments: txt - text info - destination - text destination - source - text source + destination - text destination + source - text source *******************************************************************************/ static void sat_UCODE_to_TEXT (T_SAT_TXT * txt, UBYTE * destination, cp_wstring_t source) @@ -1408,8 +1398,7 @@ $Description: - - $Returns: none + $Returns: none $Arguments: data - key info @@ -1464,19 +1453,19 @@ * requested icon could not be displayed'. */ if (data->sat_command->c.text.icon.qual == 0xFF && - data->sat_command->c.text.icon.id == 0xFF) + data->sat_command->c.text.icon.id == 0xFF) { - /* Icon not present */ - sat_res[SAT_ERR_INDEX] = SatResSuccess; + /* Icon not present */ + sat_res[SAT_ERR_INDEX] = SatResSuccess; } else { // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - sat_res[SAT_ERR_INDEX] = SatResSuccess; + sat_res[SAT_ERR_INDEX] = SatResSuccess; #else - /* Icon present but ME cannot display icon */ - sat_res[SAT_ERR_INDEX] = SatResNoIcon; + /* Icon present but ME cannot display icon */ + sat_res[SAT_ERR_INDEX] = SatResNoIcon; #endif } sat_res[SAT_AI_INDEX] = SatResAiNoCause; @@ -1489,8 +1478,7 @@ $Description: - - $Returns: none + $Returns: none $Arguments: data - string info @@ -1568,7 +1556,7 @@ { // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - sat_res[SAT_ERR_INDEX] = SatResSuccess; + sat_res[SAT_ERR_INDEX] = SatResSuccess; #else /* Icon present but ME cannot display icon */ sat_res[SAT_ERR_INDEX] = SatResNoIcon; @@ -1586,12 +1574,11 @@ $Description: Sat editor call back function. - - $Returns: none + $Returns: none $Arguments: win - window - Identifier - unique id - event - event id + Identifier - unique id + event - event id *******************************************************************************/ /* SPR#1428 - SH - New Editor: minor change so function matches callback type */ @@ -1684,9 +1671,9 @@ switch(event) { case INFO_KCD_LEFT: /* OK */ - sat_get_string_send_result (data); + sat_get_string_send_result (data); SEND_EVENT(data->win, SAT_DESTROY_WINDOW, 0, 0); /* SPR#1700 - DS - Destroy SAT string data */ - break; + break; case INFO_KCD_ALTERNATELEFT: /* help */ sat_res[SAT_ERR_INDEX] = SAT_RES_USER_HELP; sat_res[SAT_AI_INDEX] = SatResAiNoCause; @@ -1709,10 +1696,10 @@ sat_done (data->sat_command, sat_res); break; case INFO_KCD_CALL: /* SEND key */ - /* SPR#2490 - DS - Explicitly ignore SEND key press */ - TRACE_EVENT("SEND keypress ignored"); - return; - default: + /* SPR#2490 - DS - Explicitly ignore SEND key press */ + TRACE_EVENT("SEND keypress ignored"); + return; + default: TRACE_EVENT("sat_editor_cb() unexp. event"); return; //break; @@ -1740,12 +1727,12 @@ break; case INFO_TIMEOUT: /* timeout */ case INFO_KCD_LEFT: /* OK */ - /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT - * command. If supplied, set the result to 0x04 'Command performed successfully, - * but requested icon could not be displayed'. - */ - if (data->sat_command->c.text.icon.qual == 0xFF && - data->sat_command->c.text.icon.id == 0xFF) + /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT + * command. If supplied, set the result to 0x04 'Command performed successfully, + * but requested icon could not be displayed'. + */ + if (data->sat_command->c.text.icon.qual == 0xFF && + data->sat_command->c.text.icon.id == 0xFF) { /* Icon not present */ sat_res[SAT_ERR_INDEX] = SatResSuccess; @@ -1754,17 +1741,17 @@ { // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - sat_res[SAT_ERR_INDEX] = SatResSuccess; + sat_res[SAT_ERR_INDEX] = SatResSuccess; #else - /* Icon present but ME cannot display icon */ - sat_res[SAT_ERR_INDEX] = SatResNoIcon; + /* Icon present but ME cannot display icon */ + sat_res[SAT_ERR_INDEX] = SatResNoIcon; #endif } sat_res[SAT_AI_INDEX] = SatResAiNoCause; sat_done (data->sat_command, sat_res); break; case INFO_KCD_CLEAR: /* abort */ - case INFO_KCD_HUP: + case INFO_KCD_HUP: sat_res[SAT_ERR_INDEX] = SAT_RES_USER_ABORT; sat_res[SAT_AI_INDEX] = SatResAiNoCause; sat_done (data->sat_command, sat_res); @@ -1781,7 +1768,7 @@ sat_display_text_destroy (data->win); //Nov 09, 2005 REF: OMAPS00043190 - x0018858 // Re-initialize the global variable to NULL. - satDisplayTextWin = NULL; + satDisplayTextWin = NULL; } break; @@ -1798,11 +1785,11 @@ break; case INFO_KCD_LEFT: /* OK */ /* SPR#2340 - DS - Check if an icon was supplied with DISPLAY TEXT - * command. If supplied, set the result to 0x04 'Command performed successfully, - * but requested icon could not be displayed'. - */ - if (data->sat_command->c.text.icon.qual == 0xFF && - data->sat_command->c.text.icon.id == 0xFF) + * command. If supplied, set the result to 0x04 'Command performed successfully, + * but requested icon could not be displayed'. + */ + if (data->sat_command->c.text.icon.qual == 0xFF && + data->sat_command->c.text.icon.id == 0xFF) { /* Icon not present */ sat_res[SAT_ERR_INDEX] = SatResSuccess; @@ -1811,10 +1798,10 @@ { // Shashi Shekar B.S., a0876501, Jan 16, 2006, DR: OMAPS00061460 #ifdef FF_MMI_SAT_ICON - sat_res[SAT_ERR_INDEX] = SatResSuccess; + sat_res[SAT_ERR_INDEX] = SatResSuccess; #else - /* Icon present but ME cannot display icon */ - sat_res[SAT_ERR_INDEX] = SatResNoIcon; + /* Icon present but ME cannot display icon */ + sat_res[SAT_ERR_INDEX] = SatResNoIcon; #endif } sat_res[SAT_AI_INDEX] = SatResAiNoCause; @@ -1826,15 +1813,15 @@ sat_done (data->sat_command, sat_res); break; case INFO_KCD_CLEAR: /* abort */ - case INFO_KCD_HUP: + case INFO_KCD_HUP: sat_res[SAT_ERR_INDEX] = SAT_RES_USER_ABORT; sat_res[SAT_AI_INDEX] = SatResAiNoCause; sat_done (data->sat_command, sat_res); break; /* SPR#2490 - DS - Explicitly ignore SEND key press */ case INFO_KCD_CALL: /* SEND key */ - TRACE_EVENT("SEND keypress ignored"); - return; + TRACE_EVENT("SEND keypress ignored"); + return; default: TRACE_EVENT("sat_editor_cb() unexp. event"); return; @@ -1843,7 +1830,7 @@ sat_display_text_destroy (data->win); //Nov 09, 2005 REF: OMAPS00043190 - x0018858 // Re-initialize the global variable to NULL. - satDisplayTextWin = NULL; + satDisplayTextWin = NULL; } break; default: