Project/AddFileDialog.py

changeset 945
8cd4d08fa9f6
parent 882
34b86be88bf0
child 1112
8a7d1b9d18db
--- a/Project/AddFileDialog.py	Fri Mar 11 08:55:14 2011 +0100
+++ b/Project/AddFileDialog.py	Fri Mar 11 16:51:57 2011 +0100
@@ -19,12 +19,13 @@
 
 import Utilities
 
+
 class AddFileDialog(QDialog, Ui_AddFileDialog):
     """
     Class implementing a dialog to add a file to the project.
     """
-    def __init__(self, pro, parent = None, filter = None, name = None,
-                 startdir = None):
+    def __init__(self, pro, parent=None, filter=None, name=None,
+                 startdir=None):
         """
         Constructor
         
@@ -45,7 +46,7 @@
         self.filter = filter
         self.ppath = pro.ppath
         self.startdir = startdir
-        self.filetypes = pro.pdata["FILETYPES"] # save a reference to the filetypes dict
+        self.filetypes = pro.pdata["FILETYPES"]  # save a reference to the filetypes dict
         
         if self.filter is not None and self.filter != 'source':
             self.sourcecodeCheckBox.hide()
@@ -79,11 +80,11 @@
                 dir = self.targetDirEdit.text()
         if self.filter is None:
             patterns = {
-                "SOURCES"      : [], 
-                "FORMS"        : [], 
-                "RESOURCES"    : [], 
-                "INTERFACES"   : [], 
-                "TRANSLATIONS" : [], 
+                "SOURCES": [],
+                "FORMS": [],
+                "RESOURCES": [],
+                "INTERFACES": [],
+                "TRANSLATIONS": [],
             }
             for pattern, filetype in list(self.filetypes.items()):
                 if filetype in patterns:
@@ -95,10 +96,10 @@
                 "Interface Files ({3});;"
                 "Translation Files ({4});;"
                 "All Files (*)").format(
-                    " ".join(patterns["SOURCES"]), 
-                    " ".join(patterns["FORMS"]), 
-                    " ".join(patterns["RESOURCES"]), 
-                    " ".join(patterns["INTERFACES"]), 
+                    " ".join(patterns["SOURCES"]),
+                    " ".join(patterns["FORMS"]),
+                    " ".join(patterns["RESOURCES"]),
+                    " ".join(patterns["INTERFACES"]),
                     " ".join(patterns["TRANSLATIONS"]))
             caption = self.trUtf8("Select Files")
         elif self.filter == 'form':
@@ -177,9 +178,9 @@
         """
         Public slot to retrieve the dialogs data.
         
-        @return tuple of three values (list of string, string, boolean) giving the 
+        @return tuple of three values (list of string, string, boolean) giving the
             source files, the target directory and a flag telling, whether
             the files shall be added as source code
         """
-        return (self.sourceFileEdit.text().split(os.pathsep), 
+        return (self.sourceFileEdit.text().split(os.pathsep),
             self.targetDirEdit.text(), self.sourcecodeCheckBox.isChecked())

eric ide

mercurial