summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/icon.c55
-rw-r--r--apps/menus/theme_menu.c21
-rw-r--r--apps/shortcuts.c3
3 files changed, 51 insertions, 28 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index a9075b1b0f..e1f4ec31a6 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -236,36 +236,39 @@ void icons_init(void)
236 } 236 }
237 } 237 }
238 238
239 load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN); 239 if (global_settings.show_icons)
240
241 if (global_settings.viewers_icon_file[0] &&
242 global_settings.viewers_icon_file[0] != '-')
243 {
244 load_icons(global_settings.viewers_icon_file,
245 Iconset_viewers, SCREEN_MAIN);
246 read_viewer_theme_file();
247 }
248 else
249 { 240 {
250 load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN); 241 load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN);
251 } 242
243 if (global_settings.viewers_icon_file[0] &&
244 global_settings.viewers_icon_file[0] != '-')
245 {
246 load_icons(global_settings.viewers_icon_file,
247 Iconset_viewers, SCREEN_MAIN);
248 read_viewer_theme_file();
249 }
250 else
251 {
252 load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN);
253 }
252 254
253#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) 255#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
254 load_icons(global_settings.remote_icon_file, 256 load_icons(global_settings.remote_icon_file,
255 Iconset_user, SCREEN_REMOTE); 257 Iconset_user, SCREEN_REMOTE);
256 258
257 if (global_settings.remote_viewers_icon_file[0] && 259 if (global_settings.remote_viewers_icon_file[0] &&
258 global_settings.remote_viewers_icon_file[0] != '-') 260 global_settings.remote_viewers_icon_file[0] != '-')
259 { 261 {
260 load_icons(global_settings.remote_viewers_icon_file, 262 load_icons(global_settings.remote_viewers_icon_file,
261 Iconset_viewers, SCREEN_REMOTE); 263 Iconset_viewers, SCREEN_REMOTE);
262 } 264 }
263 else 265 else
264 { 266 {
265 load_icons(DEFAULT_REMOTE_VIEWER_BMP, 267 load_icons(DEFAULT_REMOTE_VIEWER_BMP,
266 Iconset_viewers, SCREEN_REMOTE); 268 Iconset_viewers, SCREEN_REMOTE);
267 } 269 }
268#endif 270#endif
271 }
269} 272}
270 273
271int get_icon_width(enum screen_type screen_type) 274int get_icon_width(enum screen_type screen_type)
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c
index f5af1c7b78..e1077a5efd 100644
--- a/apps/menus/theme_menu.c
+++ b/apps/menus/theme_menu.c
@@ -39,6 +39,7 @@
39#include "viewport.h" 39#include "viewport.h"
40#include "statusbar-skinned.h" 40#include "statusbar-skinned.h"
41#include "skin_engine/skin_engine.h" 41#include "skin_engine/skin_engine.h"
42#include "icons.h"
42 43
43#ifdef HAVE_BACKDROP_IMAGE 44#ifdef HAVE_BACKDROP_IMAGE
44/** 45/**
@@ -356,7 +357,25 @@ MENUITEM_FUNCTION(browse_rfms, MENU_FUNC_USEPARAM,
356#endif 357#endif
357#endif 358#endif
358 359
359MENUITEM_SETTING(show_icons, &global_settings.show_icons, NULL); 360
361static int showicons_callback(int action, const struct menu_item_ex *this_item)
362{
363 (void)this_item;
364 static bool old_icons;
365 switch (action)
366 {
367 case ACTION_ENTER_MENUITEM:
368 old_icons = global_settings.show_icons;
369 break;
370 case ACTION_EXIT_MENUITEM:
371 if (old_icons != global_settings.show_icons)
372 icons_init();
373 break;
374 }
375 return ACTION_REDRAW;
376}
377
378MENUITEM_SETTING(show_icons, &global_settings.show_icons, showicons_callback);
360MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM, 379MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM,
361 ID2P(LANG_CUSTOM_THEME), 380 ID2P(LANG_CUSTOM_THEME),
362 browse_folder, (void*)&themes, NULL, Icon_Config); 381 browse_folder, (void*)&themes, NULL, Icon_Config);
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index 3992068807..8ded75c1f2 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -357,7 +357,8 @@ int do_shortcut_menu(void *ignored)
357 simplelist_info_init(&list, P2STR(ID2P(LANG_SHORTCUTS)), shortcut_count, NULL); 357 simplelist_info_init(&list, P2STR(ID2P(LANG_SHORTCUTS)), shortcut_count, NULL);
358 list.get_name = shortcut_menu_get_name; 358 list.get_name = shortcut_menu_get_name;
359 list.action_callback = shortcut_menu_get_action; 359 list.action_callback = shortcut_menu_get_action;
360 list.get_icon = shortcut_menu_get_icon; 360 if (global_settings.show_icons)
361 list.get_icon = shortcut_menu_get_icon;
361 list.title_icon = Icon_Bookmark; 362 list.title_icon = Icon_Bookmark;
362 363
363 push_current_activity(ACTIVITY_SHORTCUTSMENU); 364 push_current_activity(ACTIVITY_SHORTCUTSMENU);