eric7/Cooperation/Connection.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8318
962bce857696
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
8 """ 8 """
9 9
10 from PyQt6.QtCore import pyqtSignal, QTimer, QTime, QByteArray 10 from PyQt6.QtCore import pyqtSignal, QTimer, QTime, QByteArray
11 from PyQt6.QtNetwork import QTcpSocket, QHostInfo 11 from PyQt6.QtNetwork import QTcpSocket, QHostInfo
12 12
13 from E5Gui import E5MessageBox 13 from E5Gui import EricMessageBox
14 from E5Gui.E5Application import e5App 14 from E5Gui.EricApplication import ericApp
15 15
16 import Preferences 16 import Preferences
17 17
18 MaxBufferSize = 1024 * 1024 18 MaxBufferSize = 1024 * 1024
19 TransferTimeout = 30 * 1000 19 TransferTimeout = 30 * 1000
212 212
213 if (self.__serverPort != self.peerPort() and 213 if (self.__serverPort != self.peerPort() and
214 not Preferences.getCooperation("AutoAcceptConnections")): 214 not Preferences.getCooperation("AutoAcceptConnections")):
215 # don't ask for reverse connections or 215 # don't ask for reverse connections or
216 # if we shall accept automatically 216 # if we shall accept automatically
217 res = E5MessageBox.yesNo( 217 res = EricMessageBox.yesNo(
218 None, 218 None,
219 self.tr("New Connection"), 219 self.tr("New Connection"),
220 self.tr("""<p>Accept connection from """ 220 self.tr("""<p>Accept connection from """
221 """<strong>{0}@{1}</strong>?</p>""").format( 221 """<strong>{0}@{1}</strong>?</p>""").format(
222 user, hostInfo.hostName()), 222 user, hostInfo.hostName()),
226 return 226 return
227 227
228 if self.__client is not None: 228 if self.__client is not None:
229 chatWidget = self.__client.chatWidget() 229 chatWidget = self.__client.chatWidget()
230 if chatWidget is not None and not chatWidget.isVisible(): 230 if chatWidget is not None and not chatWidget.isVisible():
231 e5App().getObject( 231 ericApp().getObject(
232 "UserInterface").activateCooperationViewer() 232 "UserInterface").activateCooperationViewer()
233 233
234 if not self.__isGreetingMessageSent: 234 if not self.__isGreetingMessageSent:
235 self.__sendGreetingMessage() 235 self.__sendGreetingMessage()
236 236

eric ide

mercurial