Merge pull request #138 from Atheros1/master
use only 9 half open connections for windows but 32 for everyone else
This commit is contained in:
commit
d6101dc3fc
|
@ -2223,8 +2223,11 @@ def signal_handler(signal, frame):
|
||||||
|
|
||||||
def connectToStream(streamNumber):
|
def connectToStream(streamNumber):
|
||||||
selfInitiatedConnections[streamNumber] = {}
|
selfInitiatedConnections[streamNumber] = {}
|
||||||
|
if sys.platform[0:3] == 'win':
|
||||||
for i in range(32):
|
maximumNumberOfHalfOpenConnections = 9
|
||||||
|
else:
|
||||||
|
maximumNumberOfHalfOpenConnections = 32
|
||||||
|
for i in range(maximumNumberOfHalfOpenConnections):
|
||||||
a = outgoingSynSender()
|
a = outgoingSynSender()
|
||||||
a.setup(streamNumber)
|
a.setup(streamNumber)
|
||||||
a.start()
|
a.start()
|
||||||
|
|
|
@ -472,18 +472,21 @@ class MyForm(QtGui.QMainWindow):
|
||||||
|
|
||||||
# Show the program window and select send tab
|
# Show the program window and select send tab
|
||||||
def appIndicatorSend(self):
|
def appIndicatorSend(self):
|
||||||
|
if not self.actionShow.isChecked():
|
||||||
self.actionShow.setChecked(True)
|
self.actionShow.setChecked(True)
|
||||||
self.appIndicatorShowOrHideWindow()
|
self.appIndicatorShowOrHideWindow()
|
||||||
self.ui.tabWidget.setCurrentIndex(1)
|
self.ui.tabWidget.setCurrentIndex(1)
|
||||||
|
|
||||||
# Show the program window and select subscriptions tab
|
# Show the program window and select subscriptions tab
|
||||||
def appIndicatorSubscribe(self):
|
def appIndicatorSubscribe(self):
|
||||||
|
if not self.actionShow.isChecked():
|
||||||
self.actionShow.setChecked(True)
|
self.actionShow.setChecked(True)
|
||||||
self.appIndicatorShowOrHideWindow()
|
self.appIndicatorShowOrHideWindow()
|
||||||
self.ui.tabWidget.setCurrentIndex(4)
|
self.ui.tabWidget.setCurrentIndex(4)
|
||||||
|
|
||||||
# Show the program window and select the address book tab
|
# Show the program window and select the address book tab
|
||||||
def appIndicatorAddressBook(self):
|
def appIndicatorAddressBook(self):
|
||||||
|
if not self.actionShow.isChecked():
|
||||||
self.actionShow.setChecked(True)
|
self.actionShow.setChecked(True)
|
||||||
self.appIndicatorShowOrHideWindow()
|
self.appIndicatorShowOrHideWindow()
|
||||||
self.ui.tabWidget.setCurrentIndex(5)
|
self.ui.tabWidget.setCurrentIndex(5)
|
||||||
|
@ -536,9 +539,11 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.tray.setContextMenu(m)
|
self.tray.setContextMenu(m)
|
||||||
self.tray.show()
|
self.tray.show()
|
||||||
if shared.config.getboolean('bitmessagesettings', 'startintray'):
|
if shared.config.getboolean('bitmessagesettings', 'startintray'):
|
||||||
self.hide()
|
|
||||||
#myapp.trayIcon.show()#This option seems to have been obsoleted by https://github.com/Bitmessage/PyBitmessage/pull/133/files
|
#myapp.trayIcon.show()#This option seems to have been obsoleted by https://github.com/Bitmessage/PyBitmessage/pull/133/files
|
||||||
self.actionShow.setChecked(False)
|
self.actionShow.setChecked(False)
|
||||||
|
self.appIndicatorShowOrHideWindow()
|
||||||
|
#if sys.platform[0:3] == 'win':
|
||||||
|
# myapp.setWindowFlags(Qt.ToolTip)
|
||||||
|
|
||||||
def tableWidgetInboxKeyPressEvent(self,event):
|
def tableWidgetInboxKeyPressEvent(self,event):
|
||||||
if event.key() == QtCore.Qt.Key_Delete:
|
if event.key() == QtCore.Qt.Key_Delete:
|
||||||
|
@ -2045,8 +2050,7 @@ def run():
|
||||||
app = QtGui.QApplication(sys.argv)
|
app = QtGui.QApplication(sys.argv)
|
||||||
app.setStyleSheet("QStatusBar::item { border: 0px solid black }")
|
app.setStyleSheet("QStatusBar::item { border: 0px solid black }")
|
||||||
myapp = MyForm()
|
myapp = MyForm()
|
||||||
|
if not shared.config.getboolean('bitmessagesettings', 'startintray'):
|
||||||
myapp.show()
|
myapp.show()
|
||||||
if sys.platform[0:3] == 'win':
|
|
||||||
myapp.setWindowFlags(Qt.ToolTip)
|
|
||||||
myapp.createAppIndicator(app)
|
myapp.createAppIndicator(app)
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user