This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit 8878d862fd924b999a4815ebae3e46a6f8dc93b2
Author: Kim Woelders <[email protected]>
AuthorDate: Fri May 13 15:35:10 2022 +0200
background: Discard broken backgrounds when opening configuration dialog
---
src/backgrounds.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/backgrounds.c b/src/backgrounds.c
index ad881a51..a426e6c7 100644
--- a/src/backgrounds.c
+++ b/src/backgrounds.c
@@ -1408,6 +1408,22 @@ typedef struct {
static void BG_RedrawView(Dialog * d);
static void BGSettingsGoTo(Dialog * d, Background * bg);
+static void
+_BackgroundsClean(void)
+{
+ Background *bg, *tmp;
+
+ LIST_FOR_EACH_SAFE(Background, &bg_list, bg, tmp)
+ {
+ /* Get full path to files */
+ _BackgroundGetBgFile(bg);
+
+ /* Discard if bg file is given but cannot be found (ignore bad fg) */
+ if (bg->bg.file && !exists(bg->bg.file))
+ BackgroundDestroy(bg);
+ }
+}
+
static void
_DlgApplyBG(Dialog * d, int val __UNUSED__, void *data __UNUSED__)
{
@@ -1951,6 +1967,7 @@ _DlgFillBackground(Dialog * d, DItem * table, void *data)
if (!Conf.backgrounds.no_scan)
ScanBackgroundMenu();
+ _BackgroundsClean();
if (!bg)
bg = DeskBackgroundGet(DesksGetCurrent());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.