Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py

changeset 3334
a75328ebac64
parent 3315
bd1a25ead18d
child 3366
6084bb3c3911
equal deleted inserted replaced
3333:dcd4391e9d43 3334:a75328ebac64
55 55
56 self.localPath = hd 56 self.localPath = hd
57 self.networkPath = "localhost/" 57 self.networkPath = "localhost/"
58 self.localProtocol = True 58 self.localProtocol = True
59 59
60 ipath = Preferences.getMultiProject("Workspace") or \
61 Utilities.getHomeDir()
62 self.__initPaths = [
63 Utilities.fromNativeSeparators(ipath),
64 Utilities.fromNativeSeparators(ipath) + "/",
65 ]
60 self.vcsProjectDirEdit.setText( 66 self.vcsProjectDirEdit.setText(
61 Utilities.toNativeSeparators( 67 Utilities.toNativeSeparators(self.__initPaths[0]))
62 Preferences.getMultiProject("Workspace") or
63 Utilities.getHomeDir()))
64 68
65 self.largeCheckBox.setEnabled(self.vcs.isExtensionActive("largefiles")) 69 self.lfNoteLabel.setVisible(self.vcs.isExtensionActive("largefiles"))
70 self.largeCheckBox.setVisible(self.vcs.isExtensionActive("largefiles"))
66 71
67 self.resize(self.width(), self.minimumSizeHint().height()) 72 self.resize(self.width(), self.minimumSizeHint().height())
73
74 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
75
76 @pyqtSlot(str)
77 def on_vcsProjectDirEdit_textChanged(self, txt):
78 """
79 Private slot to handle a change of the project directory.
80
81 @param txt name of the project directory (string)
82 """
83 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(
84 bool(txt) and
85 Utilities.fromNativeSeparators(txt) not in self.__initPaths)
68 86
69 @pyqtSlot() 87 @pyqtSlot()
70 def on_vcsUrlButton_clicked(self): 88 def on_vcsUrlButton_clicked(self):
71 """ 89 """
72 Private slot to display a selection dialog. 90 Private slot to display a selection dialog.

eric ide

mercurial