summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorGravatar Bastien Nocera2010-12-01 16:09:29 +0100
committerGravatar Nikias Bassen2010-12-01 16:09:29 +0100
commit59d520af8bbb6ff7702575036be387a9875b440d (patch)
tree7aa5a1b59fa2fb099b0b21ef705d01ae2090ce3f /src/gui.c
parent652e1793bc8a499d07299356a5f3f28a125c71b9 (diff)
downloadsbmanager-59d520af8bbb6ff7702575036be387a9875b440d.tar.gz
sbmanager-59d520af8bbb6ff7702575036be387a9875b440d.tar.bz2
Stop putting files in /tmp
Whether the wallpaper or the icons themselves, save them in $XDG_CACHE_DIR, and simplify saving.
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c13
1 files changed, 10 insertions, 3 deletions
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 */