summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/filetypes.c4
-rw-r--r--apps/player/icons.c15
2 files changed, 7 insertions, 12 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c
index db463d7ff4..8427bc7450 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -325,7 +325,6 @@ static void read_config(char* config_file)
325 filetypes[filetype_count].icon = Icon_Questionmark; 325 filetypes[filetype_count].icon = Icon_Questionmark;
326 heighest_attr++; 326 heighest_attr++;
327 /* get the icon */ 327 /* get the icon */
328#ifdef HAVE_LCD_BITMAP
329 s = e+1; 328 s = e+1;
330 if (*s == '*') 329 if (*s == '*')
331 filetypes[filetype_count].icon = atoi(s+1); 330 filetypes[filetype_count].icon = atoi(s+1);
@@ -333,9 +332,6 @@ static void read_config(char* config_file)
333 filetypes[filetype_count].icon = Icon_NOICON; 332 filetypes[filetype_count].icon = Icon_NOICON;
334 else if (*s >= '0' && *s <= '9') 333 else if (*s >= '0' && *s <= '9')
335 filetypes[filetype_count].icon = Icon_Last_Themeable + atoi(s); 334 filetypes[filetype_count].icon = Icon_Last_Themeable + atoi(s);
336#else
337 filetypes[filetype_count].icon = Icon_NOICON;
338#endif
339 filetype_count++; 335 filetype_count++;
340 } 336 }
341} 337}
diff --git a/apps/player/icons.c b/apps/player/icons.c
index 6717eb12bd..7460a8fcf2 100644
--- a/apps/player/icons.c
+++ b/apps/player/icons.c
@@ -38,9 +38,8 @@ enum old_values{
38 old_Icon_Config, 38 old_Icon_Config,
39}; 39};
40 40
41static const long icon_unknown = old_Icon_Unknown; 41static const unsigned short icons[Icon_Last_Themeable] = {
42static const long icons[Icon_Last_Themeable] = { 42 [0 ... Icon_Last_Themeable-1] = ' ',
43 [0 ... Icon_Last_Themeable-1] = 0,
44 43
45 [Icon_Audio] = old_Icon_Audio, 44 [Icon_Audio] = old_Icon_Audio,
46 [Icon_Folder] = old_Icon_Folder, 45 [Icon_Folder] = old_Icon_Folder,
@@ -52,8 +51,8 @@ static const long icons[Icon_Last_Themeable] = {
52 [Icon_Config] = old_Icon_Config, 51 [Icon_Config] = old_Icon_Config,
53 [Icon_Plugin] = old_Icon_Plugin, 52 [Icon_Plugin] = old_Icon_Plugin,
54 [Icon_Bookmark] = old_Icon_Bookmark, 53 [Icon_Bookmark] = old_Icon_Bookmark,
55 [Icon_Queued] = 'Q', 54 [Icon_Queued] = old_Icon_Queued,
56 [Icon_Moving] = 'M', 55 [Icon_Moving] = old_Icon_Moving,
57 56
58 /* 57 /*
59 [Icon_Keyboard] = , 58 [Icon_Keyboard] = ,
@@ -83,10 +82,10 @@ static const long icons[Icon_Last_Themeable] = {
83extern void screen_put_iconxy(struct screen * screen, 82extern void screen_put_iconxy(struct screen * screen,
84 int x, int y, enum themable_icons icon) 83 int x, int y, enum themable_icons icon)
85{ 84{
86 if (icon == -1) 85 if (icon == Icon_NOICON)
87 screen->putc(x, y, icon_unknown);
88 else if ((icon==Icon_NOICON) && (icons[icon]!=0))
89 screen->putc(x, y, ' '); 86 screen->putc(x, y, ' ');
87 else if (icon >= Icon_Last_Themeable)
88 screen->putc(x, y, old_Icon_Unknown);
90 else 89 else
91 screen->putc(x, y, icons[icon]); 90 screen->putc(x, y, icons[icon]);
92} 91}