Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3008
7848489bcb92
child 3060
5883ce99ee12
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
2 2
3 # Copyright (c) 2010 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2010 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the Mercurial Options Dialog for a new project from the repository. 7 Module implementing the Mercurial Options Dialog for a new project from the
8 repository.
8 """ 9 """
9 10
10 from __future__ import unicode_literals # __IGNORE_WARNING__ 11 from __future__ import unicode_literals # __IGNORE_WARNING__
11 12
12 import os 13 import os
24 import Preferences 25 import Preferences
25 26
26 27
27 class HgNewProjectOptionsDialog(QDialog, Ui_HgNewProjectOptionsDialog): 28 class HgNewProjectOptionsDialog(QDialog, Ui_HgNewProjectOptionsDialog):
28 """ 29 """
29 Class implementing the Options Dialog for a new project from the repository. 30 Class implementing the Options Dialog for a new project from the
31 repository.
30 """ 32 """
31 def __init__(self, vcs, parent=None): 33 def __init__(self, vcs, parent=None):
32 """ 34 """
33 Constructor 35 Constructor
34 36
52 self.localPath = hd 54 self.localPath = hd
53 self.networkPath = "localhost/" 55 self.networkPath = "localhost/"
54 self.localProtocol = True 56 self.localProtocol = True
55 57
56 self.vcsProjectDirEdit.setText(Utilities.toNativeSeparators( 58 self.vcsProjectDirEdit.setText(Utilities.toNativeSeparators(
57 Preferences.getMultiProject("Workspace") or Utilities.getHomeDir())) 59 Preferences.getMultiProject("Workspace") or \
60 Utilities.getHomeDir()))
58 61
59 @pyqtSlot() 62 @pyqtSlot()
60 def on_vcsUrlButton_clicked(self): 63 def on_vcsUrlButton_clicked(self):
61 """ 64 """
62 Private slot to display a selection dialog. 65 Private slot to display a selection dialog.
67 self.trUtf8("Select Repository-Directory"), 70 self.trUtf8("Select Repository-Directory"),
68 self.vcsUrlEdit.text(), 71 self.vcsUrlEdit.text(),
69 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) 72 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
70 73
71 if directory: 74 if directory:
72 self.vcsUrlEdit.setText(Utilities.toNativeSeparators(directory)) 75 self.vcsUrlEdit.setText(
76 Utilities.toNativeSeparators(directory))
73 77
74 @pyqtSlot() 78 @pyqtSlot()
75 def on_projectDirButton_clicked(self): 79 def on_projectDirButton_clicked(self):
76 """ 80 """
77 Private slot to display a directory selection dialog. 81 Private slot to display a directory selection dialog.
81 self.trUtf8("Select Project Directory"), 85 self.trUtf8("Select Project Directory"),
82 self.vcsProjectDirEdit.text(), 86 self.vcsProjectDirEdit.text(),
83 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) 87 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
84 88
85 if directory: 89 if directory:
86 self.vcsProjectDirEdit.setText(Utilities.toNativeSeparators(directory)) 90 self.vcsProjectDirEdit.setText(
91 Utilities.toNativeSeparators(directory))
87 92
88 @pyqtSlot(str) 93 @pyqtSlot(str)
89 def on_protocolCombo_activated(self, protocol): 94 def on_protocolCombo_activated(self, protocol):
90 """ 95 """
91 Private slot to switch the status of the directory selection button. 96 Private slot to switch the status of the directory selection button.

eric ide

mercurial