Fixed an issue in Project.py selecting the default file extension.

Sat, 27 Aug 2011 11:50:54 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Aug 2011 11:50:54 +0200
changeset 1239
697757468865
parent 1237
a6b7e93f649c
child 1240
4d5fc346bd3b

Fixed an issue in Project.py selecting the default file extension.
(transplanted from 5e9e288d04def06ee8f0f8b7928ce67aa5e1f4d6)

Project/Project.py file | annotate | diff | comparison | revisions
diff -r a6b7e93f649c -r 697757468865 Project/Project.py
--- a/Project/Project.py	Fri Aug 26 19:38:24 2011 +0200
+++ b/Project/Project.py	Sat Aug 27 11:50:54 2011 +0200
@@ -198,7 +198,7 @@
             "Python2": Preferences.getPython("PythonExtensions"),
             "Python3": Preferences.getPython("Python3Extensions"),
             "Ruby": ['.rb'],
-            "Mixed": ['.py', '.ptl', '.rb']
+            "Mixed": Preferences.getPython("Python3Extensions") + ['.rb'],
         }
         
         self.dbgFilters = {
@@ -2680,7 +2680,12 @@
         @return default extension (including the dot) (string)
         """
         if self.pdata["PROGLANGUAGE"]:
-            return self.sourceExtensions[self.pdata["PROGLANGUAGE"][0]][0]
+            lang = self.pdata["PROGLANGUAGE"][0]
+            if lang == "":
+                lang = "Python3"
+            elif lang == "Python":
+                lang = "Python2"
+            return self.sourceExtensions[lang][0]
         else:
             return ""
         

eric ide

mercurial