From 59d520af8bbb6ff7702575036be387a9875b440d Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 1 Dec 2010 16:09:29 +0100 Subject: Stop putting files in /tmp Whether the wallpaper or the icons themselves, save them in $XDG_CACHE_DIR, and simplify saving. --- src/gui.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gui.c') diff --git a/src/gui.c b/src/gui.c index f86d677..fcaa34d 100644 --- a/src/gui.c +++ b/src/gui.c @@ -1808,9 +1808,16 @@ static gboolean gui_pages_init_cb(gpointer user_data) /* Load wallpaper if available */ if (osversion >= 0x03020000) { - if (device_sbs_save_wallpaper(sbc, "/tmp/wallpaper.png", &error)) { - gui_set_wallpaper("/tmp/wallpaper.png"); - } + char *path; + path = device_sbs_save_wallpaper(sbc, uuid, &error); + if (path == NULL) { + g_printerr("%s", error->message); + g_error_free(error); + error = NULL; + } else { + gui_set_wallpaper(path); + } + g_free (path); } #endif /* Load icon data */ -- cgit v1.1-32-gdbae