try to migrate to Python3 + PyQt6

This commit is contained in:
Kashiko Koibumi 2024-05-13 08:06:24 +09:00
parent 3b36676793
commit 6dfecbe361
No known key found for this signature in database
GPG Key ID: 8F06E069E37C40C4
52 changed files with 1817 additions and 1087 deletions

View File

@ -15,45 +15,45 @@ import time
from datetime import datetime, timedelta
from sqlite3 import register_adapter
from PyQt4 import QtCore, QtGui
from PyQt4.QtNetwork import QLocalSocket, QLocalServer
from PyQt6 import QtCore, QtGui, QtWidgets
from PyQt6.QtNetwork import QLocalSocket, QLocalServer
import shared
import state
from debug import logger
from tr import _translate
from account import (
from .account import (
accountClass, getSortedSubscriptions,
BMAccount, GatewayAccount, MailchuckAccount, AccountColor)
from addresses import decodeAddress, addBMIfNotPresent
from bitmessageui import Ui_MainWindow
from .bitmessageui import Ui_MainWindow
from bmconfigparser import config
import namecoin
from messageview import MessageView
from migrationwizard import Ui_MigrationWizard
from foldertree import (
from .messageview import MessageView
from .migrationwizard import Ui_MigrationWizard
from .foldertree import (
AccountMixin, Ui_FolderWidget, Ui_AddressWidget, Ui_SubscriptionWidget,
MessageList_AddressWidget, MessageList_SubjectWidget,
Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress,
MessageList_TimeWidget)
import settingsmixin
import support
import bitmessageqt.settingsmixin
import bitmessageqt.support
from helper_sql import sqlQuery, sqlExecute, sqlExecuteChunked, sqlStoredProcedure
import helper_addressbook
import helper_search
import l10n
from utils import str_broadcast_subscribers, avatarize
import dialogs
from .utils import str_broadcast_subscribers, avatarize
import bitmessageqt.dialogs
from network.stats import pendingDownload, pendingUpload
from uisignaler import UISignaler
from .uisignaler import UISignaler
import paths
from proofofwork import getPowType
import queues
import shutdown
from statusbar import BMStatusBar
import sound
from .statusbar import BMStatusBar
import bitmessageqt.sound
# This is needed for tray icon
import bitmessage_icons_rc # noqa:F401 pylint: disable=unused-import
import bitmessageqt.bitmessage_icons_rc # noqa:F401 pylint: disable=unused-import
import helper_sent
try:
@ -112,7 +112,7 @@ class MyForm(settingsmixin.SMainWindow):
translationpath = os.path.join(
paths.codePath(), 'translations', 'bitmessage_' + newlocale)
self.qmytranslator.load(translationpath)
QtGui.QApplication.installTranslator(self.qmytranslator)
QtWidgets.QApplication.installTranslator(self.qmytranslator)
self.qsystranslator = QtCore.QTranslator()
if paths.frozen:
@ -120,10 +120,10 @@ class MyForm(settingsmixin.SMainWindow):
paths.codePath(), 'translations', 'qt_' + newlocale)
else:
translationpath = os.path.join(
str(QtCore.QLibraryInfo.location(
QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + newlocale)
str(QtCore.QLibraryInfo.path(
QtCore.QLibraryInfo.LibraryPath.TranslationsPath)), 'qt_' + newlocale)
self.qsystranslator.load(translationpath)
QtGui.QApplication.installTranslator(self.qsystranslator)
QtWidgets.QApplication.installTranslator(self.qsystranslator)
# TODO: move this block into l10n
# FIXME: shouldn't newlocale be used here?
@ -148,50 +148,27 @@ class MyForm(settingsmixin.SMainWindow):
logger.error("Failed to set locale to %s", lang, exc_info=True)
def init_file_menu(self):
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL(
"triggered()"), self.quit)
QtCore.QObject.connect(self.ui.actionNetworkSwitch, QtCore.SIGNAL(
"triggered()"), self.network_switch)
QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL(
"triggered()"), self.click_actionManageKeys)
QtCore.QObject.connect(self.ui.actionDeleteAllTrashedMessages,
QtCore.SIGNAL(
"triggered()"),
self.click_actionDeleteAllTrashedMessages)
QtCore.QObject.connect(self.ui.actionRegenerateDeterministicAddresses,
QtCore.SIGNAL(
"triggered()"),
self.click_actionRegenerateDeterministicAddresses)
QtCore.QObject.connect(
self.ui.pushButtonAddChan,
QtCore.SIGNAL("clicked()"),
self.click_actionJoinChan) # also used for creating chans.
QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL(
"clicked()"), self.click_NewAddressDialog)
QtCore.QObject.connect(self.ui.pushButtonAddAddressBook, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddAddressBook)
QtCore.QObject.connect(self.ui.pushButtonAddSubscription, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddSubscription)
QtCore.QObject.connect(self.ui.pushButtonTTL, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonTTL)
QtCore.QObject.connect(self.ui.pushButtonClear, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonClear)
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonSend)
QtCore.QObject.connect(self.ui.pushButtonFetchNamecoinID, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonFetchNamecoinID)
QtCore.QObject.connect(self.ui.actionSettings, QtCore.SIGNAL(
"triggered()"), self.click_actionSettings)
QtCore.QObject.connect(self.ui.actionAbout, QtCore.SIGNAL(
"triggered()"), self.click_actionAbout)
QtCore.QObject.connect(self.ui.actionSupport, QtCore.SIGNAL(
"triggered()"), self.click_actionSupport)
QtCore.QObject.connect(self.ui.actionHelp, QtCore.SIGNAL(
"triggered()"), self.click_actionHelp)
self.ui.actionExit.triggered.connect(self.quit)
self.ui.actionNetworkSwitch.triggered.connect(self.network_switch)
self.ui.actionManageKeys.triggered.connect(self.click_actionManageKeys)
self.ui.actionDeleteAllTrashedMessages.triggered.connect(self.click_actionDeleteAllTrashedMessages)
self.ui.actionRegenerateDeterministicAddresses.triggered.connect(self.click_actionRegenerateDeterministicAddresses)
self.ui.pushButtonAddChan.clicked.connect(self.click_actionJoinChan) # also used for creating chans.
self.ui.pushButtonNewAddress.clicked.connect(self.click_NewAddressDialog)
self.ui.pushButtonAddAddressBook.clicked.connect(self.click_pushButtonAddAddressBook)
self.ui.pushButtonAddSubscription.clicked.connect(self.click_pushButtonAddSubscription)
self.ui.pushButtonTTL.clicked.connect(self.click_pushButtonTTL)
self.ui.pushButtonClear.clicked.connect(self.click_pushButtonClear)
self.ui.pushButtonSend.clicked.connect(self.click_pushButtonSend)
self.ui.pushButtonFetchNamecoinID.clicked.connect(self.click_pushButtonFetchNamecoinID)
self.ui.actionSettings.triggered.connect(self.click_actionSettings)
self.ui.actionAbout.triggered.connect(self.click_actionAbout)
self.ui.actionSupport.triggered.connect(self.click_actionSupport)
self.ui.actionHelp.triggered.connect(self.click_actionHelp)
def init_inbox_popup_menu(self, connectSignal=True):
# Popup menu for the Inbox tab
self.ui.inboxContextMenuToolbar = QtGui.QToolBar()
self.ui.inboxContextMenuToolbar = QtWidgets.QToolBar()
# Actions
self.actionReply = self.ui.inboxContextMenuToolbar.addAction(_translate(
"MainWindow", "Reply to sender"), self.on_action_InboxReply)
@ -225,27 +202,21 @@ class MyForm(settingsmixin.SMainWindow):
# contextmenu messagelists
self.ui.tableWidgetInbox.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuInbox)
self.ui.tableWidgetInbox.customContextMenuRequested.connect(self.on_context_menuInbox)
self.ui.tableWidgetInboxSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuInbox)
self.ui.tableWidgetInboxSubscriptions.customContextMenuRequested.connect(self.on_context_menuInbox)
self.ui.tableWidgetInboxChans.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.tableWidgetInboxChans, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuInbox)
self.ui.tableWidgetInboxChans.customContextMenuRequested.connect(self.on_context_menuInbox)
def init_identities_popup_menu(self, connectSignal=True):
# Popup menu for the Your Identities tab
self.ui.addressContextMenuToolbarYourIdentities = QtGui.QToolBar()
self.ui.addressContextMenuToolbarYourIdentities = QtWidgets.QToolBar()
# Actions
self.actionNewYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(_translate(
"MainWindow", "New"), self.on_action_YourIdentitiesNew)
@ -277,11 +248,9 @@ class MyForm(settingsmixin.SMainWindow):
self.on_action_MarkAllRead)
self.ui.treeWidgetYourIdentities.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuYourIdentities)
self.ui.treeWidgetYourIdentities.customContextMenuRequested.connect(self.on_context_menuYourIdentities)
# load all gui.menu plugins with prefix 'address'
self.menu_plugins = {'address': []}
@ -327,15 +296,13 @@ class MyForm(settingsmixin.SMainWindow):
self.on_action_SpecialAddressBehaviorDialog)
self.ui.treeWidgetChans.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuChan)
self.ui.treeWidgetChans.customContextMenuRequested.connect(self.on_context_menuChan)
def init_addressbook_popup_menu(self, connectSignal=True):
# Popup menu for the Address Book page
self.ui.addressBookContextMenuToolbar = QtGui.QToolBar()
self.ui.addressBookContextMenuToolbar = QtWidgets.QToolBar()
# Actions
self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction(
_translate(
@ -364,11 +331,9 @@ class MyForm(settingsmixin.SMainWindow):
_translate(
"MainWindow", "Delete"), self.on_action_AddressBookDelete)
self.ui.tableWidgetAddressBook.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuAddressBook)
self.ui.tableWidgetAddressBook.customContextMenuRequested.connect(self.on_context_menuAddressBook)
def init_subscriptions_popup_menu(self, connectSignal=True):
# Actions
@ -393,11 +358,9 @@ class MyForm(settingsmixin.SMainWindow):
_translate("MainWindow", "Send message to this address"),
self.on_action_Send)
self.ui.treeWidgetSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuSubscriptions)
self.ui.treeWidgetSubscriptions.customContextMenuRequested.connect(self.on_context_menuSubscriptions)
def init_sent_popup_menu(self, connectSignal=True):
# Actions
@ -421,12 +384,12 @@ class MyForm(settingsmixin.SMainWindow):
def rerenderTabTreeSubscriptions(self):
treeWidget = self.ui.treeWidgetSubscriptions
folders = Ui_FolderWidget.folderWeight.keys()
folders.remove("new")
Ui_FolderWidget.folderWeight.pop("new", None)
# sort ascending when creating
if treeWidget.topLevelItemCount() == 0:
treeWidget.header().setSortIndicator(
0, QtCore.Qt.AscendingOrder)
0, QtCore.Qt.SortOrder.AscendingOrder)
# init dictionary
db = getSortedSubscriptions(True)
@ -468,7 +431,7 @@ class MyForm(settingsmixin.SMainWindow):
# add missing folders
if len(db[toAddress]) > 0:
j = 0
for f, c in db[toAddress].iteritems():
for f, c in db[toAddress].items():
try:
subwidget = Ui_FolderWidget(widget, j, toAddress, f, c['count'])
except KeyError:
@ -517,7 +480,7 @@ class MyForm(settingsmixin.SMainWindow):
# sort ascending when creating
if treeWidget.topLevelItemCount() == 0:
treeWidget.header().setSortIndicator(
0, QtCore.Qt.AscendingOrder)
0, QtCore.Qt.SortOrder.AscendingOrder)
# init dictionary
db = {}
enabled = {}
@ -598,7 +561,7 @@ class MyForm(settingsmixin.SMainWindow):
# add missing folders
if len(db[toAddress]) > 0:
j = 0
for f, c in db[toAddress].iteritems():
for f, c in db[toAddress].items():
if toAddress is not None and tab == 'messages' and folder == "new":
continue
subwidget = Ui_FolderWidget(widget, j, toAddress, f, c)
@ -627,7 +590,7 @@ class MyForm(settingsmixin.SMainWindow):
treeWidget.setSortingEnabled(True)
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
QtWidgets.QWidget.__init__(self, parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
@ -695,65 +658,44 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderSubscriptions()
# Initialize the inbox search
QtCore.QObject.connect(self.ui.inboxSearchLineEdit, QtCore.SIGNAL(
"returnPressed()"), self.inboxSearchLineEditReturnPressed)
QtCore.QObject.connect(self.ui.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
"returnPressed()"), self.inboxSearchLineEditReturnPressed)
QtCore.QObject.connect(self.ui.inboxSearchLineEditChans, QtCore.SIGNAL(
"returnPressed()"), self.inboxSearchLineEditReturnPressed)
QtCore.QObject.connect(self.ui.inboxSearchLineEdit, QtCore.SIGNAL(
"textChanged(QString)"), self.inboxSearchLineEditUpdated)
QtCore.QObject.connect(self.ui.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
"textChanged(QString)"), self.inboxSearchLineEditUpdated)
QtCore.QObject.connect(self.ui.inboxSearchLineEditChans, QtCore.SIGNAL(
"textChanged(QString)"), self.inboxSearchLineEditUpdated)
self.ui.inboxSearchLineEdit.returnPressed.connect(self.inboxSearchLineEditReturnPressed)
self.ui.inboxSearchLineEditSubscriptions.returnPressed.connect(self.inboxSearchLineEditReturnPressed)
self.ui.inboxSearchLineEditChans.returnPressed.connect(self.inboxSearchLineEditReturnPressed)
self.ui.inboxSearchLineEdit.textChanged.connect(self.inboxSearchLineEditUpdated)
self.ui.inboxSearchLineEditSubscriptions.textChanged.connect(self.inboxSearchLineEditUpdated)
self.ui.inboxSearchLineEditChans.textChanged.connect(self.inboxSearchLineEditUpdated)
# Initialize addressbook
QtCore.QObject.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.tableWidgetAddressBookItemChanged)
self.ui.tableWidgetAddressBook.itemChanged.connect(self.tableWidgetAddressBookItemChanged)
# This is necessary for the completer to work if multiple recipients
QtCore.QObject.connect(self.ui.lineEditTo, QtCore.SIGNAL(
"cursorPositionChanged(int, int)"), self.ui.lineEditTo.completer().onCursorPositionChanged)
self.ui.lineEditTo.cursorPositionChanged.connect(self.ui.lineEditTo.completer().onCursorPositionChanged)
# show messages from message list
QtCore.QObject.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
QtCore.QObject.connect(self.ui.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
QtCore.QObject.connect(self.ui.tableWidgetInboxChans, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
self.ui.tableWidgetInbox.itemSelectionChanged.connect(self.tableWidgetInboxItemClicked)
self.ui.tableWidgetInboxSubscriptions.itemSelectionChanged.connect(self.tableWidgetInboxItemClicked)
self.ui.tableWidgetInboxChans.itemSelectionChanged.connect(self.tableWidgetInboxItemClicked)
# tree address lists
QtCore.QObject.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetItemClicked)
QtCore.QObject.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
"itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
QtCore.QObject.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetItemClicked)
QtCore.QObject.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
"itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
QtCore.QObject.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetItemClicked)
QtCore.QObject.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
"itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
QtCore.QObject.connect(
self.ui.tabWidget, QtCore.SIGNAL("currentChanged(int)"),
self.tabWidgetCurrentChanged
)
self.ui.treeWidgetYourIdentities.itemSelectionChanged.connect(self.treeWidgetItemClicked)
self.ui.treeWidgetYourIdentities.itemChanged.connect(self.treeWidgetItemChanged)
self.ui.treeWidgetSubscriptions.itemSelectionChanged.connect(self.treeWidgetItemClicked)
self.ui.treeWidgetSubscriptions.itemChanged.connect(self.treeWidgetItemChanged)
self.ui.treeWidgetChans.itemSelectionChanged.connect(self.treeWidgetItemClicked)
self.ui.treeWidgetChans.itemChanged.connect(self.treeWidgetItemChanged)
self.ui.tabWidget.currentChanged.connect(self.tabWidgetCurrentChanged)
# Put the colored icon on the status bar
# self.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/yellowicon.png"))
self.setStatusBar(BMStatusBar())
self.statusbar = self.statusBar()
self.pushButtonStatusIcon = QtGui.QPushButton(self)
self.pushButtonStatusIcon = QtWidgets.QPushButton(self)
self.pushButtonStatusIcon.setText('')
self.pushButtonStatusIcon.setIcon(
QtGui.QIcon(':/newPrefix/images/redicon.png'))
self.pushButtonStatusIcon.setFlat(True)
self.statusbar.insertPermanentWidget(0, self.pushButtonStatusIcon)
QtCore.QObject.connect(self.pushButtonStatusIcon, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonStatusIcon)
self.pushButtonStatusIcon.clicked.connect(self.click_pushButtonStatusIcon)
self.unreadCount = 0
@ -767,39 +709,21 @@ class MyForm(settingsmixin.SMainWindow):
self.UISignalThread = UISignaler.get()
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateStatusBar(PyQt_PyObject)"), self.updateStatusBar)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateSentItemStatusByToAddress(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByToAddress)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
self.displayNewInboxMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,"
"PyQt_PyObject,PyQt_PyObject)"),
self.displayNewSentMessage)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"setStatusIcon(PyQt_PyObject)"), self.setStatusIcon)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"changedInboxUnread(PyQt_PyObject)"), self.changedInboxUnread)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderMessagelistFromLabels()"), self.rerenderMessagelistFromLabels)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderMessgelistToLabels()"), self.rerenderMessagelistToLabels)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderAddressBook()"), self.rerenderAddressBook)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderSubscriptions()"), self.rerenderSubscriptions)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"removeInboxRowByMsgid(PyQt_PyObject)"), self.removeInboxRowByMsgid)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"newVersionAvailable(PyQt_PyObject)"), self.newVersionAvailable)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"displayAlert(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayAlert)
self.UISignalThread.writeNewAddressToTable.connect(self.writeNewAddressToTable)
self.UISignalThread.updateStatusBar.connect(self.updateStatusBar)
self.UISignalThread.updateSentItemStatusByToAddress.connect(self.updateSentItemStatusByToAddress)
self.UISignalThread.updateSentItemStatusByAckdata.connect(self.updateSentItemStatusByAckdata)
self.UISignalThread.displayNewInboxMessage.connect(self.displayNewInboxMessage)
self.UISignalThread.displayNewSentMessage.connect(self.displayNewSentMessage)
self.UISignalThread.setStatusIcon.connect(self.setStatusIcon)
self.UISignalThread.changedInboxUnread.connect(self.changedInboxUnread)
self.UISignalThread.rerenderMessagelistFromLabels.connect(self.rerenderMessagelistFromLabels)
self.UISignalThread.rerenderMessagelistToLabels.connect(self.rerenderMessagelistToLabels)
self.UISignalThread.rerenderAddressBook.connect(self.rerenderAddressBook)
self.UISignalThread.rerenderSubscriptions.connect(self.rerenderSubscriptions)
self.UISignalThread.removeInboxRowByMsgid.connect(self.removeInboxRowByMsgid)
self.UISignalThread.newVersionAvailable.connect(self.newVersionAvailable)
self.UISignalThread.displayAlert.connect(self.displayAlert)
self.UISignalThread.start()
# Key press in tree view
@ -832,11 +756,10 @@ class MyForm(settingsmixin.SMainWindow):
TTL = 3600
elif TTL > 28*24*60*60: # 28 days
TTL = 28*24*60*60
self.ui.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199))
self.ui.horizontalSliderTTL.setSliderPosition(int((TTL - 3600) ** (1/3.199)))
self.updateHumanFriendlyTTLDescription(TTL)
QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL(
"valueChanged(int)"), self.updateTTL)
self.ui.horizontalSliderTTL.valueChanged.connect(self.updateTTL)
self.initSettings()
self.resetNamecoinConnection()
@ -898,9 +821,9 @@ class MyForm(settingsmixin.SMainWindow):
if numberOfHours < 48:
self.ui.labelHumanFriendlyTTLDescription.setText(
_translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfHours) +
_translate("MainWindow", "%n hour(s)", None, numberOfHours) +
", " +
_translate("MainWindow", "not recommended for chans", None, QtCore.QCoreApplication.CodecForTr)
_translate("MainWindow", "not recommended for chans", None)
)
stylesheet = "QLabel { color : red; }"
font.setBold(True)
@ -911,7 +834,6 @@ class MyForm(settingsmixin.SMainWindow):
"MainWindow",
"%n day(s)",
None,
QtCore.QCoreApplication.CodecForTr,
numberOfDays))
font.setBold(False)
self.ui.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet)
@ -1186,11 +1108,11 @@ class MyForm(settingsmixin.SMainWindow):
items = [
MessageList_AddressWidget(
toAddress, unicode(acct.toLabel, 'utf-8')),
toAddress, str(acct.toLabel, 'utf-8')),
MessageList_AddressWidget(
fromAddress, unicode(acct.fromLabel, 'utf-8')),
fromAddress, str(acct.fromLabel, 'utf-8')),
MessageList_SubjectWidget(
str(subject), unicode(acct.subject, 'utf-8', 'replace')),
str(subject), str(acct.subject, 'utf-8', 'replace')),
MessageList_TimeWidget(
statusText, False, lastactiontime, ackdata)]
self.addMessageListItem(tableWidget, items)
@ -1211,11 +1133,11 @@ class MyForm(settingsmixin.SMainWindow):
items = [
MessageList_AddressWidget(
toAddress, unicode(acct.toLabel, 'utf-8'), not read),
toAddress, str(acct.toLabel, 'utf-8'), not read),
MessageList_AddressWidget(
fromAddress, unicode(acct.fromLabel, 'utf-8'), not read),
fromAddress, str(acct.fromLabel, 'utf-8'), not read),
MessageList_SubjectWidget(
str(subject), unicode(acct.subject, 'utf-8', 'replace'),
str(subject), str(acct.subject, 'utf-8', 'replace'),
not read),
MessageList_TimeWidget(
l10n.formatTimestamp(received), not read, received, msgid)
@ -1299,11 +1221,9 @@ class MyForm(settingsmixin.SMainWindow):
# create application indicator
def appIndicatorInit(self, app):
self.initTrayIcon("can-icon-24px-red.png", app)
traySignal = "activated(QSystemTrayIcon::ActivationReason)"
QtCore.QObject.connect(self.tray, QtCore.SIGNAL(
traySignal), self.__icon_activated)
self.tray.activated.connect(self.__icon_activated);
m = QtGui.QMenu()
m = QtWidgets.QMenu()
self.actionStatus = QtGui.QAction(_translate(
"MainWindow", "Not Connected"), m, checkable=False)
@ -1471,7 +1391,8 @@ class MyForm(settingsmixin.SMainWindow):
self._notifier = _simple_notify
# does nothing if isAvailable returns false
self._player = QtGui.QSound.play
# XXX unresolved
#self._player = QtGui.QSound.play
if not get_plugins:
return
@ -1484,7 +1405,9 @@ class MyForm(settingsmixin.SMainWindow):
self._theme_player = get_plugin('notification.sound', 'theme')
if not QtGui.QSound.isAvailable():
# XXX unresolved
#if not QtGui.QSound.isAvailable():
if not False:
_plugin = get_plugin(
'notification.sound', 'file', fallback='file.fallback')
if _plugin:
@ -1496,7 +1419,7 @@ class MyForm(settingsmixin.SMainWindow):
self, title, subtitle, category, label=None, icon=None):
self.playSound(category, label)
self._notifier(
unicode(title), unicode(subtitle), category, label, icon)
str(title), str(subtitle), category, label, icon)
# tree
def treeWidgetKeyPressEvent(self, event):
@ -1712,7 +1635,7 @@ class MyForm(settingsmixin.SMainWindow):
def showConnectDialog(self):
dialog = dialogs.ConnectDialog(self)
if dialog.exec_():
if dialog.exec():
if dialog.radioButtonConnectNow.isChecked():
self.ui.updateNetworkSwitchMenuLabel(False)
config.remove_option(
@ -1820,7 +1743,7 @@ class MyForm(settingsmixin.SMainWindow):
def initTrayIcon(self, iconFileName, app):
self.currentTrayIconFileName = iconFileName
self.tray = QtGui.QSystemTrayIcon(
self.tray = QtWidgets.QSystemTrayIcon(
self.calcTrayIcon(iconFileName, self.findInboxUnreadCount()), app)
def setTrayIconFile(self, iconFileName):
@ -1995,9 +1918,9 @@ class MyForm(settingsmixin.SMainWindow):
def rerenderAddressBook(self):
def addRow (address, label, type):
self.ui.tableWidgetAddressBook.insertRow(0)
newItem = Ui_AddressBookWidgetItemLabel(address, unicode(label, 'utf-8'), type)
newItem = Ui_AddressBookWidgetItemLabel(address, label, type)
self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = Ui_AddressBookWidgetItemAddress(address, unicode(label, 'utf-8'), type)
newItem = Ui_AddressBookWidgetItemAddress(address, label, type)
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
oldRows = {}
@ -2006,7 +1929,7 @@ class MyForm(settingsmixin.SMainWindow):
oldRows[item.address] = [item.label, item.type, i]
if self.ui.tableWidgetAddressBook.rowCount() == 0:
self.ui.tableWidgetAddressBook.horizontalHeader().setSortIndicator(0, QtCore.Qt.AscendingOrder)
self.ui.tableWidgetAddressBook.horizontalHeader().setSortIndicator(0, QtCore.Qt.SortOrder.AscendingOrder)
if self.ui.tableWidgetAddressBook.isSortingEnabled():
self.ui.tableWidgetAddressBook.setSortingEnabled(False)
@ -2038,11 +1961,11 @@ class MyForm(settingsmixin.SMainWindow):
self.ui.tableWidgetAddressBook.removeRow(oldRows[address][2])
for address in newRows:
addRow(address, newRows[address][0], newRows[address][1])
completerList.append(unicode(newRows[address][0], encoding="UTF-8") + " <" + address + ">")
completerList.append(newRows[address][0] + " <" + address + ">")
# sort
self.ui.tableWidgetAddressBook.sortByColumn(
0, QtCore.Qt.AscendingOrder)
0, QtCore.Qt.SortOrder.AscendingOrder)
self.ui.tableWidgetAddressBook.setSortingEnabled(True)
self.ui.lineEditTo.completer().model().setStringList(completerList)
@ -2164,7 +2087,7 @@ class MyForm(settingsmixin.SMainWindow):
status, addressVersionNumber, streamNumber = decodeAddress(toAddress)[:3]
if status != 'success':
try:
toAddress = unicode(toAddress, 'utf-8', 'ignore')
toAddress = str(toAddress, 'utf-8', 'ignore')
except:
pass
logger.error('Error: Could not decode recipient address ' + toAddress + ':' + status)
@ -2368,11 +2291,11 @@ class MyForm(settingsmixin.SMainWindow):
addressInKeysFile, 'enabled')
isMaillinglist = config.safeGetBoolean(addressInKeysFile, 'mailinglist')
if isEnabled and not isMaillinglist:
label = unicode(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
label = str(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
if label == "":
label = addressInKeysFile
self.ui.comboBoxSendFrom.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
# self.ui.comboBoxSendFrom.model().sort(1, Qt.AscendingOrder)
# self.ui.comboBoxSendFrom.model().sort(1, QtCore.Qt.SortOrder.AscendingOrder)
for i in range(self.ui.comboBoxSendFrom.count()):
address = str(self.ui.comboBoxSendFrom.itemData(
i, QtCore.Qt.UserRole).toString())
@ -2392,7 +2315,7 @@ class MyForm(settingsmixin.SMainWindow):
addressInKeysFile, 'enabled')
isChan = config.safeGetBoolean(addressInKeysFile, 'chan')
if isEnabled and not isChan:
label = unicode(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
label = str(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
if label == "":
label = addressInKeysFile
self.ui.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
@ -2498,7 +2421,7 @@ class MyForm(settingsmixin.SMainWindow):
self.notifierShow(
_translate("MainWindow", "New Message"),
_translate("MainWindow", "From %1").arg(
unicode(acct.fromLabel, 'utf-8')),
str(acct.fromLabel, 'utf-8')),
sound.SOUND_UNKNOWN
)
if self.getCurrentAccount() is not None and (
@ -2732,12 +2655,12 @@ class MyForm(settingsmixin.SMainWindow):
_translate(
"MainWindow",
"%n object(s) pending proof of work", None,
QtCore.QCoreApplication.CodecForTr, powQueueSize()
powQueueSize()
) + ", " +
_translate(
"MainWindow",
"%n object(s) waiting to be distributed", None,
QtCore.QCoreApplication.CodecForTr, pendingUpload()
pendingUpload()
) + "\n\n" +
_translate(
"MainWindow", "Wait until these tasks finish?"),
@ -2871,7 +2794,7 @@ class MyForm(settingsmixin.SMainWindow):
QtCore.QEventLoop.AllEvents, 1000
)
self.saveSettings()
for attr, obj in self.ui.__dict__.iteritems():
for attr, obj in self.ui.__dict__.items():
if hasattr(obj, "__class__") \
and isinstance(obj, settingsmixin.SettingsMixin):
saveMethod = getattr(obj, "saveSettings", None)
@ -2934,7 +2857,7 @@ class MyForm(settingsmixin.SMainWindow):
lines[i] = '<br><br>'
content = ' '.join(lines) # To keep the whitespace between lines
content = shared.fixPotentiallyInvalidUTF8Data(content)
content = unicode(content, 'utf-8)')
content = str(content, 'utf-8)')
textEdit.setHtml(QtCore.QString(content))
def on_action_InboxMarkUnread(self):
@ -3117,7 +3040,7 @@ class MyForm(settingsmixin.SMainWindow):
self.setSendFromComboBox(toAddressAtCurrentInboxRow)
quotedText = self.quoted_text(
unicode(messageAtCurrentInboxRow, 'utf-8', 'replace'))
str(messageAtCurrentInboxRow, 'utf-8', 'replace'))
widget['message'].setPlainText(quotedText)
if acct.subject[0:3] in ('Re:', 'RE:'):
widget['subject'].setText(
@ -3368,7 +3291,7 @@ class MyForm(settingsmixin.SMainWindow):
return self.updateStatusBar(_translate(
"MainWindow", "No addresses selected."))
addresses_string = unicode(
addresses_string = str(
self.ui.lineEditTo.text().toUtf8(), 'utf-8')
for item in selected_items:
address_string = item.accountString()
@ -3861,11 +3784,11 @@ class MyForm(settingsmixin.SMainWindow):
self.setAddressSound(widget.item(widget.currentRow(), 0).text())
def setAddressSound(self, addr):
filters = [unicode(_translate(
filters = [str(_translate(
"MainWindow", "Sound files (%s)" %
' '.join(['*%s%s' % (os.extsep, ext) for ext in sound.extensions])
))]
sourcefile = unicode(QtGui.QFileDialog.getOpenFileName(
sourcefile = str(QtGui.QFileDialog.getOpenFileName(
self, _translate("MainWindow", "Set notification sound..."),
filter=';;'.join(filters)
))
@ -3874,7 +3797,7 @@ class MyForm(settingsmixin.SMainWindow):
return
destdir = os.path.join(state.appdata, 'sounds')
destfile = unicode(addr) + os.path.splitext(sourcefile)[-1]
destfile = str(addr) + os.path.splitext(sourcefile)[-1]
destination = os.path.join(destdir, destfile)
if sourcefile == destination:
@ -4084,7 +4007,7 @@ class MyForm(settingsmixin.SMainWindow):
if item.type == AccountMixin.ALL:
return
newLabel = unicode(item.text(0), 'utf-8', 'ignore')
newLabel = str(item.text(0), 'utf-8', 'ignore')
oldLabel = item.defaultLabel()
# unchanged, do not do anything either
@ -4155,7 +4078,7 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderMessagelistToLabels()
completerList = self.ui.lineEditTo.completer().model().stringList()
for i in range(len(completerList)):
if unicode(completerList[i]).endswith(" <" + item.address + ">"):
if str(completerList[i]).endswith(" <" + item.address + ">"):
completerList[i] = item.label + " <" + item.address + ">"
self.ui.lineEditTo.completer().model().setStringList(completerList)
@ -4209,7 +4132,7 @@ class MyForm(settingsmixin.SMainWindow):
def initSettings(self):
self.loadSettings()
for attr, obj in self.ui.__dict__.iteritems():
for attr, obj in self.ui.__dict__.items():
if hasattr(obj, "__class__") and \
isinstance(obj, settingsmixin.SettingsMixin):
loadMethod = getattr(obj, "loadSettings", None)
@ -4221,7 +4144,7 @@ app = None
myapp = None
class BitmessageQtApplication(QtGui.QApplication):
class BitmessageQtApplication(QtWidgets.QApplication):
"""
Listener to allow our Qt form to get focus when another instance of the
application is open.
@ -4250,7 +4173,7 @@ class BitmessageQtApplication(QtGui.QApplication):
# Cleanup past crashed servers
if not self.is_running:
if socket.error() == QLocalSocket.ConnectionRefusedError:
if socket.error() == QLocalSocket.LocalSocketError.ConnectionRefusedError:
socket.disconnectFromServer()
QLocalServer.removeServer(id)
@ -4307,4 +4230,4 @@ def run():
QtCore.QTimer.singleShot(
30000, lambda: myapp.setStatusIcon(state.statusIconColor))
app.exec_()
app.exec()

View File

@ -14,7 +14,7 @@ import re
import sys
import time
from PyQt4 import QtGui
from PyQt6 import QtGui
import queues
from addresses import decodeAddress

View File

@ -5,12 +5,12 @@ Dialogs that work with BM address.
import hashlib
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
import queues
import widgets
import bitmessageqt.widgets
import state
from account import AccountMixin, GatewayAccount, MailchuckAccount, accountClass
from .account import AccountMixin, GatewayAccount, MailchuckAccount, accountClass
from addresses import addBMIfNotPresent, decodeAddress, encodeVarint
from bmconfigparser import config as global_config
from tr import _translate
@ -79,7 +79,7 @@ class AddressCheckMixin(object):
))
class AddressDataDialog(QtGui.QDialog, AddressCheckMixin):
class AddressDataDialog(QtWidgets.QDialog, AddressCheckMixin):
"""QDialog with Bitmessage address validation"""
def __init__(self, parent):
@ -112,7 +112,7 @@ class AddAddressDialog(AddressDataDialog):
self.lineEditAddress.setText(address)
class NewAddressDialog(QtGui.QDialog):
class NewAddressDialog(QtWidgets.QDialog):
"""QDialog for generating a new address"""
def __init__(self, parent=None):
@ -212,12 +212,11 @@ class NewSubscriptionDialog(AddressDataDialog):
"MainWindow",
"Display the %n recent broadcast(s) from this address.",
None,
QtCore.QCoreApplication.CodecForTr,
count
))
class RegenerateAddressesDialog(QtGui.QDialog):
class RegenerateAddressesDialog(QtWidgets.QDialog):
"""QDialog for regenerating deterministic addresses"""
def __init__(self, parent=None):
super(RegenerateAddressesDialog, self).__init__(parent)
@ -226,7 +225,7 @@ class RegenerateAddressesDialog(QtGui.QDialog):
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
class SpecialAddressBehaviorDialog(QtGui.QDialog):
class SpecialAddressBehaviorDialog(QtWidgets.QDialog):
"""
QDialog for special address behaviour (e.g. mailing list functionality)
"""
@ -291,7 +290,7 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
self.parent.rerenderMessagelistToLabels()
class EmailGatewayDialog(QtGui.QDialog):
class EmailGatewayDialog(QtWidgets.QDialog):
"""QDialog for email gateway control"""
def __init__(self, parent, config=global_config, account=None):
super(EmailGatewayDialog, self).__init__(parent)

View File

@ -3,15 +3,15 @@ Address validator module.
"""
# pylint: disable=too-many-branches,too-many-arguments
from Queue import Empty
from queue import Empty
from PyQt4 import QtGui
from PyQt6 import QtGui
from addresses import decodeAddress, addBMIfNotPresent
from bmconfigparser import config
from queues import apiAddressGeneratorReturnQueue, addressGeneratorQueue
from tr import _translate
from utils import str_chan
from .utils import str_chan
class AddressPassPhraseValidatorMixin(object):

View File

@ -7,9 +7,9 @@
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
from PyQt6 import QtCore
qt_resource_data = "\
qt_resource_data = b"\
\x00\x00\x03\x66\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@ -1534,7 +1534,7 @@ qt_resource_data = "\
\x82\
"
qt_resource_name = "\
qt_resource_name = b"\
\x00\x09\
\x0c\x78\x54\x88\
\x00\x6e\
@ -1639,7 +1639,7 @@ qt_resource_name = "\
\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct = "\
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x18\x00\x02\x00\x00\x00\x15\x00\x00\x00\x03\

View File

@ -0,0 +1,119 @@
--- bitmessageui.py.orig 2024-05-12 18:57:04.429581050 +0900
+++ bitmessageui.py 2024-05-12 19:50:49.951776910 +0900
@@ -7,7 +7,8 @@
from PyQt6 import QtCore, QtGui, QtWidgets
-
+from bmconfigparser import config
+from .foldertree import AddressBookCompleter
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
@@ -137,6 +138,11 @@
self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True)
self.tableWidgetAddressBook.verticalHeader().setVisible(False)
self.verticalLayout_2.addWidget(self.tableWidgetAddressBook)
+ self.addressBookCompleter = AddressBookCompleter()
+ self.addressBookCompleter.setCompletionMode(QtWidgets.QCompleter.CompletionMode.PopupCompletion)
+ self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseSensitivity.CaseInsensitive)
+ self.addressBookCompleterModel = QtCore.QStringListModel()
+ self.addressBookCompleter.setModel(self.addressBookCompleterModel)
self.pushButtonAddAddressBook = QtWidgets.QPushButton(parent=self.send)
self.pushButtonAddAddressBook.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddAddressBook.setObjectName("pushButtonAddAddressBook")
@@ -181,6 +187,7 @@
self.lineEditTo = QtWidgets.QLineEdit(parent=self.tab)
self.lineEditTo.setObjectName("lineEditTo")
self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1)
+ self.lineEditTo.setCompleter(self.addressBookCompleter)
self.verticalLayout_5.addLayout(self.gridLayout_2)
self.textEditMessage = QtWidgets.QTextEdit(parent=self.tab)
self.textEditMessage.setObjectName("textEditMessage")
@@ -260,6 +267,9 @@
self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, 16777215))
self.labelHumanFriendlyTTLDescription.setObjectName("labelHumanFriendlyTTLDescription")
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription)
+ self.pushButtonClear = QtWidgets.QPushButton(parent=self.send)
+ self.pushButtonClear.setObjectName("pushButtonClear")
+ self.horizontalLayout_5.addWidget(self.pushButtonClear, 0, QtCore.Qt.AlignmentFlag.AlignRight)
self.pushButtonSend = QtWidgets.QPushButton(parent=self.send)
self.pushButtonSend.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.pushButtonSend.setObjectName("pushButtonSend")
@@ -546,6 +556,8 @@
self.actionManageKeys = QtGui.QAction(parent=MainWindow)
self.actionManageKeys.setCheckable(False)
self.actionManageKeys.setEnabled(True)
+ self.actionNetworkSwitch = QtGui.QAction(parent=MainWindow)
+ self.actionNetworkSwitch.setObjectName("actionNetworkSwitch")
icon = QtGui.QIcon.fromTheme("dialog-password")
self.actionManageKeys.setIcon(icon)
self.actionManageKeys.setObjectName("actionManageKeys")
@@ -557,6 +569,10 @@
icon = QtGui.QIcon.fromTheme("help-contents")
self.actionHelp.setIcon(icon)
self.actionHelp.setObjectName("actionHelp")
+ self.actionSupport = QtGui.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("help-support")
+ self.actionSupport.setIcon(icon)
+ self.actionSupport.setObjectName("actionSupport")
self.actionAbout = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("help-about")
self.actionAbout.setIcon(icon)
@@ -580,9 +596,11 @@
self.menuFile.addAction(self.actionManageKeys)
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
+ self.menuFile.addAction(self.actionNetworkSwitch)
self.menuFile.addAction(self.actionExit)
self.menuSettings.addAction(self.actionSettings)
self.menuHelp.addAction(self.actionHelp)
+ self.menuHelp.addAction(self.actionSupport)
self.menuHelp.addAction(self.actionAbout)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuSettings.menuAction())
@@ -606,6 +624,25 @@
MainWindow.setTabOrder(self.tableWidgetBlacklist, self.tableWidgetConnectionCount)
MainWindow.setTabOrder(self.tableWidgetConnectionCount, self.pushButtonStatusIcon)
+ # Popup menu actions container for the Sent page
+ # pylint: disable=attribute-defined-outside-init
+ self.sentContextMenuToolbar = QtWidgets.QToolBar()
+ # Popup menu actions container for chans tree
+ self.addressContextMenuToolbar = QtWidgets.QToolBar()
+ # Popup menu actions container for subscriptions tree
+ self.subscriptionsContextMenuToolbar = QtWidgets.QToolBar()
+
+ def updateNetworkSwitchMenuLabel(self, dontconnect=None):
+ if dontconnect is None:
+ _translate = QtCore.QCoreApplication.translate
+ dontconnect = config.safeGetBoolean(
+ 'bitmessagesettings', 'dontconnect')
+ self.actionNetworkSwitch.setText(
+ _translate("MainWindow", "Go online", None)
+ if dontconnect else
+ _translate("MainWindow", "Go offline", None)
+ )
+
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Bitmessage"))
@@ -653,6 +690,7 @@
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab_2), _translate("MainWindow", "Send Message to your Subscribers"))
self.pushButtonTTL.setText(_translate("MainWindow", "TTL:"))
self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "X days"))
+ self.pushButtonClear.setText(_translate("MainWindow", "Clear"))
self.pushButtonSend.setText(_translate("MainWindow", "Send"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send"))
self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions"))
@@ -722,8 +760,10 @@
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q"))
self.actionHelp.setText(_translate("MainWindow", "Help"))
self.actionHelp.setShortcut(_translate("MainWindow", "F1"))
+ self.actionSupport.setText(_translate("MainWindow", "Contact support"))
self.actionAbout.setText(_translate("MainWindow", "About"))
self.actionSettings.setText(_translate("MainWindow", "Settings"))
self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses"))
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages"))
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan"))
+ self.updateNetworkSwitchMenuLabel()

View File

@ -1,59 +1,31 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'bitmessageui.ui'
#
# Created: Mon Mar 23 22:18:07 2015
# by: PyQt4 UI code generator 4.10.4
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING! All changes made in this file will be lost!
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
from bmconfigparser import config
from foldertree import AddressBookCompleter
from messageview import MessageView
from messagecompose import MessageCompose
import settingsmixin
from networkstatus import NetworkStatus
from blacklist import Blacklist
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig, encoding=QtCore.QCoreApplication.CodecForTr, n=None):
if n is None:
return QtGui.QApplication.translate(context, text, disambig, _encoding)
else:
return QtGui.QApplication.translate(context, text, disambig, _encoding, n)
except AttributeError:
def _translate(context, text, disambig, encoding=QtCore.QCoreApplication.CodecForTr, n=None):
if n is None:
return QtGui.QApplication.translate(context, text, disambig)
else:
return QtGui.QApplication.translate(context, text, disambig, QtCore.QCoreApplication.CodecForTr, n)
from .foldertree import AddressBookCompleter
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(885, 580)
MainWindow.setObjectName("MainWindow")
self.MainDock = QtWidgets.QDockWidget(parent=MainWindow)
self.MainDock.setGeometry(QtCore.QRect(0, 0, 885, 580))
icon = QtGui.QIcon()
icon.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off
)
MainWindow.setWindowIcon(icon)
MainWindow.setTabShape(QtGui.QTabWidget.Rounded)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget)
self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10"))
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
icon.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-24px.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.MainDock.setWindowIcon(icon)
self.MainDock.setObjectName("MainDock")
self.centralwidget = QtWidgets.QWidget()
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_10 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_10.setObjectName("gridLayout_10")
self.tabWidget = QtWidgets.QTabWidget(parent=self.centralwidget)
self.tabWidget.setTabShape(QtWidgets.QTabWidget.TabShape.Rounded)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
@ -63,75 +35,62 @@ class Ui_MainWindow(object):
font = QtGui.QFont()
font.setPointSize(9)
self.tabWidget.setFont(font)
self.tabWidget.setTabPosition(QtGui.QTabWidget.North)
self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.inbox = QtGui.QWidget()
self.inbox.setObjectName(_fromUtf8("inbox"))
self.gridLayout = QtGui.QGridLayout(self.inbox)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.horizontalSplitter_3 = settingsmixin.SSplitter()
self.horizontalSplitter_3.setObjectName(_fromUtf8("horizontalSplitter_3"))
self.verticalSplitter_12 = settingsmixin.SSplitter()
self.verticalSplitter_12.setObjectName(_fromUtf8("verticalSplitter_12"))
self.verticalSplitter_12.setOrientation(QtCore.Qt.Vertical)
self.treeWidgetYourIdentities = settingsmixin.STreeWidget(self.inbox)
self.treeWidgetYourIdentities.setObjectName(_fromUtf8("treeWidgetYourIdentities"))
self.treeWidgetYourIdentities.resize(200, self.treeWidgetYourIdentities.height())
self.tabWidget.setTabPosition(QtWidgets.QTabWidget.TabPosition.North)
self.tabWidget.setTabShape(QtWidgets.QTabWidget.TabShape.Rounded)
self.tabWidget.setObjectName("tabWidget")
self.inbox = QtWidgets.QWidget()
self.inbox.setObjectName("inbox")
self.gridLayout = QtWidgets.QGridLayout(self.inbox)
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.verticalLayout_12 = QtWidgets.QVBoxLayout()
self.verticalLayout_12.setObjectName("verticalLayout_12")
self.treeWidgetYourIdentities = QtWidgets.QTreeWidget(parent=self.inbox)
self.treeWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidgetYourIdentities.setObjectName("treeWidgetYourIdentities")
icon1 = QtGui.QIcon()
icon1.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
)
icon1.addPixmap(QtGui.QPixmap(":/newPrefix/images/identities.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1)
self.verticalSplitter_12.addWidget(self.treeWidgetYourIdentities)
self.pushButtonNewAddress = QtGui.QPushButton(self.inbox)
self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress"))
self.pushButtonNewAddress.resize(200, self.pushButtonNewAddress.height())
self.verticalSplitter_12.addWidget(self.pushButtonNewAddress)
self.verticalSplitter_12.setStretchFactor(0, 1)
self.verticalSplitter_12.setStretchFactor(1, 0)
self.verticalSplitter_12.setCollapsible(0, False)
self.verticalSplitter_12.setCollapsible(1, False)
self.verticalSplitter_12.handle(1).setEnabled(False)
self.horizontalSplitter_3.addWidget(self.verticalSplitter_12)
self.verticalSplitter_7 = settingsmixin.SSplitter()
self.verticalSplitter_7.setObjectName(_fromUtf8("verticalSplitter_7"))
self.verticalSplitter_7.setOrientation(QtCore.Qt.Vertical)
self.horizontalSplitterSearch = QtGui.QSplitter()
self.horizontalSplitterSearch.setObjectName(_fromUtf8("horizontalSplitterSearch"))
self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox)
self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit"))
self.horizontalSplitterSearch.addWidget(self.inboxSearchLineEdit)
self.inboxSearchOption = QtGui.QComboBox(self.inbox)
self.inboxSearchOption.setObjectName(_fromUtf8("inboxSearchOption"))
self.inboxSearchOption.addItem(_fromUtf8(""))
self.inboxSearchOption.addItem(_fromUtf8(""))
self.inboxSearchOption.addItem(_fromUtf8(""))
self.inboxSearchOption.addItem(_fromUtf8(""))
self.inboxSearchOption.addItem(_fromUtf8(""))
self.inboxSearchOption.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.inboxSearchOption.setCurrentIndex(3)
self.horizontalSplitterSearch.addWidget(self.inboxSearchOption)
self.horizontalSplitterSearch.handle(1).setEnabled(False)
self.horizontalSplitterSearch.setStretchFactor(0, 1)
self.horizontalSplitterSearch.setStretchFactor(1, 0)
self.verticalSplitter_7.addWidget(self.horizontalSplitterSearch)
self.tableWidgetInbox = settingsmixin.STableWidget(self.inbox)
self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
self.verticalLayout_12.addWidget(self.treeWidgetYourIdentities)
self.pushButtonNewAddress = QtWidgets.QPushButton(parent=self.inbox)
self.pushButtonNewAddress.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonNewAddress.setObjectName("pushButtonNewAddress")
self.verticalLayout_12.addWidget(self.pushButtonNewAddress)
self.horizontalLayout_3.addLayout(self.verticalLayout_12)
self.verticalLayout_7 = QtWidgets.QVBoxLayout()
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.horizontalLayoutSearch = QtWidgets.QHBoxLayout()
self.horizontalLayoutSearch.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayoutSearch.setObjectName("horizontalLayoutSearch")
self.inboxSearchLineEdit = QtWidgets.QLineEdit(parent=self.inbox)
self.inboxSearchLineEdit.setObjectName("inboxSearchLineEdit")
self.horizontalLayoutSearch.addWidget(self.inboxSearchLineEdit)
self.inboxSearchOption = QtWidgets.QComboBox(parent=self.inbox)
self.inboxSearchOption.setObjectName("inboxSearchOption")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.horizontalLayoutSearch.addWidget(self.inboxSearchOption)
self.verticalLayout_7.addLayout(self.horizontalLayoutSearch)
self.tableWidgetInbox = QtWidgets.QTableWidget(parent=self.inbox)
self.tableWidgetInbox.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidgetInbox.setAlternatingRowColors(True)
self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tableWidgetInbox.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetInbox.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetInbox.setWordWrap(False)
self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox"))
self.tableWidgetInbox.setObjectName("tableWidgetInbox")
self.tableWidgetInbox.setColumnCount(4)
self.tableWidgetInbox.setRowCount(0)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(3, item)
self.tableWidgetInbox.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInbox.horizontalHeader().setDefaultSectionSize(200)
@ -141,302 +100,243 @@ class Ui_MainWindow(object):
self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True)
self.tableWidgetInbox.verticalHeader().setVisible(False)
self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26)
self.verticalSplitter_7.addWidget(self.tableWidgetInbox)
self.textEditInboxMessage = MessageView(self.inbox)
self.verticalLayout_7.addWidget(self.tableWidgetInbox)
self.textEditInboxMessage = QtWidgets.QTextEdit(parent=self.inbox)
self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessage.setReadOnly(True)
self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage"))
self.verticalSplitter_7.addWidget(self.textEditInboxMessage)
self.verticalSplitter_7.setStretchFactor(0, 0)
self.verticalSplitter_7.setStretchFactor(1, 1)
self.verticalSplitter_7.setStretchFactor(2, 2)
self.verticalSplitter_7.setCollapsible(0, False)
self.verticalSplitter_7.setCollapsible(1, False)
self.verticalSplitter_7.setCollapsible(2, False)
self.verticalSplitter_7.handle(1).setEnabled(False)
self.horizontalSplitter_3.addWidget(self.verticalSplitter_7)
self.horizontalSplitter_3.setStretchFactor(0, 0)
self.horizontalSplitter_3.setStretchFactor(1, 1)
self.horizontalSplitter_3.setCollapsible(0, False)
self.horizontalSplitter_3.setCollapsible(1, False)
self.gridLayout.addWidget(self.horizontalSplitter_3)
self.textEditInboxMessage.setObjectName("textEditInboxMessage")
self.verticalLayout_7.addWidget(self.textEditInboxMessage)
self.horizontalLayout_3.addLayout(self.verticalLayout_7)
self.gridLayout.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.tabWidget.addTab(self.inbox, icon2, _fromUtf8(""))
self.send = QtGui.QWidget()
self.send.setObjectName(_fromUtf8("send"))
self.gridLayout_7 = QtGui.QGridLayout(self.send)
self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
self.horizontalSplitter = settingsmixin.SSplitter()
self.horizontalSplitter.setObjectName(_fromUtf8("horizontalSplitter"))
self.verticalSplitter_2 = settingsmixin.SSplitter()
self.verticalSplitter_2.setObjectName(_fromUtf8("verticalSplitter_2"))
self.verticalSplitter_2.setOrientation(QtCore.Qt.Vertical)
self.tableWidgetAddressBook = settingsmixin.STableWidget(self.send)
icon2.addPixmap(QtGui.QPixmap(":/newPrefix/images/inbox.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.inbox, icon2, "")
self.send = QtWidgets.QWidget()
self.send.setObjectName("send")
self.gridLayout_7 = QtWidgets.QGridLayout(self.send)
self.gridLayout_7.setObjectName("gridLayout_7")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.tableWidgetAddressBook = QtWidgets.QTableWidget(parent=self.send)
self.tableWidgetAddressBook.setMaximumSize(QtCore.QSize(200, 16777215))
self.tableWidgetAddressBook.setAlternatingRowColors(True)
self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook"))
self.tableWidgetAddressBook.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetAddressBook.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetAddressBook.setObjectName("tableWidgetAddressBook")
self.tableWidgetAddressBook.setColumnCount(2)
self.tableWidgetAddressBook.setRowCount(0)
self.tableWidgetAddressBook.resize(200, self.tableWidgetAddressBook.height())
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
icon3 = QtGui.QIcon()
icon3.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/addressbook.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
)
icon3.addPixmap(QtGui.QPixmap(":/newPrefix/images/addressbook.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
item.setIcon(icon3)
self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetAddressBook.setHorizontalHeaderItem(1, item)
self.tableWidgetAddressBook.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetAddressBook.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetAddressBook.horizontalHeader().setHighlightSections(False)
self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True)
self.tableWidgetAddressBook.verticalHeader().setVisible(False)
self.verticalSplitter_2.addWidget(self.tableWidgetAddressBook)
self.verticalLayout_2.addWidget(self.tableWidgetAddressBook)
self.addressBookCompleter = AddressBookCompleter()
self.addressBookCompleter.setCompletionMode(QtGui.QCompleter.PopupCompletion)
self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
self.addressBookCompleterModel = QtGui.QStringListModel()
self.addressBookCompleter.setCompletionMode(QtWidgets.QCompleter.CompletionMode.PopupCompletion)
self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseSensitivity.CaseInsensitive)
self.addressBookCompleterModel = QtCore.QStringListModel()
self.addressBookCompleter.setModel(self.addressBookCompleterModel)
self.pushButtonAddAddressBook = QtGui.QPushButton(self.send)
self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook"))
self.pushButtonAddAddressBook.resize(200, self.pushButtonAddAddressBook.height())
self.verticalSplitter_2.addWidget(self.pushButtonAddAddressBook)
self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send)
self.pushButtonFetchNamecoinID.resize(200, self.pushButtonFetchNamecoinID.height())
self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID"))
self.verticalSplitter_2.addWidget(self.pushButtonFetchNamecoinID)
self.verticalSplitter_2.setStretchFactor(0, 1)
self.verticalSplitter_2.setStretchFactor(1, 0)
self.verticalSplitter_2.setStretchFactor(2, 0)
self.verticalSplitter_2.setCollapsible(0, False)
self.verticalSplitter_2.setCollapsible(1, False)
self.verticalSplitter_2.setCollapsible(2, False)
self.verticalSplitter_2.handle(1).setEnabled(False)
self.verticalSplitter_2.handle(2).setEnabled(False)
self.horizontalSplitter.addWidget(self.verticalSplitter_2)
self.verticalSplitter = settingsmixin.SSplitter()
self.verticalSplitter.setObjectName(_fromUtf8("verticalSplitter"))
self.verticalSplitter.setOrientation(QtCore.Qt.Vertical)
self.tabWidgetSend = QtGui.QTabWidget(self.send)
self.tabWidgetSend.setObjectName(_fromUtf8("tabWidgetSend"))
self.sendDirect = QtGui.QWidget()
self.sendDirect.setObjectName(_fromUtf8("sendDirect"))
self.gridLayout_8 = QtGui.QGridLayout(self.sendDirect)
self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
self.verticalSplitter_5 = settingsmixin.SSplitter()
self.verticalSplitter_5.setObjectName(_fromUtf8("verticalSplitter_5"))
self.verticalSplitter_5.setOrientation(QtCore.Qt.Vertical)
self.gridLayout_2 = QtGui.QGridLayout()
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.label_3 = QtGui.QLabel(self.sendDirect)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.pushButtonAddAddressBook = QtWidgets.QPushButton(parent=self.send)
self.pushButtonAddAddressBook.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddAddressBook.setObjectName("pushButtonAddAddressBook")
self.verticalLayout_2.addWidget(self.pushButtonAddAddressBook)
self.pushButtonFetchNamecoinID = QtWidgets.QPushButton(parent=self.send)
self.pushButtonFetchNamecoinID.setMaximumSize(QtCore.QSize(200, 16777215))
font = QtGui.QFont()
font.setPointSize(9)
self.pushButtonFetchNamecoinID.setFont(font)
self.pushButtonFetchNamecoinID.setObjectName("pushButtonFetchNamecoinID")
self.verticalLayout_2.addWidget(self.pushButtonFetchNamecoinID)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.tabWidgetSend = QtWidgets.QTabWidget(parent=self.send)
self.tabWidgetSend.setObjectName("tabWidgetSend")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.gridLayout_8 = QtWidgets.QGridLayout(self.tab)
self.gridLayout_8.setObjectName("gridLayout_8")
self.verticalLayout_5 = QtWidgets.QVBoxLayout()
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_3 = QtWidgets.QLabel(parent=self.tab)
self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
self.label_2 = QtGui.QLabel(self.sendDirect)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.label_2 = QtWidgets.QLabel(parent=self.tab)
self.label_2.setObjectName("label_2")
self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1)
self.lineEditSubject = QtGui.QLineEdit(self.sendDirect)
self.lineEditSubject.setText(_fromUtf8(""))
self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject"))
self.lineEditSubject = QtWidgets.QLineEdit(parent=self.tab)
self.lineEditSubject.setText("")
self.lineEditSubject.setObjectName("lineEditSubject")
self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1)
self.label = QtGui.QLabel(self.sendDirect)
self.label.setObjectName(_fromUtf8("label"))
self.label = QtWidgets.QLabel(parent=self.tab)
self.label.setObjectName("label")
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
self.comboBoxSendFrom = QtGui.QComboBox(self.sendDirect)
self.comboBoxSendFrom = QtWidgets.QComboBox(parent=self.tab)
self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom"))
self.comboBoxSendFrom.setObjectName("comboBoxSendFrom")
self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1)
self.lineEditTo = QtGui.QLineEdit(self.sendDirect)
self.lineEditTo.setObjectName(_fromUtf8("lineEditTo"))
self.lineEditTo = QtWidgets.QLineEdit(parent=self.tab)
self.lineEditTo.setObjectName("lineEditTo")
self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1)
self.lineEditTo.setCompleter(self.addressBookCompleter)
self.gridLayout_2_Widget = QtGui.QWidget()
self.gridLayout_2_Widget.setLayout(self.gridLayout_2)
self.verticalSplitter_5.addWidget(self.gridLayout_2_Widget)
self.textEditMessage = MessageCompose(self.sendDirect)
self.textEditMessage.setObjectName(_fromUtf8("textEditMessage"))
self.verticalSplitter_5.addWidget(self.textEditMessage)
self.verticalSplitter_5.setStretchFactor(0, 0)
self.verticalSplitter_5.setStretchFactor(1, 1)
self.verticalSplitter_5.setCollapsible(0, False)
self.verticalSplitter_5.setCollapsible(1, False)
self.verticalSplitter_5.handle(1).setEnabled(False)
self.gridLayout_8.addWidget(self.verticalSplitter_5, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.sendDirect, _fromUtf8(""))
self.sendBroadcast = QtGui.QWidget()
self.sendBroadcast.setObjectName(_fromUtf8("sendBroadcast"))
self.gridLayout_9 = QtGui.QGridLayout(self.sendBroadcast)
self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
self.verticalSplitter_6 = settingsmixin.SSplitter()
self.verticalSplitter_6.setObjectName(_fromUtf8("verticalSplitter_6"))
self.verticalSplitter_6.setOrientation(QtCore.Qt.Vertical)
self.gridLayout_5 = QtGui.QGridLayout()
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.label_8 = QtGui.QLabel(self.sendBroadcast)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.verticalLayout_5.addLayout(self.gridLayout_2)
self.textEditMessage = QtWidgets.QTextEdit(parent=self.tab)
self.textEditMessage.setObjectName("textEditMessage")
self.verticalLayout_5.addWidget(self.textEditMessage)
self.gridLayout_8.addLayout(self.verticalLayout_5, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.gridLayout_9 = QtWidgets.QGridLayout(self.tab_2)
self.gridLayout_9.setObjectName("gridLayout_9")
self.verticalLayout_6 = QtWidgets.QVBoxLayout()
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.gridLayout_5 = QtWidgets.QGridLayout()
self.gridLayout_5.setObjectName("gridLayout_5")
self.label_8 = QtWidgets.QLabel(parent=self.tab_2)
self.label_8.setObjectName("label_8")
self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1)
self.lineEditSubjectBroadcast = QtGui.QLineEdit(self.sendBroadcast)
self.lineEditSubjectBroadcast.setText(_fromUtf8(""))
self.lineEditSubjectBroadcast.setObjectName(_fromUtf8("lineEditSubjectBroadcast"))
self.lineEditSubjectBroadcast = QtWidgets.QLineEdit(parent=self.tab_2)
self.lineEditSubjectBroadcast.setText("")
self.lineEditSubjectBroadcast.setObjectName("lineEditSubjectBroadcast")
self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1)
self.label_7 = QtGui.QLabel(self.sendBroadcast)
self.label_7.setObjectName(_fromUtf8("label_7"))
self.label_7 = QtWidgets.QLabel(parent=self.tab_2)
self.label_7.setObjectName("label_7")
self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1)
self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.sendBroadcast)
self.comboBoxSendFromBroadcast = QtWidgets.QComboBox(parent=self.tab_2)
self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0))
self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("comboBoxSendFromBroadcast"))
self.comboBoxSendFromBroadcast.setObjectName("comboBoxSendFromBroadcast")
self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1)
self.gridLayout_5_Widget = QtGui.QWidget()
self.gridLayout_5_Widget.setLayout(self.gridLayout_5)
self.verticalSplitter_6.addWidget(self.gridLayout_5_Widget)
self.textEditMessageBroadcast = MessageCompose(self.sendBroadcast)
self.textEditMessageBroadcast.setObjectName(_fromUtf8("textEditMessageBroadcast"))
self.verticalSplitter_6.addWidget(self.textEditMessageBroadcast)
self.verticalSplitter_6.setStretchFactor(0, 0)
self.verticalSplitter_6.setStretchFactor(1, 1)
self.verticalSplitter_6.setCollapsible(0, False)
self.verticalSplitter_6.setCollapsible(1, False)
self.verticalSplitter_6.handle(1).setEnabled(False)
self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8(""))
self.verticalSplitter.addWidget(self.tabWidgetSend)
self.tTLContainer = QtGui.QWidget()
self.tTLContainer.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.tTLContainer.setLayout(self.horizontalLayout_5)
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.pushButtonTTL = QtGui.QPushButton(self.send)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
self.verticalLayout_6.addLayout(self.gridLayout_5)
self.textEditMessageBroadcast = QtWidgets.QTextEdit(parent=self.tab_2)
self.textEditMessageBroadcast.setObjectName("textEditMessageBroadcast")
self.verticalLayout_6.addWidget(self.textEditMessageBroadcast)
self.gridLayout_9.addLayout(self.verticalLayout_6, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.tab_2, "")
self.verticalLayout.addWidget(self.tabWidgetSend)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.pushButtonTTL = QtWidgets.QPushButton(parent=self.send)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth())
self.pushButtonTTL.setSizePolicy(sizePolicy)
self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, 16777215))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Active, QtGui.QPalette.ColorRole.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Inactive, QtGui.QPalette.ColorRole.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.ButtonText, brush)
self.pushButtonTTL.setPalette(palette)
font = QtGui.QFont()
font.setUnderline(True)
self.pushButtonTTL.setFont(font)
self.pushButtonTTL.setFlat(True)
self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL"))
self.horizontalLayout_5.addWidget(self.pushButtonTTL, 0, QtCore.Qt.AlignRight)
self.horizontalSliderTTL = QtGui.QSlider(self.send)
self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(70, 0))
self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal)
self.pushButtonTTL.setObjectName("pushButtonTTL")
self.horizontalLayout_5.addWidget(self.pushButtonTTL)
self.horizontalSliderTTL = QtWidgets.QSlider(parent=self.send)
self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0))
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, 16777215))
self.horizontalSliderTTL.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.horizontalSliderTTL.setInvertedAppearance(False)
self.horizontalSliderTTL.setInvertedControls(False)
self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL"))
self.horizontalLayout_5.addWidget(self.horizontalSliderTTL, 0, QtCore.Qt.AlignLeft)
self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
self.horizontalSliderTTL.setObjectName("horizontalSliderTTL")
self.horizontalLayout_5.addWidget(self.horizontalSliderTTL)
self.labelHumanFriendlyTTLDescription = QtWidgets.QLabel(parent=self.send)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth())
self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy)
self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0))
self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription"))
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription, 1, QtCore.Qt.AlignLeft)
self.pushButtonClear = QtGui.QPushButton(self.send)
self.pushButtonClear.setObjectName(_fromUtf8("pushButtonClear"))
self.horizontalLayout_5.addWidget(self.pushButtonClear, 0, QtCore.Qt.AlignRight)
self.pushButtonSend = QtGui.QPushButton(self.send)
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
self.horizontalLayout_5.addWidget(self.pushButtonSend, 0, QtCore.Qt.AlignRight)
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(105, self.pushButtonSend.height()))
self.verticalSplitter.addWidget(self.tTLContainer)
self.tTLContainer.adjustSize()
self.verticalSplitter.setStretchFactor(1, 0)
self.verticalSplitter.setStretchFactor(0, 1)
self.verticalSplitter.setCollapsible(0, False)
self.verticalSplitter.setCollapsible(1, False)
self.verticalSplitter.handle(1).setEnabled(False)
self.horizontalSplitter.addWidget(self.verticalSplitter)
self.horizontalSplitter.setStretchFactor(0, 0)
self.horizontalSplitter.setStretchFactor(1, 1)
self.horizontalSplitter.setCollapsible(0, False)
self.horizontalSplitter.setCollapsible(1, False)
self.gridLayout_7.addWidget(self.horizontalSplitter, 0, 0, 1, 1)
self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, 16777215))
self.labelHumanFriendlyTTLDescription.setObjectName("labelHumanFriendlyTTLDescription")
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription)
self.pushButtonClear = QtWidgets.QPushButton(parent=self.send)
self.pushButtonClear.setObjectName("pushButtonClear")
self.horizontalLayout_5.addWidget(self.pushButtonClear, 0, QtCore.Qt.AlignmentFlag.AlignRight)
self.pushButtonSend = QtWidgets.QPushButton(parent=self.send)
self.pushButtonSend.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.pushButtonSend.setObjectName("pushButtonSend")
self.horizontalLayout_5.addWidget(self.pushButtonSend)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.horizontalLayout.addLayout(self.verticalLayout)
self.gridLayout_7.addLayout(self.horizontalLayout, 0, 0, 1, 1)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.tabWidget.addTab(self.send, icon4, _fromUtf8(""))
self.subscriptions = QtGui.QWidget()
self.subscriptions.setObjectName(_fromUtf8("subscriptions"))
self.gridLayout_3 = QtGui.QGridLayout(self.subscriptions)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
self.horizontalSplitter_4 = settingsmixin.SSplitter()
self.horizontalSplitter_4.setObjectName(_fromUtf8("horizontalSplitter_4"))
self.verticalSplitter_3 = settingsmixin.SSplitter()
self.verticalSplitter_3.setObjectName(_fromUtf8("verticalSplitter_3"))
self.verticalSplitter_3.setOrientation(QtCore.Qt.Vertical)
self.treeWidgetSubscriptions = settingsmixin.STreeWidget(self.subscriptions)
icon4.addPixmap(QtGui.QPixmap(":/newPrefix/images/send.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.send, icon4, "")
self.subscriptions = QtWidgets.QWidget()
self.subscriptions.setObjectName("subscriptions")
self.gridLayout_3 = QtWidgets.QGridLayout(self.subscriptions)
self.gridLayout_3.setObjectName("gridLayout_3")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.treeWidgetSubscriptions = QtWidgets.QTreeWidget(parent=self.subscriptions)
self.treeWidgetSubscriptions.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidgetSubscriptions.setAlternatingRowColors(True)
self.treeWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.treeWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.treeWidgetSubscriptions.setObjectName(_fromUtf8("treeWidgetSubscriptions"))
self.treeWidgetSubscriptions.resize(200, self.treeWidgetSubscriptions.height())
self.treeWidgetSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.treeWidgetSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.treeWidgetSubscriptions.setObjectName("treeWidgetSubscriptions")
icon5 = QtGui.QIcon()
icon5.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
)
icon5.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5)
self.verticalSplitter_3.addWidget(self.treeWidgetSubscriptions)
self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions)
self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription"))
self.pushButtonAddSubscription.resize(200, self.pushButtonAddSubscription.height())
self.verticalSplitter_3.addWidget(self.pushButtonAddSubscription)
self.verticalSplitter_3.setStretchFactor(0, 1)
self.verticalSplitter_3.setStretchFactor(1, 0)
self.verticalSplitter_3.setCollapsible(0, False)
self.verticalSplitter_3.setCollapsible(1, False)
self.verticalSplitter_3.handle(1).setEnabled(False)
self.horizontalSplitter_4.addWidget(self.verticalSplitter_3)
self.verticalSplitter_4 = settingsmixin.SSplitter()
self.verticalSplitter_4.setObjectName(_fromUtf8("verticalSplitter_4"))
self.verticalSplitter_4.setOrientation(QtCore.Qt.Vertical)
self.horizontalSplitter_2 = QtGui.QSplitter()
self.horizontalSplitter_2.setObjectName(_fromUtf8("horizontalSplitter_2"))
self.inboxSearchLineEditSubscriptions = QtGui.QLineEdit(self.subscriptions)
self.inboxSearchLineEditSubscriptions.setObjectName(_fromUtf8("inboxSearchLineEditSubscriptions"))
self.horizontalSplitter_2.addWidget(self.inboxSearchLineEditSubscriptions)
self.inboxSearchOptionSubscriptions = QtGui.QComboBox(self.subscriptions)
self.inboxSearchOptionSubscriptions.setObjectName(_fromUtf8("inboxSearchOptionSubscriptions"))
self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
self.inboxSearchOptionSubscriptions.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.inboxSearchOptionSubscriptions.setCurrentIndex(2)
self.horizontalSplitter_2.addWidget(self.inboxSearchOptionSubscriptions)
self.horizontalSplitter_2.handle(1).setEnabled(False)
self.horizontalSplitter_2.setStretchFactor(0, 1)
self.horizontalSplitter_2.setStretchFactor(1, 0)
self.verticalSplitter_4.addWidget(self.horizontalSplitter_2)
self.tableWidgetInboxSubscriptions = settingsmixin.STableWidget(self.subscriptions)
self.tableWidgetInboxSubscriptions.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
self.verticalLayout_3.addWidget(self.treeWidgetSubscriptions)
self.pushButtonAddSubscription = QtWidgets.QPushButton(parent=self.subscriptions)
self.pushButtonAddSubscription.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddSubscription.setObjectName("pushButtonAddSubscription")
self.verticalLayout_3.addWidget(self.pushButtonAddSubscription)
self.horizontalLayout_4.addLayout(self.verticalLayout_3)
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.inboxSearchLineEditSubscriptions = QtWidgets.QLineEdit(parent=self.subscriptions)
self.inboxSearchLineEditSubscriptions.setObjectName("inboxSearchLineEditSubscriptions")
self.horizontalLayout_2.addWidget(self.inboxSearchLineEditSubscriptions)
self.inboxSearchOptionSubscriptions = QtWidgets.QComboBox(parent=self.subscriptions)
self.inboxSearchOptionSubscriptions.setObjectName("inboxSearchOptionSubscriptions")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.horizontalLayout_2.addWidget(self.inboxSearchOptionSubscriptions)
self.verticalLayout_4.addLayout(self.horizontalLayout_2)
self.tableWidgetInboxSubscriptions = QtWidgets.QTableWidget(parent=self.subscriptions)
self.tableWidgetInboxSubscriptions.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True)
self.tableWidgetInboxSubscriptions.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tableWidgetInboxSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetInboxSubscriptions.setWordWrap(False)
self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions"))
self.tableWidgetInboxSubscriptions.setObjectName("tableWidgetInboxSubscriptions")
self.tableWidgetInboxSubscriptions.setColumnCount(4)
self.tableWidgetInboxSubscriptions.setRowCount(0)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(3, item)
self.tableWidgetInboxSubscriptions.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInboxSubscriptions.horizontalHeader().setDefaultSectionSize(200)
@ -446,101 +346,74 @@ class Ui_MainWindow(object):
self.tableWidgetInboxSubscriptions.horizontalHeader().setStretchLastSection(True)
self.tableWidgetInboxSubscriptions.verticalHeader().setVisible(False)
self.tableWidgetInboxSubscriptions.verticalHeader().setDefaultSectionSize(26)
self.verticalSplitter_4.addWidget(self.tableWidgetInboxSubscriptions)
self.textEditInboxMessageSubscriptions = MessageView(self.subscriptions)
self.verticalLayout_4.addWidget(self.tableWidgetInboxSubscriptions)
self.textEditInboxMessageSubscriptions = QtWidgets.QTextEdit(parent=self.subscriptions)
self.textEditInboxMessageSubscriptions.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessageSubscriptions.setReadOnly(True)
self.textEditInboxMessageSubscriptions.setObjectName(_fromUtf8("textEditInboxMessageSubscriptions"))
self.verticalSplitter_4.addWidget(self.textEditInboxMessageSubscriptions)
self.verticalSplitter_4.setStretchFactor(0, 0)
self.verticalSplitter_4.setStretchFactor(1, 1)
self.verticalSplitter_4.setStretchFactor(2, 2)
self.verticalSplitter_4.setCollapsible(0, False)
self.verticalSplitter_4.setCollapsible(1, False)
self.verticalSplitter_4.setCollapsible(2, False)
self.verticalSplitter_4.handle(1).setEnabled(False)
self.horizontalSplitter_4.addWidget(self.verticalSplitter_4)
self.horizontalSplitter_4.setStretchFactor(0, 0)
self.horizontalSplitter_4.setStretchFactor(1, 1)
self.horizontalSplitter_4.setCollapsible(0, False)
self.horizontalSplitter_4.setCollapsible(1, False)
self.gridLayout_3.addWidget(self.horizontalSplitter_4, 0, 0, 1, 1)
self.textEditInboxMessageSubscriptions.setObjectName("textEditInboxMessageSubscriptions")
self.verticalLayout_4.addWidget(self.textEditInboxMessageSubscriptions)
self.horizontalLayout_4.addLayout(self.verticalLayout_4)
self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
icon6 = QtGui.QIcon()
icon6.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off
)
self.tabWidget.addTab(self.subscriptions, icon6, _fromUtf8(""))
self.chans = QtGui.QWidget()
self.chans.setObjectName(_fromUtf8("chans"))
self.gridLayout_4 = QtGui.QGridLayout(self.chans)
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
self.horizontalSplitter_7 = settingsmixin.SSplitter()
self.horizontalSplitter_7.setObjectName(_fromUtf8("horizontalSplitter_7"))
self.verticalSplitter_17 = settingsmixin.SSplitter()
self.verticalSplitter_17.setObjectName(_fromUtf8("verticalSplitter_17"))
self.verticalSplitter_17.setOrientation(QtCore.Qt.Vertical)
self.treeWidgetChans = settingsmixin.STreeWidget(self.chans)
self.treeWidgetChans.setFrameShadow(QtGui.QFrame.Sunken)
icon6.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.subscriptions, icon6, "")
self.tab_3 = QtWidgets.QWidget()
self.tab_3.setObjectName("tab_3")
self.gridLayout_4 = QtWidgets.QGridLayout(self.tab_3)
self.gridLayout_4.setObjectName("gridLayout_4")
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.verticalLayout_17 = QtWidgets.QVBoxLayout()
self.verticalLayout_17.setObjectName("verticalLayout_17")
self.treeWidgetChans = QtWidgets.QTreeWidget(parent=self.tab_3)
self.treeWidgetChans.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidgetChans.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
self.treeWidgetChans.setLineWidth(1)
self.treeWidgetChans.setAlternatingRowColors(True)
self.treeWidgetChans.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.treeWidgetChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.treeWidgetChans.setObjectName(_fromUtf8("treeWidgetChans"))
self.treeWidgetChans.resize(200, self.treeWidgetChans.height())
self.treeWidgetChans.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.treeWidgetChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.treeWidgetChans.setObjectName("treeWidgetChans")
icon7 = QtGui.QIcon()
icon7.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
)
icon7.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
self.treeWidgetChans.headerItem().setIcon(0, icon7)
self.verticalSplitter_17.addWidget(self.treeWidgetChans)
self.pushButtonAddChan = QtGui.QPushButton(self.chans)
self.pushButtonAddChan.setObjectName(_fromUtf8("pushButtonAddChan"))
self.pushButtonAddChan.resize(200, self.pushButtonAddChan.height())
self.verticalSplitter_17.addWidget(self.pushButtonAddChan)
self.verticalSplitter_17.setStretchFactor(0, 1)
self.verticalSplitter_17.setStretchFactor(1, 0)
self.verticalSplitter_17.setCollapsible(0, False)
self.verticalSplitter_17.setCollapsible(1, False)
self.verticalSplitter_17.handle(1).setEnabled(False)
self.horizontalSplitter_7.addWidget(self.verticalSplitter_17)
self.verticalSplitter_8 = settingsmixin.SSplitter()
self.verticalSplitter_8.setObjectName(_fromUtf8("verticalSplitter_8"))
self.verticalSplitter_8.setOrientation(QtCore.Qt.Vertical)
self.horizontalSplitter_6 = QtGui.QSplitter()
self.horizontalSplitter_6.setObjectName(_fromUtf8("horizontalSplitter_6"))
self.inboxSearchLineEditChans = QtGui.QLineEdit(self.chans)
self.inboxSearchLineEditChans.setObjectName(_fromUtf8("inboxSearchLineEditChans"))
self.horizontalSplitter_6.addWidget(self.inboxSearchLineEditChans)
self.inboxSearchOptionChans = QtGui.QComboBox(self.chans)
self.inboxSearchOptionChans.setObjectName(_fromUtf8("inboxSearchOptionChans"))
self.inboxSearchOptionChans.addItem(_fromUtf8(""))
self.inboxSearchOptionChans.addItem(_fromUtf8(""))
self.inboxSearchOptionChans.addItem(_fromUtf8(""))
self.inboxSearchOptionChans.addItem(_fromUtf8(""))
self.inboxSearchOptionChans.addItem(_fromUtf8(""))
self.inboxSearchOptionChans.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.inboxSearchOptionChans.setCurrentIndex(3)
self.horizontalSplitter_6.addWidget(self.inboxSearchOptionChans)
self.horizontalSplitter_6.handle(1).setEnabled(False)
self.horizontalSplitter_6.setStretchFactor(0, 1)
self.horizontalSplitter_6.setStretchFactor(1, 0)
self.verticalSplitter_8.addWidget(self.horizontalSplitter_6)
self.tableWidgetInboxChans = settingsmixin.STableWidget(self.chans)
self.tableWidgetInboxChans.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
self.verticalLayout_17.addWidget(self.treeWidgetChans)
self.pushButtonAddChan = QtWidgets.QPushButton(parent=self.tab_3)
self.pushButtonAddChan.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddChan.setObjectName("pushButtonAddChan")
self.verticalLayout_17.addWidget(self.pushButtonAddChan)
self.horizontalLayout_7.addLayout(self.verticalLayout_17)
self.verticalLayout_8 = QtWidgets.QVBoxLayout()
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.inboxSearchLineEditChans = QtWidgets.QLineEdit(parent=self.tab_3)
self.inboxSearchLineEditChans.setObjectName("inboxSearchLineEditChans")
self.horizontalLayout_6.addWidget(self.inboxSearchLineEditChans)
self.inboxSearchOptionChans = QtWidgets.QComboBox(parent=self.tab_3)
self.inboxSearchOptionChans.setObjectName("inboxSearchOptionChans")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.horizontalLayout_6.addWidget(self.inboxSearchOptionChans)
self.verticalLayout_8.addLayout(self.horizontalLayout_6)
self.tableWidgetInboxChans = QtWidgets.QTableWidget(parent=self.tab_3)
self.tableWidgetInboxChans.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidgetInboxChans.setAlternatingRowColors(True)
self.tableWidgetInboxChans.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.tableWidgetInboxChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tableWidgetInboxChans.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetInboxChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetInboxChans.setWordWrap(False)
self.tableWidgetInboxChans.setObjectName(_fromUtf8("tableWidgetInboxChans"))
self.tableWidgetInboxChans.setObjectName("tableWidgetInboxChans")
self.tableWidgetInboxChans.setColumnCount(4)
self.tableWidgetInboxChans.setRowCount(0)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(3, item)
self.tableWidgetInboxChans.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInboxChans.horizontalHeader().setDefaultSectionSize(200)
@ -550,97 +423,180 @@ class Ui_MainWindow(object):
self.tableWidgetInboxChans.horizontalHeader().setStretchLastSection(True)
self.tableWidgetInboxChans.verticalHeader().setVisible(False)
self.tableWidgetInboxChans.verticalHeader().setDefaultSectionSize(26)
self.verticalSplitter_8.addWidget(self.tableWidgetInboxChans)
self.textEditInboxMessageChans = MessageView(self.chans)
self.verticalLayout_8.addWidget(self.tableWidgetInboxChans)
self.textEditInboxMessageChans = QtWidgets.QTextEdit(parent=self.tab_3)
self.textEditInboxMessageChans.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessageChans.setReadOnly(True)
self.textEditInboxMessageChans.setObjectName(_fromUtf8("textEditInboxMessageChans"))
self.verticalSplitter_8.addWidget(self.textEditInboxMessageChans)
self.verticalSplitter_8.setStretchFactor(0, 0)
self.verticalSplitter_8.setStretchFactor(1, 1)
self.verticalSplitter_8.setStretchFactor(2, 2)
self.verticalSplitter_8.setCollapsible(0, False)
self.verticalSplitter_8.setCollapsible(1, False)
self.verticalSplitter_8.setCollapsible(2, False)
self.verticalSplitter_8.handle(1).setEnabled(False)
self.horizontalSplitter_7.addWidget(self.verticalSplitter_8)
self.horizontalSplitter_7.setStretchFactor(0, 0)
self.horizontalSplitter_7.setStretchFactor(1, 1)
self.horizontalSplitter_7.setCollapsible(0, False)
self.horizontalSplitter_7.setCollapsible(1, False)
self.gridLayout_4.addWidget(self.horizontalSplitter_7, 0, 0, 1, 1)
self.textEditInboxMessageChans.setObjectName("textEditInboxMessageChans")
self.verticalLayout_8.addWidget(self.textEditInboxMessageChans)
self.horizontalLayout_7.addLayout(self.verticalLayout_8)
self.gridLayout_4.addLayout(self.horizontalLayout_7, 0, 0, 1, 1)
icon8 = QtGui.QIcon()
icon8.addPixmap(
QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off
)
self.tabWidget.addTab(self.chans, icon8, _fromUtf8(""))
self.blackwhitelist = Blacklist()
self.tabWidget.addTab(self.blackwhitelist, QtGui.QIcon(":/newPrefix/images/blacklist.png"), "")
# Initialize the Blacklist or Whitelist
if config.get('bitmessagesettings', 'blackwhitelist') == 'white':
self.blackwhitelist.radioButtonWhitelist.click()
self.blackwhitelist.rerenderBlackWhiteList()
self.networkstatus = NetworkStatus()
self.tabWidget.addTab(self.networkstatus, QtGui.QIcon(":/newPrefix/images/networkstatus.png"), "")
icon8.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.tab_3, icon8, "")
self.blackwhitelist = QtWidgets.QWidget()
self.blackwhitelist.setObjectName("blackwhitelist")
self.gridLayout_6 = QtWidgets.QGridLayout(self.blackwhitelist)
self.gridLayout_6.setObjectName("gridLayout_6")
self.radioButtonBlacklist = QtWidgets.QRadioButton(parent=self.blackwhitelist)
self.radioButtonBlacklist.setChecked(True)
self.radioButtonBlacklist.setObjectName("radioButtonBlacklist")
self.gridLayout_6.addWidget(self.radioButtonBlacklist, 0, 0, 1, 2)
self.radioButtonWhitelist = QtWidgets.QRadioButton(parent=self.blackwhitelist)
self.radioButtonWhitelist.setObjectName("radioButtonWhitelist")
self.gridLayout_6.addWidget(self.radioButtonWhitelist, 1, 0, 1, 2)
self.pushButtonAddBlacklist = QtWidgets.QPushButton(parent=self.blackwhitelist)
self.pushButtonAddBlacklist.setObjectName("pushButtonAddBlacklist")
self.gridLayout_6.addWidget(self.pushButtonAddBlacklist, 2, 0, 1, 1)
spacerItem = QtWidgets.QSpacerItem(689, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout_6.addItem(spacerItem, 2, 1, 1, 1)
self.tableWidgetBlacklist = QtWidgets.QTableWidget(parent=self.blackwhitelist)
self.tableWidgetBlacklist.setAlternatingRowColors(True)
self.tableWidgetBlacklist.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.tableWidgetBlacklist.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetBlacklist.setObjectName("tableWidgetBlacklist")
self.tableWidgetBlacklist.setColumnCount(2)
self.tableWidgetBlacklist.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetBlacklist.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetBlacklist.setHorizontalHeaderItem(1, item)
self.tableWidgetBlacklist.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetBlacklist.horizontalHeader().setDefaultSectionSize(400)
self.tableWidgetBlacklist.horizontalHeader().setHighlightSections(False)
self.tableWidgetBlacklist.horizontalHeader().setSortIndicatorShown(False)
self.tableWidgetBlacklist.horizontalHeader().setStretchLastSection(True)
self.tableWidgetBlacklist.verticalHeader().setVisible(False)
self.gridLayout_6.addWidget(self.tableWidgetBlacklist, 3, 0, 1, 2)
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/newPrefix/images/blacklist.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.blackwhitelist, icon9, "")
self.networkstatus = QtWidgets.QWidget()
self.networkstatus.setObjectName("networkstatus")
self.pushButtonStatusIcon = QtWidgets.QPushButton(parent=self.networkstatus)
self.pushButtonStatusIcon.setGeometry(QtCore.QRect(680, 440, 21, 23))
self.pushButtonStatusIcon.setText("")
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/newPrefix/images/redicon.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.pushButtonStatusIcon.setIcon(icon10)
self.pushButtonStatusIcon.setFlat(True)
self.pushButtonStatusIcon.setObjectName("pushButtonStatusIcon")
self.tableWidgetConnectionCount = QtWidgets.QTableWidget(parent=self.networkstatus)
self.tableWidgetConnectionCount.setGeometry(QtCore.QRect(20, 70, 241, 241))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(212, 208, 200))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Active, QtGui.QPalette.ColorRole.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(212, 208, 200))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Inactive, QtGui.QPalette.ColorRole.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(212, 208, 200))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Base, brush)
self.tableWidgetConnectionCount.setPalette(palette)
self.tableWidgetConnectionCount.setFrameShape(QtWidgets.QFrame.Shape.Box)
self.tableWidgetConnectionCount.setFrameShadow(QtWidgets.QFrame.Shadow.Plain)
self.tableWidgetConnectionCount.setProperty("showDropIndicator", False)
self.tableWidgetConnectionCount.setAlternatingRowColors(True)
self.tableWidgetConnectionCount.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection)
self.tableWidgetConnectionCount.setObjectName("tableWidgetConnectionCount")
self.tableWidgetConnectionCount.setColumnCount(2)
self.tableWidgetConnectionCount.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetConnectionCount.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetConnectionCount.setHorizontalHeaderItem(1, item)
self.tableWidgetConnectionCount.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetConnectionCount.horizontalHeader().setHighlightSections(False)
self.tableWidgetConnectionCount.horizontalHeader().setStretchLastSection(True)
self.tableWidgetConnectionCount.verticalHeader().setVisible(False)
self.labelTotalConnections = QtWidgets.QLabel(parent=self.networkstatus)
self.labelTotalConnections.setGeometry(QtCore.QRect(20, 30, 401, 16))
self.labelTotalConnections.setObjectName("labelTotalConnections")
self.labelStartupTime = QtWidgets.QLabel(parent=self.networkstatus)
self.labelStartupTime.setGeometry(QtCore.QRect(320, 110, 331, 20))
self.labelStartupTime.setObjectName("labelStartupTime")
self.labelMessageCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelMessageCount.setGeometry(QtCore.QRect(350, 130, 361, 16))
self.labelMessageCount.setObjectName("labelMessageCount")
self.labelPubkeyCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelPubkeyCount.setGeometry(QtCore.QRect(350, 170, 331, 16))
self.labelPubkeyCount.setObjectName("labelPubkeyCount")
self.labelBroadcastCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelBroadcastCount.setGeometry(QtCore.QRect(350, 150, 351, 16))
self.labelBroadcastCount.setObjectName("labelBroadcastCount")
self.labelLookupsPerSecond = QtWidgets.QLabel(parent=self.networkstatus)
self.labelLookupsPerSecond.setGeometry(QtCore.QRect(320, 250, 291, 16))
self.labelLookupsPerSecond.setObjectName("labelLookupsPerSecond")
self.labelBytesRecvCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelBytesRecvCount.setGeometry(QtCore.QRect(350, 210, 251, 16))
self.labelBytesRecvCount.setObjectName("labelBytesRecvCount")
self.labelBytesSentCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelBytesSentCount.setGeometry(QtCore.QRect(350, 230, 251, 16))
self.labelBytesSentCount.setObjectName("labelBytesSentCount")
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/newPrefix/images/networkstatus.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.networkstatus, icon11, "")
self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.MainDock.setWidget(self.centralwidget)
# XXX unresolved
#MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(None), self.MainDock)
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 885, 27))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName(_fromUtf8("menuFile"))
self.menuSettings = QtGui.QMenu(self.menubar)
self.menuSettings.setObjectName(_fromUtf8("menuSettings"))
self.menuHelp = QtGui.QMenu(self.menubar)
self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(parent=self.menubar)
self.menuFile.setObjectName("menuFile")
self.menuSettings = QtWidgets.QMenu(parent=self.menubar)
self.menuSettings.setObjectName("menuSettings")
self.menuHelp = QtWidgets.QMenu(parent=self.menubar)
self.menuHelp.setObjectName("menuHelp")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar = QtWidgets.QStatusBar(parent=MainWindow)
self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22))
self.statusbar.setObjectName(_fromUtf8("statusbar"))
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionImport_keys = QtGui.QAction(MainWindow)
self.actionImport_keys.setObjectName(_fromUtf8("actionImport_keys"))
self.actionManageKeys = QtGui.QAction(MainWindow)
self.actionImport_keys = QtGui.QAction(parent=MainWindow)
self.actionImport_keys.setObjectName("actionImport_keys")
self.actionManageKeys = QtGui.QAction(parent=MainWindow)
self.actionManageKeys.setCheckable(False)
self.actionManageKeys.setEnabled(True)
icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password"))
self.actionNetworkSwitch = QtGui.QAction(parent=MainWindow)
self.actionNetworkSwitch.setObjectName("actionNetworkSwitch")
icon = QtGui.QIcon.fromTheme("dialog-password")
self.actionManageKeys.setIcon(icon)
self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys"))
self.actionNetworkSwitch = QtGui.QAction(MainWindow)
self.actionNetworkSwitch.setObjectName(_fromUtf8("actionNetworkSwitch"))
self.actionExit = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit"))
self.actionManageKeys.setObjectName("actionManageKeys")
self.actionExit = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("application-exit")
self.actionExit.setIcon(icon)
self.actionExit.setObjectName(_fromUtf8("actionExit"))
self.actionHelp = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("help-contents"))
self.actionExit.setObjectName("actionExit")
self.actionHelp = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("help-contents")
self.actionHelp.setIcon(icon)
self.actionHelp.setObjectName(_fromUtf8("actionHelp"))
self.actionHelp.setObjectName("actionHelp")
self.actionSupport = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("help-support"))
icon = QtGui.QIcon.fromTheme("help-support")
self.actionSupport.setIcon(icon)
self.actionSupport.setObjectName(_fromUtf8("actionSupport"))
self.actionAbout = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("help-about"))
self.actionSupport.setObjectName("actionSupport")
self.actionAbout = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("help-about")
self.actionAbout.setIcon(icon)
self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
self.actionSettings = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("document-properties"))
self.actionAbout.setObjectName("actionAbout")
self.actionSettings = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("document-properties")
self.actionSettings.setIcon(icon)
self.actionSettings.setObjectName(_fromUtf8("actionSettings"))
self.actionRegenerateDeterministicAddresses = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("view-refresh"))
self.actionSettings.setObjectName("actionSettings")
self.actionRegenerateDeterministicAddresses = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("view-refresh")
self.actionRegenerateDeterministicAddresses.setIcon(icon)
self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses"))
self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("user-trash"))
self.actionRegenerateDeterministicAddresses.setObjectName("actionRegenerateDeterministicAddresses")
self.actionDeleteAllTrashedMessages = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("user-trash")
self.actionDeleteAllTrashedMessages.setIcon(icon)
self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages"))
self.actionJoinChan = QtGui.QAction(MainWindow)
icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new"))
self.actionDeleteAllTrashedMessages.setObjectName("actionDeleteAllTrashedMessages")
self.actionJoinChan = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("contact-new")
self.actionJoinChan.setIcon(icon)
self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan"))
self.actionJoinChan.setObjectName("actionJoinChan")
self.menuFile.addAction(self.actionManageKeys)
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
@ -655,30 +611,34 @@ class Ui_MainWindow(object):
self.menubar.addAction(self.menuHelp.menuAction())
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(
self.tabWidget.indexOf(self.inbox)
)
self.tabWidgetSend.setCurrentIndex(
self.tabWidgetSend.indexOf(self.sendDirect)
)
self.tabWidget.setCurrentIndex(0)
self.tabWidgetSend.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage)
MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom)
MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo)
MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject)
MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage)
MainWindow.setTabOrder(self.textEditMessage, self.pushButtonAddSubscription)
MainWindow.setTabOrder(self.textEditMessage, self.pushButtonSend)
MainWindow.setTabOrder(self.pushButtonSend, self.pushButtonAddSubscription)
MainWindow.setTabOrder(self.pushButtonAddSubscription, self.radioButtonBlacklist)
MainWindow.setTabOrder(self.radioButtonBlacklist, self.radioButtonWhitelist)
MainWindow.setTabOrder(self.radioButtonWhitelist, self.pushButtonAddBlacklist)
MainWindow.setTabOrder(self.pushButtonAddBlacklist, self.tableWidgetBlacklist)
MainWindow.setTabOrder(self.tableWidgetBlacklist, self.tableWidgetConnectionCount)
MainWindow.setTabOrder(self.tableWidgetConnectionCount, self.pushButtonStatusIcon)
# Popup menu actions container for the Sent page
# pylint: disable=attribute-defined-outside-init
self.sentContextMenuToolbar = QtGui.QToolBar()
self.sentContextMenuToolbar = QtWidgets.QToolBar()
# Popup menu actions container for chans tree
self.addressContextMenuToolbar = QtGui.QToolBar()
self.addressContextMenuToolbar = QtWidgets.QToolBar()
# Popup menu actions container for subscriptions tree
self.subscriptionsContextMenuToolbar = QtGui.QToolBar()
self.subscriptionsContextMenuToolbar = QtWidgets.QToolBar()
def updateNetworkSwitchMenuLabel(self, dontconnect=None):
if dontconnect is None:
_translate = QtCore.QCoreApplication.translate
dontconnect = config.safeGetBoolean(
'bitmessagesettings', 'dontconnect')
self.actionNetworkSwitch.setText(
@ -688,130 +648,126 @@ class Ui_MainWindow(object):
)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "Bitmessage", None))
self.treeWidgetYourIdentities.headerItem().setText(0, _translate("MainWindow", "Identities", None))
self.pushButtonNewAddress.setText(_translate("MainWindow", "New Identity", None))
self.inboxSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search", None))
self.inboxSearchOption.setItemText(0, _translate("MainWindow", "All", None))
self.inboxSearchOption.setItemText(1, _translate("MainWindow", "To", None))
self.inboxSearchOption.setItemText(2, _translate("MainWindow", "From", None))
self.inboxSearchOption.setItemText(3, _translate("MainWindow", "Subject", None))
self.inboxSearchOption.setItemText(4, _translate("MainWindow", "Message", None))
_translate = QtCore.QCoreApplication.translate
self.MainDock.setWindowTitle(_translate("MainWindow", "Bitmessage"))
self.treeWidgetYourIdentities.headerItem().setText(0, _translate("MainWindow", "Identities"))
self.pushButtonNewAddress.setText(_translate("MainWindow", "New Indentitiy"))
self.inboxSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search"))
self.inboxSearchOption.setItemText(0, _translate("MainWindow", "All"))
self.inboxSearchOption.setItemText(1, _translate("MainWindow", "To"))
self.inboxSearchOption.setItemText(2, _translate("MainWindow", "From"))
self.inboxSearchOption.setItemText(3, _translate("MainWindow", "Subject"))
self.inboxSearchOption.setItemText(4, _translate("MainWindow", "Message"))
self.tableWidgetInbox.setSortingEnabled(True)
item = self.tableWidgetInbox.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "To", None))
item.setText(_translate("MainWindow", "To"))
item = self.tableWidgetInbox.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "From", None))
item.setText(_translate("MainWindow", "From"))
item = self.tableWidgetInbox.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Subject", None))
item.setText(_translate("MainWindow", "Subject"))
item = self.tableWidgetInbox.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Messages", None))
item.setText(_translate("MainWindow", "Received"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Messages"))
self.tableWidgetAddressBook.setSortingEnabled(True)
item = self.tableWidgetAddressBook.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Address book", None))
item.setText(_translate("MainWindow", "Address book"))
item = self.tableWidgetAddressBook.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address", None))
self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact", None))
self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID", None))
self.label_3.setText(_translate("MainWindow", "Subject:", None))
self.label_2.setText(_translate("MainWindow", "From:", None))
self.label.setText(_translate("MainWindow", "To:", None))
self.tabWidgetSend.setTabText(
self.tabWidgetSend.indexOf(self.sendDirect), _translate("MainWindow", "Send ordinary Message", None)
)
self.label_8.setText(_translate("MainWindow", "From:", None))
self.label_7.setText(_translate("MainWindow", "Subject:", None))
self.tabWidgetSend.setTabText(
self.tabWidgetSend.indexOf(self.sendBroadcast),
_translate("MainWindow", "Send Message to your Subscribers", None)
)
self.pushButtonTTL.setText(_translate("MainWindow", "TTL:", None))
hours = 48
try:
hours = int(config.getint('bitmessagesettings', 'ttl') / 60 / 60)
except:
pass
self.labelHumanFriendlyTTLDescription.setText(
_translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, hours)
)
self.pushButtonClear.setText(_translate("MainWindow", "Clear", None))
self.pushButtonSend.setText(_translate("MainWindow", "Send", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions", None))
self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription", None))
self.inboxSearchLineEditSubscriptions.setPlaceholderText(_translate("MainWindow", "Search", None))
self.inboxSearchOptionSubscriptions.setItemText(0, _translate("MainWindow", "All", None))
self.inboxSearchOptionSubscriptions.setItemText(1, _translate("MainWindow", "From", None))
self.inboxSearchOptionSubscriptions.setItemText(2, _translate("MainWindow", "Subject", None))
self.inboxSearchOptionSubscriptions.setItemText(3, _translate("MainWindow", "Message", None))
item.setText(_translate("MainWindow", "Address"))
self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact"))
self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID"))
self.label_3.setText(_translate("MainWindow", "Subject:"))
self.label_2.setText(_translate("MainWindow", "From:"))
self.label.setText(_translate("MainWindow", "To:"))
self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>"))
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab), _translate("MainWindow", "Send ordinary Message"))
self.label_8.setText(_translate("MainWindow", "From:"))
self.label_7.setText(_translate("MainWindow", "Subject:"))
self.textEditMessageBroadcast.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>"))
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab_2), _translate("MainWindow", "Send Message to your Subscribers"))
self.pushButtonTTL.setText(_translate("MainWindow", "TTL:"))
self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "X days"))
self.pushButtonClear.setText(_translate("MainWindow", "Clear"))
self.pushButtonSend.setText(_translate("MainWindow", "Send"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send"))
self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions"))
self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription"))
self.inboxSearchLineEditSubscriptions.setPlaceholderText(_translate("MainWindow", "Search"))
self.inboxSearchOptionSubscriptions.setItemText(0, _translate("MainWindow", "All"))
self.inboxSearchOptionSubscriptions.setItemText(1, _translate("MainWindow", "To"))
self.inboxSearchOptionSubscriptions.setItemText(2, _translate("MainWindow", "From"))
self.inboxSearchOptionSubscriptions.setItemText(3, _translate("MainWindow", "Subject"))
self.inboxSearchOptionSubscriptions.setItemText(4, _translate("MainWindow", "Message"))
self.tableWidgetInboxSubscriptions.setSortingEnabled(True)
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "To", None))
item.setText(_translate("MainWindow", "To"))
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "From", None))
item.setText(_translate("MainWindow", "From"))
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Subject", None))
item.setText(_translate("MainWindow", "Subject"))
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(
self.tabWidget.indexOf(self.subscriptions),
_translate("MainWindow", "Subscriptions", None)
)
self.treeWidgetChans.headerItem().setText(0, _translate("MainWindow", "Chans", None))
self.pushButtonAddChan.setText(_translate("MainWindow", "Add Chan", None))
self.inboxSearchLineEditChans.setPlaceholderText(_translate("MainWindow", "Search", None))
self.inboxSearchOptionChans.setItemText(0, _translate("MainWindow", "All", None))
self.inboxSearchOptionChans.setItemText(1, _translate("MainWindow", "To", None))
self.inboxSearchOptionChans.setItemText(2, _translate("MainWindow", "From", None))
self.inboxSearchOptionChans.setItemText(3, _translate("MainWindow", "Subject", None))
self.inboxSearchOptionChans.setItemText(4, _translate("MainWindow", "Message", None))
item.setText(_translate("MainWindow", "Received"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions"))
self.treeWidgetChans.headerItem().setText(0, _translate("MainWindow", "Chans"))
self.pushButtonAddChan.setText(_translate("MainWindow", "Add Chan"))
self.inboxSearchLineEditChans.setPlaceholderText(_translate("MainWindow", "Search"))
self.inboxSearchOptionChans.setItemText(0, _translate("MainWindow", "All"))
self.inboxSearchOptionChans.setItemText(1, _translate("MainWindow", "To"))
self.inboxSearchOptionChans.setItemText(2, _translate("MainWindow", "From"))
self.inboxSearchOptionChans.setItemText(3, _translate("MainWindow", "Subject"))
self.inboxSearchOptionChans.setItemText(4, _translate("MainWindow", "Message"))
self.tableWidgetInboxChans.setSortingEnabled(True)
item = self.tableWidgetInboxChans.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "To", None))
item.setText(_translate("MainWindow", "To"))
item = self.tableWidgetInboxChans.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "From", None))
item.setText(_translate("MainWindow", "From"))
item = self.tableWidgetInboxChans.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Subject", None))
item.setText(_translate("MainWindow", "Subject"))
item = self.tableWidgetInboxChans.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.chans), _translate("MainWindow", "Chans", None))
self.blackwhitelist.retranslateUi()
self.tabWidget.setTabText(
self.tabWidget.indexOf(self.blackwhitelist),
_translate("blacklist", "Blacklist", None)
)
self.networkstatus.retranslateUi()
self.tabWidget.setTabText(
self.tabWidget.indexOf(self.networkstatus),
_translate("networkstatus", "Network Status", None)
)
self.menuFile.setTitle(_translate("MainWindow", "File", None))
self.menuSettings.setTitle(_translate("MainWindow", "Settings", None))
self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
self.actionImport_keys.setText(_translate("MainWindow", "Import keys", None))
self.actionManageKeys.setText(_translate("MainWindow", "Manage keys", None))
self.actionExit.setText(_translate("MainWindow", "Quit", None))
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q", None))
self.actionHelp.setText(_translate("MainWindow", "Help", None))
self.actionHelp.setShortcut(_translate("MainWindow", "F1", None))
self.actionSupport.setText(_translate("MainWindow", "Contact support", None))
self.actionAbout.setText(_translate("MainWindow", "About", None))
self.actionSettings.setText(_translate("MainWindow", "Settings", None))
self.actionRegenerateDeterministicAddresses.setText(
_translate("MainWindow", "Regenerate deterministic addresses", None)
)
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages", None))
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan", None))
item.setText(_translate("MainWindow", "Received"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Chans"))
self.radioButtonBlacklist.setText(_translate("MainWindow", "Use a Blacklist (Allow all incoming messages except those on the Blacklist)"))
self.radioButtonWhitelist.setText(_translate("MainWindow", "Use a Whitelist (Block all incoming messages except those on the Whitelist)"))
self.pushButtonAddBlacklist.setText(_translate("MainWindow", "Add new entry"))
self.tableWidgetBlacklist.setSortingEnabled(True)
item = self.tableWidgetBlacklist.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Name or Label"))
item = self.tableWidgetBlacklist.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.blackwhitelist), _translate("MainWindow", "Blacklist"))
item = self.tableWidgetConnectionCount.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Stream #"))
item = self.tableWidgetConnectionCount.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Connections"))
self.labelTotalConnections.setText(_translate("MainWindow", "Total connections:"))
self.labelStartupTime.setText(_translate("MainWindow", "Since startup:"))
self.labelMessageCount.setText(_translate("MainWindow", "Processed 0 person-to-person messages."))
self.labelPubkeyCount.setText(_translate("MainWindow", "Processed 0 public keys."))
self.labelBroadcastCount.setText(_translate("MainWindow", "Processed 0 broadcasts."))
self.labelLookupsPerSecond.setText(_translate("MainWindow", "Inventory lookups per second: 0"))
self.labelBytesRecvCount.setText(_translate("MainWindow", "Down: 0 KB/s"))
self.labelBytesSentCount.setText(_translate("MainWindow", "Up: 0 KB/s"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus), _translate("MainWindow", "Network Status"))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.menuSettings.setTitle(_translate("MainWindow", "Settings"))
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
self.actionImport_keys.setText(_translate("MainWindow", "Import keys"))
self.actionManageKeys.setText(_translate("MainWindow", "Manage keys"))
self.actionExit.setText(_translate("MainWindow", "Quit"))
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q"))
self.actionHelp.setText(_translate("MainWindow", "Help"))
self.actionHelp.setShortcut(_translate("MainWindow", "F1"))
self.actionSupport.setText(_translate("MainWindow", "Contact support"))
self.actionAbout.setText(_translate("MainWindow", "About"))
self.actionSettings.setText(_translate("MainWindow", "Settings"))
self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses"))
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages"))
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan"))
self.updateNetworkSwitchMenuLabel()
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = settingsmixin.SMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())

View File

@ -0,0 +1,732 @@
# Form implementation generated from reading ui file 'bitmessageui.ui'
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
self.MainDock = QtWidgets.QDockWidget(parent=MainWindow)
self.MainDock.setGeometry(QtCore.QRect(0, 0, 885, 580))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-24px.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.MainDock.setWindowIcon(icon)
self.MainDock.setObjectName("MainDock")
self.centralwidget = QtWidgets.QWidget()
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_10 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_10.setObjectName("gridLayout_10")
self.tabWidget = QtWidgets.QTabWidget(parent=self.centralwidget)
self.tabWidget.setTabShape(QtWidgets.QTabWidget.TabShape.Rounded)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
self.tabWidget.setMinimumSize(QtCore.QSize(0, 0))
self.tabWidget.setBaseSize(QtCore.QSize(0, 0))
font = QtGui.QFont()
font.setPointSize(9)
self.tabWidget.setFont(font)
self.tabWidget.setTabPosition(QtWidgets.QTabWidget.TabPosition.North)
self.tabWidget.setTabShape(QtWidgets.QTabWidget.TabShape.Rounded)
self.tabWidget.setObjectName("tabWidget")
self.inbox = QtWidgets.QWidget()
self.inbox.setObjectName("inbox")
self.gridLayout = QtWidgets.QGridLayout(self.inbox)
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.verticalLayout_12 = QtWidgets.QVBoxLayout()
self.verticalLayout_12.setObjectName("verticalLayout_12")
self.treeWidgetYourIdentities = QtWidgets.QTreeWidget(parent=self.inbox)
self.treeWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidgetYourIdentities.setObjectName("treeWidgetYourIdentities")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/newPrefix/images/identities.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1)
self.verticalLayout_12.addWidget(self.treeWidgetYourIdentities)
self.pushButtonNewAddress = QtWidgets.QPushButton(parent=self.inbox)
self.pushButtonNewAddress.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonNewAddress.setObjectName("pushButtonNewAddress")
self.verticalLayout_12.addWidget(self.pushButtonNewAddress)
self.horizontalLayout_3.addLayout(self.verticalLayout_12)
self.verticalLayout_7 = QtWidgets.QVBoxLayout()
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.horizontalLayoutSearch = QtWidgets.QHBoxLayout()
self.horizontalLayoutSearch.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayoutSearch.setObjectName("horizontalLayoutSearch")
self.inboxSearchLineEdit = QtWidgets.QLineEdit(parent=self.inbox)
self.inboxSearchLineEdit.setObjectName("inboxSearchLineEdit")
self.horizontalLayoutSearch.addWidget(self.inboxSearchLineEdit)
self.inboxSearchOption = QtWidgets.QComboBox(parent=self.inbox)
self.inboxSearchOption.setObjectName("inboxSearchOption")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.inboxSearchOption.addItem("")
self.horizontalLayoutSearch.addWidget(self.inboxSearchOption)
self.verticalLayout_7.addLayout(self.horizontalLayoutSearch)
self.tableWidgetInbox = QtWidgets.QTableWidget(parent=self.inbox)
self.tableWidgetInbox.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidgetInbox.setAlternatingRowColors(True)
self.tableWidgetInbox.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetInbox.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetInbox.setWordWrap(False)
self.tableWidgetInbox.setObjectName("tableWidgetInbox")
self.tableWidgetInbox.setColumnCount(4)
self.tableWidgetInbox.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(2, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(3, item)
self.tableWidgetInbox.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInbox.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetInbox.horizontalHeader().setHighlightSections(False)
self.tableWidgetInbox.horizontalHeader().setMinimumSectionSize(27)
self.tableWidgetInbox.horizontalHeader().setSortIndicatorShown(False)
self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True)
self.tableWidgetInbox.verticalHeader().setVisible(False)
self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26)
self.verticalLayout_7.addWidget(self.tableWidgetInbox)
self.textEditInboxMessage = QtWidgets.QTextEdit(parent=self.inbox)
self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessage.setReadOnly(True)
self.textEditInboxMessage.setObjectName("textEditInboxMessage")
self.verticalLayout_7.addWidget(self.textEditInboxMessage)
self.horizontalLayout_3.addLayout(self.verticalLayout_7)
self.gridLayout.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/newPrefix/images/inbox.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.inbox, icon2, "")
self.send = QtWidgets.QWidget()
self.send.setObjectName("send")
self.gridLayout_7 = QtWidgets.QGridLayout(self.send)
self.gridLayout_7.setObjectName("gridLayout_7")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.tableWidgetAddressBook = QtWidgets.QTableWidget(parent=self.send)
self.tableWidgetAddressBook.setMaximumSize(QtCore.QSize(200, 16777215))
self.tableWidgetAddressBook.setAlternatingRowColors(True)
self.tableWidgetAddressBook.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetAddressBook.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetAddressBook.setObjectName("tableWidgetAddressBook")
self.tableWidgetAddressBook.setColumnCount(2)
self.tableWidgetAddressBook.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/newPrefix/images/addressbook.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
item.setIcon(icon3)
self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetAddressBook.setHorizontalHeaderItem(1, item)
self.tableWidgetAddressBook.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetAddressBook.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetAddressBook.horizontalHeader().setHighlightSections(False)
self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True)
self.tableWidgetAddressBook.verticalHeader().setVisible(False)
self.verticalLayout_2.addWidget(self.tableWidgetAddressBook)
self.pushButtonAddAddressBook = QtWidgets.QPushButton(parent=self.send)
self.pushButtonAddAddressBook.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddAddressBook.setObjectName("pushButtonAddAddressBook")
self.verticalLayout_2.addWidget(self.pushButtonAddAddressBook)
self.pushButtonFetchNamecoinID = QtWidgets.QPushButton(parent=self.send)
self.pushButtonFetchNamecoinID.setMaximumSize(QtCore.QSize(200, 16777215))
font = QtGui.QFont()
font.setPointSize(9)
self.pushButtonFetchNamecoinID.setFont(font)
self.pushButtonFetchNamecoinID.setObjectName("pushButtonFetchNamecoinID")
self.verticalLayout_2.addWidget(self.pushButtonFetchNamecoinID)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.tabWidgetSend = QtWidgets.QTabWidget(parent=self.send)
self.tabWidgetSend.setObjectName("tabWidgetSend")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.gridLayout_8 = QtWidgets.QGridLayout(self.tab)
self.gridLayout_8.setObjectName("gridLayout_8")
self.verticalLayout_5 = QtWidgets.QVBoxLayout()
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_3 = QtWidgets.QLabel(parent=self.tab)
self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
self.label_2 = QtWidgets.QLabel(parent=self.tab)
self.label_2.setObjectName("label_2")
self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1)
self.lineEditSubject = QtWidgets.QLineEdit(parent=self.tab)
self.lineEditSubject.setText("")
self.lineEditSubject.setObjectName("lineEditSubject")
self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1)
self.label = QtWidgets.QLabel(parent=self.tab)
self.label.setObjectName("label")
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
self.comboBoxSendFrom = QtWidgets.QComboBox(parent=self.tab)
self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
self.comboBoxSendFrom.setObjectName("comboBoxSendFrom")
self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1)
self.lineEditTo = QtWidgets.QLineEdit(parent=self.tab)
self.lineEditTo.setObjectName("lineEditTo")
self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1)
self.verticalLayout_5.addLayout(self.gridLayout_2)
self.textEditMessage = QtWidgets.QTextEdit(parent=self.tab)
self.textEditMessage.setObjectName("textEditMessage")
self.verticalLayout_5.addWidget(self.textEditMessage)
self.gridLayout_8.addLayout(self.verticalLayout_5, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.gridLayout_9 = QtWidgets.QGridLayout(self.tab_2)
self.gridLayout_9.setObjectName("gridLayout_9")
self.verticalLayout_6 = QtWidgets.QVBoxLayout()
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.gridLayout_5 = QtWidgets.QGridLayout()
self.gridLayout_5.setObjectName("gridLayout_5")
self.label_8 = QtWidgets.QLabel(parent=self.tab_2)
self.label_8.setObjectName("label_8")
self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1)
self.lineEditSubjectBroadcast = QtWidgets.QLineEdit(parent=self.tab_2)
self.lineEditSubjectBroadcast.setText("")
self.lineEditSubjectBroadcast.setObjectName("lineEditSubjectBroadcast")
self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1)
self.label_7 = QtWidgets.QLabel(parent=self.tab_2)
self.label_7.setObjectName("label_7")
self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1)
self.comboBoxSendFromBroadcast = QtWidgets.QComboBox(parent=self.tab_2)
self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0))
self.comboBoxSendFromBroadcast.setObjectName("comboBoxSendFromBroadcast")
self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1)
self.verticalLayout_6.addLayout(self.gridLayout_5)
self.textEditMessageBroadcast = QtWidgets.QTextEdit(parent=self.tab_2)
self.textEditMessageBroadcast.setObjectName("textEditMessageBroadcast")
self.verticalLayout_6.addWidget(self.textEditMessageBroadcast)
self.gridLayout_9.addLayout(self.verticalLayout_6, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.tab_2, "")
self.verticalLayout.addWidget(self.tabWidgetSend)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.pushButtonTTL = QtWidgets.QPushButton(parent=self.send)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth())
self.pushButtonTTL.setSizePolicy(sizePolicy)
self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, 16777215))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Active, QtGui.QPalette.ColorRole.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Inactive, QtGui.QPalette.ColorRole.ButtonText, brush)
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.ButtonText, brush)
self.pushButtonTTL.setPalette(palette)
font = QtGui.QFont()
font.setUnderline(True)
self.pushButtonTTL.setFont(font)
self.pushButtonTTL.setFlat(True)
self.pushButtonTTL.setObjectName("pushButtonTTL")
self.horizontalLayout_5.addWidget(self.pushButtonTTL)
self.horizontalSliderTTL = QtWidgets.QSlider(parent=self.send)
self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0))
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, 16777215))
self.horizontalSliderTTL.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.horizontalSliderTTL.setInvertedAppearance(False)
self.horizontalSliderTTL.setInvertedControls(False)
self.horizontalSliderTTL.setObjectName("horizontalSliderTTL")
self.horizontalLayout_5.addWidget(self.horizontalSliderTTL)
self.labelHumanFriendlyTTLDescription = QtWidgets.QLabel(parent=self.send)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth())
self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy)
self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0))
self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, 16777215))
self.labelHumanFriendlyTTLDescription.setObjectName("labelHumanFriendlyTTLDescription")
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription)
self.pushButtonSend = QtWidgets.QPushButton(parent=self.send)
self.pushButtonSend.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.pushButtonSend.setObjectName("pushButtonSend")
self.horizontalLayout_5.addWidget(self.pushButtonSend)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.horizontalLayout.addLayout(self.verticalLayout)
self.gridLayout_7.addLayout(self.horizontalLayout, 0, 0, 1, 1)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/newPrefix/images/send.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.send, icon4, "")
self.subscriptions = QtWidgets.QWidget()
self.subscriptions.setObjectName("subscriptions")
self.gridLayout_3 = QtWidgets.QGridLayout(self.subscriptions)
self.gridLayout_3.setObjectName("gridLayout_3")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.treeWidgetSubscriptions = QtWidgets.QTreeWidget(parent=self.subscriptions)
self.treeWidgetSubscriptions.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidgetSubscriptions.setAlternatingRowColors(True)
self.treeWidgetSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.treeWidgetSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.treeWidgetSubscriptions.setObjectName("treeWidgetSubscriptions")
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5)
self.verticalLayout_3.addWidget(self.treeWidgetSubscriptions)
self.pushButtonAddSubscription = QtWidgets.QPushButton(parent=self.subscriptions)
self.pushButtonAddSubscription.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddSubscription.setObjectName("pushButtonAddSubscription")
self.verticalLayout_3.addWidget(self.pushButtonAddSubscription)
self.horizontalLayout_4.addLayout(self.verticalLayout_3)
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.inboxSearchLineEditSubscriptions = QtWidgets.QLineEdit(parent=self.subscriptions)
self.inboxSearchLineEditSubscriptions.setObjectName("inboxSearchLineEditSubscriptions")
self.horizontalLayout_2.addWidget(self.inboxSearchLineEditSubscriptions)
self.inboxSearchOptionSubscriptions = QtWidgets.QComboBox(parent=self.subscriptions)
self.inboxSearchOptionSubscriptions.setObjectName("inboxSearchOptionSubscriptions")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.inboxSearchOptionSubscriptions.addItem("")
self.horizontalLayout_2.addWidget(self.inboxSearchOptionSubscriptions)
self.verticalLayout_4.addLayout(self.horizontalLayout_2)
self.tableWidgetInboxSubscriptions = QtWidgets.QTableWidget(parent=self.subscriptions)
self.tableWidgetInboxSubscriptions.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True)
self.tableWidgetInboxSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetInboxSubscriptions.setWordWrap(False)
self.tableWidgetInboxSubscriptions.setObjectName("tableWidgetInboxSubscriptions")
self.tableWidgetInboxSubscriptions.setColumnCount(4)
self.tableWidgetInboxSubscriptions.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(3, item)
self.tableWidgetInboxSubscriptions.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInboxSubscriptions.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetInboxSubscriptions.horizontalHeader().setHighlightSections(False)
self.tableWidgetInboxSubscriptions.horizontalHeader().setMinimumSectionSize(27)
self.tableWidgetInboxSubscriptions.horizontalHeader().setSortIndicatorShown(False)
self.tableWidgetInboxSubscriptions.horizontalHeader().setStretchLastSection(True)
self.tableWidgetInboxSubscriptions.verticalHeader().setVisible(False)
self.tableWidgetInboxSubscriptions.verticalHeader().setDefaultSectionSize(26)
self.verticalLayout_4.addWidget(self.tableWidgetInboxSubscriptions)
self.textEditInboxMessageSubscriptions = QtWidgets.QTextEdit(parent=self.subscriptions)
self.textEditInboxMessageSubscriptions.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessageSubscriptions.setReadOnly(True)
self.textEditInboxMessageSubscriptions.setObjectName("textEditInboxMessageSubscriptions")
self.verticalLayout_4.addWidget(self.textEditInboxMessageSubscriptions)
self.horizontalLayout_4.addLayout(self.verticalLayout_4)
self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.subscriptions, icon6, "")
self.tab_3 = QtWidgets.QWidget()
self.tab_3.setObjectName("tab_3")
self.gridLayout_4 = QtWidgets.QGridLayout(self.tab_3)
self.gridLayout_4.setObjectName("gridLayout_4")
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.verticalLayout_17 = QtWidgets.QVBoxLayout()
self.verticalLayout_17.setObjectName("verticalLayout_17")
self.treeWidgetChans = QtWidgets.QTreeWidget(parent=self.tab_3)
self.treeWidgetChans.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidgetChans.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
self.treeWidgetChans.setLineWidth(1)
self.treeWidgetChans.setAlternatingRowColors(True)
self.treeWidgetChans.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.treeWidgetChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.treeWidgetChans.setObjectName("treeWidgetChans")
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
self.treeWidgetChans.headerItem().setIcon(0, icon7)
self.verticalLayout_17.addWidget(self.treeWidgetChans)
self.pushButtonAddChan = QtWidgets.QPushButton(parent=self.tab_3)
self.pushButtonAddChan.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddChan.setObjectName("pushButtonAddChan")
self.verticalLayout_17.addWidget(self.pushButtonAddChan)
self.horizontalLayout_7.addLayout(self.verticalLayout_17)
self.verticalLayout_8 = QtWidgets.QVBoxLayout()
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.inboxSearchLineEditChans = QtWidgets.QLineEdit(parent=self.tab_3)
self.inboxSearchLineEditChans.setObjectName("inboxSearchLineEditChans")
self.horizontalLayout_6.addWidget(self.inboxSearchLineEditChans)
self.inboxSearchOptionChans = QtWidgets.QComboBox(parent=self.tab_3)
self.inboxSearchOptionChans.setObjectName("inboxSearchOptionChans")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.inboxSearchOptionChans.addItem("")
self.horizontalLayout_6.addWidget(self.inboxSearchOptionChans)
self.verticalLayout_8.addLayout(self.horizontalLayout_6)
self.tableWidgetInboxChans = QtWidgets.QTableWidget(parent=self.tab_3)
self.tableWidgetInboxChans.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidgetInboxChans.setAlternatingRowColors(True)
self.tableWidgetInboxChans.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
self.tableWidgetInboxChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetInboxChans.setWordWrap(False)
self.tableWidgetInboxChans.setObjectName("tableWidgetInboxChans")
self.tableWidgetInboxChans.setColumnCount(4)
self.tableWidgetInboxChans.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(3, item)
self.tableWidgetInboxChans.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInboxChans.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetInboxChans.horizontalHeader().setHighlightSections(False)
self.tableWidgetInboxChans.horizontalHeader().setMinimumSectionSize(27)
self.tableWidgetInboxChans.horizontalHeader().setSortIndicatorShown(False)
self.tableWidgetInboxChans.horizontalHeader().setStretchLastSection(True)
self.tableWidgetInboxChans.verticalHeader().setVisible(False)
self.tableWidgetInboxChans.verticalHeader().setDefaultSectionSize(26)
self.verticalLayout_8.addWidget(self.tableWidgetInboxChans)
self.textEditInboxMessageChans = QtWidgets.QTextEdit(parent=self.tab_3)
self.textEditInboxMessageChans.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessageChans.setReadOnly(True)
self.textEditInboxMessageChans.setObjectName("textEditInboxMessageChans")
self.verticalLayout_8.addWidget(self.textEditInboxMessageChans)
self.horizontalLayout_7.addLayout(self.verticalLayout_8)
self.gridLayout_4.addLayout(self.horizontalLayout_7, 0, 0, 1, 1)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.tab_3, icon8, "")
self.blackwhitelist = QtWidgets.QWidget()
self.blackwhitelist.setObjectName("blackwhitelist")
self.gridLayout_6 = QtWidgets.QGridLayout(self.blackwhitelist)
self.gridLayout_6.setObjectName("gridLayout_6")
self.radioButtonBlacklist = QtWidgets.QRadioButton(parent=self.blackwhitelist)
self.radioButtonBlacklist.setChecked(True)
self.radioButtonBlacklist.setObjectName("radioButtonBlacklist")
self.gridLayout_6.addWidget(self.radioButtonBlacklist, 0, 0, 1, 2)
self.radioButtonWhitelist = QtWidgets.QRadioButton(parent=self.blackwhitelist)
self.radioButtonWhitelist.setObjectName("radioButtonWhitelist")
self.gridLayout_6.addWidget(self.radioButtonWhitelist, 1, 0, 1, 2)
self.pushButtonAddBlacklist = QtWidgets.QPushButton(parent=self.blackwhitelist)
self.pushButtonAddBlacklist.setObjectName("pushButtonAddBlacklist")
self.gridLayout_6.addWidget(self.pushButtonAddBlacklist, 2, 0, 1, 1)
spacerItem = QtWidgets.QSpacerItem(689, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout_6.addItem(spacerItem, 2, 1, 1, 1)
self.tableWidgetBlacklist = QtWidgets.QTableWidget(parent=self.blackwhitelist)
self.tableWidgetBlacklist.setAlternatingRowColors(True)
self.tableWidgetBlacklist.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.tableWidgetBlacklist.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidgetBlacklist.setObjectName("tableWidgetBlacklist")
self.tableWidgetBlacklist.setColumnCount(2)
self.tableWidgetBlacklist.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetBlacklist.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetBlacklist.setHorizontalHeaderItem(1, item)
self.tableWidgetBlacklist.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetBlacklist.horizontalHeader().setDefaultSectionSize(400)
self.tableWidgetBlacklist.horizontalHeader().setHighlightSections(False)
self.tableWidgetBlacklist.horizontalHeader().setSortIndicatorShown(False)
self.tableWidgetBlacklist.horizontalHeader().setStretchLastSection(True)
self.tableWidgetBlacklist.verticalHeader().setVisible(False)
self.gridLayout_6.addWidget(self.tableWidgetBlacklist, 3, 0, 1, 2)
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/newPrefix/images/blacklist.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.blackwhitelist, icon9, "")
self.networkstatus = QtWidgets.QWidget()
self.networkstatus.setObjectName("networkstatus")
self.pushButtonStatusIcon = QtWidgets.QPushButton(parent=self.networkstatus)
self.pushButtonStatusIcon.setGeometry(QtCore.QRect(680, 440, 21, 23))
self.pushButtonStatusIcon.setText("")
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/newPrefix/images/redicon.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.pushButtonStatusIcon.setIcon(icon10)
self.pushButtonStatusIcon.setFlat(True)
self.pushButtonStatusIcon.setObjectName("pushButtonStatusIcon")
self.tableWidgetConnectionCount = QtWidgets.QTableWidget(parent=self.networkstatus)
self.tableWidgetConnectionCount.setGeometry(QtCore.QRect(20, 70, 241, 241))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(212, 208, 200))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Active, QtGui.QPalette.ColorRole.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(212, 208, 200))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Inactive, QtGui.QPalette.ColorRole.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(212, 208, 200))
brush.setStyle(QtCore.Qt.BrushStyle.SolidPattern)
palette.setBrush(QtGui.QPalette.ColorGroup.Disabled, QtGui.QPalette.ColorRole.Base, brush)
self.tableWidgetConnectionCount.setPalette(palette)
self.tableWidgetConnectionCount.setFrameShape(QtWidgets.QFrame.Shape.Box)
self.tableWidgetConnectionCount.setFrameShadow(QtWidgets.QFrame.Shadow.Plain)
self.tableWidgetConnectionCount.setProperty("showDropIndicator", False)
self.tableWidgetConnectionCount.setAlternatingRowColors(True)
self.tableWidgetConnectionCount.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection)
self.tableWidgetConnectionCount.setObjectName("tableWidgetConnectionCount")
self.tableWidgetConnectionCount.setColumnCount(2)
self.tableWidgetConnectionCount.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetConnectionCount.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidgetConnectionCount.setHorizontalHeaderItem(1, item)
self.tableWidgetConnectionCount.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetConnectionCount.horizontalHeader().setHighlightSections(False)
self.tableWidgetConnectionCount.horizontalHeader().setStretchLastSection(True)
self.tableWidgetConnectionCount.verticalHeader().setVisible(False)
self.labelTotalConnections = QtWidgets.QLabel(parent=self.networkstatus)
self.labelTotalConnections.setGeometry(QtCore.QRect(20, 30, 401, 16))
self.labelTotalConnections.setObjectName("labelTotalConnections")
self.labelStartupTime = QtWidgets.QLabel(parent=self.networkstatus)
self.labelStartupTime.setGeometry(QtCore.QRect(320, 110, 331, 20))
self.labelStartupTime.setObjectName("labelStartupTime")
self.labelMessageCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelMessageCount.setGeometry(QtCore.QRect(350, 130, 361, 16))
self.labelMessageCount.setObjectName("labelMessageCount")
self.labelPubkeyCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelPubkeyCount.setGeometry(QtCore.QRect(350, 170, 331, 16))
self.labelPubkeyCount.setObjectName("labelPubkeyCount")
self.labelBroadcastCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelBroadcastCount.setGeometry(QtCore.QRect(350, 150, 351, 16))
self.labelBroadcastCount.setObjectName("labelBroadcastCount")
self.labelLookupsPerSecond = QtWidgets.QLabel(parent=self.networkstatus)
self.labelLookupsPerSecond.setGeometry(QtCore.QRect(320, 250, 291, 16))
self.labelLookupsPerSecond.setObjectName("labelLookupsPerSecond")
self.labelBytesRecvCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelBytesRecvCount.setGeometry(QtCore.QRect(350, 210, 251, 16))
self.labelBytesRecvCount.setObjectName("labelBytesRecvCount")
self.labelBytesSentCount = QtWidgets.QLabel(parent=self.networkstatus)
self.labelBytesSentCount.setGeometry(QtCore.QRect(350, 230, 251, 16))
self.labelBytesSentCount.setObjectName("labelBytesSentCount")
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/newPrefix/images/networkstatus.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
self.tabWidget.addTab(self.networkstatus, icon11, "")
self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1)
self.MainDock.setWidget(self.centralwidget)
MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(None), self.MainDock)
self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 885, 27))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(parent=self.menubar)
self.menuFile.setObjectName("menuFile")
self.menuSettings = QtWidgets.QMenu(parent=self.menubar)
self.menuSettings.setObjectName("menuSettings")
self.menuHelp = QtWidgets.QMenu(parent=self.menubar)
self.menuHelp.setObjectName("menuHelp")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(parent=MainWindow)
self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22))
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionImport_keys = QtGui.QAction(parent=MainWindow)
self.actionImport_keys.setObjectName("actionImport_keys")
self.actionManageKeys = QtGui.QAction(parent=MainWindow)
self.actionManageKeys.setCheckable(False)
self.actionManageKeys.setEnabled(True)
icon = QtGui.QIcon.fromTheme("dialog-password")
self.actionManageKeys.setIcon(icon)
self.actionManageKeys.setObjectName("actionManageKeys")
self.actionExit = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("application-exit")
self.actionExit.setIcon(icon)
self.actionExit.setObjectName("actionExit")
self.actionHelp = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("help-contents")
self.actionHelp.setIcon(icon)
self.actionHelp.setObjectName("actionHelp")
self.actionAbout = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("help-about")
self.actionAbout.setIcon(icon)
self.actionAbout.setObjectName("actionAbout")
self.actionSettings = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("document-properties")
self.actionSettings.setIcon(icon)
self.actionSettings.setObjectName("actionSettings")
self.actionRegenerateDeterministicAddresses = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("view-refresh")
self.actionRegenerateDeterministicAddresses.setIcon(icon)
self.actionRegenerateDeterministicAddresses.setObjectName("actionRegenerateDeterministicAddresses")
self.actionDeleteAllTrashedMessages = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("user-trash")
self.actionDeleteAllTrashedMessages.setIcon(icon)
self.actionDeleteAllTrashedMessages.setObjectName("actionDeleteAllTrashedMessages")
self.actionJoinChan = QtGui.QAction(parent=MainWindow)
icon = QtGui.QIcon.fromTheme("contact-new")
self.actionJoinChan.setIcon(icon)
self.actionJoinChan.setObjectName("actionJoinChan")
self.menuFile.addAction(self.actionManageKeys)
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
self.menuFile.addAction(self.actionExit)
self.menuSettings.addAction(self.actionSettings)
self.menuHelp.addAction(self.actionHelp)
self.menuHelp.addAction(self.actionAbout)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuSettings.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
self.tabWidgetSend.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage)
MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom)
MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo)
MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject)
MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage)
MainWindow.setTabOrder(self.textEditMessage, self.pushButtonSend)
MainWindow.setTabOrder(self.pushButtonSend, self.pushButtonAddSubscription)
MainWindow.setTabOrder(self.pushButtonAddSubscription, self.radioButtonBlacklist)
MainWindow.setTabOrder(self.radioButtonBlacklist, self.radioButtonWhitelist)
MainWindow.setTabOrder(self.radioButtonWhitelist, self.pushButtonAddBlacklist)
MainWindow.setTabOrder(self.pushButtonAddBlacklist, self.tableWidgetBlacklist)
MainWindow.setTabOrder(self.tableWidgetBlacklist, self.tableWidgetConnectionCount)
MainWindow.setTabOrder(self.tableWidgetConnectionCount, self.pushButtonStatusIcon)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
self.MainDock.setWindowTitle(_translate("MainWindow", "Bitmessage"))
self.treeWidgetYourIdentities.headerItem().setText(0, _translate("MainWindow", "Identities"))
self.pushButtonNewAddress.setText(_translate("MainWindow", "New Indentitiy"))
self.inboxSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search"))
self.inboxSearchOption.setItemText(0, _translate("MainWindow", "All"))
self.inboxSearchOption.setItemText(1, _translate("MainWindow", "To"))
self.inboxSearchOption.setItemText(2, _translate("MainWindow", "From"))
self.inboxSearchOption.setItemText(3, _translate("MainWindow", "Subject"))
self.inboxSearchOption.setItemText(4, _translate("MainWindow", "Message"))
self.tableWidgetInbox.setSortingEnabled(True)
item = self.tableWidgetInbox.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "To"))
item = self.tableWidgetInbox.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "From"))
item = self.tableWidgetInbox.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Subject"))
item = self.tableWidgetInbox.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Messages"))
self.tableWidgetAddressBook.setSortingEnabled(True)
item = self.tableWidgetAddressBook.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Address book"))
item = self.tableWidgetAddressBook.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address"))
self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact"))
self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID"))
self.label_3.setText(_translate("MainWindow", "Subject:"))
self.label_2.setText(_translate("MainWindow", "From:"))
self.label.setText(_translate("MainWindow", "To:"))
self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>"))
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab), _translate("MainWindow", "Send ordinary Message"))
self.label_8.setText(_translate("MainWindow", "From:"))
self.label_7.setText(_translate("MainWindow", "Subject:"))
self.textEditMessageBroadcast.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>"))
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab_2), _translate("MainWindow", "Send Message to your Subscribers"))
self.pushButtonTTL.setText(_translate("MainWindow", "TTL:"))
self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "X days"))
self.pushButtonSend.setText(_translate("MainWindow", "Send"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send"))
self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions"))
self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription"))
self.inboxSearchLineEditSubscriptions.setPlaceholderText(_translate("MainWindow", "Search"))
self.inboxSearchOptionSubscriptions.setItemText(0, _translate("MainWindow", "All"))
self.inboxSearchOptionSubscriptions.setItemText(1, _translate("MainWindow", "To"))
self.inboxSearchOptionSubscriptions.setItemText(2, _translate("MainWindow", "From"))
self.inboxSearchOptionSubscriptions.setItemText(3, _translate("MainWindow", "Subject"))
self.inboxSearchOptionSubscriptions.setItemText(4, _translate("MainWindow", "Message"))
self.tableWidgetInboxSubscriptions.setSortingEnabled(True)
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "To"))
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "From"))
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Subject"))
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions"))
self.treeWidgetChans.headerItem().setText(0, _translate("MainWindow", "Chans"))
self.pushButtonAddChan.setText(_translate("MainWindow", "Add Chan"))
self.inboxSearchLineEditChans.setPlaceholderText(_translate("MainWindow", "Search"))
self.inboxSearchOptionChans.setItemText(0, _translate("MainWindow", "All"))
self.inboxSearchOptionChans.setItemText(1, _translate("MainWindow", "To"))
self.inboxSearchOptionChans.setItemText(2, _translate("MainWindow", "From"))
self.inboxSearchOptionChans.setItemText(3, _translate("MainWindow", "Subject"))
self.inboxSearchOptionChans.setItemText(4, _translate("MainWindow", "Message"))
self.tableWidgetInboxChans.setSortingEnabled(True)
item = self.tableWidgetInboxChans.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "To"))
item = self.tableWidgetInboxChans.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "From"))
item = self.tableWidgetInboxChans.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Subject"))
item = self.tableWidgetInboxChans.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Chans"))
self.radioButtonBlacklist.setText(_translate("MainWindow", "Use a Blacklist (Allow all incoming messages except those on the Blacklist)"))
self.radioButtonWhitelist.setText(_translate("MainWindow", "Use a Whitelist (Block all incoming messages except those on the Whitelist)"))
self.pushButtonAddBlacklist.setText(_translate("MainWindow", "Add new entry"))
self.tableWidgetBlacklist.setSortingEnabled(True)
item = self.tableWidgetBlacklist.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Name or Label"))
item = self.tableWidgetBlacklist.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.blackwhitelist), _translate("MainWindow", "Blacklist"))
item = self.tableWidgetConnectionCount.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Stream #"))
item = self.tableWidgetConnectionCount.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Connections"))
self.labelTotalConnections.setText(_translate("MainWindow", "Total connections:"))
self.labelStartupTime.setText(_translate("MainWindow", "Since startup:"))
self.labelMessageCount.setText(_translate("MainWindow", "Processed 0 person-to-person messages."))
self.labelPubkeyCount.setText(_translate("MainWindow", "Processed 0 public keys."))
self.labelBroadcastCount.setText(_translate("MainWindow", "Processed 0 broadcasts."))
self.labelLookupsPerSecond.setText(_translate("MainWindow", "Inventory lookups per second: 0"))
self.labelBytesRecvCount.setText(_translate("MainWindow", "Down: 0 KB/s"))
self.labelBytesSentCount.setText(_translate("MainWindow", "Up: 0 KB/s"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus), _translate("MainWindow", "Network Status"))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.menuSettings.setTitle(_translate("MainWindow", "Settings"))
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
self.actionImport_keys.setText(_translate("MainWindow", "Import keys"))
self.actionManageKeys.setText(_translate("MainWindow", "Manage keys"))
self.actionExit.setText(_translate("MainWindow", "Quit"))
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q"))
self.actionHelp.setText(_translate("MainWindow", "Help"))
self.actionHelp.setShortcut(_translate("MainWindow", "F1"))
self.actionAbout.setText(_translate("MainWindow", "About"))
self.actionSettings.setText(_translate("MainWindow", "Settings"))
self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses"))
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages"))
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan"))

View File

@ -2,6 +2,7 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<widget class="QDockWidget" name="MainDock">
<property name="geometry">
<rect>
<x>0</x>
@ -17,13 +18,13 @@
<iconset resource="bitmessage_icons.qrc">
<normaloff>:/newPrefix/images/can-icon-24px.png</normaloff>:/newPrefix/images/can-icon-24px.png</iconset>
</property>
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="tabShape">
<enum>QTabWidget::Rounded</enum>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -1290,6 +1291,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>

View File

@ -1,42 +1,37 @@
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
import widgets
import bitmessageqt.widgets as widgets
from addresses import addBMIfNotPresent
from bmconfigparser import config
from dialogs import AddAddressDialog
from .dialogs import AddAddressDialog
from helper_sql import sqlExecute, sqlQuery
from queues import UISignalQueue
from retranslateui import RetranslateMixin
from .retranslateui import RetranslateMixin
from tr import _translate
from uisignaler import UISignaler
from utils import avatarize
from .uisignaler import UISignaler
from .utils import avatarize
class Blacklist(QtGui.QWidget, RetranslateMixin):
class Blacklist(QtWidgets.QWidget, RetranslateMixin):
def __init__(self, parent=None):
super(Blacklist, self).__init__(parent)
widgets.load('blacklist.ui', self)
QtCore.QObject.connect(self.radioButtonBlacklist, QtCore.SIGNAL(
"clicked()"), self.click_radioButtonBlacklist)
QtCore.QObject.connect(self.radioButtonWhitelist, QtCore.SIGNAL(
"clicked()"), self.click_radioButtonWhitelist)
QtCore.QObject.connect(self.pushButtonAddBlacklist, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddBlacklist)
self.radioButtonBlacklist.clicked.connect(self.click_radioButtonBlacklist)
self.radioButtonWhitelist.clicked.connect(self.click_radioButtonWhitelist)
self.pushButtonAddBlacklist.clicked.connect(self.click_pushButtonAddBlacklist)
self.init_blacklist_popup_menu()
# Initialize blacklist
QtCore.QObject.connect(self.tableWidgetBlacklist, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.tableWidgetBlacklistItemChanged)
self.tableWidgetBlacklist.itemChanged.connect(self.tableWidgetBlacklistItemChanged)
# Set the icon sizes for the identicons
identicon_size = 3*7
self.tableWidgetBlacklist.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.UISignalThread = UISignaler.get()
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"rerenderBlackWhiteList()"), self.rerenderBlackWhiteList)
self.UISignalThread.rerenderBlackWhiteList.connect(self.rerenderBlackWhiteList)
def click_radioButtonBlacklist(self):
if config.get('bitmessagesettings', 'blackwhitelist') == 'white':
@ -118,7 +113,7 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
def init_blacklist_popup_menu(self, connectSignal=True):
# Popup menu for the Blacklist page
self.blacklistContextMenuToolbar = QtGui.QToolBar()
self.blacklistContextMenuToolbar = QtWidgets.QToolBar()
# Actions
self.actionBlacklistNew = self.blacklistContextMenuToolbar.addAction(
_translate(
@ -141,12 +136,10 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
"MainWindow", "Set avatar..."),
self.on_action_BlacklistSetAvatar)
self.tableWidgetBlacklist.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
if connectSignal:
self.connect(self.tableWidgetBlacklist, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuBlacklist)
self.popMenuBlacklist = QtGui.QMenu(self)
self.tableWidgetBlacklist.customContextMenuRequested.connect(self.on_context_menuBlacklist)
self.popMenuBlacklist = QtWidgets.QMenu(self)
# self.popMenuBlacklist.addAction( self.actionBlacklistNew )
self.popMenuBlacklist.addAction(self.actionBlacklistDelete)
self.popMenuBlacklist.addSeparator()
@ -172,12 +165,12 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
for row in queryreturn:
label, address, enabled = row
self.tableWidgetBlacklist.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
newItem = QtWidgets.QTableWidgetItem(unicode(label, 'utf-8'))
if not enabled:
newItem.setTextColor(QtGui.QColor(128, 128, 128))
newItem.setIcon(avatarize(address))
self.tableWidgetBlacklist.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(address)
newItem = QtWidgets.QTableWidgetItem(address)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not enabled:

View File

@ -2,17 +2,17 @@
Custom dialog classes
"""
# pylint: disable=too-few-public-methods
from PyQt4 import QtGui
from PyQt6 import QtGui, QtWidgets
import paths
import widgets
from address_dialogs import (
import bitmessageqt.widgets as widgets
from .address_dialogs import (
AddAddressDialog, EmailGatewayDialog, NewAddressDialog,
NewSubscriptionDialog, RegenerateAddressesDialog,
SpecialAddressBehaviorDialog
)
from newchandialog import NewChanDialog
from settings import SettingsDialog
from .newchandialog import NewChanDialog
from .settings import SettingsDialog
from tr import _translate
from version import softwareVersion
@ -25,7 +25,7 @@ __all__ = [
]
class AboutDialog(QtGui.QDialog):
class AboutDialog(QtWidgets.QDialog):
"""The `About` dialog"""
def __init__(self, parent=None):
super(AboutDialog, self).__init__(parent)
@ -50,10 +50,10 @@ class AboutDialog(QtGui.QDialog):
except AttributeError:
pass
self.setFixedSize(QtGui.QWidget.sizeHint(self))
self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
class IconGlossaryDialog(QtGui.QDialog):
class IconGlossaryDialog(QtWidgets.QDialog):
"""The `Icon Glossary` dialog, explaining the status icon colors"""
def __init__(self, parent=None, config=None):
super(IconGlossaryDialog, self).__init__(parent)
@ -66,20 +66,20 @@ class IconGlossaryDialog(QtGui.QDialog):
"iconGlossaryDialog",
"You are using TCP port %1. (This can be changed in the settings)."
).arg(config.getint('bitmessagesettings', 'port')))
self.setFixedSize(QtGui.QWidget.sizeHint(self))
self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
class HelpDialog(QtGui.QDialog):
class HelpDialog(QtWidgets.QDialog):
"""The `Help` dialog"""
def __init__(self, parent=None):
super(HelpDialog, self).__init__(parent)
widgets.load('help.ui', self)
self.setFixedSize(QtGui.QWidget.sizeHint(self))
self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
class ConnectDialog(QtGui.QDialog):
class ConnectDialog(QtWidgets.QDialog):
"""The `Connect` dialog"""
def __init__(self, parent=None):
super(ConnectDialog, self).__init__(parent)
widgets.load('connect.ui', self)
self.setFixedSize(QtGui.QWidget.sizeHint(self))
self.setFixedSize(QtWidgets.QWidget.sizeHint(self))

View File

@ -4,15 +4,15 @@ Folder tree and messagelist widgets definitions.
# pylint: disable=too-many-arguments,bad-super-call
# pylint: disable=attribute-defined-outside-init
from cgi import escape
from html import escape
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
from bmconfigparser import config
from helper_sql import sqlExecute, sqlQuery
from settingsmixin import SettingsMixin
from .settingsmixin import SettingsMixin
from tr import _translate
from utils import avatarize
from .utils import avatarize
# for pylupdate
_translate("MainWindow", "inbox")
@ -20,7 +20,7 @@ _translate("MainWindow", "new")
_translate("MainWindow", "sent")
_translate("MainWindow", "trash")
TimestampRole = QtCore.Qt.UserRole + 1
TimestampRole = QtCore.Qt.ItemDataRole.UserRole + 1
class AccountMixin(object):
@ -40,13 +40,13 @@ class AccountMixin(object):
return QtGui.QColor(216, 119, 0)
elif self.type in [self.MAILINGLIST, self.SUBSCRIPTION]:
return QtGui.QColor(137, 4, 177)
return QtGui.QApplication.palette().text().color()
return QtWidgets.QApplication.palette().text().color()
def folderColor(self):
"""QT UI color for a folder"""
if not self.parent().isEnabled:
return QtGui.QColor(128, 128, 128)
return QtGui.QApplication.palette().text().color()
return QtWidgets.QApplication.palette().text().color()
def accountBrush(self):
"""Account brush (for QT UI)"""
@ -83,7 +83,7 @@ class AccountMixin(object):
except AttributeError:
pass
self.unreadCount = int(cnt)
if isinstance(self, QtGui.QTreeWidgetItem):
if isinstance(self, QtWidgets.QTreeWidgetItem):
self.emitDataChanged()
def setEnabled(self, enabled):
@ -97,15 +97,15 @@ class AccountMixin(object):
for i in range(self.childCount()):
if isinstance(self.child(i), Ui_FolderWidget):
self.child(i).setEnabled(enabled)
if isinstance(self, QtGui.QTreeWidgetItem):
if isinstance(self, QtWidgets.QTreeWidgetItem):
self.emitDataChanged()
def setType(self):
"""Set account type (QT UI)"""
self.setFlags(self.flags() | QtCore.Qt.ItemIsEditable)
self.setFlags(self.flags() | QtCore.Qt.ItemFlag.ItemIsEditable)
if self.address is None:
self.type = self.ALL
self.setFlags(self.flags() & ~QtCore.Qt.ItemIsEditable)
self.setFlags(self.flags() & ~QtCore.Qt.ItemFlag.ItemIsEditable)
elif config.safeGetBoolean(self.address, 'chan'):
self.type = self.CHAN
elif config.safeGetBoolean(self.address, 'mailinglist'):
@ -144,11 +144,11 @@ class AccountMixin(object):
return retval or unicode(self.address, 'utf-8')
class BMTreeWidgetItem(QtGui.QTreeWidgetItem, AccountMixin):
class BMTreeWidgetItem(QtWidgets.QTreeWidgetItem, AccountMixin):
"""A common abstract class for Tree widget item"""
def __init__(self, parent, pos, address, unreadCount):
super(QtGui.QTreeWidgetItem, self).__init__()
super(QtWidgets.QTreeWidgetItem, self).__init__()
self.setAddress(address)
self.setUnreadCount(unreadCount)
self._setup(parent, pos)
@ -159,14 +159,14 @@ class BMTreeWidgetItem(QtGui.QTreeWidgetItem, AccountMixin):
def data(self, column, role):
"""Override internal QT method for returning object data"""
if column == 0:
if role == QtCore.Qt.DisplayRole:
if role == QtCore.Qt.ItemDataRole.DisplayRole:
return self._getLabel() + self._getAddressBracket(
self.unreadCount > 0)
elif role == QtCore.Qt.EditRole:
elif role == QtCore.Qt.ItemDataRole.EditRole:
return self._getLabel()
elif role == QtCore.Qt.ToolTipRole:
elif role == QtCore.Qt.ItemDataRole.ToolTipRole:
return self._getLabel() + self._getAddressBracket(False)
elif role == QtCore.Qt.FontRole:
elif role == QtCore.Qt.ItemDataRole.FontRole:
font = QtGui.QFont()
font.setBold(self.unreadCount > 0)
return font
@ -195,7 +195,7 @@ class Ui_FolderWidget(BMTreeWidgetItem):
def data(self, column, role):
"""Override internal QT method for returning object data"""
if column == 0 and role == QtCore.Qt.ForegroundRole:
if column == 0 and role == QtCore.Qt.ItemDataRole.ForegroundRole:
return self.folderBrush()
return super(Ui_FolderWidget, self).data(column, role)
@ -216,7 +216,7 @@ class Ui_FolderWidget(BMTreeWidgetItem):
return self.folderName < other.folderName
return x >= y if reverse else x < y
return super(QtGui.QTreeWidgetItem, self).__lt__(other)
return super(QtWidgets.QTreeWidgetItem, self).__lt__(other)
class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
@ -252,16 +252,16 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
def data(self, column, role):
"""Override internal QT method for returning object data"""
if column == 0:
if role == QtCore.Qt.DecorationRole:
if role == QtCore.Qt.ItemDataRole.DecorationRole:
return avatarize(
self.address or self._getLabel().encode('utf8'))
elif role == QtCore.Qt.ForegroundRole:
elif role == QtCore.Qt.ItemDataRole.ForegroundRole:
return self.accountBrush()
return super(Ui_AddressWidget, self).data(column, role)
def setData(self, column, role, value):
"""Save account label (if you edit in the the UI, this will be triggered and will save it to keys.dat)"""
if role == QtCore.Qt.EditRole \
if role == QtCore.Qt.ItemDataRole.EditRole \
and self.type != AccountMixin.SUBSCRIPTION:
config.set(
str(self.address), 'label',
@ -275,7 +275,7 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
def setAddress(self, address):
"""Set address to object (for QT UI)"""
super(Ui_AddressWidget, self).setAddress(address)
self.setData(0, QtCore.Qt.UserRole, self.address)
self.setData(0, QtCore.Qt.ItemDataRole.UserRole, self.address)
def _getSortRank(self):
return self.type if self.isEnabled else (self.type + 100)
@ -295,7 +295,7 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
if self._getSortRank() < other._getSortRank() else reverse
)
return super(QtGui.QTreeWidgetItem, self).__lt__(other)
return super(QtWidgets.QTreeWidgetItem, self).__lt__(other)
class Ui_SubscriptionWidget(Ui_AddressWidget):
@ -321,7 +321,7 @@ class Ui_SubscriptionWidget(Ui_AddressWidget):
def setData(self, column, role, value):
"""Save subscription label to database"""
if role == QtCore.Qt.EditRole:
if role == QtCore.Qt.ItemDataRole.EditRole:
if isinstance(value, QtCore.QVariant):
label = str(
value.toString().toUtf8()).decode('utf-8', 'ignore')
@ -333,17 +333,17 @@ class Ui_SubscriptionWidget(Ui_AddressWidget):
return super(Ui_SubscriptionWidget, self).setData(column, role, value)
class BMTableWidgetItem(QtGui.QTableWidgetItem, SettingsMixin):
class BMTableWidgetItem(QtWidgets.QTableWidgetItem, SettingsMixin):
"""A common abstract class for Table widget item"""
def __init__(self, label=None, unread=False):
super(QtGui.QTableWidgetItem, self).__init__()
super(QtWidgets.QTableWidgetItem, self).__init__()
self.setLabel(label)
self.setUnread(unread)
self._setup()
def _setup(self):
self.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.setFlags(QtCore.Qt.ItemFlag.ItemIsSelectable | QtCore.Qt.ItemFlag.ItemIsEnabled)
def setLabel(self, label):
"""Set object label"""
@ -356,10 +356,10 @@ class BMTableWidgetItem(QtGui.QTableWidgetItem, SettingsMixin):
def data(self, role):
"""Return object data (QT UI)"""
if role in (
QtCore.Qt.DisplayRole, QtCore.Qt.EditRole, QtCore.Qt.ToolTipRole
QtCore.Qt.ItemDataRole.DisplayRole, QtCore.Qt.ItemDataRole.EditRole, QtCore.Qt.ItemDataRole.ToolTipRole
):
return self.label
elif role == QtCore.Qt.FontRole:
elif role == QtCore.Qt.ItemDataRole.FontRole:
font = QtGui.QFont()
font.setBold(self.unread)
return font
@ -379,13 +379,13 @@ class BMAddressWidget(BMTableWidgetItem, AccountMixin):
def data(self, role):
"""Return object data (QT UI)"""
if role == QtCore.Qt.ToolTipRole:
if role == QtCore.Qt.ItemDataRole.ToolTipRole:
return self.label + " (" + self.address + ")"
elif role == QtCore.Qt.DecorationRole:
elif role == QtCore.Qt.ItemDataRole.DecorationRole:
if config.safeGetBoolean(
'bitmessagesettings', 'useidenticons'):
return avatarize(self.address or self.label)
elif role == QtCore.Qt.ForegroundRole:
elif role == QtCore.Qt.ItemDataRole.ForegroundRole:
return self.accountBrush()
return super(BMAddressWidget, self).data(role)
@ -424,13 +424,13 @@ class MessageList_AddressWidget(BMAddressWidget):
def data(self, role):
"""Return object data (QT UI)"""
if role == QtCore.Qt.UserRole:
if role == QtCore.Qt.ItemDataRole.UserRole:
return self.address
return super(MessageList_AddressWidget, self).data(role)
def setData(self, role, value):
"""Set object data"""
if role == QtCore.Qt.EditRole:
if role == QtCore.Qt.ItemDataRole.EditRole:
self.setLabel()
return super(MessageList_AddressWidget, self).setData(role, value)
@ -438,7 +438,7 @@ class MessageList_AddressWidget(BMAddressWidget):
def __lt__(self, other):
if isinstance(other, MessageList_AddressWidget):
return self.label.lower() < other.label.lower()
return super(QtGui.QTableWidgetItem, self).__lt__(other)
return super(QtWidgets.QTableWidgetItem, self).__lt__(other)
class MessageList_SubjectWidget(BMTableWidgetItem):
@ -453,9 +453,9 @@ class MessageList_SubjectWidget(BMTableWidgetItem):
def data(self, role):
"""Return object data (QT UI)"""
if role == QtCore.Qt.UserRole:
if role == QtCore.Qt.ItemDataRole.UserRole:
return self.subject
if role == QtCore.Qt.ToolTipRole:
if role == QtCore.Qt.ItemDataRole.ToolTipRole:
return escape(unicode(self.subject, 'utf-8'))
return super(MessageList_SubjectWidget, self).data(role)
@ -463,7 +463,7 @@ class MessageList_SubjectWidget(BMTableWidgetItem):
def __lt__(self, other):
if isinstance(other, MessageList_SubjectWidget):
return self.label.lower() < other.label.lower()
return super(QtGui.QTableWidgetItem, self).__lt__(other)
return super(QtWidgets.QTableWidgetItem, self).__lt__(other)
# In order for the time columns on the Inbox and Sent tabs to be sorted
@ -473,26 +473,26 @@ class MessageList_TimeWidget(BMTableWidgetItem):
"""
A subclass of QTableWidgetItem for received (lastactiontime) field.
'<' operator is overloaded to sort by TimestampRole == 33
msgid is available by QtCore.Qt.UserRole
msgid is available by QtCore.Qt.ItemDataRole.UserRole
"""
def __init__(self, label=None, unread=False, timestamp=None, msgid=''):
super(MessageList_TimeWidget, self).__init__(label, unread)
self.setData(QtCore.Qt.UserRole, QtCore.QByteArray(msgid))
self.setData(QtCore.Qt.ItemDataRole.UserRole, QtCore.QByteArray(msgid))
self.setData(TimestampRole, int(timestamp))
def __lt__(self, other):
return self.data(TimestampRole) < other.data(TimestampRole)
def data(self, role=QtCore.Qt.UserRole):
def data(self, role=QtCore.Qt.ItemDataRole.UserRole):
"""
Returns expected python types for QtCore.Qt.UserRole and TimestampRole
Returns expected python types for QtCore.Qt.ItemDataRole.UserRole and TimestampRole
custom roles and super for any Qt role
"""
data = super(MessageList_TimeWidget, self).data(role)
if role == TimestampRole:
return int(data.toPyObject())
if role == QtCore.Qt.UserRole:
if role == QtCore.Qt.ItemDataRole.UserRole:
return str(data.toPyObject())
return data
@ -506,13 +506,13 @@ class Ui_AddressBookWidgetItem(BMAddressWidget):
def data(self, role):
"""Return object data"""
if role == QtCore.Qt.UserRole:
if role == QtCore.Qt.ItemDataRole.UserRole:
return self.type
return super(Ui_AddressBookWidgetItem, self).data(role)
def setData(self, role, value):
"""Set data"""
if role == QtCore.Qt.EditRole:
if role == QtCore.Qt.ItemDataRole.EditRole:
self.label = str(
value.toString().toUtf8()
if isinstance(value, QtCore.QVariant) else value
@ -540,7 +540,7 @@ class Ui_AddressBookWidgetItem(BMAddressWidget):
if self.type == other.type:
return self.label.lower() < other.label.lower()
return not reverse if self.type < other.type else reverse
return super(QtGui.QTableWidgetItem, self).__lt__(other)
return super(QtWidgets.QTableWidgetItem, self).__lt__(other)
class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem):
@ -563,14 +563,14 @@ class Ui_AddressBookWidgetItemAddress(Ui_AddressBookWidgetItem):
def data(self, role):
"""Return object data"""
if role == QtCore.Qt.ToolTipRole:
if role == QtCore.Qt.ItemDataRole.ToolTipRole:
return self.address
if role == QtCore.Qt.DecorationRole:
if role == QtCore.Qt.ItemDataRole.DecorationRole:
return None
return super(Ui_AddressBookWidgetItemAddress, self).data(role)
class AddressBookCompleter(QtGui.QCompleter):
class AddressBookCompleter(QtWidgets.QCompleter):
"""Addressbook completer"""
def __init__(self):
@ -590,7 +590,7 @@ class AddressBookCompleter(QtGui.QCompleter):
def pathFromIndex(self, index):
"""Perform autocompletion (reimplemented QCompleter method)"""
autoString = unicode(
index.data(QtCore.Qt.EditRole).toString().toUtf8(), 'utf-8')
index.data(QtCore.Qt.ItemDataRole.EditRole).toString().toUtf8(), 'utf-8')
text = unicode(self.widget().text().toUtf8(), 'utf-8')
# If cursor position was saved, restore it, else save it

View File

@ -3,10 +3,10 @@ Message editor with a wheel zoom functionality
"""
# pylint: disable=bad-continuation
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
class MessageCompose(QtGui.QTextEdit):
class MessageCompose(QtWidgets.QTextEdit):
"""Editor class with wheel zoom functionality"""
def __init__(self, parent=0):
super(MessageCompose, self).__init__(parent)

View File

@ -5,13 +5,13 @@ zoom and URL click warning popup
"""
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
from safehtmlparser import SafeHTMLParser
from .safehtmlparser import SafeHTMLParser
from tr import _translate
class MessageView(QtGui.QTextBrowser):
class MessageView(QtWidgets.QTextBrowser):
"""Message content viewer class, can switch between plaintext and HTML"""
MODE_PLAIN = 0
MODE_HTML = 1
@ -60,7 +60,7 @@ class MessageView(QtGui.QTextBrowser):
def setWrappingWidth(self, width=None):
"""Set word-wrapping width"""
self.setLineWrapMode(QtGui.QTextEdit.FixedPixelWidth)
self.setLineWrapMode(QtWidgets.QTextEdit.LineWrapMode.FixedPixelWidth)
if width is None:
width = self.width()
self.setLineWrapColumnOrWidth(width)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python2.7
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
class MigrationWizardIntroPage(QtGui.QWizardPage):
class MigrationWizardIntroPage(QtWidgets.QWizardPage):
def __init__(self):
super(QtGui.QWizardPage, self).__init__()
self.setTitle("Migrating configuration")
@ -18,7 +18,7 @@ class MigrationWizardIntroPage(QtGui.QWizardPage):
return 1
class MigrationWizardAddressesPage(QtGui.QWizardPage):
class MigrationWizardAddressesPage(QtWidgets.QWizardPage):
def __init__(self, addresses):
super(QtGui.QWizardPage, self).__init__()
self.setTitle("Addresses")
@ -34,7 +34,7 @@ class MigrationWizardAddressesPage(QtGui.QWizardPage):
return 10
class MigrationWizardGPUPage(QtGui.QWizardPage):
class MigrationWizardGPUPage(QtWidgets.QWizardPage):
def __init__(self):
super(QtGui.QWizardPage, self).__init__()
self.setTitle("GPU")
@ -50,7 +50,7 @@ class MigrationWizardGPUPage(QtGui.QWizardPage):
return 10
class MigrationWizardConclusionPage(QtGui.QWizardPage):
class MigrationWizardConclusionPage(QtWidgets.QWizardPage):
def __init__(self):
super(QtGui.QWizardPage, self).__init__()
self.setTitle("All done!")
@ -63,7 +63,7 @@ class MigrationWizardConclusionPage(QtGui.QWizardPage):
self.setLayout(layout)
class Ui_MigrationWizard(QtGui.QWizard):
class Ui_MigrationWizard(QtWidgets.QWizard):
def __init__(self, addresses):
super(QtGui.QWizard, self).__init__()

View File

@ -4,47 +4,43 @@ Network status tab widget definition.
import time
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
import l10n
import network.stats
import state
import widgets
import bitmessageqt.widgets as widgets
from network import connectionpool, knownnodes
from retranslateui import RetranslateMixin
from .retranslateui import RetranslateMixin
from tr import _translate
from uisignaler import UISignaler
from .uisignaler import UISignaler
class NetworkStatus(QtGui.QWidget, RetranslateMixin):
class NetworkStatus(QtWidgets.QWidget, RetranslateMixin):
"""Network status tab"""
def __init__(self, parent=None):
super(NetworkStatus, self).__init__(parent)
widgets.load('networkstatus.ui', self)
header = self.tableWidgetConnectionCount.horizontalHeader()
header.setResizeMode(QtGui.QHeaderView.ResizeToContents)
header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeMode.ResizeToContents)
# Somehow this value was 5 when I tested
if header.sortIndicatorSection() > 4:
header.setSortIndicator(0, QtCore.Qt.AscendingOrder)
header.setSortIndicator(0, QtCore.Qt.SortOrder.AscendingOrder)
self.startup = time.localtime()
self.UISignalThread = UISignaler.get()
# pylint: disable=no-member
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed)
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.updateNetworkStatusTab)
self.UISignalThread.updateNumberOfMessagesProcessed.connect(self.updateNumberOfMessagesProcessed)
self.UISignalThread.updateNumberOfPubkeysProcessed.connect(self.updateNumberOfPubkeysProcessed)
self.UISignalThread.updateNumberOfBroadcastsProcessed.connect(self.updateNumberOfBroadcastsProcessed)
self.UISignalThread.updateNetworkStatusTab.connect(self.updateNetworkStatusTab)
self.timer = QtCore.QTimer()
QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)
self.timer.timeout.connect(self.runEveryTwoSeconds)
# pylint: enable=no-member
def startUpdate(self):
@ -65,7 +61,6 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
"networkstatus",
"byte(s)",
None,
QtCore.QCoreApplication.CodecForTr,
num),
"kB",
"MB",
@ -89,7 +84,6 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
"networkstatus",
"Object(s) to be synced: %n",
None,
QtCore.QCoreApplication.CodecForTr,
network.stats.pendingDownload()
+ network.stats.pendingUpload()))
@ -101,7 +95,6 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
"networkstatus",
"Processed %n person-to-person message(s).",
None,
QtCore.QCoreApplication.CodecForTr,
state.numberOfMessagesProcessed))
def updateNumberOfBroadcastsProcessed(self):
@ -112,7 +105,6 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
"networkstatus",
"Processed %n broadcast message(s).",
None,
QtCore.QCoreApplication.CodecForTr,
state.numberOfBroadcastsProcessed))
def updateNumberOfPubkeysProcessed(self):
@ -123,7 +115,6 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
"networkstatus",
"Processed %n public key(s).",
None,
QtCore.QCoreApplication.CodecForTr,
state.numberOfPubkeysProcessed))
def updateNumberOfBytes(self):

View File

@ -4,18 +4,18 @@ src/bitmessageqt/newchandialog.py
"""
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
import widgets
import bitmessageqt.widgets
from addresses import addBMIfNotPresent
from addressvalidator import AddressValidator, PassPhraseValidator
from .addressvalidator import AddressValidator, PassPhraseValidator
from queues import (
addressGeneratorQueue, apiAddressGeneratorReturnQueue, UISignalQueue)
from tr import _translate
from utils import str_chan
from .utils import str_chan
class NewChanDialog(QtGui.QDialog):
class NewChanDialog(QtWidgets.QDialog):
"""The `New Chan` dialog"""
def __init__(self, parent=None):
super(NewChanDialog, self).__init__(parent)

View File

@ -1,7 +1,7 @@
from os import path
from PyQt4 import QtGui
from PyQt6 import QtGui
from debug import logger
import widgets
import bitmessageqt.widgets
class RetranslateMixin(object):
def retranslateUi(self):

View File

@ -2,10 +2,9 @@
import inspect
import re
from HTMLParser import HTMLParser
from html.parser import HTMLParser
from urllib import quote_plus
from urlparse import urlparse
from urllib.parse import quote_plus, urlparse
class SafeHTMLParser(HTMLParser):

View File

@ -1,13 +1,13 @@
"""
This module setting file is for settings
"""
import ConfigParser
from configparser import ConfigParser
import os
import sys
import tempfile
import six
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
import debug
import defaults
@ -16,7 +16,7 @@ import openclpow
import paths
import queues
import state
import widgets
import bitmessageqt.widgets
from bmconfigparser import config as config_obj
from helper_sql import sqlExecute, sqlStoredProcedure
from helper_startup import start_proxyconfig
@ -39,7 +39,7 @@ def getSOCKSProxyType(config):
return result
class SettingsDialog(QtGui.QDialog):
class SettingsDialog(QtWidgets.QDialog):
"""The "Settings" dialog"""
def __init__(self, parent=None, firstrun=False):
super(SettingsDialog, self).__init__(parent)

View File

@ -5,7 +5,7 @@ src/settingsmixin.py
"""
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
class SettingsMixin(object):
@ -56,7 +56,7 @@ class SettingsMixin(object):
pass
class SMainWindow(QtGui.QMainWindow, SettingsMixin):
class SMainWindow(QtWidgets.QMainWindow, SettingsMixin):
"""Main window with Settings functionality."""
def loadSettings(self):
"""Load main window settings."""
@ -69,7 +69,7 @@ class SMainWindow(QtGui.QMainWindow, SettingsMixin):
self.writeGeometry(self)
class STableWidget(QtGui.QTableWidget, SettingsMixin):
class STableWidget(QtWidgets.QTableWidget, SettingsMixin):
"""Table widget with Settings functionality"""
# pylint: disable=too-many-ancestors
def loadSettings(self):
@ -81,7 +81,7 @@ class STableWidget(QtGui.QTableWidget, SettingsMixin):
self.writeState(self.horizontalHeader())
class SSplitter(QtGui.QSplitter, SettingsMixin):
class SSplitter(QtWidgets.QSplitter, SettingsMixin):
"""Splitter with Settings functionality."""
def loadSettings(self):
"""Load splitter settings"""
@ -92,7 +92,7 @@ class SSplitter(QtGui.QSplitter, SettingsMixin):
self.writeState(self)
class STreeWidget(QtGui.QTreeWidget, SettingsMixin):
class STreeWidget(QtWidgets.QTreeWidget, SettingsMixin):
"""Tree widget with settings functionality."""
# pylint: disable=too-many-ancestors
def loadSettings(self):

View File

@ -2,10 +2,10 @@
"""Status bar Module"""
from time import time
from PyQt4 import QtGui
from PyQt6 import QtGui, QtWidgets
class BMStatusBar(QtGui.QStatusBar):
class BMStatusBar(QtWidgets.QStatusBar):
"""Status bar with queue and priorities"""
duration = 10000
deleteAfter = 60

View File

@ -6,9 +6,9 @@ import ssl
import sys
import time
from PyQt4 import QtCore
from PyQt6 import QtCore
import account
import bitmessageqt.account
import defaults
import network.stats
import paths
@ -16,12 +16,12 @@ import proofofwork
import queues
import state
from bmconfigparser import config
from foldertree import AccountMixin
from .foldertree import AccountMixin
from helper_sql import sqlExecute, sqlQuery
from l10n import getTranslationLanguage
from openclpow import openclEnabled
from pyelliptic.openssl import OpenSSL
from settings import getSOCKSProxyType
from .settings import getSOCKSProxyType
from version import softwareVersion
from tr import _translate

View File

@ -1,5 +1,5 @@
from PyQt4.QtCore import QThread, SIGNAL
from PyQt6.QtCore import QThread, pyqtSignal
import sys
import queues
@ -11,6 +11,27 @@ class UISignaler(QThread):
def __init__(self, parent=None):
QThread.__init__(self, parent)
rerenderBlackWhiteList = pyqtSignal()
updateNumberOfMessagesProcessed = pyqtSignal()
updateNumberOfPubkeysProcessed = pyqtSignal()
updateNumberOfBroadcastsProcessed = pyqtSignal()
updateNetworkStatusTab = pyqtSignal(object, object, object)
writeNewAddressToTable = pyqtSignal(object, object, object)
updateStatusBar = pyqtSignal(object)
updateSentItemStatusByToAddress = pyqtSignal(object, object)
updateSentItemStatusByAckdata = pyqtSignal(object, object)
displayNewInboxMessage = pyqtSignal(object, object, object, object, object)
displayNewSentMessage = pyqtSignal(object, object, object, object, object, object)
setStatusIcon = pyqtSignal(object)
changedInboxUnread = pyqtSignal(object)
rerenderMessagelistFromLabels = pyqtSignal()
rerenderMessagelistToLabels = pyqtSignal()
rerenderAddressBook = pyqtSignal()
rerenderSubscriptions = pyqtSignal()
removeInboxRowByMsgid = pyqtSignal(object)
newVersionAvailable = pyqtSignal(object)
displayAlert = pyqtSignal(object, object, object)
@classmethod
def get(cls):
if not cls._instance:
@ -28,7 +49,7 @@ class UISignaler(QThread):
address,
str(streamNumber))
elif command == 'updateStatusBar':
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"), data)
self.updateStatusBar.emit(data)
elif command == 'updateSentItemStatusByToAddress':
toAddress, message = data
self.emit(SIGNAL(

View File

@ -1,7 +1,7 @@
import hashlib
import os
from PyQt4 import QtGui
from PyQt6 import QtGui
import state
from addresses import addBMIfNotPresent
@ -85,11 +85,11 @@ def avatarize(address):
if address == str_broadcast_subscribers:
# don't hash [Broadcast subscribers]
icon_hash = address
# https://www.riverbankcomputing.com/static/Docs/PyQt4/qimagereader.html#supportedImageFormats
# https://doc.qt.io/qt-6/qimagereader.html#supportedImageFormats
# QImageReader.supportedImageFormats ()
extensions = [
'PNG', 'GIF', 'JPG', 'JPEG', 'SVG', 'BMP', 'MNG', 'PBM', 'PGM', 'PPM',
'TIFF', 'XBM', 'XPM', 'TGA']
'PNG', 'GIF', 'JPG', 'JPEG', 'SVG', 'BMP', 'PBM', 'PGM', 'PPM',
'XBM', 'XPM' ]
# try to find a specific avatar
for ext in extensions:
lower_hash = state.appdata + 'avatars/' + icon_hash + '.' + ext.lower()

View File

@ -1,4 +1,4 @@
from PyQt4 import uic
from PyQt6 import uic
import os.path
import paths
import sys

View File

@ -380,11 +380,11 @@ def check_curses():
def check_pyqt():
"""Do pyqt dependency check.
Here we are checking for PyQt4 with its version, as for it require
PyQt 4.8 or later.
Here we are checking for PyQt6 with its version, as for it require
PyQt 6.4 or later.
"""
QtCore = try_import(
'PyQt4.QtCore', 'PyBitmessage requires PyQt 4.8 or later and Qt 4.7 or later.')
'PyQt6.QtCore', 'PyBitmessage requires PyQt 6.4 or later and Qt 6.4 or later.')
if not QtCore:
return False
@ -433,15 +433,10 @@ def check_dependencies(verbose=False, optional=False):
# Python 3+ is not supported, but it is still useful to provide
# information about our other requirements.
logger.info('Python version: %s', sys.version)
if sys.hexversion < 0x20704F0:
if sys.hexversion < 0x3000000:
logger.error(
'PyBitmessage requires Python 2.7.4 or greater'
' (but not Python 3+)')
has_all_dependencies = False
if sys.hexversion >= 0x3000000:
logger.error(
'PyBitmessage does not support Python 3+. Python 2.7.4'
' or greater is required. Python 2.7.18 is recommended.')
'PyBitmessage requires Python 3 or greater')
#has_all_dependencies = False
sys.exit()
# FIXME: This needs to be uncommented when more of the code is python3 compatible

View File

@ -4,7 +4,7 @@ Namecoin queries
# pylint: disable=too-many-branches,protected-access
import base64
import httplib
import http.client
import json
import os
import socket
@ -71,7 +71,7 @@ class namecoinConnection(object):
assert self.nmctype == "namecoind" or self.nmctype == "nmcontrol"
if self.nmctype == "namecoind":
self.con = httplib.HTTPConnection(self.host, self.port, timeout=3)
self.con = http.client.HTTPConnection(self.host, self.port, timeout=3)
def query(self, identity):
"""

View File

@ -12,7 +12,7 @@ def start(config, state):
"""Start network threads"""
import state
from .announcethread import AnnounceThread
import connectionpool # pylint: disable=relative-import
import network.connectionpool # pylint: disable=relative-import
from .addrthread import AddrThread
from .dandelion import Dandelion
from .downloadthread import DownloadThread

View File

@ -5,12 +5,12 @@ from six.moves import queue
# magic imports!
import state
import connectionpool
import network.connectionpool
from helper_random import randomshuffle
from protocol import assembleAddrMessage
from queues import addrQueue # FIXME: init with queue
from threads import StoppableThread
from .threads import StoppableThread
class AddrThread(StoppableThread):

View File

@ -7,7 +7,7 @@ import time
import network.asyncore_pollchoose as asyncore
import state
from threads import BusyError, nonBlocking
from .threads import BusyError, nonBlocking
class ProcessingError(Exception):

View File

@ -5,12 +5,12 @@ import time
# magic imports!
import state
import connectionpool
import network.connectionpool as connectionpool
from bmconfigparser import config
from protocol import assembleAddrMessage
from node import Peer
from threads import StoppableThread
from .node import Peer
from .threads import StoppableThread
class AnnounceThread(StoppableThread):

View File

@ -12,10 +12,10 @@ import time
# magic imports!
import addresses
import knownnodes
import network.knownnodes
import protocol
import state
import connectionpool
import network.connectionpool
from bmconfigparser import config
from queues import invQueue, objectProcessorQueue, portCheckerQueue
from randomtrackingdict import RandomTrackingDict
@ -27,8 +27,8 @@ from network.bmobject import (
)
from network.proxy import ProxyError
from node import Node, Peer
from objectracker import ObjectTracker, missingObjects
from .node import Node, Peer
from .objectracker import ObjectTracker, missingObjects
logger = logging.getLogger('default')

View File

@ -5,7 +5,7 @@ Select which node to connect to
import logging
import random
import knownnodes
import network.knownnodes
import protocol
import state
from bmconfigparser import config

View File

@ -8,19 +8,19 @@ import socket
import sys
import time
import asyncore_pollchoose as asyncore
import network.asyncore_pollchoose as asyncore
import helper_random
import knownnodes
import network.knownnodes
import protocol
import state
from bmconfigparser import config
from connectionchooser import chooseConnection
from node import Peer
from proxy import Proxy
from tcp import (
from .connectionchooser import chooseConnection
from .node import Peer
from .proxy import Proxy
from .tcp import (
bootstrap, Socks4aBMConnection, Socks5BMConnection,
TCPConnection, TCPServer)
from udp import UDPSocket
from .udp import UDPSocket
logger = logging.getLogger('default')
@ -78,7 +78,7 @@ class BMConnectionPool(object):
Shortcut for combined list of connections from
`inboundConnections` and `outboundConnections` dicts
"""
return self.inboundConnections.values() + self.outboundConnections.values()
return list(self.inboundConnections.values()) + list(self.outboundConnections.values())
def establishedConnections(self):
"""Shortcut for list of connections having fullyEstablished == True"""

View File

@ -7,7 +7,7 @@ from random import choice, expovariate, sample
from threading import RLock
from time import time
import connectionpool
import network.connectionpool
import state
from queues import invQueue
@ -99,12 +99,12 @@ class Dandelion: # pylint: disable=old-style-class
with self.lock:
if len(self.stem) < MAX_STEMS:
self.stem.append(connection)
for k in (k for k, v in self.nodeMap.iteritems() if v is None):
for k in (k for k, v in self.nodeMap.items() if v is None):
self.nodeMap[k] = connection
for k, v in {
k: v for k, v in self.hashMap.iteritems()
k: v for k, v in self.hashMap.items()
if v.child is None
}.iteritems():
}.items():
self.hashMap[k] = Stem(
connection, v.stream, self.poissonTimeout())
invQueue.put((v.stream, k, v.child))
@ -120,14 +120,14 @@ class Dandelion: # pylint: disable=old-style-class
self.stem.remove(connection)
# active mappings to pointing to the removed node
for k in (
k for k, v in self.nodeMap.iteritems()
k for k, v in self.nodeMap.items()
if v == connection
):
self.nodeMap[k] = None
for k, v in {
k: v for k, v in self.hashMap.iteritems()
k: v for k, v in self.hashMap.items()
if v.child == connection
}.iteritems():
}.items():
self.hashMap[k] = Stem(
None, v.stream, self.poissonTimeout())
@ -168,7 +168,7 @@ class Dandelion: # pylint: disable=old-style-class
with self.lock:
deadline = time()
toDelete = [
[v.stream, k, v.child] for k, v in self.hashMap.iteritems()
[v.stream, k, v.child] for k, v in self.hashMap.items()
if v.timeout < deadline
]

View File

@ -6,9 +6,9 @@ import state
import addresses
import helper_random
import protocol
import connectionpool
from objectracker import missingObjects
from threads import StoppableThread
import network.connectionpool
from .objectracker import missingObjects
from .threads import StoppableThread
class DownloadThread(StoppableThread):
@ -28,7 +28,7 @@ class DownloadThread(StoppableThread):
deadline = time.time() - self.requestExpires
try:
toDelete = [
k for k, v in missingObjects.iteritems()
k for k, v in missingObjects.items()
if v < deadline]
except RuntimeError:
pass

View File

@ -1,16 +1,16 @@
"""
Thread to send inv annoucements
"""
import Queue
import queue
import random
from time import time
import addresses
import protocol
import state
import connectionpool
import network.connectionpool
from queues import invQueue
from threads import StoppableThread
from .threads import StoppableThread
def handleExpiredDandelion(expired):
@ -58,7 +58,7 @@ class InvThread(StoppableThread):
# locally generated
if len(data) == 2 or data[2] is None:
self.handleLocallyGenerated(data[0], data[1])
except Queue.Empty:
except queue.Empty:
break
if chunk:

View File

@ -54,8 +54,8 @@ def json_serialize_knownnodes(output):
Reorganize knownnodes dict and write it as JSON to output
"""
_serialized = []
for stream, peers in knownNodes.iteritems():
for peer, info in peers.iteritems():
for stream, peers in knownNodes.items():
for peer, info in peers.items():
info.update(rating=round(info.get('rating', 0), 2))
_serialized.append({
'stream': stream, 'peer': peer._asdict(), 'info': info
@ -87,7 +87,7 @@ def pickle_deserialize_old_knownnodes(source):
global knownNodes
knownNodes = pickle.load(source) # nosec B301
for stream in knownNodes.keys():
for node, params in knownNodes[stream].iteritems():
for node, params in knownNodes[stream].items():
if isinstance(params, (float, int)):
addKnownNode(stream, node, params)
@ -97,7 +97,7 @@ def saveKnownNodes(dirName=None):
if dirName is None:
dirName = state.appdata
with knownNodesLock:
with open(os.path.join(dirName, 'knownnodes.dat'), 'wb') as output:
with open(os.path.join(dirName, 'knownnodes.dat'), 'w') as output:
json_serialize_knownnodes(output)

View File

@ -3,9 +3,9 @@ A thread to handle network concerns
"""
import network.asyncore_pollchoose as asyncore
import state
import connectionpool
import network.connectionpool
from queues import excQueue
from threads import StoppableThread
from .threads import StoppableThread
class BMNetworkThread(StoppableThread):

View File

@ -5,7 +5,7 @@ import time
from threading import RLock
import state
import connectionpool
import network.connectionpool
from randomtrackingdict import RandomTrackingDict
haveBloom = False
@ -75,7 +75,7 @@ class ObjectTracker(object):
with self.objectsNewToThemLock:
self.objectsNewToThem = {
k: v
for k, v in self.objectsNewToThem.iteritems()
for k, v in self.objectsNewToThem.items()
if v >= deadline}
self.lastCleaned = time.time()

View File

@ -6,10 +6,10 @@ import logging
import socket
import time
import asyncore_pollchoose as asyncore
from advanceddispatcher import AdvancedDispatcher
import network.asyncore_pollchoose as asyncore
from .advanceddispatcher import AdvancedDispatcher
from bmconfigparser import config
from node import Peer
from .node import Peer
logger = logging.getLogger('default')

View File

@ -2,14 +2,14 @@
Process data incoming from network
"""
import errno
import Queue
import queue
import socket
import state
import connectionpool
import network.connectionpool
from network.advanceddispatcher import UnknownStateError
from queues import receiveDataQueue
from threads import StoppableThread
from .threads import StoppableThread
class ReceiveQueueThread(StoppableThread):
@ -22,7 +22,7 @@ class ReceiveQueueThread(StoppableThread):
while not self._stopped and state.shutdown == 0:
try:
dest = receiveDataQueue.get(block=True, timeout=1)
except Queue.Empty:
except queue.Empty:
continue
if self._stopped or state.shutdown:

View File

@ -6,7 +6,7 @@ import logging
import socket
import struct
from proxy import GeneralProxyError, Proxy, ProxyError
from .proxy import GeneralProxyError, Proxy, ProxyError
logger = logging.getLogger('default')

View File

@ -7,8 +7,8 @@ import logging
import socket
import struct
from node import Peer
from proxy import GeneralProxyError, Proxy, ProxyError
from .node import Peer
from .proxy import GeneralProxyError, Proxy, ProxyError
logger = logging.getLogger('default')

View File

@ -3,9 +3,9 @@ Network statistics
"""
import time
import asyncore_pollchoose as asyncore
import connectionpool
from objectracker import missingObjects
import network.asyncore_pollchoose as asyncore
import network.connectionpool
from .objectracker import missingObjects
lastReceivedTimestamp = time.time()

View File

@ -15,21 +15,21 @@ import helper_random
import l10n
import protocol
import state
import connectionpool
import network.connectionpool
from bmconfigparser import config
from highlevelcrypto import randomBytes
from queues import invQueue, receiveDataQueue, UISignalQueue
from tr import _translate
import asyncore_pollchoose as asyncore
import knownnodes
import network.asyncore_pollchoose as asyncore
import network.knownnodes
from network.advanceddispatcher import AdvancedDispatcher
from network.bmproto import BMProto
from network.objectracker import ObjectTracker
from network.socks4a import Socks4aConnection
from network.socks5 import Socks5Connection
from network.tls import TLSDispatcher
from node import Peer
from .node import Peer
logger = logging.getLogger('default')
@ -191,7 +191,7 @@ class TCPConnection(BMProto, TLSDispatcher):
# only if more recent than 3 hours
# and having positive or neutral rating
filtered = [
(k, v) for k, v in nodes.iteritems()
(k, v) for k, v in nodes.items()
if v["lastseen"] > int(time.time())
- maximumAgeOfNodesThatIAdvertiseToOthers
and v["rating"] >= 0 and not k.host.endswith('.onion')

View File

@ -34,7 +34,7 @@ else:
# ciphers
if (
ssl.OPENSSL_VERSION_NUMBER >= 0x10100000
and not ssl.OPENSSL_VERSION.startswith(b"LibreSSL")
and not ssl.OPENSSL_VERSION.startswith("LibreSSL")
):
sslProtocolCiphers = "AECDH-AES256-SHA@SECLEVEL=0"
else:

View File

@ -10,9 +10,9 @@ import protocol
import state
from queues import receiveDataQueue
from bmproto import BMProto
from node import Peer
from objectracker import ObjectTracker
from .bmproto import BMProto
from .node import Peer
from .objectracker import ObjectTracker
logger = logging.getLogger('default')

View File

@ -6,9 +6,9 @@ import time
import helper_random
import protocol
import state
import connectionpool
import network.connectionpool as connectionpool
from randomtrackingdict import RandomTrackingDict
from threads import StoppableThread
from .threads import StoppableThread
class UploadThread(StoppableThread):

View File

@ -41,7 +41,7 @@ def translateText(context, text, n=None):
enableGUI = True
if enableGUI:
try:
from PyQt4 import QtCore, QtGui
from PyQt6 import QtCore, QtGui, QtWidgets
except Exception as err:
print('PyBitmessage requires PyQt unless you want to run it as a daemon'
' and interact with it using the API.'
@ -51,7 +51,7 @@ def translateText(context, text, n=None):
print('Error message:', err)
os._exit(0) # pylint: disable=protected-access
if n is None:
return QtGui.QApplication.translate(context, text)
return QtWidgets.QApplication.translate(context, text)
return QtGui.QApplication.translate(context, text, None, QtCore.QCoreApplication.CodecForTr, n)
else:
if '%' in text:

View File

@ -1,3 +1,3 @@
#!/bin/sh
python2 pybitmessage/bitmessagemain.py "$@"
python3 pybitmessage/bitmessagemain.py "$@"