[gnome-control-center] background: Avoid warning when XML file doesn't exist
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Avoid warning when XML file doesn't exist
- Date: Mon, 14 Feb 2011 14:29:21 +0000 (UTC)
commit bad4e389efab7a9654fef5a77d5bb5c7892d3140
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 14 14:28:46 2011 +0000
background: Avoid warning when XML file doesn't exist
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 9e5b847..84ee0df 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -475,6 +475,9 @@ cc_background_xml_get_item (const char *filename)
CcBackgroundXml *xml;
CcBackgroundItem *item;
+ if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) == FALSE)
+ return NULL;
+
xml = cc_background_xml_new ();
item = NULL;
g_signal_connect (G_OBJECT (xml), "added",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]