? viewer.c ? viewer.h Index: tree.c =================================================================== RCS file: /cvsroot/rockbox/apps/tree.c,v retrieving revision 1.134 diff -u -b -r1.134 tree.c --- tree.c 29 Sep 2002 22:24:00 -0000 1.134 +++ tree.c 30 Sep 2002 02:44:04 -0000 @@ -46,6 +46,7 @@ #include "rolo.h" #include "icons.h" #include "lang.h" +#include "viewer.h" #include "language.h" #include "screens.h" @@ -141,6 +142,7 @@ #define TREE_ATTR_WPS 0x100 /* wps config file */ #define TREE_ATTR_MOD 0x200 /* firmware file */ #define TREE_ATTR_EQ 0x400 /* EQ config file */ +#define TREE_ATTR_TXT 0x500 /* text file */ #define TREE_ATTR_FONT 0x800 /* font file */ #define TREE_ATTR_LNG 0x1000 /* binary lang file */ #define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */ @@ -258,6 +260,8 @@ dptr->attr |= TREE_ATTR_EQ; else if (!strcasecmp(&entry->d_name[len-4], ".wps")) dptr->attr |= TREE_ATTR_WPS; + else if (!strcasecmp(&entry->d_name[len-4], ".txt")) + dptr->attr |= TREE_ATTR_TXT; else if (!strcasecmp(&entry->d_name[len-4], ".lng")) dptr->attr |= TREE_ATTR_LNG; #ifdef HAVE_RECORDER_KEYPAD @@ -383,6 +387,10 @@ icon_type = Wps; break; + case TREE_ATTR_TXT: + icon_type = Wps; + break; + case TREE_ATTR_LNG: icon_type = Language; break; @@ -798,6 +806,13 @@ snprintf(buf, sizeof buf, "%s/%s", currdir, file->name); settings_load_eq(buf); + restore = true; + break; + + case TREE_ATTR_TXT: + snprintf(buf, sizeof buf, "%s/%s", + currdir, file->name); + viewer_run(buf); restore = true; break;