63 """ |
63 """ |
64 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
64 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
65 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) |
65 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) |
66 dlg.start( |
66 dlg.start( |
67 self.protocolCombo.currentText() + self.vcsUrlPicker.text()) |
67 self.protocolCombo.currentText() + self.vcsUrlPicker.text()) |
68 if dlg.exec() == QDialog.Accepted: |
68 if dlg.exec() == QDialog.DialogCode.Accepted: |
69 url = dlg.getSelectedUrl() |
69 url = dlg.getSelectedUrl() |
70 if url: |
70 if url: |
71 protocol = url.split("://")[0] |
71 protocol = url.split("://")[0] |
72 path = url.split("://")[1] |
72 path = url.split("://")[1] |
73 self.protocolCombo.setCurrentIndex( |
73 self.protocolCombo.setCurrentIndex( |
74 self.protocolCombo.findText(protocol + "://")) |
74 self.protocolCombo.findText(protocol + "://")) |
75 self.vcsUrlPicker.setText(path) |
75 self.vcsUrlPicker.setText(path) |
76 |
76 |
77 @pyqtSlot(str) |
77 @pyqtSlot(int) |
78 def on_protocolCombo_activated(self, protocol): |
78 def on_protocolCombo_activated(self, index): |
79 """ |
79 """ |
80 Private slot to switch the status of the directory selection button. |
80 Private slot to switch the status of the directory selection button. |
81 |
81 |
82 @param protocol selected protocol (string) |
82 @param index index of the selected entry |
|
83 @type int |
83 """ |
84 """ |
|
85 protocol = self.protocolCombo.itemText(index) |
84 if protocol == "file://": |
86 if protocol == "file://": |
85 self.networkPath = self.vcsUrlPicker.text() |
87 self.networkPath = self.vcsUrlPicker.text() |
86 self.vcsUrlPicker.setText(self.localPath) |
88 self.vcsUrlPicker.setText(self.localPath) |
87 self.vcsUrlLabel.setText(self.tr("Pat&h:")) |
89 self.vcsUrlLabel.setText(self.tr("Pat&h:")) |
88 self.localProtocol = True |
90 self.localProtocol = True |
99 Private slot to handle changes of the URL. |
101 Private slot to handle changes of the URL. |
100 |
102 |
101 @param txt current text of the line edit (string) |
103 @param txt current text of the line edit (string) |
102 """ |
104 """ |
103 enable = "://" not in txt |
105 enable = "://" not in txt |
104 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
106 self.buttonBox.button( |
|
107 QDialogButtonBox.StandardButton.Ok).setEnabled(enable) |
105 |
108 |
106 def getData(self): |
109 def getData(self): |
107 """ |
110 """ |
108 Public slot to retrieve the data entered into the dialog. |
111 Public slot to retrieve the data entered into the dialog. |
109 |
112 |