Revert "run autopep8 on src/bitmessageqt"
This reverts commit ab9fc0b390
.
This commit is contained in:
parent
1077548eb6
commit
1e53720b54
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
autopep8 --in-place --recursive src src/bitmessageqt
|
autopep8 --in-place --recursive src
|
||||||
|
|
|
@ -152,8 +152,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self.ui.actionNetworkSwitch.triggered.connect(self.network_switch)
|
self.ui.actionNetworkSwitch.triggered.connect(self.network_switch)
|
||||||
self.ui.actionManageKeys.triggered.connect(self.click_actionManageKeys)
|
self.ui.actionManageKeys.triggered.connect(self.click_actionManageKeys)
|
||||||
self.ui.actionDeleteAllTrashedMessages.triggered.connect(self.click_actionDeleteAllTrashedMessages)
|
self.ui.actionDeleteAllTrashedMessages.triggered.connect(self.click_actionDeleteAllTrashedMessages)
|
||||||
self.ui.actionRegenerateDeterministicAddresses.triggered.connect(
|
self.ui.actionRegenerateDeterministicAddresses.triggered.connect(self.click_actionRegenerateDeterministicAddresses)
|
||||||
self.click_actionRegenerateDeterministicAddresses)
|
|
||||||
self.ui.pushButtonAddChan.clicked.connect(self.click_actionJoinChan) # also used for creating chans.
|
self.ui.pushButtonAddChan.clicked.connect(self.click_actionJoinChan) # also used for creating chans.
|
||||||
self.ui.pushButtonNewAddress.clicked.connect(self.click_NewAddressDialog)
|
self.ui.pushButtonNewAddress.clicked.connect(self.click_NewAddressDialog)
|
||||||
self.ui.pushButtonAddAddressBook.clicked.connect(self.click_pushButtonAddAddressBook)
|
self.ui.pushButtonAddAddressBook.clicked.connect(self.click_pushButtonAddAddressBook)
|
||||||
|
@ -822,9 +821,9 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
if numberOfHours < 48:
|
if numberOfHours < 48:
|
||||||
self.ui.labelHumanFriendlyTTLDescription.setText(
|
self.ui.labelHumanFriendlyTTLDescription.setText(
|
||||||
_translate("MainWindow", "%n hour(s)", None, numberOfHours)
|
_translate("MainWindow", "%n hour(s)", None, numberOfHours) +
|
||||||
+ ", "
|
", " +
|
||||||
+ _translate("MainWindow", "not recommended for chans", None)
|
_translate("MainWindow", "not recommended for chans", None)
|
||||||
)
|
)
|
||||||
stylesheet = "QLabel { color : red; }"
|
stylesheet = "QLabel { color : red; }"
|
||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
|
@ -1222,7 +1221,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
# create application indicator
|
# create application indicator
|
||||||
def appIndicatorInit(self, app):
|
def appIndicatorInit(self, app):
|
||||||
self.initTrayIcon("can-icon-24px-red.png", app)
|
self.initTrayIcon("can-icon-24px-red.png", app)
|
||||||
self.tray.activated.connect(self.__icon_activated)
|
self.tray.activated.connect(self.__icon_activated);
|
||||||
|
|
||||||
m = QtWidgets.QMenu()
|
m = QtWidgets.QMenu()
|
||||||
|
|
||||||
|
@ -2660,13 +2659,13 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
"MainWindow",
|
"MainWindow",
|
||||||
"%n object(s) pending proof of work", None,
|
"%n object(s) pending proof of work", None,
|
||||||
powQueueSize()
|
powQueueSize()
|
||||||
) + ", "
|
) + ", " +
|
||||||
+ _translate(
|
_translate(
|
||||||
"MainWindow",
|
"MainWindow",
|
||||||
"%n object(s) waiting to be distributed", None,
|
"%n object(s) waiting to be distributed", None,
|
||||||
pendingUpload()
|
pendingUpload()
|
||||||
) + "\n\n"
|
) + "\n\n" +
|
||||||
+ _translate(
|
_translate(
|
||||||
"MainWindow", "Wait until these tasks finish?"),
|
"MainWindow", "Wait until these tasks finish?"),
|
||||||
QtWidgets.QMessageBox.StandardButton.Yes | QtWidgets.QMessageBox.StandardButton.No
|
QtWidgets.QMessageBox.StandardButton.Yes | QtWidgets.QMessageBox.StandardButton.No
|
||||||
| QtWidgets.QMessageBox.StandardButton.Cancel, QtWidgets.QMessageBox.StandardButton.Cancel)
|
| QtWidgets.QMessageBox.StandardButton.Cancel, QtWidgets.QMessageBox.StandardButton.Cancel)
|
||||||
|
@ -2749,8 +2748,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
if curWorkerQueue > 0:
|
if curWorkerQueue > 0:
|
||||||
self.updateStatusBar(_translate(
|
self.updateStatusBar(_translate(
|
||||||
"MainWindow", "Waiting for PoW to finish... {0}%"
|
"MainWindow", "Waiting for PoW to finish... {0}%"
|
||||||
).format(50 * (maxWorkerQueue - curWorkerQueue)
|
).format(50 * (maxWorkerQueue - curWorkerQueue) /
|
||||||
/ maxWorkerQueue))
|
maxWorkerQueue))
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
QtCore.QCoreApplication.processEvents(
|
QtCore.QCoreApplication.processEvents(
|
||||||
QtCore.QEventLoop.ProcessEventsFlag.AllEvents, 1000
|
QtCore.QEventLoop.ProcessEventsFlag.AllEvents, 1000
|
||||||
|
@ -3018,8 +3017,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
|
toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
|
||||||
if fromAddressAtCurrentInboxRow == \
|
if fromAddressAtCurrentInboxRow == \
|
||||||
tableWidget.item(currentInboxRow, column_from).label or (
|
tableWidget.item(currentInboxRow, column_from).label or (
|
||||||
isinstance(acct, GatewayAccount)
|
isinstance(acct, GatewayAccount) and
|
||||||
and fromAddressAtCurrentInboxRow == acct.relayAddress):
|
fromAddressAtCurrentInboxRow == acct.relayAddress):
|
||||||
self.ui.lineEditTo.setText(str(acct.fromAddress))
|
self.ui.lineEditTo.setText(str(acct.fromAddress))
|
||||||
else:
|
else:
|
||||||
self.ui.lineEditTo.setText(
|
self.ui.lineEditTo.setText(
|
||||||
|
@ -3663,8 +3662,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
otherAddress = tableWidget.item(currentRow, 1).data(QtCore.Qt.ItemDataRole.UserRole)
|
otherAddress = tableWidget.item(currentRow, 1).data(QtCore.Qt.ItemDataRole.UserRole)
|
||||||
account = accountClass(myAddress)
|
account = accountClass(myAddress)
|
||||||
if isinstance(account, GatewayAccount) and otherAddress == account.relayAddress and (
|
if isinstance(account, GatewayAccount) and otherAddress == account.relayAddress and (
|
||||||
(currentColumn in [0, 2] and self.getCurrentFolder() == "sent")
|
(currentColumn in [0, 2] and self.getCurrentFolder() == "sent") or
|
||||||
or (currentColumn in [1, 2] and self.getCurrentFolder() != "sent")):
|
(currentColumn in [1, 2] and self.getCurrentFolder() != "sent")):
|
||||||
text = str(tableWidget.item(currentRow, currentColumn).label)
|
text = str(tableWidget.item(currentRow, currentColumn).label)
|
||||||
else:
|
else:
|
||||||
text = tableWidget.item(currentRow, currentColumn).data(QtCore.Qt.ItemDataRole.UserRole)
|
text = tableWidget.item(currentRow, currentColumn).data(QtCore.Qt.ItemDataRole.UserRole)
|
||||||
|
|
|
@ -216,7 +216,6 @@ class NewSubscriptionDialog(AddressDataDialog):
|
||||||
|
|
||||||
class RegenerateAddressesDialog(QtWidgets.QDialog):
|
class RegenerateAddressesDialog(QtWidgets.QDialog):
|
||||||
"""QDialog for regenerating deterministic addresses"""
|
"""QDialog for regenerating deterministic addresses"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(RegenerateAddressesDialog, self).__init__(parent)
|
super(RegenerateAddressesDialog, self).__init__(parent)
|
||||||
widgets.load('regenerateaddresses.ui', self)
|
widgets.load('regenerateaddresses.ui', self)
|
||||||
|
@ -289,7 +288,6 @@ class SpecialAddressBehaviorDialog(QtWidgets.QDialog):
|
||||||
|
|
||||||
class EmailGatewayDialog(QtWidgets.QDialog):
|
class EmailGatewayDialog(QtWidgets.QDialog):
|
||||||
"""QDialog for email gateway control"""
|
"""QDialog for email gateway control"""
|
||||||
|
|
||||||
def __init__(self, parent, config=global_config, account=None):
|
def __init__(self, parent, config=global_config, account=None):
|
||||||
super(EmailGatewayDialog, self).__init__(parent)
|
super(EmailGatewayDialog, self).__init__(parent)
|
||||||
widgets.load('emailgateway.ui', self)
|
widgets.load('emailgateway.ui', self)
|
||||||
|
|
|
@ -16,7 +16,6 @@ from .utils import str_chan
|
||||||
|
|
||||||
class AddressPassPhraseValidatorMixin(object):
|
class AddressPassPhraseValidatorMixin(object):
|
||||||
"""Bitmessage address or passphrase validator class for Qt UI"""
|
"""Bitmessage address or passphrase validator class for Qt UI"""
|
||||||
|
|
||||||
def setParams(
|
def setParams(
|
||||||
self,
|
self,
|
||||||
passPhraseObject=None,
|
passPhraseObject=None,
|
||||||
|
@ -170,7 +169,6 @@ class AddressPassPhraseValidatorMixin(object):
|
||||||
|
|
||||||
class AddressValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
|
class AddressValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
|
||||||
"""AddressValidator class for Qt UI"""
|
"""AddressValidator class for Qt UI"""
|
||||||
|
|
||||||
def __init__(self, parent=None, passPhraseObject=None, feedBackObject=None, buttonBox=None, addressMandatory=True):
|
def __init__(self, parent=None, passPhraseObject=None, feedBackObject=None, buttonBox=None, addressMandatory=True):
|
||||||
super(AddressValidator, self).__init__(parent)
|
super(AddressValidator, self).__init__(parent)
|
||||||
self.setParams(passPhraseObject, parent, feedBackObject, buttonBox, addressMandatory)
|
self.setParams(passPhraseObject, parent, feedBackObject, buttonBox, addressMandatory)
|
||||||
|
@ -178,7 +176,6 @@ class AddressValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
|
||||||
|
|
||||||
class PassPhraseValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
|
class PassPhraseValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
|
||||||
"""PassPhraseValidator class for Qt UI"""
|
"""PassPhraseValidator class for Qt UI"""
|
||||||
|
|
||||||
def __init__(self, parent=None, addressObject=None, feedBackObject=None, buttonBox=None, addressMandatory=False):
|
def __init__(self, parent=None, addressObject=None, feedBackObject=None, buttonBox=None, addressMandatory=False):
|
||||||
super(PassPhraseValidator, self).__init__(parent)
|
super(PassPhraseValidator, self).__init__(parent)
|
||||||
self.setParams(parent, addressObject, feedBackObject, buttonBox, addressMandatory)
|
self.setParams(parent, addressObject, feedBackObject, buttonBox, addressMandatory)
|
||||||
|
|
|
@ -1666,13 +1666,10 @@ qt_resource_struct = b"\
|
||||||
\x00\x00\x01\xe6\x00\x00\x00\x00\x00\x01\x00\x00\x34\xdf\
|
\x00\x00\x01\xe6\x00\x00\x00\x00\x00\x01\x00\x00\x34\xdf\
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
def qInitResources():
|
def qInitResources():
|
||||||
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||||
|
|
||||||
|
|
||||||
def qCleanupResources():
|
def qCleanupResources():
|
||||||
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
|
||||||
|
|
||||||
|
|
||||||
qInitResources()
|
qInitResources()
|
||||||
|
|
|
@ -15,7 +15,6 @@ import bitmessageqt.settingsmixin as settingsmixin
|
||||||
from .networkstatus import NetworkStatus
|
from .networkstatus import NetworkStatus
|
||||||
from .blacklist import Blacklist
|
from .blacklist import Blacklist
|
||||||
|
|
||||||
|
|
||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, MainWindow):
|
def setupUi(self, MainWindow):
|
||||||
MainWindow.setObjectName("MainWindow")
|
MainWindow.setObjectName("MainWindow")
|
||||||
|
@ -23,8 +22,7 @@ class Ui_MainWindow(object):
|
||||||
self.MainDock = QtWidgets.QDockWidget(parent=MainWindow)
|
self.MainDock = QtWidgets.QDockWidget(parent=MainWindow)
|
||||||
self.MainDock.setGeometry(QtCore.QRect(0, 0, 885, 580))
|
self.MainDock.setGeometry(QtCore.QRect(0, 0, 885, 580))
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-24px.png"),
|
icon.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-24px.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
|
||||||
self.MainDock.setWindowIcon(icon)
|
self.MainDock.setWindowIcon(icon)
|
||||||
self.MainDock.setObjectName("MainDock")
|
self.MainDock.setObjectName("MainDock")
|
||||||
self.centralwidget = QtWidgets.QWidget()
|
self.centralwidget = QtWidgets.QWidget()
|
||||||
|
@ -33,8 +31,7 @@ class Ui_MainWindow(object):
|
||||||
self.gridLayout_10.setObjectName("gridLayout_10")
|
self.gridLayout_10.setObjectName("gridLayout_10")
|
||||||
self.tabWidget = QtWidgets.QTabWidget(parent=self.centralwidget)
|
self.tabWidget = QtWidgets.QTabWidget(parent=self.centralwidget)
|
||||||
self.tabWidget.setTabShape(QtWidgets.QTabWidget.TabShape.Rounded)
|
self.tabWidget.setTabShape(QtWidgets.QTabWidget.TabShape.Rounded)
|
||||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding,
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||||
QtWidgets.QSizePolicy.Policy.Expanding)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
|
||||||
|
@ -59,8 +56,7 @@ class Ui_MainWindow(object):
|
||||||
self.treeWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215))
|
self.treeWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215))
|
||||||
self.treeWidgetYourIdentities.setObjectName("treeWidgetYourIdentities")
|
self.treeWidgetYourIdentities.setObjectName("treeWidgetYourIdentities")
|
||||||
icon1 = QtGui.QIcon()
|
icon1 = QtGui.QIcon()
|
||||||
icon1.addPixmap(QtGui.QPixmap(":/newPrefix/images/identities.png"),
|
icon1.addPixmap(QtGui.QPixmap(":/newPrefix/images/identities.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
|
||||||
self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1)
|
self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1)
|
||||||
self.verticalLayout_12.addWidget(self.treeWidgetYourIdentities)
|
self.verticalLayout_12.addWidget(self.treeWidgetYourIdentities)
|
||||||
self.pushButtonNewAddress = QtWidgets.QPushButton(parent=self.inbox)
|
self.pushButtonNewAddress = QtWidgets.QPushButton(parent=self.inbox)
|
||||||
|
@ -139,8 +135,7 @@ class Ui_MainWindow(object):
|
||||||
self.tableWidgetAddressBook.setRowCount(0)
|
self.tableWidgetAddressBook.setRowCount(0)
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
icon3 = QtGui.QIcon()
|
icon3 = QtGui.QIcon()
|
||||||
icon3.addPixmap(QtGui.QPixmap(":/newPrefix/images/addressbook.png"),
|
icon3.addPixmap(QtGui.QPixmap(":/newPrefix/images/addressbook.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
|
||||||
item.setIcon(icon3)
|
item.setIcon(icon3)
|
||||||
self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item)
|
self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item)
|
||||||
item = QtWidgets.QTableWidgetItem()
|
item = QtWidgets.QTableWidgetItem()
|
||||||
|
@ -316,8 +311,7 @@ class Ui_MainWindow(object):
|
||||||
self.treeWidgetSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
self.treeWidgetSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
||||||
self.treeWidgetSubscriptions.setObjectName("treeWidgetSubscriptions")
|
self.treeWidgetSubscriptions.setObjectName("treeWidgetSubscriptions")
|
||||||
icon5 = QtGui.QIcon()
|
icon5 = QtGui.QIcon()
|
||||||
icon5.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"),
|
icon5.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
|
||||||
self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5)
|
self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5)
|
||||||
self.verticalLayout_3.addWidget(self.treeWidgetSubscriptions)
|
self.verticalLayout_3.addWidget(self.treeWidgetSubscriptions)
|
||||||
self.pushButtonAddSubscription = QtWidgets.QPushButton(parent=self.subscriptions)
|
self.pushButtonAddSubscription = QtWidgets.QPushButton(parent=self.subscriptions)
|
||||||
|
@ -344,10 +338,8 @@ class Ui_MainWindow(object):
|
||||||
self.tableWidgetInboxSubscriptions = QtWidgets.QTableWidget(parent=self.subscriptions)
|
self.tableWidgetInboxSubscriptions = QtWidgets.QTableWidget(parent=self.subscriptions)
|
||||||
self.tableWidgetInboxSubscriptions.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.tableWidgetInboxSubscriptions.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True)
|
self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True)
|
||||||
self.tableWidgetInboxSubscriptions.setSelectionMode(
|
self.tableWidgetInboxSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
|
||||||
QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection)
|
self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
||||||
self.tableWidgetInboxSubscriptions.setSelectionBehavior(
|
|
||||||
QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
|
||||||
self.tableWidgetInboxSubscriptions.setWordWrap(False)
|
self.tableWidgetInboxSubscriptions.setWordWrap(False)
|
||||||
self.tableWidgetInboxSubscriptions.setObjectName("tableWidgetInboxSubscriptions")
|
self.tableWidgetInboxSubscriptions.setObjectName("tableWidgetInboxSubscriptions")
|
||||||
self.tableWidgetInboxSubscriptions.setColumnCount(4)
|
self.tableWidgetInboxSubscriptions.setColumnCount(4)
|
||||||
|
@ -377,8 +369,7 @@ class Ui_MainWindow(object):
|
||||||
self.horizontalLayout_4.addLayout(self.verticalLayout_4)
|
self.horizontalLayout_4.addLayout(self.verticalLayout_4)
|
||||||
self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
|
self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
|
||||||
icon6 = QtGui.QIcon()
|
icon6 = QtGui.QIcon()
|
||||||
icon6.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"),
|
icon6.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
|
||||||
self.tabWidget.addTab(self.subscriptions, icon6, "")
|
self.tabWidget.addTab(self.subscriptions, icon6, "")
|
||||||
self.chans = QtWidgets.QWidget()
|
self.chans = QtWidgets.QWidget()
|
||||||
self.chans.setObjectName("chans")
|
self.chans.setObjectName("chans")
|
||||||
|
@ -397,8 +388,7 @@ class Ui_MainWindow(object):
|
||||||
self.treeWidgetChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
self.treeWidgetChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
|
||||||
self.treeWidgetChans.setObjectName("treeWidgetChans")
|
self.treeWidgetChans.setObjectName("treeWidgetChans")
|
||||||
icon7 = QtGui.QIcon()
|
icon7 = QtGui.QIcon()
|
||||||
icon7.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"),
|
icon7.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Selected, QtGui.QIcon.State.Off)
|
|
||||||
self.treeWidgetChans.headerItem().setIcon(0, icon7)
|
self.treeWidgetChans.headerItem().setIcon(0, icon7)
|
||||||
self.verticalLayout_17.addWidget(self.treeWidgetChans)
|
self.verticalLayout_17.addWidget(self.treeWidgetChans)
|
||||||
self.pushButtonAddChan = QtWidgets.QPushButton(parent=self.chans)
|
self.pushButtonAddChan = QtWidgets.QPushButton(parent=self.chans)
|
||||||
|
@ -456,8 +446,7 @@ class Ui_MainWindow(object):
|
||||||
self.horizontalLayout_7.addLayout(self.verticalLayout_8)
|
self.horizontalLayout_7.addLayout(self.verticalLayout_8)
|
||||||
self.gridLayout_4.addLayout(self.horizontalLayout_7, 0, 0, 1, 1)
|
self.gridLayout_4.addLayout(self.horizontalLayout_7, 0, 0, 1, 1)
|
||||||
icon8 = QtGui.QIcon()
|
icon8 = QtGui.QIcon()
|
||||||
icon8.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"),
|
icon8.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||||
QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
|
||||||
self.tabWidget.addTab(self.chans, icon8, "")
|
self.tabWidget.addTab(self.chans, icon8, "")
|
||||||
self.blackwhitelist = Blacklist()
|
self.blackwhitelist = Blacklist()
|
||||||
self.blackwhitelist.setObjectName("blackwhitelist")
|
self.blackwhitelist.setObjectName("blackwhitelist")
|
||||||
|
@ -613,8 +602,7 @@ class Ui_MainWindow(object):
|
||||||
"p, li { white-space: pre-wrap; }\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"
|
"</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>"))
|
"<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.sendDirect),
|
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.sendDirect), _translate("MainWindow", "Send ordinary Message"))
|
||||||
_translate("MainWindow", "Send ordinary Message"))
|
|
||||||
self.label_8.setText(_translate("MainWindow", "From:"))
|
self.label_8.setText(_translate("MainWindow", "From:"))
|
||||||
self.label_7.setText(_translate("MainWindow", "Subject:"))
|
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"
|
self.textEditMessageBroadcast.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||||
|
@ -622,8 +610,7 @@ class Ui_MainWindow(object):
|
||||||
"p, li { white-space: pre-wrap; }\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"
|
"</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>"))
|
"<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.sendBroadcast),
|
self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.sendBroadcast), _translate("MainWindow", "Send Message to your Subscribers"))
|
||||||
_translate("MainWindow", "Send Message to your Subscribers"))
|
|
||||||
self.pushButtonTTL.setText(_translate("MainWindow", "TTL:"))
|
self.pushButtonTTL.setText(_translate("MainWindow", "TTL:"))
|
||||||
self.pushButtonClear.setText(_translate("MainWindow", "Clear"))
|
self.pushButtonClear.setText(_translate("MainWindow", "Clear"))
|
||||||
self.pushButtonSend.setText(_translate("MainWindow", "Send"))
|
self.pushButtonSend.setText(_translate("MainWindow", "Send"))
|
||||||
|
@ -645,8 +632,7 @@ class Ui_MainWindow(object):
|
||||||
item.setText(_translate("MainWindow", "Subject"))
|
item.setText(_translate("MainWindow", "Subject"))
|
||||||
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3)
|
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3)
|
||||||
item.setText(_translate("MainWindow", "Received"))
|
item.setText(_translate("MainWindow", "Received"))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions),
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions"))
|
||||||
_translate("MainWindow", "Subscriptions"))
|
|
||||||
self.treeWidgetChans.headerItem().setText(0, _translate("MainWindow", "Chans"))
|
self.treeWidgetChans.headerItem().setText(0, _translate("MainWindow", "Chans"))
|
||||||
self.pushButtonAddChan.setText(_translate("MainWindow", "Add Chan"))
|
self.pushButtonAddChan.setText(_translate("MainWindow", "Add Chan"))
|
||||||
self.inboxSearchLineEditChans.setPlaceholderText(_translate("MainWindow", "Search"))
|
self.inboxSearchLineEditChans.setPlaceholderText(_translate("MainWindow", "Search"))
|
||||||
|
@ -666,8 +652,7 @@ class Ui_MainWindow(object):
|
||||||
item.setText(_translate("MainWindow", "Received"))
|
item.setText(_translate("MainWindow", "Received"))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.chans), _translate("MainWindow", "Chans"))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.chans), _translate("MainWindow", "Chans"))
|
||||||
self.networkstatus.retranslateUi()
|
self.networkstatus.retranslateUi()
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus),
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.networkstatus), _translate("MainWindow", "Network Status"))
|
||||||
_translate("MainWindow", "Network Status"))
|
|
||||||
self.menuFile.setTitle(_translate("MainWindow", "File"))
|
self.menuFile.setTitle(_translate("MainWindow", "File"))
|
||||||
self.menuSettings.setTitle(_translate("MainWindow", "Settings"))
|
self.menuSettings.setTitle(_translate("MainWindow", "Settings"))
|
||||||
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
||||||
|
@ -680,8 +665,7 @@ class Ui_MainWindow(object):
|
||||||
self.actionSupport.setText(_translate("MainWindow", "Contact support"))
|
self.actionSupport.setText(_translate("MainWindow", "Contact support"))
|
||||||
self.actionAbout.setText(_translate("MainWindow", "About"))
|
self.actionAbout.setText(_translate("MainWindow", "About"))
|
||||||
self.actionSettings.setText(_translate("MainWindow", "Settings"))
|
self.actionSettings.setText(_translate("MainWindow", "Settings"))
|
||||||
self.actionRegenerateDeterministicAddresses.setText(
|
self.actionRegenerateDeterministicAddresses.setText(_translate("MainWindow", "Regenerate deterministic addresses"))
|
||||||
_translate("MainWindow", "Regenerate deterministic addresses"))
|
|
||||||
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages"))
|
self.actionDeleteAllTrashedMessages.setText(_translate("MainWindow", "Delete all trashed messages"))
|
||||||
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan"))
|
self.actionJoinChan.setText(_translate("MainWindow", "Join / Create chan"))
|
||||||
self.updateNetworkSwitchMenuLabel()
|
self.updateNetworkSwitchMenuLabel()
|
||||||
|
|
|
@ -27,7 +27,6 @@ __all__ = [
|
||||||
|
|
||||||
class AboutDialog(QtWidgets.QDialog):
|
class AboutDialog(QtWidgets.QDialog):
|
||||||
"""The `About` dialog"""
|
"""The `About` dialog"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(AboutDialog, self).__init__(parent)
|
super(AboutDialog, self).__init__(parent)
|
||||||
widgets.load('about.ui', self)
|
widgets.load('about.ui', self)
|
||||||
|
@ -56,7 +55,6 @@ class AboutDialog(QtWidgets.QDialog):
|
||||||
|
|
||||||
class IconGlossaryDialog(QtWidgets.QDialog):
|
class IconGlossaryDialog(QtWidgets.QDialog):
|
||||||
"""The `Icon Glossary` dialog, explaining the status icon colors"""
|
"""The `Icon Glossary` dialog, explaining the status icon colors"""
|
||||||
|
|
||||||
def __init__(self, parent=None, config=None):
|
def __init__(self, parent=None, config=None):
|
||||||
super(IconGlossaryDialog, self).__init__(parent)
|
super(IconGlossaryDialog, self).__init__(parent)
|
||||||
widgets.load('iconglossary.ui', self)
|
widgets.load('iconglossary.ui', self)
|
||||||
|
@ -73,7 +71,6 @@ class IconGlossaryDialog(QtWidgets.QDialog):
|
||||||
|
|
||||||
class HelpDialog(QtWidgets.QDialog):
|
class HelpDialog(QtWidgets.QDialog):
|
||||||
"""The `Help` dialog"""
|
"""The `Help` dialog"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(HelpDialog, self).__init__(parent)
|
super(HelpDialog, self).__init__(parent)
|
||||||
widgets.load('help.ui', self)
|
widgets.load('help.ui', self)
|
||||||
|
@ -82,7 +79,6 @@ class HelpDialog(QtWidgets.QDialog):
|
||||||
|
|
||||||
class ConnectDialog(QtWidgets.QDialog):
|
class ConnectDialog(QtWidgets.QDialog):
|
||||||
"""The `Connect` dialog"""
|
"""The `Connect` dialog"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(ConnectDialog, self).__init__(parent)
|
super(ConnectDialog, self).__init__(parent)
|
||||||
widgets.load('connect.ui', self)
|
widgets.load('connect.ui', self)
|
||||||
|
|
|
@ -219,7 +219,6 @@ class Ui_FolderWidget(BMTreeWidgetItem):
|
||||||
|
|
||||||
class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
|
class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
|
||||||
"""Item in the account/folder tree representing an account"""
|
"""Item in the account/folder tree representing an account"""
|
||||||
|
|
||||||
def __init__(self, parent, pos=0, address=None, unreadCount=0, enabled=True):
|
def __init__(self, parent, pos=0, address=None, unreadCount=0, enabled=True):
|
||||||
super(Ui_AddressWidget, self).__init__(
|
super(Ui_AddressWidget, self).__init__(
|
||||||
parent, pos, address, unreadCount)
|
parent, pos, address, unreadCount)
|
||||||
|
@ -298,7 +297,6 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
|
||||||
class Ui_SubscriptionWidget(Ui_AddressWidget):
|
class Ui_SubscriptionWidget(Ui_AddressWidget):
|
||||||
"""Special treating of subscription addresses"""
|
"""Special treating of subscription addresses"""
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
|
|
||||||
def __init__(self, parent, pos=0, address="", unreadCount=0, label="", enabled=True):
|
def __init__(self, parent, pos=0, address="", unreadCount=0, label="", enabled=True):
|
||||||
super(Ui_SubscriptionWidget, self).__init__(
|
super(Ui_SubscriptionWidget, self).__init__(
|
||||||
parent, pos, address, unreadCount, enabled)
|
parent, pos, address, unreadCount, enabled)
|
||||||
|
@ -389,7 +387,6 @@ class BMAddressWidget(BMTableWidgetItem, AccountMixin):
|
||||||
|
|
||||||
class MessageList_AddressWidget(BMAddressWidget):
|
class MessageList_AddressWidget(BMAddressWidget):
|
||||||
"""Address item in a messagelist"""
|
"""Address item in a messagelist"""
|
||||||
|
|
||||||
def __init__(self, address=None, label=None, unread=False):
|
def __init__(self, address=None, label=None, unread=False):
|
||||||
self.setAddress(address)
|
self.setAddress(address)
|
||||||
super(MessageList_AddressWidget, self).__init__(label, unread)
|
super(MessageList_AddressWidget, self).__init__(label, unread)
|
||||||
|
@ -439,7 +436,6 @@ class MessageList_AddressWidget(BMAddressWidget):
|
||||||
|
|
||||||
class MessageList_SubjectWidget(BMTableWidgetItem):
|
class MessageList_SubjectWidget(BMTableWidgetItem):
|
||||||
"""Message list subject item"""
|
"""Message list subject item"""
|
||||||
|
|
||||||
def __init__(self, subject=None, label=None, unread=False):
|
def __init__(self, subject=None, label=None, unread=False):
|
||||||
self.setSubject(subject)
|
self.setSubject(subject)
|
||||||
super(MessageList_SubjectWidget, self).__init__(label, unread)
|
super(MessageList_SubjectWidget, self).__init__(label, unread)
|
||||||
|
@ -497,7 +493,6 @@ class MessageList_TimeWidget(BMTableWidgetItem):
|
||||||
class Ui_AddressBookWidgetItem(BMAddressWidget):
|
class Ui_AddressBookWidgetItem(BMAddressWidget):
|
||||||
"""Addressbook item"""
|
"""Addressbook item"""
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
|
|
||||||
def __init__(self, label=None, acc_type=AccountMixin.NORMAL):
|
def __init__(self, label=None, acc_type=AccountMixin.NORMAL):
|
||||||
self.type = acc_type
|
self.type = acc_type
|
||||||
super(Ui_AddressBookWidgetItem, self).__init__(label=label)
|
super(Ui_AddressBookWidgetItem, self).__init__(label=label)
|
||||||
|
@ -540,7 +535,6 @@ class Ui_AddressBookWidgetItem(BMAddressWidget):
|
||||||
|
|
||||||
class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem):
|
class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem):
|
||||||
"""Addressbook label item"""
|
"""Addressbook label item"""
|
||||||
|
|
||||||
def __init__(self, address, label, acc_type):
|
def __init__(self, address, label, acc_type):
|
||||||
self.address = address
|
self.address = address
|
||||||
super(Ui_AddressBookWidgetItemLabel, self).__init__(label, acc_type)
|
super(Ui_AddressBookWidgetItemLabel, self).__init__(label, acc_type)
|
||||||
|
@ -553,7 +547,6 @@ class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem):
|
||||||
|
|
||||||
class Ui_AddressBookWidgetItemAddress(Ui_AddressBookWidgetItem):
|
class Ui_AddressBookWidgetItemAddress(Ui_AddressBookWidgetItem):
|
||||||
"""Addressbook address item"""
|
"""Addressbook address item"""
|
||||||
|
|
||||||
def __init__(self, address, label, acc_type):
|
def __init__(self, address, label, acc_type):
|
||||||
self.address = address
|
self.address = address
|
||||||
super(Ui_AddressBookWidgetItemAddress, self).__init__(address, acc_type)
|
super(Ui_AddressBookWidgetItemAddress, self).__init__(address, acc_type)
|
||||||
|
|
|
@ -8,7 +8,6 @@ from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
class MessageCompose(QtWidgets.QTextEdit):
|
class MessageCompose(QtWidgets.QTextEdit):
|
||||||
"""Editor class with wheel zoom functionality"""
|
"""Editor class with wheel zoom functionality"""
|
||||||
|
|
||||||
def __init__(self, parent=0):
|
def __init__(self, parent=0):
|
||||||
super(MessageCompose, self).__init__(parent)
|
super(MessageCompose, self).__init__(parent)
|
||||||
self.setAcceptRichText(False)
|
self.setAcceptRichText(False)
|
||||||
|
|
|
@ -145,8 +145,7 @@ class MessageView(QtWidgets.QTextBrowser):
|
||||||
"""Render message as HTML"""
|
"""Render message as HTML"""
|
||||||
self.mode = MessageView.MODE_HTML
|
self.mode = MessageView.MODE_HTML
|
||||||
out = self.html.sanitised
|
out = self.html.sanitised
|
||||||
out = "<div align=\"center\" style=\"text-decoration: underline;\"><b>" + \
|
out = "<div align=\"center\" style=\"text-decoration: underline;\"><b>" + QtWidgets.QApplication.translate("MessageView", "Click here to disable HTML") + "</b></div><br/>" + out
|
||||||
QtWidgets.QApplication.translate("MessageView", "Click here to disable HTML") + "</b></div><br/>" + out
|
|
||||||
self.out = out
|
self.out = out
|
||||||
self.outpos = 0
|
self.outpos = 0
|
||||||
self.setHtml("")
|
self.setHtml("")
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python2.7
|
||||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
class MigrationWizardIntroPage(QtWidgets.QWizardPage):
|
class MigrationWizardIntroPage(QtWidgets.QWizardPage):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(QtGui.QWizardPage, self).__init__()
|
super(QtGui.QWizardPage, self).__init__()
|
||||||
|
|
|
@ -18,7 +18,6 @@ from .uisignaler import UISignaler
|
||||||
|
|
||||||
class NetworkStatus(QtWidgets.QWidget, RetranslateMixin):
|
class NetworkStatus(QtWidgets.QWidget, RetranslateMixin):
|
||||||
"""Network status tab"""
|
"""Network status tab"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(NetworkStatus, self).__init__(parent)
|
super(NetworkStatus, self).__init__(parent)
|
||||||
widgets.load('networkstatus.ui', self)
|
widgets.load('networkstatus.ui', self)
|
||||||
|
|
|
@ -17,7 +17,6 @@ from .utils import str_chan
|
||||||
|
|
||||||
class NewChanDialog(QtWidgets.QDialog):
|
class NewChanDialog(QtWidgets.QDialog):
|
||||||
"""The `New Chan` dialog"""
|
"""The `New Chan` dialog"""
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(NewChanDialog, self).__init__(parent)
|
super(NewChanDialog, self).__init__(parent)
|
||||||
widgets.load('newchandialog.ui', self)
|
widgets.load('newchandialog.ui', self)
|
||||||
|
|
|
@ -3,7 +3,6 @@ from PyQt6 import QtGui, QtWidgets
|
||||||
from debug import logger
|
from debug import logger
|
||||||
import bitmessageqt.widgets as widgets
|
import bitmessageqt.widgets as widgets
|
||||||
|
|
||||||
|
|
||||||
class RetranslateMixin(object):
|
class RetranslateMixin(object):
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
defaults = QtWidgets.QWidget()
|
defaults = QtWidgets.QWidget()
|
||||||
|
|
|
@ -41,7 +41,6 @@ def getSOCKSProxyType(config):
|
||||||
|
|
||||||
class SettingsDialog(QtWidgets.QDialog):
|
class SettingsDialog(QtWidgets.QDialog):
|
||||||
"""The "Settings" dialog"""
|
"""The "Settings" dialog"""
|
||||||
|
|
||||||
def __init__(self, parent=None, firstrun=False):
|
def __init__(self, parent=None, firstrun=False):
|
||||||
super(SettingsDialog, self).__init__(parent)
|
super(SettingsDialog, self).__init__(parent)
|
||||||
widgets.load('settings.ui', self)
|
widgets.load('settings.ui', self)
|
||||||
|
|
|
@ -10,7 +10,6 @@ from PyQt6 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
class SettingsMixin(object):
|
class SettingsMixin(object):
|
||||||
"""Mixin for adding geometry and state saving between restarts."""
|
"""Mixin for adding geometry and state saving between restarts."""
|
||||||
|
|
||||||
def warnIfNoObjectName(self):
|
def warnIfNoObjectName(self):
|
||||||
"""
|
"""
|
||||||
Handle objects which don't have a name. Currently it ignores them. Objects without a name can't have their
|
Handle objects which don't have a name. Currently it ignores them. Objects without a name can't have their
|
||||||
|
@ -59,7 +58,6 @@ class SettingsMixin(object):
|
||||||
|
|
||||||
class SMainWindow(QtWidgets.QMainWindow, SettingsMixin):
|
class SMainWindow(QtWidgets.QMainWindow, SettingsMixin):
|
||||||
"""Main window with Settings functionality."""
|
"""Main window with Settings functionality."""
|
||||||
|
|
||||||
def loadSettings(self):
|
def loadSettings(self):
|
||||||
"""Load main window settings."""
|
"""Load main window settings."""
|
||||||
self.readGeometry(self)
|
self.readGeometry(self)
|
||||||
|
@ -74,7 +72,6 @@ class SMainWindow(QtWidgets.QMainWindow, SettingsMixin):
|
||||||
class STableWidget(QtWidgets.QTableWidget, SettingsMixin):
|
class STableWidget(QtWidgets.QTableWidget, SettingsMixin):
|
||||||
"""Table widget with Settings functionality"""
|
"""Table widget with Settings functionality"""
|
||||||
# pylint: disable=too-many-ancestors
|
# pylint: disable=too-many-ancestors
|
||||||
|
|
||||||
def loadSettings(self):
|
def loadSettings(self):
|
||||||
"""Load table settings."""
|
"""Load table settings."""
|
||||||
self.readState(self.horizontalHeader())
|
self.readState(self.horizontalHeader())
|
||||||
|
@ -86,7 +83,6 @@ class STableWidget(QtWidgets.QTableWidget, SettingsMixin):
|
||||||
|
|
||||||
class SSplitter(QtWidgets.QSplitter, SettingsMixin):
|
class SSplitter(QtWidgets.QSplitter, SettingsMixin):
|
||||||
"""Splitter with Settings functionality."""
|
"""Splitter with Settings functionality."""
|
||||||
|
|
||||||
def loadSettings(self):
|
def loadSettings(self):
|
||||||
"""Load splitter settings"""
|
"""Load splitter settings"""
|
||||||
self.readState(self)
|
self.readState(self)
|
||||||
|
@ -99,7 +95,6 @@ class SSplitter(QtWidgets.QSplitter, SettingsMixin):
|
||||||
class STreeWidget(QtWidgets.QTreeWidget, SettingsMixin):
|
class STreeWidget(QtWidgets.QTreeWidget, SettingsMixin):
|
||||||
"""Tree widget with settings functionality."""
|
"""Tree widget with settings functionality."""
|
||||||
# pylint: disable=too-many-ancestors
|
# pylint: disable=too-many-ancestors
|
||||||
|
|
||||||
def loadSettings(self):
|
def loadSettings(self):
|
||||||
"""Load tree settings."""
|
"""Load tree settings."""
|
||||||
# recurse children
|
# recurse children
|
||||||
|
|
|
@ -3,13 +3,11 @@ import os.path
|
||||||
import paths
|
import paths
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def resource_path(resFile):
|
def resource_path(resFile):
|
||||||
baseDir = paths.codePath()
|
baseDir = paths.codePath()
|
||||||
for subDir in ["ui", "bitmessageqt"]:
|
for subDir in ["ui", "bitmessageqt"]:
|
||||||
if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)):
|
if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)):
|
||||||
return os.path.join(baseDir, subDir, resFile)
|
return os.path.join(baseDir, subDir, resFile)
|
||||||
|
|
||||||
|
|
||||||
def load(resFile, widget):
|
def load(resFile, widget):
|
||||||
uic.loadUi(resource_path(resFile), widget)
|
uic.loadUi(resource_path(resFile), widget)
|
||||||
|
|
Reference in New Issue
Block a user