[gromit] Try to load configuration from ~/.config/gromit/gromitrc
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gromit] Try to load configuration from ~/.config/gromit/gromitrc
- Date: Thu, 28 Jun 2012 13:32:38 +0000 (UTC)
commit 12135943b06be097d3875e1fa73feea598822a18
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jun 28 14:31:48 2012 +0100
Try to load configuration from ~/.config/gromit/gromitrc
By default.
gromit.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gromit.c b/gromit.c
index f840cf5..67406e2 100644
--- a/gromit.c
+++ b/gromit.c
@@ -1048,9 +1048,16 @@ parse_config (GromitData *data)
GdkColor *fg_color=NULL;
guint width, arrowsize;
- filename = g_strjoin (G_DIR_SEPARATOR_S,
- g_get_home_dir(), ".gromitrc", NULL);
+ filename = g_build_filename (g_get_user_config_dir (),
+ "gromit", "gromitrc", NULL);
file = open (filename, O_RDONLY);
+ if (file < 0)
+ {
+ g_free (filename);
+ filename = g_strjoin (G_DIR_SEPARATOR_S,
+ g_get_home_dir(), ".gromitrc", NULL);
+ file = open (filename, O_RDONLY);
+ }
if (file < 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]