gnome-desktop r5085 - trunk/libgnome-desktop
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5085 - trunk/libgnome-desktop
- Date: Wed, 14 May 2008 23:26:11 +0100 (BST)
Author: mccann
Date: Wed May 14 22:26:11 2008
New Revision: 5085
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5085&view=rev
Log:
2008-05-14 William Jon McCann <jmccann redhat com>
* gnome-bg.c (gnome_bg_load_from_preferences): Falls back to the
default image if the user's background doesn't exist. Prevents
a white screen on OS upgrade.
Patch by Ray Strode <rstrode redhat com>
Modified:
trunk/libgnome-desktop/ChangeLog
trunk/libgnome-desktop/gnome-bg.c
Modified: trunk/libgnome-desktop/gnome-bg.c
==============================================================================
--- trunk/libgnome-desktop/gnome-bg.c (original)
+++ trunk/libgnome-desktop/gnome-bg.c Wed May 14 22:26:11 2008
@@ -263,6 +263,22 @@
} else {
uri = g_filename_from_utf8 (tmp, -1, NULL, NULL, NULL);
}
+
+ /* Fall back to default background if filename was set
+ but no longer exists */
+ if (!g_file_test (uri, G_FILE_TEST_EXISTS)) {
+ GConfValue *default_value;
+
+ g_free (uri);
+ uri = NULL;
+
+ default_value = gconf_client_get_default_from_schema (client,
+ BG_KEY_PICTURE_FILENAME, NULL);
+ if (default_value != NULL) {
+ uri = g_strdup (gconf_value_get_string (default_value));
+ gconf_value_free (default_value);
+ }
+ }
}
g_free (tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]