62 ] |
62 ] |
63 self.vcsProjectDirPicker.setText(self.__initPaths[0]) |
63 self.vcsProjectDirPicker.setText(self.__initPaths[0]) |
64 |
64 |
65 self.resize(self.width(), self.minimumSizeHint().height()) |
65 self.resize(self.width(), self.minimumSizeHint().height()) |
66 |
66 |
67 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
67 self.buttonBox.button( |
|
68 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
68 |
69 |
69 msh = self.minimumSizeHint() |
70 msh = self.minimumSizeHint() |
70 self.resize(max(self.width(), msh.width()), msh.height()) |
71 self.resize(max(self.width(), msh.width()), msh.height()) |
71 |
72 |
72 @pyqtSlot(str) |
73 @pyqtSlot(str) |
74 """ |
75 """ |
75 Private slot to handle a change of the project directory. |
76 Private slot to handle a change of the project directory. |
76 |
77 |
77 @param txt name of the project directory (string) |
78 @param txt name of the project directory (string) |
78 """ |
79 """ |
79 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( |
80 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
80 bool(txt) and |
81 bool(txt) and |
81 Utilities.fromNativeSeparators(txt) not in self.__initPaths) |
82 Utilities.fromNativeSeparators(txt) not in self.__initPaths) |
82 |
83 |
83 def on_vcsUrlPicker_pickerButtonClicked(self): |
84 def on_vcsUrlPicker_pickerButtonClicked(self): |
84 """ |
85 """ |
86 """ |
87 """ |
87 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
88 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
88 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) |
89 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) |
89 dlg.start( |
90 dlg.start( |
90 self.protocolCombo.currentText() + self.vcsUrlPicker.text()) |
91 self.protocolCombo.currentText() + self.vcsUrlPicker.text()) |
91 if dlg.exec() == QDialog.Accepted: |
92 if dlg.exec() == QDialog.DialogCode.Accepted: |
92 url = dlg.getSelectedUrl() |
93 url = dlg.getSelectedUrl() |
93 if url: |
94 if url: |
94 protocol = url.split("://")[0] |
95 protocol = url.split("://")[0] |
95 path = url.split("://")[1] |
96 path = url.split("://")[1] |
96 self.protocolCombo.setCurrentIndex( |
97 self.protocolCombo.setCurrentIndex( |
135 Private slot to handle changes of the URL. |
136 Private slot to handle changes of the URL. |
136 |
137 |
137 @param txt current text of the line edit (string) |
138 @param txt current text of the line edit (string) |
138 """ |
139 """ |
139 enable = "://" not in txt |
140 enable = "://" not in txt |
140 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
141 self.buttonBox.button( |
|
142 QDialogButtonBox.StandardButton.Ok).setEnabled(enable) |
141 |
143 |
142 def getData(self): |
144 def getData(self): |
143 """ |
145 """ |
144 Public slot to retrieve the data entered into the dialog. |
146 Public slot to retrieve the data entered into the dialog. |
145 |
147 |