[transmageddon] Switch utils.py in GTK3 version over to GLib



commit 16f82f7f8263c9302f4de7993016f28f2acc53e7
Author: uraeus <uraeus gnome org>
Date:   Tue Apr 3 11:34:52 2012 +0100

    Switch utils.py in GTK3 version over to GLib

 src/utils.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/utils.py b/src/utils.py
index 416ce12..657063d 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -28,6 +28,7 @@ import gettext
 import logging
 import os
 import sys
+from gi.repository import GLib
 
 _ = gettext.gettext
 
@@ -38,10 +39,12 @@ def get_search_paths():
         @rtype: list
         @return: A list of paths to search in the order they will be searched
     """
+    userconfig=GLib.get_user_config_dir()
     return [
+        userconfig
         os.getcwd(),
         os.path.join(os.getcwd(), ".."),
-        os.path.expanduser(os.path.join("~", ".transmageddon")),
+        os.path.expanduser(os.path.join(userconfig, "transmageddon")),
         os.path.join(sys.prefix, "share", "transmageddon"),
         os.path.join(sys.prefix, "local", "share", "transmageddon"),
     ]



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