summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-09-01 02:25:53 +0200
committerraveit65 <[email protected]>2017-09-04 09:19:05 +0200
commit343bcfe83b307e9fa5365c9337f62263d021046d (patch)
treebbcaeacb6364b7c1a531ece12110e7859a6f2918
parent1a8648b9fe64c194d39360fa05fc106ee210a554 (diff)
downloadcaja-343bcfe83b307e9fa5365c9337f62263d021046d.tar.bz2
caja-343bcfe83b307e9fa5365c9337f62263d021046d.tar.xz
Fix: high cpu while loading background image
Fixes #606
-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 76f47a69..841997da 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -1033,6 +1033,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);