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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Aug 2011 11:50:54 +0200
branch
5_1_x
changeset 1238
5e9e288d04de
parent 1236
7a58aba00647
child 1270
e1a56c0c0b60

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

Project/Project.py file | annotate | diff | comparison | revisions
diff -r 7a58aba00647 -r 5e9e288d04de Project/Project.py
--- 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