8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot, QDir |
12 from PyQt4.QtCore import pyqtSlot, QDir |
13 from PyQt4.QtGui import QDialog |
13 from PyQt4.QtGui import QDialog, QDialogButtonBox |
14 |
14 |
15 from E5Gui.E5Completers import E5DirCompleter |
15 from E5Gui.E5Completers import E5DirCompleter |
16 from E5Gui import E5FileDialog |
16 from E5Gui import E5FileDialog |
17 |
17 |
18 from .Ui_HgNewProjectOptionsDialog import Ui_HgNewProjectOptionsDialog |
18 from .Ui_HgNewProjectOptionsDialog import Ui_HgNewProjectOptionsDialog |
99 if self.localProtocol: |
99 if self.localProtocol: |
100 self.localPath = self.vcsUrlEdit.text() |
100 self.localPath = self.vcsUrlEdit.text() |
101 self.vcsUrlEdit.setText(self.networkPath) |
101 self.vcsUrlEdit.setText(self.networkPath) |
102 self.localProtocol = False |
102 self.localProtocol = False |
103 |
103 |
|
104 @pyqtSlot(str) |
|
105 def on_vcsUrlEdit_textChanged(self, txt): |
|
106 """ |
|
107 Private slot to handle changes of the URL. |
|
108 |
|
109 @param txt current text of the line edit (string) |
|
110 """ |
|
111 enable = "://" not in txt |
|
112 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) |
|
113 |
104 def getData(self): |
114 def getData(self): |
105 """ |
115 """ |
106 Public slot to retrieve the data entered into the dialog. |
116 Public slot to retrieve the data entered into the dialog. |
107 |
117 |
108 @return a tuple of a string (project directory) and a dictionary |
118 @return a tuple of a string (project directory) and a dictionary |