53 def on_vcsUrlButton_clicked(self): |
53 def on_vcsUrlButton_clicked(self): |
54 """ |
54 """ |
55 Private slot to display a selection dialog. |
55 Private slot to display a selection dialog. |
56 """ |
56 """ |
57 if self.protocolCombo.currentText() == "file://": |
57 if self.protocolCombo.currentText() == "file://": |
58 directory = QFileDialog.getExistingDirectory(\ |
58 directory = QFileDialog.getExistingDirectory( |
59 self, |
59 self, |
60 self.trUtf8("Select Repository-Directory"), |
60 self.trUtf8("Select Repository-Directory"), |
61 self.vcsUrlEdit.text(), |
61 self.vcsUrlEdit.text(), |
62 QFileDialog.Options(QFileDialog.ShowDirsOnly)) |
62 QFileDialog.Options(QFileDialog.ShowDirsOnly)) |
63 |
63 |
69 if dlg.exec_() == QDialog.Accepted: |
69 if dlg.exec_() == QDialog.Accepted: |
70 url = dlg.getSelectedUrl() |
70 url = dlg.getSelectedUrl() |
71 if url: |
71 if url: |
72 protocol = url.split("://")[0] |
72 protocol = url.split("://")[0] |
73 path = url.split("://")[1] |
73 path = url.split("://")[1] |
74 self.protocolCombo.setCurrentIndex(\ |
74 self.protocolCombo.setCurrentIndex( |
75 self.protocolCombo.findText(protocol + "://")) |
75 self.protocolCombo.findText(protocol + "://")) |
76 self.vcsUrlEdit.setText(path) |
76 self.vcsUrlEdit.setText(path) |
77 |
77 |
78 @pyqtSlot() |
78 @pyqtSlot() |
79 def on_projectDirButton_clicked(self): |
79 def on_projectDirButton_clicked(self): |
80 """ |
80 """ |
81 Private slot to display a directory selection dialog. |
81 Private slot to display a directory selection dialog. |
82 """ |
82 """ |
83 directory = QFileDialog.getExistingDirectory(\ |
83 directory = QFileDialog.getExistingDirectory( |
84 self, |
84 self, |
85 self.trUtf8("Select Project Directory"), |
85 self.trUtf8("Select Project Directory"), |
86 self.vcsProjectDirEdit.text(), |
86 self.vcsProjectDirEdit.text(), |
87 QFileDialog.Options(QFileDialog.ShowDirsOnly)) |
87 QFileDialog.Options(QFileDialog.ShowDirsOnly)) |
88 |
88 |