logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: apps tree.c,1.231,1.232: msg#00060

Subject: cvs: apps tree.c,1.231,1.232
Update of /cvsroot/rockbox/apps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23229/apps

Modified Files:
        tree.c 
Log Message:
Fixed the font problem reported by Mark Bright, cleaning up some code in the 
process

Index: tree.c
===================================================================
RCS file: /cvsroot/rockbox/apps/tree.c,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -b -r1.231 -r1.232
--- tree.c      17 Mar 2004 11:57:25 -0000      1.231
+++ tree.c      17 Mar 2004 14:46:06 -0000      1.232
@@ -234,6 +234,7 @@
 {
     char* name = dircache[direntry].name;
     int xpos = LINE_X;
+    char* dotpos = NULL;
 
 #ifdef HAVE_LCD_CHARCELLS
     if (!global_settings.show_icons)
@@ -244,35 +245,26 @@
     if (*dirfilter != SHOW_ALL &&
         !(dircache[direntry].attr & ATTR_DIRECTORY))
     {
-        char* dotpos = strrchr(name, '.');
-        char temp=0;
+        dotpos = strrchr(name, '.');
         if (dotpos) {
-            temp = *dotpos;
             *dotpos = 0;
         }
-        if(scroll)
-#ifdef HAVE_LCD_BITMAP
-            if (global_settings.invert_cursor)
-                lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
-            else
-#endif
-                lcd_puts_scroll(xpos, line, name);
-        else
-            lcd_puts(xpos, line, name);
-        if (temp)
-            *dotpos = temp;
     }
-    else {
-        if(scroll)
+    
+    if(scroll) {
 #ifdef HAVE_LCD_BITMAP
+        lcd_setfont(FONT_UI);
             if (global_settings.invert_cursor)
                 lcd_puts_scroll_style(xpos, line, name, STYLE_INVERT);
             else
 #endif
                 lcd_puts_scroll(xpos, line, name);
-        else
+    } else
             lcd_puts(xpos, line, name);
-    }
+
+    /* Restore the dot before the extension if it was removed */
+    if (dotpos)
+        *dotpos = '.';
 }
 
 /* load sorted directory into dircache.  returns NULL on failure. */

_______________________________________________
Rockbox-cvs mailing list
Rockbox-cvs@xxxxxxxxxxxx
http://cool.haxx.se/mailman/listinfo/rockbox-cvs



<Prev in Thread] Current Thread [Next in Thread>