src/eric7/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
11 import os 11 import os
12 12
13 from PyQt6.QtCore import QDir, pyqtSlot 13 from PyQt6.QtCore import QDir, pyqtSlot
14 from PyQt6.QtWidgets import QDialog, QDialogButtonBox 14 from PyQt6.QtWidgets import QDialog, QDialogButtonBox
15 15
16 from eric7 import Preferences, Utilities 16 from eric7 import Preferences
17 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes 17 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes
18 from eric7.SystemUtilities import FileSystemUtilities, OSUtilities
18 19
19 from .Config import ConfigSvnProtocols 20 from .Config import ConfigSvnProtocols
20 from .Ui_SvnNewProjectOptionsDialog import Ui_SvnNewProjectOptionsDialog 21 from .Ui_SvnNewProjectOptionsDialog import Ui_SvnNewProjectOptionsDialog
21 22
22 23
41 42
42 self.protocolCombo.addItems(ConfigSvnProtocols) 43 self.protocolCombo.addItems(ConfigSvnProtocols)
43 44
44 self.vcs = vcs 45 self.vcs = vcs
45 46
46 hd = Utilities.toNativeSeparators(QDir.homePath()) 47 hd = FileSystemUtilities.toNativeSeparators(QDir.homePath())
47 hd = os.path.join(hd, "subversionroot") 48 hd = os.path.join(hd, "subversionroot")
48 self.vcsUrlPicker.setText(hd) 49 self.vcsUrlPicker.setText(hd)
49 50
50 self.localPath = hd 51 self.localPath = hd
51 self.networkPath = "localhost/" 52 self.networkPath = "localhost/"
52 self.localProtocol = True 53 self.localProtocol = True
53 54
54 ipath = Preferences.getMultiProject("Workspace") or Utilities.getHomeDir() 55 ipath = Preferences.getMultiProject("Workspace") or OSUtilities.getHomeDir()
55 self.__initPaths = [ 56 self.__initPaths = [
56 Utilities.fromNativeSeparators(ipath), 57 FileSystemUtilities.fromNativeSeparators(ipath),
57 Utilities.fromNativeSeparators(ipath) + "/", 58 FileSystemUtilities.fromNativeSeparators(ipath) + "/",
58 ] 59 ]
59 self.vcsProjectDirPicker.setText(self.__initPaths[0]) 60 self.vcsProjectDirPicker.setText(self.__initPaths[0])
60 61
61 self.resize(self.width(), self.minimumSizeHint().height()) 62 self.resize(self.width(), self.minimumSizeHint().height())
62 63
71 Private slot to handle a change of the project directory. 72 Private slot to handle a change of the project directory.
72 73
73 @param txt name of the project directory (string) 74 @param txt name of the project directory (string)
74 """ 75 """
75 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( 76 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
76 bool(txt) and Utilities.fromNativeSeparators(txt) not in self.__initPaths 77 bool(txt)
78 and FileSystemUtilities.fromNativeSeparators(txt) not in self.__initPaths
77 ) 79 )
78 80
79 def on_vcsUrlPicker_pickerButtonClicked(self): 81 def on_vcsUrlPicker_pickerButtonClicked(self):
80 """ 82 """
81 Private slot to display a repository browser dialog. 83 Private slot to display a repository browser dialog.

eric ide

mercurial