Project/Project.py

branch
5_1_x
changeset 1238
5e9e288d04de
parent 1174
53ae8212ccdb
child 1493
876e068d632d
--- a/Project/Project.py	Fri Aug 26 19:38:42 2011 +0200
+++ b/Project/Project.py	Sat Aug 27 11:50:54 2011 +0200
@@ -192,10 +192,10 @@
         self.ui = parent
         
         self.sourceExtensions = {
-            "Python2"  : Preferences.getPython("PythonExtensions"),
+            "Python2" : Preferences.getPython("PythonExtensions"),
             "Python3" : Preferences.getPython("Python3Extensions"),
             "Ruby"    : ['.rb'],
-            "Mixed"   : ['.py', '.ptl', '.rb']
+            "Mixed"   : Preferences.getPython("Python3Extensions") + ['.rb'],
         }
         
         self.dbgFilters = {
@@ -2679,7 +2679,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