[pitivi] pitivi.ui: Handle Win32 glade locations



commit c578bce41a9d23ca61050a8311c8301c5e5b53a1
Author: Edward Hervey <bilboed bilboed com>
Date:   Tue Apr 27 22:20:30 2010 +0200

    pitivi.ui: Handle Win32 glade locations

 pitivi/ui/glade.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/glade.py b/pitivi/ui/glade.py
index f3b5699..644fdfe 100644
--- a/pitivi/ui/glade.py
+++ b/pitivi/ui/glade.py
@@ -85,7 +85,11 @@ class GladeWidget(gtk.VBox):
         gtk.VBox.__init__(self)
         try:
             assert self.glade_file
-            filepath = os.path.join(self.glade_dir, self.glade_file)
+            if 'pitivi.exe' in __file__.lower():
+                from pitivi.configure import WIN32_LIBDIR
+                filepath = os.path.join(self.glade_dir, WIN32_LIBDIR + self.glade_file)
+            else:
+                filepath = os.path.join(self.glade_dir, self.glade_file)
             if self.glade_typedict:
                 wtree = XML(filepath, typedict=self.glade_typedict, domain='pitivi')
             else:
@@ -141,7 +145,11 @@ class GladeWindow(object):
     def __init__(self, parent=None):
         try:
             assert self.glade_file
-            filepath = os.path.join(self.glade_dir, self.glade_file)
+            if 'pitivi.exe' in __file__.lower():
+                from pitivi.configure import WIN32_LIBDIR
+                filepath = os.path.join(self.glade_dir, WIN32_LIBDIR + self.glade_file)
+            else:
+                filepath = os.path.join(self.glade_dir, self.glade_file)
             if self.glade_typedict:
                 wtree = XML(filepath, typedict=self.glade_typedict, domain='pitivi')
             else:



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