Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py

branch
5_4_x
changeset 3335
0e973a74be62
parent 3160
209a07d7e401
equal deleted inserted replaced
3331:3a723d9cfa6a 3335:0e973a74be62
51 51
52 self.localPath = hd 52 self.localPath = hd
53 self.networkPath = "localhost/" 53 self.networkPath = "localhost/"
54 self.localProtocol = True 54 self.localProtocol = True
55 55
56 self.vcsProjectDirEdit.setText(Utilities.toNativeSeparators( 56 ipath = Preferences.getMultiProject("Workspace") or \
57 Preferences.getMultiProject("Workspace") or 57 Utilities.getHomeDir()
58 Utilities.getHomeDir())) 58 self.__initPaths = [
59 Utilities.fromNativeSeparators(ipath),
60 Utilities.fromNativeSeparators(ipath) + "/",
61 ]
62 self.vcsProjectDirEdit.setText(
63 Utilities.toNativeSeparators(self.__initPaths[0]))
64
65 self.resize(self.width(), self.minimumSizeHint().height())
66
67 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
68
69 @pyqtSlot(str)
70 def on_vcsProjectDirEdit_textChanged(self, txt):
71 """
72 Private slot to handle a change of the project directory.
73
74 @param txt name of the project directory (string)
75 """
76 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(
77 bool(txt) and
78 Utilities.fromNativeSeparators(txt) not in self.__initPaths)
59 79
60 @pyqtSlot() 80 @pyqtSlot()
61 def on_vcsUrlButton_clicked(self): 81 def on_vcsUrlButton_clicked(self):
62 """ 82 """
63 Private slot to display a selection dialog. 83 Private slot to display a selection dialog.

eric ide

mercurial