Deleted generated code for settings window

This commit is contained in:
Biryuzovye Kleshni 2018-07-20 00:02:17 +00:00
parent e94bdf4642
commit d1a5c604e6
7 changed files with 222 additions and 887 deletions

View File

@ -30,7 +30,6 @@ from foldertree import (
AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget, AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget,
MessageList_AddressWidget, MessageList_SubjectWidget, MessageList_AddressWidget, MessageList_SubjectWidget,
Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress) Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress)
from settings import Ui_settingsDialog
import settingsmixin import settingsmixin
import support import support
import debug import debug
@ -55,6 +54,7 @@ import state
from statusbar import BMStatusBar from statusbar import BMStatusBar
from network.asyncore_pollchoose import set_rates from network.asyncore_pollchoose import set_rates
import sound import sound
import re
try: try:
@ -1797,7 +1797,7 @@ class MyForm(settingsmixin.SMainWindow):
os._exit(0) os._exit(0)
def updateWorkProverStatus(self, status): def updateWorkProverStatus(self, status):
self.POWTasksCount = status[3] self.POWTasksCount = status.tasksCount
def rerenderMessagelistFromLabels(self): def rerenderMessagelistFromLabels(self):
for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions): for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
@ -4122,8 +4122,7 @@ class settingsDialog(QtGui.QDialog):
def __init__(self, parent): def __init__(self, parent):
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.ui = Ui_settingsDialog() self.ui = widgets.load("settings.ui", self)
self.ui.setupUi(self)
self.parent = parent self.parent = parent
self.ui.checkBoxStartOnLogon.setChecked( self.ui.checkBoxStartOnLogon.setChecked(
BMConfigParser().getboolean('bitmessagesettings', 'startonlogon')) BMConfigParser().getboolean('bitmessagesettings', 'startonlogon'))
@ -4169,6 +4168,41 @@ class settingsDialog(QtGui.QDialog):
self.ui.checkBoxStartOnLogon.setDisabled(True) self.ui.checkBoxStartOnLogon.setDisabled(True)
self.ui.checkBoxStartOnLogon.setText(_translate( self.ui.checkBoxStartOnLogon.setText(_translate(
"MainWindow", "Start-on-login not yet supported on your OS.")) "MainWindow", "Start-on-login not yet supported on your OS."))
self.ui.languageComboBox.addItem(
QtGui.QApplication.translate("settingsDialog", "System Settings", "system"),
"system"
)
localeRegexp = re.compile("bitmessage_(.*).qm$")
localeNames = {"eo": "Esperanto", "en_pirate": "Pirate English"}
for i in sorted(os.listdir(os.path.join(paths.codePath(), "translations"))):
match = localeRegexp.match(i)
if match is None:
continue
localeCode = match.group(1)
if localeCode in localeNames:
localeName = localeNames[localeCode]
else:
localeName = QtCore.QLocale(QtCore.QString(localeCode)).nativeLanguageName()
if localeName == "":
localeName = localeCode
self.ui.languageComboBox.addItem(localeName, localeCode)
configuredLocale = BMConfigParser().safeGet("bitmessagesettings", "userlocale", "system")
for i in range(self.ui.languageComboBox.count()):
if self.ui.languageComboBox.itemData(i) == configuredLocale:
self.ui.languageComboBox.setCurrentIndex(i)
break
# On the Network settings tab: # On the Network settings tab:
self.ui.lineEditTCPPort.setText(str( self.ui.lineEditTCPPort.setText(str(
BMConfigParser().get('bitmessagesettings', 'port'))) BMConfigParser().get('bitmessagesettings', 'port')))
@ -4205,6 +4239,9 @@ class settingsDialog(QtGui.QDialog):
BMConfigParser().get('bitmessagesettings', 'maxdownloadrate'))) BMConfigParser().get('bitmessagesettings', 'maxdownloadrate')))
self.ui.lineEditMaxUploadRate.setText(str( self.ui.lineEditMaxUploadRate.setText(str(
BMConfigParser().get('bitmessagesettings', 'maxuploadrate'))) BMConfigParser().get('bitmessagesettings', 'maxuploadrate')))
self.ui.lineEditMaxOutboundConnections.setValidator(
QtGui.QIntValidator(0, 8, self.ui.lineEditMaxOutboundConnections)
)
self.ui.lineEditMaxOutboundConnections.setText(str( self.ui.lineEditMaxOutboundConnections.setText(str(
BMConfigParser().get('bitmessagesettings', 'maxoutboundconnections'))) BMConfigParser().get('bitmessagesettings', 'maxoutboundconnections')))

View File

@ -1,36 +0,0 @@
import glob
import os
from PyQt4 import QtCore, QtGui
from bmconfigparser import BMConfigParser
import paths
class LanguageBox(QtGui.QComboBox):
languageName = {"system": "System Settings", "eo": "Esperanto", "en_pirate": "Pirate English"}
def __init__(self, parent = None):
super(QtGui.QComboBox, self).__init__(parent)
self.populate()
def populate(self):
self.clear()
localesPath = os.path.join (paths.codePath(), 'translations')
self.addItem(QtGui.QApplication.translate("settingsDialog", "System Settings", "system"), "system")
self.setCurrentIndex(0)
self.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
for translationFile in sorted(glob.glob(os.path.join(localesPath, "bitmessage_*.qm"))):
localeShort = os.path.split(translationFile)[1].split("_", 1)[1][:-3]
locale = QtCore.QLocale(QtCore.QString(localeShort))
if localeShort in LanguageBox.languageName:
self.addItem(LanguageBox.languageName[localeShort], localeShort)
elif locale.nativeLanguageName() == "":
self.addItem(localeShort, localeShort)
else:
self.addItem(locale.nativeLanguageName(), localeShort)
configuredLocale = BMConfigParser().safeGet(
'bitmessagesettings', 'userlocale', "system")
for i in range(self.count()):
if self.itemData(i) == configuredLocale:
self.setCurrentIndex(i)
break

View File

@ -1,630 +0,0 @@
# -*- coding: utf-8 -*-
# pylint: disable=too-many-instance-attributes,too-many-locals,too-many-statements,attribute-defined-outside-init
"""
Form implementation generated from reading ui file 'settings.ui'
Created: Thu Dec 25 23:21:20 2014
by: PyQt4 UI code generator 4.10.3
WARNING! All changes made in this file will be lost!
"""
from __future__ import absolute_import
from sys import platform
from PyQt4 import QtCore, QtGui
from . import bitmessage_icons_rc # pylint: disable=unused-import
from .languagebox import LanguageBox
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_settingsDialog(object):
"""Encapsulate a UI settings dialog object"""
def setupUi(self, settingsDialog):
"""Set up the UI"""
settingsDialog.setObjectName(_fromUtf8("settingsDialog"))
settingsDialog.resize(521, 413)
self.gridLayout = QtGui.QGridLayout(settingsDialog)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.buttonBox = QtGui.QDialogButtonBox(settingsDialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.gridLayout.addWidget(self.buttonBox, 1, 0, 1, 1)
self.tabWidgetSettings = QtGui.QTabWidget(settingsDialog)
self.tabWidgetSettings.setObjectName(_fromUtf8("tabWidgetSettings"))
self.tabUserInterface = QtGui.QWidget()
self.tabUserInterface.setEnabled(True)
self.tabUserInterface.setObjectName(_fromUtf8("tabUserInterface"))
self.formLayout = QtGui.QFormLayout(self.tabUserInterface)
self.formLayout.setObjectName(_fromUtf8("formLayout"))
self.checkBoxStartOnLogon = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxStartOnLogon.setObjectName(_fromUtf8("checkBoxStartOnLogon"))
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.checkBoxStartOnLogon)
self.groupBoxTray = QtGui.QGroupBox(self.tabUserInterface)
self.groupBoxTray.setObjectName(_fromUtf8("groupBoxTray"))
self.formLayoutTray = QtGui.QFormLayout(self.groupBoxTray)
self.formLayoutTray.setObjectName(_fromUtf8("formLayoutTray"))
self.checkBoxStartInTray = QtGui.QCheckBox(self.groupBoxTray)
self.checkBoxStartInTray.setObjectName(_fromUtf8("checkBoxStartInTray"))
self.formLayoutTray.setWidget(0, QtGui.QFormLayout.SpanningRole, self.checkBoxStartInTray)
self.checkBoxMinimizeToTray = QtGui.QCheckBox(self.groupBoxTray)
self.checkBoxMinimizeToTray.setChecked(True)
self.checkBoxMinimizeToTray.setObjectName(_fromUtf8("checkBoxMinimizeToTray"))
self.formLayoutTray.setWidget(1, QtGui.QFormLayout.LabelRole, self.checkBoxMinimizeToTray)
self.checkBoxTrayOnClose = QtGui.QCheckBox(self.groupBoxTray)
self.checkBoxTrayOnClose.setChecked(True)
self.checkBoxTrayOnClose.setObjectName(_fromUtf8("checkBoxTrayOnClose"))
self.formLayoutTray.setWidget(2, QtGui.QFormLayout.LabelRole, self.checkBoxTrayOnClose)
self.formLayout.setWidget(1, QtGui.QFormLayout.SpanningRole, self.groupBoxTray)
self.checkBoxHideTrayConnectionNotifications = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxHideTrayConnectionNotifications.setChecked(False)
self.checkBoxHideTrayConnectionNotifications.setObjectName(
_fromUtf8("checkBoxHideTrayConnectionNotifications"))
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.checkBoxHideTrayConnectionNotifications)
self.checkBoxShowTrayNotifications = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxShowTrayNotifications.setObjectName(_fromUtf8("checkBoxShowTrayNotifications"))
self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.checkBoxShowTrayNotifications)
self.checkBoxPortableMode = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxPortableMode.setObjectName(_fromUtf8("checkBoxPortableMode"))
self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.checkBoxPortableMode)
self.PortableModeDescription = QtGui.QLabel(self.tabUserInterface)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.PortableModeDescription.sizePolicy().hasHeightForWidth())
self.PortableModeDescription.setSizePolicy(sizePolicy)
self.PortableModeDescription.setWordWrap(True)
self.PortableModeDescription.setObjectName(_fromUtf8("PortableModeDescription"))
self.formLayout.setWidget(5, QtGui.QFormLayout.SpanningRole, self.PortableModeDescription)
self.checkBoxWillinglySendToMobile = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxWillinglySendToMobile.setObjectName(_fromUtf8("checkBoxWillinglySendToMobile"))
self.formLayout.setWidget(6, QtGui.QFormLayout.SpanningRole, self.checkBoxWillinglySendToMobile)
self.checkBoxUseIdenticons = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxUseIdenticons.setObjectName(_fromUtf8("checkBoxUseIdenticons"))
self.formLayout.setWidget(7, QtGui.QFormLayout.LabelRole, self.checkBoxUseIdenticons)
self.checkBoxReplyBelow = QtGui.QCheckBox(self.tabUserInterface)
self.checkBoxReplyBelow.setObjectName(_fromUtf8("checkBoxReplyBelow"))
self.formLayout.setWidget(8, QtGui.QFormLayout.LabelRole, self.checkBoxReplyBelow)
self.groupBox = QtGui.QGroupBox(self.tabUserInterface)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.formLayout_2 = QtGui.QFormLayout(self.groupBox)
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
self.languageComboBox = LanguageBox(self.groupBox)
self.languageComboBox.setMinimumSize(QtCore.QSize(100, 0))
self.languageComboBox.setObjectName(_fromUtf8("languageComboBox")) # pylint: disable=not-callable
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.languageComboBox)
self.formLayout.setWidget(9, QtGui.QFormLayout.FieldRole, self.groupBox)
self.tabWidgetSettings.addTab(self.tabUserInterface, _fromUtf8(""))
self.tabNetworkSettings = QtGui.QWidget()
self.tabNetworkSettings.setObjectName(_fromUtf8("tabNetworkSettings"))
self.gridLayout_4 = QtGui.QGridLayout(self.tabNetworkSettings)
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
self.groupBox1 = QtGui.QGroupBox(self.tabNetworkSettings)
self.groupBox1.setObjectName(_fromUtf8("groupBox1"))
self.gridLayout_3 = QtGui.QGridLayout(self.groupBox1)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
self.label = QtGui.QLabel(self.groupBox1)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1, QtCore.Qt.AlignRight)
self.lineEditTCPPort = QtGui.QLineEdit(self.groupBox1)
self.lineEditTCPPort.setMaximumSize(QtCore.QSize(70, 16777215))
self.lineEditTCPPort.setObjectName(_fromUtf8("lineEditTCPPort"))
self.gridLayout_3.addWidget(self.lineEditTCPPort, 0, 1, 1, 1, QtCore.Qt.AlignLeft)
self.labelUPnP = QtGui.QLabel(self.groupBox1)
self.labelUPnP.setObjectName(_fromUtf8("labelUPnP"))
self.gridLayout_3.addWidget(self.labelUPnP, 0, 2, 1, 1, QtCore.Qt.AlignRight)
self.checkBoxUPnP = QtGui.QCheckBox(self.groupBox1)
self.checkBoxUPnP.setObjectName(_fromUtf8("checkBoxUPnP"))
self.gridLayout_3.addWidget(self.checkBoxUPnP, 0, 3, 1, 1, QtCore.Qt.AlignLeft)
self.gridLayout_4.addWidget(self.groupBox1, 0, 0, 1, 1)
self.groupBox_3 = QtGui.QGroupBox(self.tabNetworkSettings)
self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
self.gridLayout_9 = QtGui.QGridLayout(self.groupBox_3)
self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_9.addItem(spacerItem1, 0, 0, 2, 1)
self.label_24 = QtGui.QLabel(self.groupBox_3)
self.label_24.setObjectName(_fromUtf8("label_24"))
self.gridLayout_9.addWidget(self.label_24, 0, 1, 1, 1)
self.lineEditMaxDownloadRate = QtGui.QLineEdit(self.groupBox_3)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditMaxDownloadRate.sizePolicy().hasHeightForWidth())
self.lineEditMaxDownloadRate.setSizePolicy(sizePolicy)
self.lineEditMaxDownloadRate.setMaximumSize(QtCore.QSize(60, 16777215))
self.lineEditMaxDownloadRate.setObjectName(_fromUtf8("lineEditMaxDownloadRate"))
self.gridLayout_9.addWidget(self.lineEditMaxDownloadRate, 0, 2, 1, 1)
self.label_25 = QtGui.QLabel(self.groupBox_3)
self.label_25.setObjectName(_fromUtf8("label_25"))
self.gridLayout_9.addWidget(self.label_25, 1, 1, 1, 1)
self.lineEditMaxUploadRate = QtGui.QLineEdit(self.groupBox_3)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditMaxUploadRate.sizePolicy().hasHeightForWidth())
self.lineEditMaxUploadRate.setSizePolicy(sizePolicy)
self.lineEditMaxUploadRate.setMaximumSize(QtCore.QSize(60, 16777215))
self.lineEditMaxUploadRate.setObjectName(_fromUtf8("lineEditMaxUploadRate"))
self.gridLayout_9.addWidget(self.lineEditMaxUploadRate, 1, 2, 1, 1)
self.label_26 = QtGui.QLabel(self.groupBox_3)
self.label_26.setObjectName(_fromUtf8("label_26"))
self.gridLayout_9.addWidget(self.label_26, 2, 1, 1, 1)
self.lineEditMaxOutboundConnections = QtGui.QLineEdit(self.groupBox_3)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditMaxOutboundConnections.sizePolicy().hasHeightForWidth())
self.lineEditMaxOutboundConnections.setSizePolicy(sizePolicy)
self.lineEditMaxOutboundConnections.setMaximumSize(QtCore.QSize(60, 16777215))
self.lineEditMaxOutboundConnections.setObjectName(_fromUtf8("lineEditMaxOutboundConnections"))
self.lineEditMaxOutboundConnections.setValidator(
QtGui.QIntValidator(0, 8, self.lineEditMaxOutboundConnections))
self.gridLayout_9.addWidget(self.lineEditMaxOutboundConnections, 2, 2, 1, 1)
self.gridLayout_4.addWidget(self.groupBox_3, 2, 0, 1, 1)
self.groupBox_2 = QtGui.QGroupBox(self.tabNetworkSettings)
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_2)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.label_2 = QtGui.QLabel(self.groupBox_2)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1)
self.label_3 = QtGui.QLabel(self.groupBox_2)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout_2.addWidget(self.label_3, 1, 1, 1, 1)
self.lineEditSocksHostname = QtGui.QLineEdit(self.groupBox_2)
self.lineEditSocksHostname.setObjectName(_fromUtf8("lineEditSocksHostname"))
self.lineEditSocksHostname.setPlaceholderText(_fromUtf8("127.0.0.1"))
self.gridLayout_2.addWidget(self.lineEditSocksHostname, 1, 2, 1, 2)
self.label_4 = QtGui.QLabel(self.groupBox_2)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.gridLayout_2.addWidget(self.label_4, 1, 4, 1, 1)
self.lineEditSocksPort = QtGui.QLineEdit(self.groupBox_2)
self.lineEditSocksPort.setObjectName(_fromUtf8("lineEditSocksPort"))
if platform in ['darwin', 'win32', 'win64']:
self.lineEditSocksPort.setPlaceholderText(_fromUtf8("9150"))
else:
self.lineEditSocksPort.setPlaceholderText(_fromUtf8("9050"))
self.gridLayout_2.addWidget(self.lineEditSocksPort, 1, 5, 1, 1)
self.checkBoxAuthentication = QtGui.QCheckBox(self.groupBox_2)
self.checkBoxAuthentication.setObjectName(_fromUtf8("checkBoxAuthentication"))
self.gridLayout_2.addWidget(self.checkBoxAuthentication, 2, 1, 1, 1)
self.label_5 = QtGui.QLabel(self.groupBox_2)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.gridLayout_2.addWidget(self.label_5, 2, 2, 1, 1)
self.lineEditSocksUsername = QtGui.QLineEdit(self.groupBox_2)
self.lineEditSocksUsername.setEnabled(False)
self.lineEditSocksUsername.setObjectName(_fromUtf8("lineEditSocksUsername"))
self.gridLayout_2.addWidget(self.lineEditSocksUsername, 2, 3, 1, 1)
self.label_6 = QtGui.QLabel(self.groupBox_2)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.gridLayout_2.addWidget(self.label_6, 2, 4, 1, 1)
self.lineEditSocksPassword = QtGui.QLineEdit(self.groupBox_2)
self.lineEditSocksPassword.setEnabled(False)
self.lineEditSocksPassword.setInputMethodHints(
QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText)
self.lineEditSocksPassword.setEchoMode(QtGui.QLineEdit.Password)
self.lineEditSocksPassword.setObjectName(_fromUtf8("lineEditSocksPassword"))
self.gridLayout_2.addWidget(self.lineEditSocksPassword, 2, 5, 1, 1)
self.checkBoxSocksListen = QtGui.QCheckBox(self.groupBox_2)
self.checkBoxSocksListen.setObjectName(_fromUtf8("checkBoxSocksListen"))
self.gridLayout_2.addWidget(self.checkBoxSocksListen, 3, 1, 1, 4)
self.comboBoxProxyType = QtGui.QComboBox(self.groupBox_2)
self.comboBoxProxyType.setObjectName(_fromUtf8("comboBoxProxyType")) # pylint: disable=not-callable
self.comboBoxProxyType.addItem(_fromUtf8(""))
self.comboBoxProxyType.addItem(_fromUtf8(""))
self.comboBoxProxyType.addItem(_fromUtf8(""))
self.gridLayout_2.addWidget(self.comboBoxProxyType, 0, 1, 1, 1)
self.gridLayout_4.addWidget(self.groupBox_2, 1, 0, 1, 1)
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_4.addItem(spacerItem2, 3, 0, 1, 1)
self.tabWidgetSettings.addTab(self.tabNetworkSettings, _fromUtf8(""))
self.tabDemandedDifficulty = QtGui.QWidget()
self.tabDemandedDifficulty.setObjectName(_fromUtf8("tabDemandedDifficulty"))
self.gridLayout_6 = QtGui.QGridLayout(self.tabDemandedDifficulty)
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
self.label_9 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_9.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_9.setObjectName(_fromUtf8("label_9"))
self.gridLayout_6.addWidget(self.label_9, 1, 1, 1, 1)
self.label_10 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_10.setWordWrap(True)
self.label_10.setObjectName(_fromUtf8("label_10"))
self.gridLayout_6.addWidget(self.label_10, 2, 0, 1, 3)
self.label_11 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_11.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_11.setObjectName(_fromUtf8("label_11"))
self.gridLayout_6.addWidget(self.label_11, 3, 1, 1, 1)
self.label_8 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_8.setWordWrap(True)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.gridLayout_6.addWidget(self.label_8, 0, 0, 1, 3)
spacerItem3 = QtGui.QSpacerItem(203, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_6.addItem(spacerItem3, 1, 0, 1, 1)
self.label_12 = QtGui.QLabel(self.tabDemandedDifficulty)
self.label_12.setWordWrap(True)
self.label_12.setObjectName(_fromUtf8("label_12"))
self.gridLayout_6.addWidget(self.label_12, 4, 0, 1, 3)
self.lineEditSmallMessageDifficulty = QtGui.QLineEdit(self.tabDemandedDifficulty)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditSmallMessageDifficulty.sizePolicy().hasHeightForWidth())
self.lineEditSmallMessageDifficulty.setSizePolicy(sizePolicy)
self.lineEditSmallMessageDifficulty.setMaximumSize(QtCore.QSize(70, 16777215))
self.lineEditSmallMessageDifficulty.setObjectName(_fromUtf8("lineEditSmallMessageDifficulty"))
self.gridLayout_6.addWidget(self.lineEditSmallMessageDifficulty, 3, 2, 1, 1)
self.lineEditTotalDifficulty = QtGui.QLineEdit(self.tabDemandedDifficulty)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditTotalDifficulty.sizePolicy().hasHeightForWidth())
self.lineEditTotalDifficulty.setSizePolicy(sizePolicy)
self.lineEditTotalDifficulty.setMaximumSize(QtCore.QSize(70, 16777215))
self.lineEditTotalDifficulty.setObjectName(_fromUtf8("lineEditTotalDifficulty"))
self.gridLayout_6.addWidget(self.lineEditTotalDifficulty, 1, 2, 1, 1)
spacerItem4 = QtGui.QSpacerItem(203, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_6.addItem(spacerItem4, 3, 0, 1, 1)
spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_6.addItem(spacerItem5, 5, 0, 1, 1)
self.tabWidgetSettings.addTab(self.tabDemandedDifficulty, _fromUtf8(""))
self.tabMaxAcceptableDifficulty = QtGui.QWidget()
self.tabMaxAcceptableDifficulty.setObjectName(_fromUtf8("tabMaxAcceptableDifficulty"))
self.gridLayout_7 = QtGui.QGridLayout(self.tabMaxAcceptableDifficulty)
self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
self.label_15 = QtGui.QLabel(self.tabMaxAcceptableDifficulty)
self.label_15.setWordWrap(True)
self.label_15.setObjectName(_fromUtf8("label_15"))
self.gridLayout_7.addWidget(self.label_15, 0, 0, 1, 3)
spacerItem6 = QtGui.QSpacerItem(102, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_7.addItem(spacerItem6, 1, 0, 1, 1)
self.label_13 = QtGui.QLabel(self.tabMaxAcceptableDifficulty)
self.label_13.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_13.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_13.setObjectName(_fromUtf8("label_13"))
self.gridLayout_7.addWidget(self.label_13, 1, 1, 1, 1)
self.lineEditMaxAcceptableTotalDifficulty = QtGui.QLineEdit(self.tabMaxAcceptableDifficulty)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditMaxAcceptableTotalDifficulty.sizePolicy().hasHeightForWidth())
self.lineEditMaxAcceptableTotalDifficulty.setSizePolicy(sizePolicy)
self.lineEditMaxAcceptableTotalDifficulty.setMaximumSize(QtCore.QSize(70, 16777215))
self.lineEditMaxAcceptableTotalDifficulty.setObjectName(_fromUtf8("lineEditMaxAcceptableTotalDifficulty"))
self.gridLayout_7.addWidget(self.lineEditMaxAcceptableTotalDifficulty, 1, 2, 1, 1)
spacerItem7 = QtGui.QSpacerItem(102, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_7.addItem(spacerItem7, 2, 0, 1, 1)
self.label_14 = QtGui.QLabel(self.tabMaxAcceptableDifficulty)
self.label_14.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_14.setObjectName(_fromUtf8("label_14"))
self.gridLayout_7.addWidget(self.label_14, 2, 1, 1, 1)
self.lineEditMaxAcceptableSmallMessageDifficulty = QtGui.QLineEdit(self.tabMaxAcceptableDifficulty)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEditMaxAcceptableSmallMessageDifficulty.sizePolicy().hasHeightForWidth())
self.lineEditMaxAcceptableSmallMessageDifficulty.setSizePolicy(sizePolicy)
self.lineEditMaxAcceptableSmallMessageDifficulty.setMaximumSize(QtCore.QSize(70, 16777215))
self.lineEditMaxAcceptableSmallMessageDifficulty.setObjectName(
_fromUtf8("lineEditMaxAcceptableSmallMessageDifficulty"))
self.gridLayout_7.addWidget(self.lineEditMaxAcceptableSmallMessageDifficulty, 2, 2, 1, 1)
spacerItem8 = QtGui.QSpacerItem(20, 147, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_7.addItem(spacerItem8, 3, 1, 1, 1)
self.labelOpenCL = QtGui.QLabel(self.tabMaxAcceptableDifficulty)
self.labelOpenCL.setObjectName(_fromUtf8("labelOpenCL"))
self.gridLayout_7.addWidget(self.labelOpenCL, 4, 0, 1, 1)
self.comboBoxOpenCL = QtGui.QComboBox(self.tabMaxAcceptableDifficulty)
self.comboBoxOpenCL.setObjectName = (_fromUtf8("comboBoxOpenCL"))
self.gridLayout_7.addWidget(self.comboBoxOpenCL, 4, 1, 1, 1)
self.tabWidgetSettings.addTab(self.tabMaxAcceptableDifficulty, _fromUtf8(""))
self.tabNamecoin = QtGui.QWidget()
self.tabNamecoin.setObjectName(_fromUtf8("tabNamecoin"))
self.gridLayout_8 = QtGui.QGridLayout(self.tabNamecoin)
self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
spacerItem9 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_8.addItem(spacerItem9, 2, 0, 1, 1)
self.label_16 = QtGui.QLabel(self.tabNamecoin)
self.label_16.setWordWrap(True)
self.label_16.setObjectName(_fromUtf8("label_16"))
self.gridLayout_8.addWidget(self.label_16, 0, 0, 1, 3)
self.label_17 = QtGui.QLabel(self.tabNamecoin)
self.label_17.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_17.setObjectName(_fromUtf8("label_17"))
self.gridLayout_8.addWidget(self.label_17, 2, 1, 1, 1)
self.lineEditNamecoinHost = QtGui.QLineEdit(self.tabNamecoin)
self.lineEditNamecoinHost.setObjectName(_fromUtf8("lineEditNamecoinHost"))
self.gridLayout_8.addWidget(self.lineEditNamecoinHost, 2, 2, 1, 1)
spacerItem10 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_8.addItem(spacerItem10, 3, 0, 1, 1)
spacerItem11 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_8.addItem(spacerItem11, 4, 0, 1, 1)
self.label_18 = QtGui.QLabel(self.tabNamecoin)
self.label_18.setEnabled(True)
self.label_18.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_18.setObjectName(_fromUtf8("label_18"))
self.gridLayout_8.addWidget(self.label_18, 3, 1, 1, 1)
self.lineEditNamecoinPort = QtGui.QLineEdit(self.tabNamecoin)
self.lineEditNamecoinPort.setObjectName(_fromUtf8("lineEditNamecoinPort"))
self.gridLayout_8.addWidget(self.lineEditNamecoinPort, 3, 2, 1, 1)
spacerItem12 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_8.addItem(spacerItem12, 8, 1, 1, 1)
self.labelNamecoinUser = QtGui.QLabel(self.tabNamecoin)
self.labelNamecoinUser.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.labelNamecoinUser.setObjectName(_fromUtf8("labelNamecoinUser"))
self.gridLayout_8.addWidget(self.labelNamecoinUser, 4, 1, 1, 1)
self.lineEditNamecoinUser = QtGui.QLineEdit(self.tabNamecoin)
self.lineEditNamecoinUser.setObjectName(_fromUtf8("lineEditNamecoinUser"))
self.gridLayout_8.addWidget(self.lineEditNamecoinUser, 4, 2, 1, 1)
spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_8.addItem(spacerItem13, 5, 0, 1, 1)
self.labelNamecoinPassword = QtGui.QLabel(self.tabNamecoin)
self.labelNamecoinPassword.setAlignment(
QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.labelNamecoinPassword.setObjectName(_fromUtf8("labelNamecoinPassword"))
self.gridLayout_8.addWidget(self.labelNamecoinPassword, 5, 1, 1, 1)
self.lineEditNamecoinPassword = QtGui.QLineEdit(self.tabNamecoin)
self.lineEditNamecoinPassword.setInputMethodHints(
QtCore.Qt.ImhHiddenText | QtCore.Qt.ImhNoAutoUppercase | QtCore.Qt.ImhNoPredictiveText)
self.lineEditNamecoinPassword.setEchoMode(QtGui.QLineEdit.Password)
self.lineEditNamecoinPassword.setObjectName(_fromUtf8("lineEditNamecoinPassword"))
self.gridLayout_8.addWidget(self.lineEditNamecoinPassword, 5, 2, 1, 1)
self.labelNamecoinTestResult = QtGui.QLabel(self.tabNamecoin)
self.labelNamecoinTestResult.setText(_fromUtf8(""))
self.labelNamecoinTestResult.setObjectName(_fromUtf8("labelNamecoinTestResult"))
self.gridLayout_8.addWidget(self.labelNamecoinTestResult, 7, 0, 1, 2)
self.pushButtonNamecoinTest = QtGui.QPushButton(self.tabNamecoin)
self.pushButtonNamecoinTest.setObjectName(_fromUtf8("pushButtonNamecoinTest"))
self.gridLayout_8.addWidget(self.pushButtonNamecoinTest, 7, 2, 1, 1)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.label_21 = QtGui.QLabel(self.tabNamecoin)
self.label_21.setObjectName(_fromUtf8("label_21"))
self.horizontalLayout.addWidget(self.label_21)
self.radioButtonNamecoinNamecoind = QtGui.QRadioButton(self.tabNamecoin)
self.radioButtonNamecoinNamecoind.setObjectName(_fromUtf8("radioButtonNamecoinNamecoind"))
self.horizontalLayout.addWidget(self.radioButtonNamecoinNamecoind)
self.radioButtonNamecoinNmcontrol = QtGui.QRadioButton(self.tabNamecoin)
self.radioButtonNamecoinNmcontrol.setObjectName(_fromUtf8("radioButtonNamecoinNmcontrol"))
self.horizontalLayout.addWidget(self.radioButtonNamecoinNmcontrol)
self.gridLayout_8.addLayout(self.horizontalLayout, 1, 0, 1, 3)
self.tabWidgetSettings.addTab(self.tabNamecoin, _fromUtf8(""))
self.tabResendsExpire = QtGui.QWidget()
self.tabResendsExpire.setObjectName(_fromUtf8("tabResendsExpire"))
self.gridLayout_5 = QtGui.QGridLayout(self.tabResendsExpire)
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.label_7 = QtGui.QLabel(self.tabResendsExpire)
self.label_7.setWordWrap(True)
self.label_7.setObjectName(_fromUtf8("label_7"))
self.gridLayout_5.addWidget(self.label_7, 0, 0, 1, 3)
spacerItem14 = QtGui.QSpacerItem(212, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.gridLayout_5.addItem(spacerItem14, 1, 0, 1, 1)
self.widget = QtGui.QWidget(self.tabResendsExpire)
self.widget.setMinimumSize(QtCore.QSize(231, 75))
self.widget.setObjectName(_fromUtf8("widget"))
self.label_19 = QtGui.QLabel(self.widget)
self.label_19.setGeometry(QtCore.QRect(10, 20, 101, 20))
self.label_19.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_19.setObjectName(_fromUtf8("label_19"))
self.label_20 = QtGui.QLabel(self.widget)
self.label_20.setGeometry(QtCore.QRect(30, 40, 80, 16))
self.label_20.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.label_20.setObjectName(_fromUtf8("label_20"))
self.lineEditDays = QtGui.QLineEdit(self.widget)
self.lineEditDays.setGeometry(QtCore.QRect(113, 20, 51, 20))
self.lineEditDays.setObjectName(_fromUtf8("lineEditDays"))
self.lineEditMonths = QtGui.QLineEdit(self.widget)
self.lineEditMonths.setGeometry(QtCore.QRect(113, 40, 51, 20))
self.lineEditMonths.setObjectName(_fromUtf8("lineEditMonths"))
self.label_22 = QtGui.QLabel(self.widget)
self.label_22.setGeometry(QtCore.QRect(169, 23, 61, 16))
self.label_22.setObjectName(_fromUtf8("label_22"))
self.label_23 = QtGui.QLabel(self.widget)
self.label_23.setGeometry(QtCore.QRect(170, 41, 71, 16))
self.label_23.setObjectName(_fromUtf8("label_23"))
self.gridLayout_5.addWidget(self.widget, 1, 2, 1, 1)
spacerItem15 = QtGui.QSpacerItem(20, 129, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.gridLayout_5.addItem(spacerItem15, 2, 1, 1, 1)
self.tabWidgetSettings.addTab(self.tabResendsExpire, _fromUtf8(""))
self.gridLayout.addWidget(self.tabWidgetSettings, 0, 0, 1, 1)
self.retranslateUi(settingsDialog)
self.tabWidgetSettings.setCurrentIndex(0)
QtCore.QObject.connect( # pylint: disable=no-member
self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), settingsDialog.accept)
QtCore.QObject.connect( # pylint: disable=no-member
self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), settingsDialog.reject)
QtCore.QObject.connect( # pylint: disable=no-member
self.checkBoxAuthentication,
QtCore.SIGNAL(
_fromUtf8("toggled(bool)")),
self.lineEditSocksUsername.setEnabled)
QtCore.QObject.connect( # pylint: disable=no-member
self.checkBoxAuthentication,
QtCore.SIGNAL(
_fromUtf8("toggled(bool)")),
self.lineEditSocksPassword.setEnabled)
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
settingsDialog.setTabOrder(self.tabWidgetSettings, self.checkBoxStartOnLogon)
settingsDialog.setTabOrder(self.checkBoxStartOnLogon, self.checkBoxStartInTray)
settingsDialog.setTabOrder(self.checkBoxStartInTray, self.checkBoxMinimizeToTray)
settingsDialog.setTabOrder(self.checkBoxMinimizeToTray, self.lineEditTCPPort)
settingsDialog.setTabOrder(self.lineEditTCPPort, self.comboBoxProxyType)
settingsDialog.setTabOrder(self.comboBoxProxyType, self.lineEditSocksHostname)
settingsDialog.setTabOrder(self.lineEditSocksHostname, self.lineEditSocksPort)
settingsDialog.setTabOrder(self.lineEditSocksPort, self.checkBoxAuthentication)
settingsDialog.setTabOrder(self.checkBoxAuthentication, self.lineEditSocksUsername)
settingsDialog.setTabOrder(self.lineEditSocksUsername, self.lineEditSocksPassword)
settingsDialog.setTabOrder(self.lineEditSocksPassword, self.checkBoxSocksListen)
settingsDialog.setTabOrder(self.checkBoxSocksListen, self.buttonBox)
def retranslateUi(self, settingsDialog):
"""Re-translate the UI into the supported languages"""
settingsDialog.setWindowTitle(_translate("settingsDialog", "Settings", None))
self.checkBoxStartOnLogon.setText(_translate("settingsDialog", "Start Bitmessage on user login", None))
self.groupBoxTray.setTitle(_translate("settingsDialog", "Tray", None))
self.checkBoxStartInTray.setText(
_translate(
"settingsDialog",
"Start Bitmessage in the tray (don\'t show main window)",
None))
self.checkBoxMinimizeToTray.setText(_translate("settingsDialog", "Minimize to tray", None))
self.checkBoxTrayOnClose.setText(_translate("settingsDialog", "Close to tray", None))
self.checkBoxHideTrayConnectionNotifications.setText(
_translate("settingsDialog", "Hide connection notifications", None))
self.checkBoxShowTrayNotifications.setText(
_translate(
"settingsDialog",
"Show notification when message received",
None))
self.checkBoxPortableMode.setText(_translate("settingsDialog", "Run in Portable Mode", None))
self.PortableModeDescription.setText(
_translate(
"settingsDialog",
"In Portable Mode, messages and config files are stored in the same directory as the"
" program rather than the normal application-data folder. This makes it convenient to"
" run Bitmessage from a USB thumb drive.",
None))
self.checkBoxWillinglySendToMobile.setText(
_translate(
"settingsDialog",
"Willingly include unencrypted destination address when sending to a mobile device",
None))
self.checkBoxUseIdenticons.setText(_translate("settingsDialog", "Use Identicons", None))
self.checkBoxReplyBelow.setText(_translate("settingsDialog", "Reply below Quote", None))
self.groupBox.setTitle(_translate("settingsDialog", "Interface Language", None))
self.languageComboBox.setItemText(0, _translate("settingsDialog", "System Settings", "system"))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabUserInterface),
_translate(
"settingsDialog", "User Interface", None))
self.groupBox1.setTitle(_translate("settingsDialog", "Listening port", None))
self.label.setText(_translate("settingsDialog", "Listen for connections on port:", None))
self.labelUPnP.setText(_translate("settingsDialog", "UPnP:", None))
self.groupBox_3.setTitle(_translate("settingsDialog", "Bandwidth limit", None))
self.label_24.setText(_translate("settingsDialog", "Maximum download rate (kB/s): [0: unlimited]", None))
self.label_25.setText(_translate("settingsDialog", "Maximum upload rate (kB/s): [0: unlimited]", None))
self.label_26.setText(_translate("settingsDialog", "Maximum outbound connections: [0: none]", None))
self.groupBox_2.setTitle(_translate("settingsDialog", "Proxy server / Tor", None))
self.label_2.setText(_translate("settingsDialog", "Type:", None))
self.label_3.setText(_translate("settingsDialog", "Server hostname:", None))
self.label_4.setText(_translate("settingsDialog", "Port:", None))
self.checkBoxAuthentication.setText(_translate("settingsDialog", "Authentication", None))
self.label_5.setText(_translate("settingsDialog", "Username:", None))
self.label_6.setText(_translate("settingsDialog", "Pass:", None))
self.checkBoxSocksListen.setText(
_translate(
"settingsDialog",
"Listen for incoming connections when using proxy",
None))
self.comboBoxProxyType.setItemText(0, _translate("settingsDialog", "none", None))
self.comboBoxProxyType.setItemText(1, _translate("settingsDialog", "SOCKS4a", None))
self.comboBoxProxyType.setItemText(2, _translate("settingsDialog", "SOCKS5", None))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabNetworkSettings),
_translate(
"settingsDialog", "Network Settings", None))
self.label_9.setText(_translate("settingsDialog", "Total difficulty:", None))
self.label_10.setText(
_translate(
"settingsDialog",
"The \'Total difficulty\' affects the absolute amount of work the sender must complete."
" Doubling this value doubles the amount of work.",
None))
self.label_11.setText(_translate("settingsDialog", "Small message difficulty:", None))
self.label_8.setText(_translate(
"settingsDialog",
"When someone sends you a message, their computer must first complete some work. The difficulty of this"
" work, by default, is 1. You may raise this default for new addresses you create by changing the values"
" here. Any new addresses you create will require senders to meet the higher difficulty. There is one"
" exception: if you add a friend or acquaintance to your address book, Bitmessage will automatically"
" notify them when you next send a message that they need only complete the minimum amount of"
" work: difficulty 1. ",
None))
self.label_12.setText(
_translate(
"settingsDialog",
"The \'Small message difficulty\' mostly only affects the difficulty of sending small messages."
" Doubling this value makes it almost twice as difficult to send a small message but doesn\'t really"
" affect large messages.",
None))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabDemandedDifficulty),
_translate(
"settingsDialog", "Demanded difficulty", None))
self.label_15.setText(
_translate(
"settingsDialog",
"Here you may set the maximum amount of work you are willing to do to send a message to another"
" person. Setting these values to 0 means that any value is acceptable.",
None))
self.label_13.setText(_translate("settingsDialog", "Maximum acceptable total difficulty:", None))
self.label_14.setText(_translate("settingsDialog", "Maximum acceptable small message difficulty:", None))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabMaxAcceptableDifficulty),
_translate(
"settingsDialog", "Max acceptable difficulty", None))
self.labelOpenCL.setText(_translate("settingsDialog", "Hardware GPU acceleration (OpenCL):", None))
self.label_16.setText(_translate(
"settingsDialog",
"<html><head/><body><p>Bitmessage can utilize a different Bitcoin-based program called Namecoin to make"
" addresses human-friendly. For example, instead of having to tell your friend your long Bitmessage"
" address, you can simply tell him to send a message to <span style=\" font-style:italic;\">test."
" </span></p><p>(Getting your own Bitmessage address into Namecoin is still rather difficult).</p>"
"<p>Bitmessage can use either namecoind directly or a running nmcontrol instance.</p></body></html>",
None))
self.label_17.setText(_translate("settingsDialog", "Host:", None))
self.label_18.setText(_translate("settingsDialog", "Port:", None))
self.labelNamecoinUser.setText(_translate("settingsDialog", "Username:", None))
self.labelNamecoinPassword.setText(_translate("settingsDialog", "Password:", None))
self.pushButtonNamecoinTest.setText(_translate("settingsDialog", "Test", None))
self.label_21.setText(_translate("settingsDialog", "Connect to:", None))
self.radioButtonNamecoinNamecoind.setText(_translate("settingsDialog", "Namecoind", None))
self.radioButtonNamecoinNmcontrol.setText(_translate("settingsDialog", "NMControl", None))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabNamecoin),
_translate(
"settingsDialog", "Namecoin integration", None))
self.label_7.setText(_translate(
"settingsDialog",
"<html><head/><body><p>By default, if you send a message to someone and he is offline for more than two"
" days, Bitmessage will send the message again after an additional two days. This will be continued with"
" exponential backoff forever; messages will be resent after 5, 10, 20 days ect. until the receiver"
" acknowledges them. Here you may change that behavior by having Bitmessage give up after a certain"
" number of days or months.</p><p>Leave these input fields blank for the default behavior."
" </p></body></html>",
None))
self.label_19.setText(_translate("settingsDialog", "Give up after", None))
self.label_20.setText(_translate("settingsDialog", "and", None))
self.label_22.setText(_translate("settingsDialog", "days", None))
self.label_23.setText(_translate("settingsDialog", "months.", None))
self.tabWidgetSettings.setTabText(
self.tabWidgetSettings.indexOf(
self.tabResendsExpire),
_translate(
"settingsDialog", "Resends Expire", None))

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>521</width> <width>555</width>
<height>413</height> <height>592</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -44,23 +44,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxStartInTray">
<property name="text">
<string>Start Bitmessage in the tray (don't show main window)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="checkBoxMinimizeToTray">
<property name="text">
<string>Minimize to tray</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="checkBoxShowTrayNotifications"> <widget class="QCheckBox" name="checkBoxShowTrayNotifications">
<property name="text"> <property name="text">
@ -126,81 +109,52 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<item> </widget>
<property name="text">
<string comment="system">System Settings</string>
</property>
</item> </item>
<item> </layout>
<property name="text"> </widget>
<string notr="true" comment="en">English</string>
</property>
</item> </item>
<item> <item row="2" column="0">
<widget class="QCheckBox" name="checkBoxHideTrayConnectionNotifications">
<property name="text"> <property name="text">
<string notr="true" comment="eo">Esperanto</string> <string>Hide connection notifications</string>
</property> </property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item> </item>
<item> <item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="groupBoxTray">
<property name="title">
<string>Tray</string>
</property>
<layout class="QFormLayout" name="formLayoutTray">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="checkBoxStartInTray">
<property name="text"> <property name="text">
<string notr="true" comment="fr">Français</string> <string>Start Bitmessage in the tray (don't show main window)</string>
</property> </property>
</widget>
</item> </item>
<item> <item row="1" column="0">
<widget class="QCheckBox" name="checkBoxMinimizeToTray">
<property name="text"> <property name="text">
<string notr="true" comment="de">Deutsch</string> <string>Minimize to tray</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item> <item row="2" column="0">
<widget class="QCheckBox" name="checkBoxTrayOnClose">
<property name="text"> <property name="text">
<string notr="true" comment="es">Español</string> <string>Close to tray</string>
</property> </property>
</item> <property name="checked">
<item> <bool>true</bool>
<property name="text">
<string notr="true" comment="ru">русский</string>
</property> </property>
</item>
<item>
<property name="text">
<string notr="true" comment="no">Norsk</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="ar">العربية</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="zh_cn">简体中文</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="ja">日本語</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="nl">Nederlands</string>
</property>
</item>
<item>
<property name="text">
<string notr="true" comment="cs">Česky</string>
</property>
</item>
<item>
<property name="text">
<string comment="en_pirate">Pirate English</string>
</property>
</item>
<item>
<property name="text">
<string comment="other">Other (set in keys.dat)</string>
</property>
</item>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -213,33 +167,33 @@
<string>Network Settings</string> <string>Network Settings</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>Listening port</string> <string>Listening port</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0" alignment="Qt::AlignRight">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>125</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Listen for connections on port:</string> <string>Listen for connections on port:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="1" alignment="Qt::AlignLeft">
<widget class="QLineEdit" name="lineEditTCPPort"> <widget class="QLineEdit" name="lineEditTCPPort">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -249,94 +203,13 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="0" column="3" alignment="Qt::AlignLeft">
</widget> <widget class="QCheckBox" name="checkBoxUPnP"/>
</item> </item>
<item row="2" column="0"> <item row="0" column="2" alignment="Qt::AlignRight">
<widget class="QGroupBox" name="groupBox_3"> <widget class="QLabel" name="labelUPnP">
<property name="title">
<string>Bandwidth limit</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0" rowspan="2">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_24">
<property name="text"> <property name="text">
<string>Maximum download rate (kB/s): [0: unlimited]</string> <string>UPnP:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="lineEditMaxDownloadRate">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_25">
<property name="text">
<string>Maximum upload rate (kB/s): [0: unlimited]</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="lineEditMaxUploadRate">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Maximum outbound connections: [0: none]</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="lineEditMaxOutboundConnections">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -364,7 +237,11 @@
</widget> </widget>
</item> </item>
<item row="1" column="2" colspan="2"> <item row="1" column="2" colspan="2">
<widget class="QLineEdit" name="lineEditSocksHostname"/> <widget class="QLineEdit" name="lineEditSocksHostname">
<property name="placeholderText">
<string notr="true">127.0.0.1</string>
</property>
</widget>
</item> </item>
<item row="1" column="4"> <item row="1" column="4">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
@ -446,21 +323,99 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<spacer name="verticalSpacer"> <widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Bandwidth limit</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="2" column="2">
<widget class="QLineEdit" name="lineEditMaxOutboundConnections">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_25">
<property name="text">
<string>Maximum upload rate (kB/s): [0: unlimited]</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="lineEditMaxUploadRate">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="lineEditMaxDownloadRate">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Maximum outbound connections: [0: none]</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_24">
<property name="text">
<string>Maximum download rate (kB/s): [0: unlimited]</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<spacer name="horizontalSpacer_11">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>40</width>
<height>40</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabDemandedDifficulty"> <widget class="QWidget" name="tabDemandedDifficulty">
<attribute name="title"> <attribute name="title">
<string>Demanded difficulty</string> <string>Demanded difficulty</string>
@ -698,6 +653,16 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="0">
<widget class="QLabel" name="labelOpenCL">
<property name="text">
<string>Hardware GPU acceleration (OpenCL):</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxOpenCL"/>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabNamecoin"> <widget class="QWidget" name="tabNamecoin">
@ -741,7 +706,7 @@
<item row="2" column="2"> <item row="2" column="2">
<widget class="QLineEdit" name="lineEditNamecoinHost"/> <widget class="QLineEdit" name="lineEditNamecoinHost"/>
</item> </item>
<item row="3" column="0"> <item row="4" column="0">
<spacer name="horizontalSpacer_7"> <spacer name="horizontalSpacer_7">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -754,7 +719,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="0"> <item row="3" column="0">
<spacer name="horizontalSpacer_8"> <spacer name="horizontalSpacer_8">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>

View File

@ -10,4 +10,4 @@ def resource_path(resFile):
return os.path.join(baseDir, subDir, resFile) return os.path.join(baseDir, subDir, resFile)
def load(resFile, widget): def load(resFile, widget):
uic.loadUi(resource_path(resFile), widget) return uic.loadUi(resource_path(resFile), widget)

View File

@ -352,11 +352,7 @@ class singleWorker(threading.Thread, helper_threading.StoppableThread):
debug.logger.info("Sending pubkey of %s", address) debug.logger.info("Sending pubkey of %s", address)
TTL = randomizeTTL(28 * 24 * 60 * 60) TTL = randomizeTTL(28 * 24 * 60 * 60)
if addressProperties.version > 2:
expiryTime = int(time.time() + TTL) expiryTime = int(time.time() + TTL)
else:
expiryTime = None
headlessPayload = struct.pack(">I", 1) headlessPayload = struct.pack(">I", 1)
headlessPayload += addresses.encodeVarint(addressProperties.version) headlessPayload += addresses.encodeVarint(addressProperties.version)
@ -895,6 +891,7 @@ class singleWorker(threading.Thread, helper_threading.StoppableThread):
debug.logger.info("Making request for version %s pubkey with tag: %s", version, binascii.hexlify(tag)) debug.logger.info("Making request for version %s pubkey with tag: %s", version, binascii.hexlify(tag))
TTL = randomizeTTL(28 * 24 * 60 * 60) TTL = randomizeTTL(28 * 24 * 60 * 60)
expiryTime = int(time.time() + TTL)
headlessPayload = struct.pack(">I", 0) headlessPayload = struct.pack(">I", 0)
headlessPayload += addresses.encodeVarint(version) headlessPayload += addresses.encodeVarint(version)
@ -936,7 +933,7 @@ class singleWorker(threading.Thread, helper_threading.StoppableThread):
))) )))
self.startWork( self.startWork(
ID, headlessPayload, TTL, None, ID, headlessPayload, TTL, expiryTime,
defaults.networkDefaultProofOfWorkNonceTrialsPerByte, defaults.networkDefaultProofOfWorkNonceTrialsPerByte,
defaults.networkDefaultPayloadLengthExtraBytes, defaults.networkDefaultPayloadLengthExtraBytes,
"(For getpubkey message)".format(version), "(For getpubkey message)".format(version),

View File

@ -27,6 +27,8 @@ class Task(object):
self.expiryTime = expiryTime self.expiryTime = expiryTime
self.target = target self.target = target
Status = collections.namedtuple("Status", ["solverName", "solverStatus", "speed", "tasksCount"])
class WorkProver(threading.Thread): class WorkProver(threading.Thread):
# Seed must be 32 bytes # Seed must be 32 bytes
@ -92,7 +94,7 @@ class WorkProver(threading.Thread):
if self.solver is not None: if self.solver is not None:
status = self.solver.status status = self.solver.status
self.statusUpdated((self.solverName, status, self.speed, len(self.tasks))) self.statusUpdated(Status(self.solverName, status, self.speed, len(self.tasks)))
def setSolver(self, name, configuration): def setSolver(self, name, configuration):
if name is None and self.solverName is None: if name is None and self.solverName is None: