eric6/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8151
8c1445825e7b
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
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 @pyqtSlot() 84 @pyqtSlot()
84 def on_vcsUrlPicker_pickerButtonClicked(self): 85 def on_vcsUrlPicker_pickerButtonClicked(self):
87 """ 88 """
88 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog 89 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog
89 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) 90 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self)
90 dlg.start( 91 dlg.start(
91 self.protocolCombo.currentText() + self.vcsUrlPicker.text()) 92 self.protocolCombo.currentText() + self.vcsUrlPicker.text())
92 if dlg.exec() == QDialog.Accepted: 93 if dlg.exec() == QDialog.DialogCode.Accepted:
93 url = dlg.getSelectedUrl() 94 url = dlg.getSelectedUrl()
94 if url: 95 if url:
95 protocol = url.split("://")[0] 96 protocol = url.split("://")[0]
96 path = url.split("://")[1] 97 path = url.split("://")[1]
97 self.protocolCombo.setCurrentIndex( 98 self.protocolCombo.setCurrentIndex(
136 Private slot to handle changes of the URL. 137 Private slot to handle changes of the URL.
137 138
138 @param txt current text of the line edit (string) 139 @param txt current text of the line edit (string)
139 """ 140 """
140 enable = "://" not in txt 141 enable = "://" not in txt
141 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) 142 self.buttonBox.button(
143 QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
142 144
143 def getData(self): 145 def getData(self):
144 """ 146 """
145 Public slot to retrieve the data entered into the dialog. 147 Public slot to retrieve the data entered into the dialog.
146 148

eric ide

mercurial