Fixed an issue when using the PyQt4 windows installer.

Wed, 26 May 2010 08:37:24 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 26 May 2010 08:37:24 +0200
changeset 284
06d3067f8a63
parent 283
efe6750fb0ec
child 286
652f5159f1c3

Fixed an issue when using the PyQt4 windows installer.

Preferences/__init__.py file | annotate | diff | comparison | revisions
--- a/Preferences/__init__.py	Wed May 26 08:16:15 2010 +0200
+++ b/Preferences/__init__.py	Wed May 26 08:37:24 2010 +0200
@@ -1802,9 +1802,13 @@
     s = prefClass.settings.value("Qt/Qt4TranslationsDir", 
         prefClass.qtDefaults["Qt4TranslationsDir"])
     if s == "":
-        return os.getenv("QT4TRANSLATIONSDIR", "")
-    else:
-        return s
+        s = os.getenv("QT4TRANSLATIONSDIR", "")
+    if s == "" and isWindowsPlatform():
+        from PyQt4 import pyqtconfig
+        transPath = os.path.join(pyqtconfig._pkg_config["pyqt_mod_dir"], "translations")
+        if os.path.exists(transPath):
+            s = transPath
+    return s
     
 def getQt(key, prefClass = Prefs):
     """

eric ide

mercurial