pitivi r1328 - in trunk: . bin



Author: edwardrv
Date: Thu Oct 16 14:20:42 2008
New Revision: 1328
URL: http://svn.gnome.org/viewvc/pitivi?rev=1328&view=rev

Log:
	* bin/pitivi.in:
	Cleanups
bin/pitivi : cleanups

Modified:
   trunk/ChangeLog
   trunk/bin/pitivi.in

Modified: trunk/bin/pitivi.in
==============================================================================
--- trunk/bin/pitivi.in	(original)
+++ trunk/bin/pitivi.in	Thu Oct 16 14:20:42 2008
@@ -36,13 +36,22 @@
 # Add the path of pitivi stuff
 # TODO : change it when it's finally in cvs
 
+def _get_root_dir():
+    return '/'.join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1])
+
+def _in_devel():
+    rd = _get_root_dir()
+    return (os.path.exists(os.path.join(rd, '.svn')) or
+            os.path.exists(os.path.join(rd, 'CVS')) or
+            os.path.exists(os.path.join(rd, '.git')))
+
 def _add_pitivi_path():
     global localedir
     dir = os.path.dirname(os.path.abspath(__file__))
-    if (os.path.exists(os.path.join(dir, 'CVS')) or
-        os.path.exists(os.path.join(dir, '.svn'))):
+    root = None
+    if _in_devel():
         root = os.path.split(dir)[0]
-        localedir = os.path.join(root, 'locale')
+        localedir = os.path.join(os.path.split(dir)[0], 'locale')
     else:
         root = os.path.join(LIBDIR, 'pitivi', 'python')
         localedir = "@DATADIR@/locale"
@@ -89,11 +98,11 @@
         raise SystemExit("Can't find glade module")
 
     glade.bindtextdomain('pitivi', localedir)
-    
+
     try:
         import pygst
         pygst.require('0.10')
-        
+
         import gst
     except ImportError:
         raise SystemExit("Gst-Python couldn't be found!")



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