summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-09-01 02:25:53 +0200
committerZenWalker <[email protected]>2017-09-01 02:25:53 +0200
commitb9cf3667fa5563d52bffb9e3618aa41c7c908aa6 (patch)
tree2aba01434bb8b72456f15e3f73ef4d27605bef77 /eel
parent1b6b16df34de6114e2cdd62b66d0c6e75c42a3e1 (diff)
downloadcaja-b9cf3667fa5563d52bffb9e3618aa41c7c908aa6.tar.bz2
caja-b9cf3667fa5563d52bffb9e3618aa41c7c908aa6.tar.xz
Fix: high cpu while loading background image
Fixes #606
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-background.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index a3392c2b..53e0a652 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -1062,6 +1062,14 @@ void
eel_bg_load_from_gsettings (EelBackground *self,
GSettings *settings)
{
+ char *keyfile = g_settings_get_string (settings, MATE_BG_KEY_PICTURE_FILENAME);
+
+ if (!g_file_test (keyfile, G_FILE_TEST_EXISTS) && (*keyfile != '\0'))
+ {
+ *keyfile = '\0';
+ g_settings_set_string (settings, MATE_BG_KEY_PICTURE_FILENAME, keyfile);
+ }
+
if (self->details->bg)
mate_bg_load_from_gsettings (self->details->bg,
settings);