On Mon, Jan 5, 2009 at 10:40 AM, Edward Hervey <bilboed@gmail.com> wrote:

 A little thing to take into account : PiTiVi is *NOT* a GNOME-specific
application ! The basic logic is the following : Detect at run-time
whether we're running in a specific environment (GNOME, KDE, Pure X11,
MacosX, win, ...) and enable those environment-specific code paths.
That's why bugs that people encounter on non-GNOME systems are very
important to us.

Ok this sounds nice. I had the "feeling" that Pitivi needed Gnome libs until I noticed that I didn't have any installed myself.
Also I've been asked to fix this -> http://bugzilla.gnome.org/show_bug.cgi?id=335547
Anyway, about the pitivirc file this patch shows what I mean and it's very easy to implement with ConfigParser (only touched one file):

diff -ur pitivi.orig/pitivi/settings.py pitivi/pitivi/settings.py
--- pitivi.orig/pitivi/settings.py    2009-01-05 08:22:52.000000000 +0100
+++ pitivi/pitivi/settings.py    2009-01-05 09:52:22.000000000 +0100
@@ -26,12 +26,34 @@
 
 import os
 import gst
+import ConfigParser
 
 from serializable import Serializable
 from signalinterface import Signallable
 
 from gettext import gettext as _
 
+####################################################
+# START TODO: Move this code to a better place!
+####################################################
+# We probably should be checking $XDG_CONFIG_HOME here.
+pitivi_path = os.path.expanduser("~/.config/pitivi")
+    if not os.path.exists(pitivi_path):
+        os.mkdir(pitivi_path)
+pitivirc = """# Main Pitivi config file
+[config]
+use_gnome: false
+window_width: 800
+window_height: 600
+use_hal: false
+use_dbus: false
+"""
+_file = open(pitivi_path + "/pitivirc", "w")
+_file.write(pitivirc).close()
+####################################################
+# End TODO
+####################################################
+
 def get_bool_env(name):
     """
     Checks the given env variable name and returns a boolean answer.
@@ -74,7 +96,9 @@
 
     def _readSettingsFromConfigurationFile(self):
         # This reads the configuration from the user configuration file
-        pass
+        config = ConfigParser.SafeConfigParser()
+        config.read([pitivi_path + "/pitivirc"])
+       
 
     def _readSettingsFromEnvironmentVariables(self):
         # reads some settings from environment variable
@@ -91,11 +115,11 @@
         @return: the plugin repository path
         """
 
-        pitivi_path = os.path.expanduser("~/.pitivi")
+        pitivi_path = os.path.expanduser("~/.config/pitivi")
         if not os.path.exists(pitivi_path) and autocreate:
             os.mkdir(pitivi_path)
 
-        repository_path = os.path.expanduser("~/.pitivi/plugins")
+        repository_path = os.path.expanduser("~/.config/pitivi/plugins")
         if not os.path.exists(repository_path) and autocreate:
             os.mkdir(repository_path)
 
@@ -109,11 +133,11 @@
         @return: the plugin settings path
         """
 
-        pitivi_path = os.path.expanduser("~/.pitivi")
+        pitivi_path = os.path.expanduser("~/.config/pitivi")
         if not os.path.exists(pitivi_path) and autocreate:
             os.mkdir(pitivi_path)
 
-        repository_path = os.path.expanduser("~/.pitivi/plugins-settings")
+        repository_path = os.path.expanduser("~/.config/pitivi/plugins-settings")
         if not os.path.exists(repository_path) and autocreate:
             os.mkdir(repository_path)
 


The trick is to pass the config around to those classes that needs it but it should be fixed in not so many hours. Heck even a method already existed that says it reads user I don't think it's much more than around five files that needs it. If we want it and noone else doesn't have the time to implement it I can do it, though I will need some input from the core devs so I don't put anything at the wrong place. :D

Greets Jens