[gnome-control-center] sharing: Fix empty folder list by default
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sharing: Fix empty folder list by default
- Date: Fri, 12 Sep 2014 10:06:27 +0000 (UTC)
commit 658bcc86e6fd40ebeacacd2e308c7269dbb9d7fe
Author: Bastien Nocera <hadess hadess net>
Date: Fri Sep 12 10:33:47 2014 +0200
sharing: Fix empty folder list by default
https://bugzilla.gnome.org/show_bug.cgi?id=736536
panels/sharing/Makefile.am | 1 +
panels/sharing/cc-media-sharing.c | 13 ++++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/panels/sharing/Makefile.am b/panels/sharing/Makefile.am
index 51d1c36..cfbab9a 100644
--- a/panels/sharing/Makefile.am
+++ b/panels/sharing/Makefile.am
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
$(SHARING_PANEL_CFLAGS) \
$(BLUETOOTH_CFLAGS) \
-DLIBEXECDIR=\"$(libexecdir)\" \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
$(NULL)
noinst_LTLIBRARIES = libsharing.la
diff --git a/panels/sharing/cc-media-sharing.c b/panels/sharing/cc-media-sharing.c
index e3c5cf3..8cdf1c3 100644
--- a/panels/sharing/cc-media-sharing.c
+++ b/panels/sharing/cc-media-sharing.c
@@ -35,9 +35,16 @@ cc_media_sharing_open_key_file (void)
path = g_build_filename (g_get_user_config_dir (), "rygel.conf", NULL);
- g_key_file_load_from_file (file, path,
- G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
- NULL);
+ if (!g_key_file_load_from_file (file, path,
+ G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
+ NULL))
+ {
+ g_free (path);
+ path = g_build_filename (SYSCONFDIR, "rygel.conf", NULL);
+ g_key_file_load_from_file (file, path,
+ G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
+ NULL);
+ }
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]