[gnome-control-center] background: Don't show errors when loading default bg
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Don't show errors when loading default bg
- Date: Tue, 29 Mar 2011 15:39:58 +0000 (UTC)
commit d361022907b771be062f7ce7e0167372f0f99252
Author: Bastien Nocera <hadess hadess net>
Date: Tue Mar 29 11:09:14 2011 +0100
background: Don't show errors when loading default bg
Check whether the file exists so we don't get warnings
when loading the default wallpaper on startup.
https://bugzilla.gnome.org/show_bug.cgi?id=646056
panels/background/cc-background-xml.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/background/cc-background-xml.c b/panels/background/cc-background-xml.c
index 4aa0ab9..9f7a74b 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -485,6 +485,9 @@ cc_background_xml_load_xml (CcBackgroundXml *xml,
{
g_return_val_if_fail (CC_IS_BACKGROUND_XML (xml), FALSE);
+ if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) == FALSE)
+ return NULL;
+
return cc_background_xml_load_xml_internal (xml, filename, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]