[dia/dia-0-97: 1/2] Bug #581531 - Use diagtkrc from the config dir



commit 511446e637d4fe03838b66f8ff301a793b891a84
Author: Hans Breuer <hans breuer org>
Date:   Sat May 23 10:31:10 2009 +0200

    Bug #581531 - Use diagtkrc from the config dir
    
    Use diagtkrc from the config dir instead of current dir.
    Patch from Vincent Untz with small modification to not use
    dia_config_filename() without protoype.
---
 lib/dialib.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/dialib.c b/lib/dialib.c
index 5279e22..e4aa586 100644
--- a/lib/dialib.c
+++ b/lib/dialib.c
@@ -32,6 +32,7 @@
 #include "dia_image.h"
 #include "color.h"
 #include "object.h"
+#include "dia_dirs.h"
 
 static void
 stderr_message_internal(const char *title, enum ShowAgainStyle showAgain,
@@ -104,12 +105,16 @@ libdia_init (guint flags)
   stdprops_init();
 
   if (flags & DIA_INTERACTIVE) {
+    char *diagtkrc;
 
     dia_image_init();
 
     gdk_rgb_init();
 
-    gtk_rc_parse("diagtkrc");
+    diagtkrc = dia_config_filename("diagtkrc");
+    dia_log_message ("Config from %s", diagtkrc);
+    gtk_rc_parse(diagtkrc);
+    g_free(diagtkrc);
 
     color_init();
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]