158 It is assumed, that the user wants to add a bunch of files to |
158 It is assumed, that the user wants to add a bunch of files to |
159 the project in place. |
159 the project in place. |
160 |
160 |
161 @param sfile the text of the source file picker (string) |
161 @param sfile the text of the source file picker (string) |
162 """ |
162 """ |
163 sfile = self.sourceFilesPicker.firstPath() |
163 sfile = str(self.sourceFilesPicker.firstPath()) |
164 if sfile.startswith(self.ppath): |
164 if sfile.startswith(self.ppath): |
165 if os.path.isdir(sfile): |
165 if os.path.isdir(sfile): |
166 directory = sfile |
166 directory = sfile |
167 else: |
167 else: |
168 directory = os.path.dirname(sfile) |
168 directory = os.path.dirname(sfile) |
175 @return tuple of three values (list of string, string, boolean) |
175 @return tuple of three values (list of string, string, boolean) |
176 giving the source files, the target directory and a flag |
176 giving the source files, the target directory and a flag |
177 telling, whether the files shall be added as source code |
177 telling, whether the files shall be added as source code |
178 """ |
178 """ |
179 return ( |
179 return ( |
180 self.sourceFilesPicker.paths(), |
180 [str(p) for p in self.sourceFilesPicker.paths()], |
181 self.targetDirPicker.text(), |
181 self.targetDirPicker.text(), |
182 self.sourcecodeCheckBox.isChecked(), |
182 self.sourcecodeCheckBox.isChecked(), |
183 ) |
183 ) |