54 self.submoduleUrlCombo.setEditText("") |
54 self.submoduleUrlCombo.setEditText("") |
55 |
55 |
56 self.submoduleUrlDirCompleter = E5DirCompleter(self.submoduleUrlCombo) |
56 self.submoduleUrlDirCompleter = E5DirCompleter(self.submoduleUrlCombo) |
57 self.submoduleDirCompleter = E5DirCompleter(self.submoduleDirEdit) |
57 self.submoduleDirCompleter = E5DirCompleter(self.submoduleDirEdit) |
58 |
58 |
59 ipath = Preferences.getMultiProject("Workspace") or \ |
59 ipath = ( |
|
60 Preferences.getMultiProject("Workspace") or |
60 Utilities.getHomeDir() |
61 Utilities.getHomeDir() |
|
62 ) |
61 self.__initPaths = [ |
63 self.__initPaths = [ |
62 Utilities.fromNativeSeparators(ipath), |
64 Utilities.fromNativeSeparators(ipath), |
63 Utilities.fromNativeSeparators(ipath) + "/", |
65 Utilities.fromNativeSeparators(ipath) + "/", |
64 ] |
66 ] |
65 |
67 |
187 belong to the project |
189 belong to the project |
188 @rtype str |
190 @rtype str |
189 """ |
191 """ |
190 if path == self.__repodir: |
192 if path == self.__repodir: |
191 return "" |
193 return "" |
192 elif Utilities.normcasepath(Utilities.toNativeSeparators(path))\ |
194 elif ( |
|
195 Utilities.normcasepath(Utilities.toNativeSeparators(path)) |
193 .startswith(Utilities.normcasepath( |
196 .startswith(Utilities.normcasepath( |
194 Utilities.toNativeSeparators(self.__repodir + "/"))): |
197 Utilities.toNativeSeparators(self.__repodir + "/"))) |
|
198 ): |
195 relpath = path[len(self.__repodir):] |
199 relpath = path[len(self.__repodir):] |
196 if relpath.startswith(("/", "\\")): |
200 if relpath.startswith(("/", "\\")): |
197 relpath = relpath[1:] |
201 relpath = relpath[1:] |
198 return relpath |
202 return relpath |
199 else: |
203 else: |