82 Private slot to handle the path selection via a directory selection |
82 Private slot to handle the path selection via a directory selection |
83 dialog. |
83 dialog. |
84 """ |
84 """ |
85 path = E5FileDialog.getExistingDirectory( |
85 path = E5FileDialog.getExistingDirectory( |
86 self, |
86 self, |
87 self.trUtf8("Add Sub-repository"), |
87 self.tr("Add Sub-repository"), |
88 os.path.join(self.__projectPath, self.pathEdit.text()), |
88 os.path.join(self.__projectPath, self.pathEdit.text()), |
89 E5FileDialog.Options(E5FileDialog.Option(0))) |
89 E5FileDialog.Options(E5FileDialog.Option(0))) |
90 |
90 |
91 if path: |
91 if path: |
92 path = Utilities.toNativeSeparators(path) |
92 path = Utilities.toNativeSeparators(path) |
94 path = path.replace(self.__projectPath, "")[1:] |
94 path = path.replace(self.__projectPath, "")[1:] |
95 self.pathEdit.setText(path) |
95 self.pathEdit.setText(path) |
96 else: |
96 else: |
97 E5MessageBox.critical( |
97 E5MessageBox.critical( |
98 self, |
98 self, |
99 self.trUtf8("Add Sub-repository"), |
99 self.tr("Add Sub-repository"), |
100 self.trUtf8("""The sub-repository path must be inside""" |
100 self.tr("""The sub-repository path must be inside""" |
101 """ the project.""")) |
101 """ the project.""")) |
102 return |
102 return |
103 |
103 |
104 def getData(self): |
104 def getData(self): |
105 """ |
105 """ |
106 Public method to get the data. |
106 Public method to get the data. |