From 953fcef05e5868ca9f66351c6152a3c3c1274107 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Fri, 15 Nov 2024 03:14:19 +0100 Subject: [PATCH] gui: Fix unsuccesful attempt at loading default viewer iconset The default viewer icons file seems to have been removed in the rewrite of buildzip.pl (see commit 66b6fdb). So, this only worked accidentally, once some theme put a viewers.bmp file in the icons folder, potentially leading to confusing behavior. Deactivating viewer icons (instead of reverting to some default file) when they are set to "-" is probably expected behavior at this point. Change-Id: I5010764676c67592bf20abfb3d0780edb1d555d4 --- apps/gui/icon.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 7a59a72151..50fa0034ab 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -39,10 +39,6 @@ #include "bitmaps/remote_default_icons.h" #endif -/* These are just the file names, the full path is snprint'ed when used */ -#define DEFAULT_VIEWER_BMP "viewers" -#define DEFAULT_REMOTE_VIEWER_BMP "remote_viewers" - /* We dont actually do anything with these pointers, but they need to be grouped like this to save code so storing them as void* is ok. (stops compile warning) */ @@ -211,12 +207,8 @@ void icons_init(void) { load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN); - if (global_settings.viewers_icon_file[0] == '-' || - global_settings.viewers_icon_file[0] == '\0') - { - load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN); - } - else + if (global_settings.viewers_icon_file[0] != '-' && + global_settings.viewers_icon_file[0] != '\0') { load_icons(global_settings.viewers_icon_file, Iconset_viewers, SCREEN_MAIN); @@ -226,13 +218,8 @@ void icons_init(void) load_icons(global_settings.remote_icon_file, Iconset_user, SCREEN_REMOTE); - if (global_settings.remote_viewers_icon_file[0] == '-' || - global_settings.remote_viewers_icon_file[0] == '\0') - { - load_icons(DEFAULT_REMOTE_VIEWER_BMP, - Iconset_viewers, SCREEN_REMOTE); - } - else + if (global_settings.remote_viewers_icon_file[0] != '-' && + global_settings.remote_viewers_icon_file[0] != '\0') { load_icons(global_settings.remote_viewers_icon_file, Iconset_viewers, SCREEN_REMOTE);