Cooperation/Connection.py

changeset 538
7f1a56e80124
parent 323
75182cd9b2c5
child 541
00e1a5d060c5
equal deleted inserted replaced
537:72b32daeb8d6 538:7f1a56e80124
8 """ 8 """
9 9
10 from PyQt4.QtCore import pyqtSignal, QTimer, QTime, QByteArray 10 from PyQt4.QtCore import pyqtSignal, QTimer, QTime, QByteArray
11 from PyQt4.QtGui import QMessageBox 11 from PyQt4.QtGui import QMessageBox
12 from PyQt4.QtNetwork import QTcpSocket 12 from PyQt4.QtNetwork import QTcpSocket
13
14 from E5Gui import E5MessageBox
13 15
14 import Preferences 16 import Preferences
15 17
16 MaxBufferSize = 1024 * 1024 18 MaxBufferSize = 1024 * 1024
17 TransferTimeout = 30 * 1000 19 TransferTimeout = 30 * 1000
189 191
190 if self.__serverPort != self.peerPort() and \ 192 if self.__serverPort != self.peerPort() and \
191 not Preferences.getCooperation("AutoAcceptConnections"): 193 not Preferences.getCooperation("AutoAcceptConnections"):
192 # don't ask for reverse connections or 194 # don't ask for reverse connections or
193 # if we shall accept automatically 195 # if we shall accept automatically
194 res = QMessageBox.question(None, 196 res = E5MessageBox.question(None,
195 self.trUtf8("New Connection"), 197 self.trUtf8("New Connection"),
196 self.trUtf8("""<p>Accept connection from """ 198 self.trUtf8("""<p>Accept connection from """
197 """<strong>{0}@{1}</strong>?</p>""").format( 199 """<strong>{0}@{1}</strong>?</p>""").format(
198 user, self.peerAddress().toString()), 200 user, self.peerAddress().toString()),
199 QMessageBox.StandardButtons(\ 201 QMessageBox.StandardButtons(\

eric ide

mercurial