diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-09-24 12:40:52 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-09-24 12:40:52 +0000 |
| commit | a007ebf3b15d791a03d259bc14d590f4f09ae489 (patch) | |
| tree | 23f7080cf6cd1dfd3d3918157638940d3b21fedf /apps | |
| parent | 8d38c965ddbb0cd34189626a0002d33f1a9d1d2d (diff) | |
| download | rockbox-a007ebf3b15d791a03d259bc14d590f4f09ae489.zip rockbox-a007ebf3b15d791a03d259bc14d590f4f09ae489.tar.gz rockbox-a007ebf3b15d791a03d259bc14d590f4f09ae489.tar.bz2 rockbox-a007ebf3b15d791a03d259bc14d590f4f09ae489.tar.xz | |
use the language load function for .lng files, oooh this is fun! ;-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2389 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/tree.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c index d3ee244..7aaea69 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -46,6 +46,7 @@ #include "rolo.h" #include "icons.h" #include "lang.h" +#include "language.h" #ifdef HAVE_LCD_BITMAP #include "widgets.h" @@ -139,6 +140,7 @@ extern unsigned char bitmap_icons_6x8[LastIcon][6]; #define TREE_ATTR_MOD 0x200 /* firmware file */ #define TREE_ATTR_EQ 0x400 /* EQ config 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) */ static int build_playlist(int start_index) @@ -253,6 +255,8 @@ static int showdir(char *path, int start) 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], ".lng")) + dptr->attr |= TREE_ATTR_LNG; #ifdef HAVE_RECORDER_KEYPAD else if (!strcasecmp(&entry->d_name[len-4], ".fnt")) dptr->attr |= TREE_ATTR_FONT; @@ -369,6 +373,10 @@ static int showdir(char *path, int start) icon_type = Wps; break; + case TREE_ATTR_LNG: + icon_type = Wps; /* for now */ + break; + case TREE_ATTR_MOD: icon_type = Mod_Ajz; break; @@ -722,6 +730,13 @@ bool dirbrowse(char *root) restore = true; break; + case TREE_ATTR_LNG: + snprintf(buf, sizeof buf, "%s/%s", + currdir, file->name); + lang_load(buf); + restore = true; + break; + #ifdef HAVE_LCD_BITMAP case TREE_ATTR_FONT: snprintf(buf, sizeof buf, "%s/%s", @@ -966,3 +981,9 @@ bool dirbrowse(char *root) return false; } + +/* ----------------------------------------------------------------- + * local variables: + * eval: (load-file "../firmware/rockbox-mode.el") + * end: + */ |