[gtk+/gtk-2-24] Look for rc files in system config dirs as well
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Look for rc files in system config dirs as well
- Date: Thu, 4 Jul 2013 13:35:46 +0000 (UTC)
commit 602b44020adbae882b5d7df378081969cf639692
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 4 09:05:07 2013 -0400
Look for rc files in system config dirs as well
This will allow us to ship package defaults in /usr instead
of /etc.
gtk/gtkrc.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index 82a6470..69b3cfe 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -522,8 +522,18 @@ gtk_rc_add_initial_default_files (void)
else
{
const gchar *home;
- str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtkrc", NULL);
+ const gchar * const *config_dirs;
+ const gchar *config_dir;
+ config_dirs = g_get_system_config_dirs ();
+ for (config_dir = *config_dirs; *config_dirs != NULL; config_dirs++)
+ {
+ str = g_build_filename (config_dir, "gtk-2.0", "gtkrc", NULL);
+ gtk_rc_add_default_file (str);
+ g_free (str);
+ }
+
+ str = g_build_filename (GTK_SYSCONFDIR, "gtk-2.0", "gtkrc", NULL);
gtk_rc_add_default_file (str);
g_free (str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]