diff src/ui/mfw/mfw_mnu.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
line wrap: on
line diff
--- a/src/ui/mfw/mfw_mnu.c	Tue Jan 19 05:41:26 2021 +0000
+++ b/src/ui/mfw/mfw_mnu.c	Tue Jan 19 06:10:27 2021 +0000
@@ -7,7 +7,7 @@
 +--------------------------------------------------------------------+
 
    MODULE  : MFW_MNU
- 
+
    PURPOSE : menu handling functions
 
    EXPORT  :
@@ -20,28 +20,28 @@
  	Description: Header Toggling
  	Solution: Implemented the toggling of header when displaying the length text in SELECT ITEM and SET UP MENU
 
-	May 18, 2006    REF: DRT OMAPS00076438  xdeepadh	
+	May 18, 2006    REF: DRT OMAPS00076438  xdeepadh
 	Description: Scrolling not implemented in Imageviewer
 	Solution: The support for scrolling has been provided.
 
- 
+
        May 03, 2006    REF: DRT OMAPS00076439  xdeepadh
-	Description: Image viewer back not working 
-	Solution: The Preview List will be repopulated, when the list window is 
+	Description: Image viewer back not working
+	Solution: The Preview List will be repopulated, when the list window is
 	resumed.
 
        Shashi Shekar B.S., a0876501, 16 Mar, 2006, OMAPS00061462
        Icon support for SetupMenu & Select item.
-   
+
  *
  * ************************************************
-	
+
 
 
 	Dec 22, 2005    REF: ENH  xdeepadh
 	Description: Image Viewer Application
 	Solution: Implemeted the Image Viewer  to view the jpeg images
- 
+
  * User: xreddymn           Date: Sep-30-2005
  * Updated in $/GSM/Condat/MS/SRC/MFW
  * Added header display for menus on monochrome
@@ -126,11 +126,11 @@
 
 #define MNU_TOGGLE_TIMEOUT 3000
 
-static USHORT g_title_pos;			
-static USHORT g_title_next_pos;	
+static USHORT g_title_pos;
+static USHORT g_title_next_pos;
 MfwHnd g_title_timer;
 
-extern MfwHnd g_win;	
+extern MfwHnd g_win;
 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
 
 static int menuIsEmpty (MfwMnu *m, MfwMnuAttr *ma);
@@ -139,13 +139,13 @@
 static void drawListMenu (MfwMnu *m);
 static void drawIconsListMenu(MfwMnu *m);
 static void drawFreeMenu (MfwMnu *m);
-//May 18, 2006    REF: DRT OMAPS00076438  xdeepadh	
+//May 18, 2006    REF: DRT OMAPS00076438  xdeepadh
 static int mnuCommand (U32 cmd, void *h);
 
 /* 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */
 static int Menu_edit_TitleTimerCb(MfwEvt e, MfwTim *t);
 
-#define TIME_TRACE_EVENT 
+#define TIME_TRACE_EVENT
 
 /*
 +--------------------------------------------------------------------+
@@ -190,7 +190,7 @@
 +--------------------------------------------------------------------+
 
   PURPOSE : create menu control
-  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 
+  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
 				used (useStrID) and if the strings are ascii or unicode (uesDefLang).
 
 */
@@ -200,16 +200,16 @@
     MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
     MfwMnu *mnu = (MfwMnu *) mfwAlloc(sizeof(MfwMnu));
 	MfwHdr *insert_status =0;
-	
+
     if (!hdr || !mnu)
     {
     	TRACE_ERROR("ERROR: mnuCreate() Mem Alloc Failed.");
-			
+
 	   	if(hdr)
    			mfwFree((U8*)hdr,sizeof(MfwHdr));
    		if(mnu)
-   			mfwFree((U8*)mnu,sizeof(MfwMnu));	
-   		
+   			mfwFree((U8*)mnu,sizeof(MfwMnu));
+
 	   	return 0;
   	}
 
@@ -278,7 +278,7 @@
 
   PURPOSE : set / get whether the string is associated with an ID or if it is null-terminated
 
-  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 
+  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
 				used (useStrID) and if the strings are ascii or unicode (uesDefLang).
 */
 
@@ -302,7 +302,7 @@
    	else
    	{
    		mnu->textDCS = MNU_LIST_LANGUAGE_ASCII;
-   	}	
+   	}
 
     return ol;
 }
@@ -315,7 +315,7 @@
 
   PURPOSE : set / get language in use (1=use default ascii/unicode, 0=assume ascii)
 
-  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 
+  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
 				used (useStrID) and if the strings are ascii or unicode (uesDefLang).
 */
 MfwHnd mnuStrType (MfwHnd m, MfwHnd l)
@@ -338,7 +338,7 @@
    	{
    		mnu->textDCS = MNU_LIST_LANGUAGE_DEFAULT;
    	}
-   	
+
     return ol;
 }
 
@@ -363,7 +363,7 @@
 
     ol = mnu->textDCS;
     mnu->textDCS = listLanguageType;
-   	
+
     return ol;
 }
 
@@ -406,7 +406,7 @@
 MfwRes mnuHide (MfwHnd m)
 {
     MfwMnu *mnu;
-//	U8 dsplOld;  
+//	U8 dsplOld;
 
     if ((mnu = mfwControl(m)) == 0)
         return MfwResIllHnd;
@@ -433,7 +433,7 @@
 MfwRes mnuUnhide (MfwHnd m)
 {
     MfwMnu *mnu;
-//	U8 dsplOld;  
+//	U8 dsplOld;
 
     if ((mnu = mfwControl(m)) == 0)
         return MfwResIllHnd;
@@ -459,8 +459,8 @@
 MfwRes mnuUpdate (MfwMnu *m)
 {
 
-//    U8 dsplOld;  
-	
+//    U8 dsplOld;
+
 
     if (!m)
         return MfwResIllHnd;
@@ -475,7 +475,7 @@
 	{
 		MfwMnuAttr *ma = m->curAttr;
 		int index= m->lCursor[m->level];
-	//	int iloop;   
+	//	int iloop;
 		U16 retVal;
 
 		 if (ma->items[index].flagFunc)
@@ -494,13 +494,13 @@
 			 else
 			 	retVal = 0;
 
-	    } 
-		m->lCursor[m->level]=index;	    
+	    }
+		m->lCursor[m->level]=index;
 	}
-	
+
     if ((m->curAttr->mode & MNU_DISPLAY) == MNU_OVERLAPPED)
         drawFreeMenu(m);
-//May 18, 2006    REF: DRT OMAPS00076438  xdeepadh		
+//May 18, 2006    REF: DRT OMAPS00076438  xdeepadh
     else if ((m->curAttr->mode & MNU_DISPLAY) == MNU_PAGED)
         drawPageMenu(m);
     else if ((m->curAttr->mode & MNU_DISPLAY) == MNU_LIST)
@@ -535,8 +535,8 @@
     MfwMnu *mnu;
     MfwMnuAttr *ca;
     MfwMnuItem *ci;
-//	U8 uMode;  
-	
+//	U8 uMode;
+
     if ((mnu = mfwControl(m)) == 0)
         return MfwResIllHnd;
 
@@ -559,19 +559,19 @@
         }
         ci = ca->items + mnu->lCursor[mnu->level];
     } while (ci->flagFunc(mnu,ca,ci) & MNU_ITEM_HIDE);
-	
+
 	if (mnu->scrollMode) /* Simple scrolling */
 	{
 		U8 shift = mnu->lShift[mnu->level];
 		U8 index = countVisible(mnu,ca,mnu->lCursor[mnu->level]);
-		U8 visibleItems = countVisible(mnu,ca,ca->nItems); 
+		U8 visibleItems = countVisible(mnu,ca,ca->nItems);
 		int nLines = mnu->nLines;
-	    		
+
 		if (visibleItems<nLines)
 			nLines = visibleItems;
 		if (shift>1)
 			shift--;
-		mnu->lShift[mnu->level] = shift;		
+		mnu->lShift[mnu->level] = shift;
 
 	}
     mnuUpdate(mnu);
@@ -621,14 +621,14 @@
 	{
 		U8 shift = mnu->lShift[mnu->level];
 		U8 index = countVisible(mnu,ca,mnu->lCursor[mnu->level]);
-		U8 visibleItems = countVisible(mnu,ca,ca->nItems); 
+		U8 visibleItems = countVisible(mnu,ca,ca->nItems);
 		int nLines = mnu->nLines;
-		
+
 		if (visibleItems<nLines)
 			nLines = visibleItems;
 		if (shift<nLines)
 			shift++;
-		mnu->lShift[mnu->level] = shift;		
+		mnu->lShift[mnu->level] = shift;
 
 	}
     mnuUpdate(mnu);
@@ -652,11 +652,11 @@
     MfwMnu *mnu;
     MfwMnuAttr *submenu, *ca;
     MenuFunc func;
-//	U8 dsplOld;  
+//	U8 dsplOld;
 
     if ((mnu = mfwControl(m)) == 0)
         return MfwResIllHnd;
-    
+
     ca = mnu->curAttr;
     submenu = ca->items[mnu->lCursor[mnu->level]].menu;
     func = ca->items[mnu->lCursor[mnu->level]].func;
@@ -716,7 +716,7 @@
     MfwMnu *mnu;
     MfwMnuAttr *attr;
     U8 lvl;
-//	U8 dsplOld;  
+//	U8 dsplOld;
 
     if ((mnu = mfwControl(m)) == 0)
         return MfwResIllHnd;
@@ -1050,7 +1050,7 @@
                                                               char *menuString)
 {
 	char *e;                            /* ES!! UNICODE             */
-	int index = 0;   
+	int index = 0;
 	/*a0393213 compiler warning removal - variable unicode removed*/
 	U16 flagResult;
 
@@ -1080,11 +1080,11 @@
 
 		/* SPR998 - SH - Checked or unchecked option.
 		 * Don't need to do anything here. */
-		
+
 		case MNU_ITEM_UNCHECKED:
 		case MNU_ITEM_CHECKED:
 			break;
-			
+
 		default:
 			break;
 	}
@@ -1104,9 +1104,9 @@
 
 	/* START: 05-June 2006, x0045876 (OMAPS00060424 - Header Toggle) */
 	dspl_DevCaps disData;
-	
+
 	T_DS_TEXTFORMAT  format;
-	
+
 	T_ATB_TEXT title;
 	T_ATB_TEXT newTitle;
 
@@ -1128,7 +1128,7 @@
 	sy = res_getTitleHeight();
 	resources_setTitleColour(mnuColour);
        dspl_Clear(xPos,yPos,(U16)(mnuArea->sx+xPos-1),(U16)(mnuArea->sy+yPos-1));
-	
+
 	if ((mode & MNU_HDR_ALIGN) == MNU_HDR_LEFT)
 	{
 		txtXpos = xPos;
@@ -1149,7 +1149,7 @@
 				title.dcs = ATB_DCS_ASCII;
 				title.data = (UBYTE*)txt;/*a0393213 warnings removal-typecasting done*/
 				title.len = ATB_string_Length(&title);
-					
+
 				ATB_display_SetFormatAttr(&format, 0, FALSE);
 				titleWidth = ATB_display_StringWidth(&title, &format)+2;
 				/*titleHeight = ATB_display_StringHeight(&title, &format);*//*a0393213 warning removal-titleHeight assigned but never used*/
@@ -1169,7 +1169,7 @@
 					titleWidth = 0;
 					textIndex = g_title_pos;
 					lastSpace = 0;
-	
+
 					while (titleWidth<(disData.Width -2) && textIndex<title.len)
 					{
 						character = ATB_string_GetChar(&title, textIndex);
@@ -1196,18 +1196,18 @@
 					{
 						ATB_string_SetChar(&newTitle, textIndex, ATB_string_GetChar(&title, g_title_pos+textIndex));
 					}
-					ATB_string_SetChar(&newTitle, newTitle.len, UNICODE_EOLN);	
+					ATB_string_SetChar(&newTitle, newTitle.len, UNICODE_EOLN);
 					ATB_display_Text(0,0,&format, &newTitle);
 					mfwFree((UBYTE *)newTitle.data, (newTitle.len+1)*ATB_string_Size(&title));
 
-					areaLeft->px = xPos;	
+					areaLeft->px = xPos;
 					areaLeft->sx = mnuArea->sx;
-					areaLeft->py = yPos+sy;	
+					areaLeft->py = yPos+sy;
 					areaLeft->sy = mnuArea->sy-sy;
-	
+
 					resources_restoreMnuColour();
 					return;
-				
+
 				}
 				else
 				{
@@ -1228,7 +1228,7 @@
 #ifdef FF_MMI_SAT_ICON
        if (mnuAttr->icon != NULL)
 	{
-		if (mnuAttr->icon->area.sx > TITLE_ICON_WIDTH) 
+		if (mnuAttr->icon->area.sx > TITLE_ICON_WIDTH)
 		{
 			titleIconWidth = TITLE_ICON_WIDTH;
 		}
@@ -1236,7 +1236,7 @@
 		{
 			titleIconWidth = mnuAttr->icon->area.sx;
 		}
-	}			
+	}
 	else
 	{
 		titleIconWidth = 0;
@@ -1253,7 +1253,7 @@
 				dspl_ScrText (txtXpos, yPos, txt, 0);
 			else
 				dspl_TextOut(txtXpos, yPos, DSPL_TXTATTR_CURRENT_MODE, txt );
-		}	
+		}
     }
     else
     {
@@ -1267,7 +1267,7 @@
 		dspl_ScrText (txtXpos, yPos, txt, 0);
 	else
 		dspl_TextOut(txtXpos, yPos, DSPL_TXTATTR_CURRENT_MODE, txt );
-#endif	
+#endif
 
 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
 #ifdef FF_MMI_SAT_ICON
@@ -1277,11 +1277,11 @@
 	    {
 			if ((mnuAttr->icon->area.sx > TITLE_ICON_WIDTH) || (mnuAttr->icon->area.sy > TITLE_ICON_HEIGHT))
 			{
-				/* iconY calculates place holder to place the icon 
+				/* iconY calculates place holder to place the icon
 					at the center of the screen. */
 				   iconX = 1;
 				   iconY = 1+ ((sy-2) / 2) - (10 / 2);
-				   dspl_BitBlt2(iconX, iconY, 8, 
+				   dspl_BitBlt2(iconX, iconY, 8,
 						10, (void*)SATIconQuestionMark, 0, BMP_FORMAT_256_COLOUR);
 			}
 			else
@@ -1294,13 +1294,13 @@
     	}
 #endif
 
-	areaLeft->px = xPos;	
+	areaLeft->px = xPos;
 	areaLeft->sx = mnuArea->sx;
-	areaLeft->py = yPos+sy;	
+	areaLeft->py = yPos+sy;
 	areaLeft->sy = mnuArea->sy-sy;
 #ifdef MFW_DEBUG_DISPLAY_SIZE
     dspl_DrawRect(xPos,yPos,(xPos+mnuArea->sx-1),(yPos+sy-1));
-#endif    
+#endif
 	resources_restoreMnuColour();
 }
 
@@ -1368,7 +1368,7 @@
 
   PURPOSE : draws menu in page mode
 
-  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 
+  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
 				used (useStrID) and if the strings are ascii or unicode (uesDefLang).
 
 */
@@ -1376,16 +1376,16 @@
 						int bmpSx,	int bmpSy,		//size of bitmap
 						char*	srcBitmap,
 						int posX,   	int posY,   	// start of area to be copied into
-						int sx,     	int sy,     	// size of area to be copied into 
+						int sx,     	int sy,     	// size of area to be copied into
 						U32 bgd_col,	int bmptype);
 
 static void drawPageMenu (MfwMnu *mnu)
 {
     MfwMnuAttr *ma;                     /* menu attributes          */
-    //U16 th, tw, tl;                     /* text height, width, len  */ 
+    //U16 th, tw, tl;                     /* text height, width, len  */
     U16 ax, ay, aw, ah;  // , x;              /* menu area dimensions     */
-//    int tLines;                         /* lines in item text       */  
-//    int nLines;                         /* lines in menu area       */ 
+//    int tLines;                         /* lines in item text       */
+//    int nLines;                         /* lines in menu area       */
     char *txt;                // Removed *t2, save;          /* item text & clip saver   */
     MfwIcnAttr * icn;                    /* item icon                */
     U8 oldFont = (U8)-1;                    /* save previous font       */ /*a0393213 compiler warnings removal - explicit casting done*/
@@ -1406,7 +1406,7 @@
  	resources_setColour(ma->mnuColour);
 
     if ((ma->mode & MNU_HDRFORMAT_STR)==0)  /* header is a text ID */
-		txt =  (char*)MmiRsrcGetText((int)txt);  
+		txt =  (char*)MmiRsrcGetText((int)txt);
  	checkPredraw(mnu,mi,&txt,&icn);     /* ES!!                     */
     {
     	MfwRect areaLeft;
@@ -1421,21 +1421,21 @@
 		{
 			fastCopyBitmap(		(int)bmpArea->px, (int)bmpArea->py, (int)bmpArea->sx, (int)bmpArea->sy,
 									ma->bgdBitmap->icons,
-									(int)ax,(int)ay, (int)aw, (int)ah, 
+									(int)ax,(int)ay, (int)aw, (int)ah,
 									dspl_GetBgdColour(),
-									ma->bgdBitmap->icnType);			
+									ma->bgdBitmap->icnType);
 		}
 		else
 		{
 		    dspl_Clear(ax,ay,(U16)(ax+aw-1),(U16)(ay+ah-1));
-		}			
+		}
 	}
 	else
 	{
 	    dspl_Clear(ax,ay,(U16)(ax+aw-1),(U16)(ay+ah-1));
 	}
-		
-    
+
+
 
     if (icn != NULL)
     {                                   /* show associated icon     */
@@ -1451,7 +1451,7 @@
 
 #ifdef MFW_DEBUG_DISPLAY_SIZE
     dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1));
-#endif    
+#endif
 	resources_restoreColour();
 }
 
@@ -1464,7 +1464,7 @@
 
   PURPOSE : draws menu in list mode
 
-  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be 
+  GW 05/10/01 - Changed single value 'lng' to 2 values indicating if ID's should be
 				used (useStrID) and if the strings are ascii or unicode (uesDefLang).
 */
 #define MAX_STR_CHAR 64
@@ -1479,7 +1479,7 @@
     int nIdx;
     int nTextLen;
     MfwIcnAttr * icn;
-//    int fit;    
+//    int fit;
     char *txtStr;                          /* item text                */
     char txt[MAX_STR_CHAR];
     U8 oldFont =(U8) -1;                    /* save previous font       */ /*a0393213 compiler warnings removal - explicit type casting done*/
@@ -1502,7 +1502,7 @@
     ma = mnu->curAttr;
 
 	/* SPR#1983 - SH - Ignore language type now */
-	
+
     if (ma->font != (U8) -1)
         oldFont = dspl_SelectFontbyID(ma->font); /* setup font */
 
@@ -1515,14 +1515,14 @@
 	else
 		fh = dspl_GetFontHeight();
     fw = dspl_GetTextExtent("X",1); // ES!! only for normal fonts !
-    
+
     //Display header info (if required)
     if ((ma->hdrId != 0) && (dspl_getDisplayType()==DSPL_COLOUR))
     {
     	MfwRect areaLeft;
     	char *hdrStr;
 	    if ((ma->mode & MNU_HDRFORMAT_STR)==0)  /* header is a text ID */
-			hdrStr =  MmiRsrcGetText(ma->hdrId);  
+			hdrStr =  MmiRsrcGetText(ma->hdrId);
     	else
     		hdrStr = (char*)(ma->hdrId);
     	mnuDrawHeader(ma,&areaLeft,hdrStr);
@@ -1556,7 +1556,7 @@
 	mnu->nLines = nLines; //Store the number of lines we are drawing for scrolling up/down
     {
 //    	TRACE_EVENT_P5(" ax:%d ay:%d aw:%d ah:%d lines:%d",ax,ay,aw,ah, nLines);
-    } 	
+    }
 	if ((!mnu->scrollMode)||(countVisible(mnu,ma,ma->nItems)<=nLines)) /* Simple scrolling */
 		simpleScrolling = TRUE;
 	else
@@ -1575,7 +1575,7 @@
 		while (ma->items[index-1].flagFunc(mnu,ma,&(ma->items[index-1])) & MNU_ITEM_HIDE)
 	    {
 			index++;
-        } 
+        }
 
 		while (count>0){
 			if (index<=0)
@@ -1583,11 +1583,11 @@
 			else
 				index--;
 	        if (!(ma->items[index].flagFunc(mnu,ma,&(ma->items[index]))& MNU_ITEM_HIDE))
-				count--;								
+				count--;
 		}
 		if (nVisibles<nLines)
 			nLines = nVisibles;
-	    nIdx = index;	
+	    nIdx = index;
 	}
 
     for (i = 0; i < nLines; nIdx++)     /* ES!! not so nice...      */
@@ -1597,9 +1597,9 @@
 			if (simpleScrolling)
 				break;
 			else
-				nIdx=0;				
+				nIdx=0;
 		}
-	
+
         if (ma->items[nIdx].flagFunc(mnu,ma,&(ma->items[nIdx]))
 	                                            & MNU_ITEM_HIDE)
             continue;
@@ -1613,7 +1613,7 @@
 #ifdef FF_MMI_SAT_ICON
        if (icn != NULL)
 	{
-		if (icn->area.sx > TITLE_ICON_WIDTH) 
+		if (icn->area.sx > TITLE_ICON_WIDTH)
 		{
 			titleIconWidth = TITLE_ICON_WIDTH;
 		}
@@ -1621,7 +1621,7 @@
 		{
 			titleIconWidth = icn->area.sx;
 		}
-	}			
+	}
 	else
 	{
 		titleIconWidth = 0;
@@ -1675,13 +1675,13 @@
 #endif
 					nTextLen = dspl_GetTextExtent((char*)(txt+EOL_position),(U16)dspl_str_length(txt));
 
-				/* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */	
+				/* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */
 				if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED)
 				{
 					nTextLen+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right);
 				}
 				/* end of SPR#998 */
-			
+
 		        if ((ma->mode & MNU_ALIGN) == MNU_CENTER)
 			        x2 = (U16) (ax + (aw - nTextLen) / 2);
 		        else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT)
@@ -1696,14 +1696,14 @@
         nTextLen = dspl_GetTextExtent(txt,(U16)dspl_str_length(txt));
 
 		/* SPR#998 - SH - If list is a checkbox list, include space for checkbox in width */
-		
+
 		if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED)
 		{
 			nTextLen+=(checkbox_spacing_left+checkbox_width+checkbox_spacing_right);
 		}
 
 		/* end of SPR#998 */
-		
+
         if ((ma->mode & MNU_ALIGN) == MNU_CENTER)
 	        x = (U16) (ax + (aw - nTextLen) / 2);
         else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT)
@@ -1716,10 +1716,10 @@
 		/* SPR#998 - SH - Draw checkboxes if required */
 
 		if (status==MNU_ITEM_CHECKED || status==MNU_ITEM_UNCHECKED)
-		{	
+		{
 			checkbox_x = x+checkbox_spacing_left;
 			checkbox_y = ay+i*fh+(fh-checkbox_height)/2;
-			
+
 			if (status==MNU_ITEM_CHECKED)
 			{
 				/* NOTE: for some reason, a filled rect must have x2, y2 +1 of the same size
@@ -1739,8 +1739,8 @@
 		}
 
 		/* end of SPR#998 */
-		
-		{      
+
+		{
 #ifdef NO_ASCIIZ
 /*MC, use universal height rather than smaller chinese font height*/
 /*MC, SPR1526, send  whole string to dspl_TextOut, rather than missing out unicode tag*/
@@ -1778,14 +1778,14 @@
 				}
 				else
 					dspl_TextOut(x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt);
-#else			
+#else
 				dspl_TextOut(x,(U16)(ay+i*fh),DSPL_TXTATTR_CURRENT_MODE,txt);
 #endif
 				if(EOL_position>0) /* xreddymn Dec-16-2004 MMI-SPR-27384: two line display */
 				{
 					dspl_TextOut(x2,(U16)(ay+i*fh+hfh),DSPL_TXTATTR_CURRENT_MODE,(char*)(txt+EOL_position));
 				}
-			}	
+			}
 		}
 
 	    if (nIdx == mnu->lCursor[mnu->level])
@@ -1878,7 +1878,7 @@
 	        {
 // Shashi Shekar B.S., a0876501, Feb 4, 2006, DR: OMAPS00061462
 #ifdef FF_MMI_SAT_ICON
-/* There is a problem when this icon is displayed. 
+/* There is a problem when this icon is displayed.
 The last parameter was not taken into consideration & a default '0' was been set. This is corrected now.*/
 /*    	        dspl_BitBlt2(icn->area.px, icn->area.py,
         	                icn->area.sx, icn->area.sy,
@@ -1904,17 +1904,17 @@
     	}
         i++;
 	    checkPostdraw(mnu,ma->items+nIdx); /* ES!!                  */
-    }	
+    }
 
     if (oldFont != (U8) -1)
         dspl_SelectFontbyID(oldFont);   /* restore previous font    */
 
     /* SPR#1983 - SH - No longer have to change text type back */
-    
+
     resources_restoreColour();
 #ifdef MFW_DEBUG_DISPLAY_SIZE
     dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1));
-#endif    
+#endif
     TRACE_EVENT("drawListMenu() end"); /*a0393213 warnings removal-TIME_TRACE_EVENT changed to TRACE_EVENT*/
 
 }
@@ -1940,20 +1940,20 @@
 	TRACE_FUNCTION("drawIconsListMenu()");	/* Replace TIME_TRACE_EVENT to TRACE_FUNCTION - x0020906 - Warning Correction */
     ma = mnu->curAttr;
 	/* SPR#1983 - SH - Ignore language type now */
-	
+
     if (ma->font != (U8) -1)
         oldFont = dspl_SelectFontbyID(ma->font); /* setup font */
 
 	fh = dspl_GetFontHeight();
     fw = dspl_GetTextExtent("X",1); // ES!! only for normal fonts !
-    
+
     //Display header info (if required)
     if ((ma->hdrId != 0) && (dspl_getDisplayType()==DSPL_COLOUR))
     {
     	MfwRect areaLeft;
     	char *hdrStr;
 	    if ((ma->mode & MNU_HDRFORMAT_STR)==0)  /* header is a text ID */
-			hdrStr =  MmiRsrcGetText(ma->hdrId);  
+			hdrStr =  MmiRsrcGetText(ma->hdrId);
     	else
     		hdrStr = (char*)(ma->hdrId);
     	mnuDrawHeader(ma,&areaLeft,hdrStr);
@@ -2017,7 +2017,7 @@
 		while (ma->items[index-1].flagFunc(mnu,ma,&(ma->items[index-1])) & MNU_ITEM_HIDE)
 	    {
 			index++;
-        } 
+        }
 
 		while (count>0){
 			if (index<=0)
@@ -2025,11 +2025,11 @@
 			else
 				index--;
 	        if (!(ma->items[index].flagFunc(mnu,ma,&(ma->items[index]))& MNU_ITEM_HIDE))
-				count--;								
+				count--;
 		}
 		if (nVisibles<nLines)
 			nLines = nVisibles;
-	    nIdx = index;	
+	    nIdx = index;
 	}
 	if(ma->items[0].icon != NULL)
 	{
@@ -2043,7 +2043,7 @@
 			if (simpleScrolling)
 				break;
 			else
-				nIdx=0;				
+				nIdx=0;
 		}
         if (ma->items[nIdx].flagFunc(mnu,ma,&(ma->items[nIdx]))
 	                                            & MNU_ITEM_HIDE)
@@ -2065,7 +2065,7 @@
 	    }
 
         nTextLen = dspl_GetTextExtent(txt,(U16)dspl_str_length(txt));
-		
+
         if ((ma->mode & MNU_ALIGN) == MNU_CENTER)
 	        x = (U16) (ax + (aw - nTextLen) / 2);
         else if ((ma->mode & MNU_ALIGN) == MNU_RIGHT)
@@ -2077,11 +2077,11 @@
 
 		/* SPR#998 - SH - Draw checkboxes if required */
 
-		
+
 
 		/* end of SPR#998 */
-		
-		{      
+
+		{
 #ifdef NO_ASCIIZ
 /*MC, use universal height rather than smaller chinese font height*/
 /*MC, SPR1526, send  whole string to dspl_TextOut, rather than missing out unicode tag*/
@@ -2089,14 +2089,14 @@
 
 			if (txt[0] == (char)0x80 || mnu->textDCS==MNU_LIST_LANGUAGE_UNICODE)
 			{
- 				dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt); 				
+ 				dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt);
 			}
 			else
 #endif
 			{
- 			
-				dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt); 				
-			}	
+
+				dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt);
+			}
 		}
 
 	    if (nIdx == mnu->lCursor[mnu->level])
@@ -2136,13 +2136,13 @@
 					/* SPR#1983 - SH - If unicode is set, send text as unicode */
 					if (txt[0] == (char)0x80 || mnu->textDCS==MNU_LIST_LANGUAGE_UNICODE)
 					{
- 
+
 						dspl_TextOut(x+icon_w,(U16)ay+i*icon_h/*MC, 1319*/,DSPL_TXTATTR_UNICODE,txt);
 					}
 					else
 #endif
 					{
- 
+
 						dspl_TextOut(x+icon_w,(U16)(ay+i*icon_h),DSPL_TXTATTR_CURRENT_MODE,txt);
 
 					}
@@ -2154,7 +2154,7 @@
 	        {
                  dspl_BitBlt2(ax,ay+i*icon_h,
         	                icn->area.sx,icn->area.sy,
-                            icn->icons,0,icn->icnType);           
+                            icn->icons,0,icn->icnType);
  	        }
     	}
 		else
@@ -2166,16 +2166,16 @@
     	}
         i++;
 	    checkPostdraw(mnu,ma->items+nIdx); /* ES!!                  */
-    }	
+    }
 
     if (oldFont != (U8) -1)
         dspl_SelectFontbyID(oldFont);   /* restore previous font    */
 
-    
+
     resources_restoreColour();
 #ifdef MFW_DEBUG_DISPLAY_SIZE
     dspl_DrawRect(ax,ay,(ax+aw-1),(ay+ah-1));
-#endif    
+#endif
 
 }
 
@@ -2214,7 +2214,7 @@
         x = wa->area->px + wa->area->sx - nTextLen;
     else
         x = wa->area->px;
- 
+
     dspl_TextOut((U16)x,(U16)(wa->area->py+wa->area->sy-nFontHeight),DSPL_TXTATTR_CURRENT_MODE,
                  wa->items[mnu->lCursor[mnu->level]].str);
 
@@ -2275,10 +2275,10 @@
 void mnuScrollMode (MfwHnd menu,U8 mode)
 {
 	MfwMnu *mnu;
-	
+
     if ((mnu = mfwControl(menu)) == 0)
         return;
-	mnu->scrollMode = mode;	
+	mnu->scrollMode = mode;
 }
 
 
@@ -2287,9 +2287,9 @@
 	mnuItem->icon = 0;
 	mnuItem->exta = 0;
 	mnuItem->menu = 0;
-	mnuItem->func = 0;	
-    mnuItem->str = NULL;                       
-    mnuItem->flagFunc = 0; 
+	mnuItem->func = 0;
+    mnuItem->str = NULL;
+    mnuItem->flagFunc = 0;
 
 }
 
@@ -2308,11 +2308,11 @@
 {
 	int index;
 	int currentOption;
-	
+
 	/* Identify current menu option */
 
 	currentOption = -1;
-	
+
 	for (index=0; index < attr->nItems; index++)
 	{
 		if (&attr->items[index]==item)
@@ -2335,22 +2335,22 @@
 
  $Description:	Callback function for the Menu title timer.  Recalculates title_pos so that
  				the next part of the string is displayed.
- 
+
  $Returns:	None.
 
  $Arguments:	event	- the event type
  			timer	- the timer
- 
+
 *******************************************************************************/
 static int Menu_edit_TitleTimerCb (MfwEvt e, MfwTim *t)
-{	
+{
 	TRACE_FUNCTION("Menu_edit_TitleTimerCb");
 
 	if (g_title_next_pos!=g_title_pos)
 		g_title_pos = g_title_next_pos;
 	winShow(g_win);
 	timStart(g_title_timer);
-	
+
     	return 1;
 }
 /* END: 05-June-2006, x0045876 (OMAPS00060424 - Header Toggle) */