diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/filetypes.c | 14 | ||||
-rw-r--r-- | apps/gui/icon.c | 11 | ||||
-rw-r--r-- | apps/settings.h | 1 |
3 files changed, 14 insertions, 12 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 0daae1b617..69448a7946 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -145,10 +145,7 @@ void read_viewer_theme_file(void) | |||
145 | custom_filetype_icons[0] = Icon_Folder; | 145 | custom_filetype_icons[0] = Icon_Folder; |
146 | for (i=1; i<filetype_count; i++) | 146 | for (i=1; i<filetype_count; i++) |
147 | { | 147 | { |
148 | if (filetypes[i].icon < Icon_Last_Themeable) | 148 | custom_filetype_icons[i] = filetypes[i].icon; |
149 | custom_filetype_icons[i] = filetypes[i].icon; | ||
150 | else | ||
151 | custom_filetype_icons[i] = Icon_Questionmark; | ||
152 | } | 149 | } |
153 | 150 | ||
154 | snprintf(buffer, MAX_PATH, "%s/%s.icons", ICON_DIR, | 151 | snprintf(buffer, MAX_PATH, "%s/%s.icons", ICON_DIR, |
@@ -181,6 +178,7 @@ void read_viewer_theme_file(void) | |||
181 | 178 | ||
182 | void filetype_init(void) | 179 | void filetype_init(void) |
183 | { | 180 | { |
181 | int i; | ||
184 | /* set the directory item first */ | 182 | /* set the directory item first */ |
185 | filetypes[0].extension = NULL; | 183 | filetypes[0].extension = NULL; |
186 | filetypes[0].plugin = NULL; | 184 | filetypes[0].plugin = NULL; |
@@ -193,6 +191,14 @@ void filetype_init(void) | |||
193 | #ifdef HAVE_LCD_BITMAP | 191 | #ifdef HAVE_LCD_BITMAP |
194 | read_viewer_theme_file(); | 192 | read_viewer_theme_file(); |
195 | #endif | 193 | #endif |
194 | /* figure out how many viewer icons have been loaded */ | ||
195 | global_status.viewer_icon_count = Icon_Last_Themeable; | ||
196 | for (i=1; i<filetype_count; i++) | ||
197 | { | ||
198 | if (custom_filetype_icons[i] > global_status.viewer_icon_count) | ||
199 | global_status.viewer_icon_count = custom_filetype_icons[i]; | ||
200 | } | ||
201 | global_status.viewer_icon_count -= Icon_Last_Themeable; | ||
196 | } | 202 | } |
197 | 203 | ||
198 | /* remove all white spaces from string */ | 204 | /* remove all white spaces from string */ |
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 37eb1a715f..968d83548f 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c | |||
@@ -129,16 +129,11 @@ void screen_put_iconxy(struct screen * display, | |||
129 | { | 129 | { |
130 | icon -= Icon_Last_Themeable; | 130 | icon -= Icon_Last_Themeable; |
131 | if (!viewer_icons_loaded[screen] || | 131 | if (!viewer_icons_loaded[screen] || |
132 | (global_status.viewer_icon_count*height | ||
133 | > viewer_iconset[screen].height) || | ||
132 | (icon * height > viewer_iconset[screen].height)) | 134 | (icon * height > viewer_iconset[screen].height)) |
133 | { | 135 | { |
134 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) | 136 | screen_put_iconxy(display, xpos, ypos, Icon_Questionmark); |
135 | if (screen == SCREEN_REMOTE) | ||
136 | { | ||
137 | screen_put_iconxy(display, xpos, ypos, Icon_Questionmark); | ||
138 | return; | ||
139 | } | ||
140 | #endif | ||
141 | screen_clear_area(display, xpos, ypos, width, height); | ||
142 | return; | 137 | return; |
143 | } | 138 | } |
144 | data = viewer_iconset[screen].data; | 139 | data = viewer_iconset[screen].data; |
diff --git a/apps/settings.h b/apps/settings.h index 1fee6b4838..0a82051498 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -300,6 +300,7 @@ struct system_status | |||
300 | relative to MIN_FREQ */ | 300 | relative to MIN_FREQ */ |
301 | #endif | 301 | #endif |
302 | char last_screen; | 302 | char last_screen; |
303 | int viewer_icon_count; | ||
303 | }; | 304 | }; |
304 | 305 | ||
305 | struct user_settings | 306 | struct user_settings |