From 1e640b3135bc891fd11baf44fcdad3021c534923 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Mon, 5 Nov 2018 16:57:00 +0200
Subject: [PATCH 01/14] bitmessageui.ui: added all cusom widgets except for
SSplitter
---
src/bitmessageqt/__init__.py | 6 +-
src/bitmessageqt/bitmessageui.ui | 412 ++++++-------------------------
2 files changed, 82 insertions(+), 336 deletions(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index eb140fb9..cb3e9147 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -2240,7 +2240,7 @@ class MyForm(settingsmixin.SMainWindow):
))
def click_pushButtonFetchNamecoinID(self):
- identities = str(self.ui.lineEditTo.text().toUtf8()).split(";")
+ identities = str(self.lineEditTo.text().toUtf8()).split(";")
err, addr = self.namecoin.query(identities[-1].strip())
if err is not None:
self.updateStatusBar(
@@ -4096,9 +4096,9 @@ class MyForm(settingsmixin.SMainWindow):
logger.warning(
'There was a problem testing for a Namecoin daemon.'
' Hiding the Fetch Namecoin ID button')
- self.ui.pushButtonFetchNamecoinID.hide()
+ self.pushButtonFetchNamecoinID.hide()
else:
- self.ui.pushButtonFetchNamecoinID.show()
+ self.pushButtonFetchNamecoinID.show()
def initSettings(self):
self.loadSettings()
diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui
index fef40be6..515de98b 100644
--- a/src/bitmessageqt/bitmessageui.ui
+++ b/src/bitmessageqt/bitmessageui.ui
@@ -70,7 +70,7 @@
-
-
-
+
200
@@ -150,7 +150,7 @@
-
-
+
QAbstractItemView::NoEditTriggers
@@ -216,7 +216,7 @@
-
-
+
0
@@ -248,7 +248,7 @@
-
-
-
+
200
@@ -337,9 +337,9 @@
-
- 0
+ 1
-
+
Send ordinary Message
@@ -392,12 +392,12 @@
-
-
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<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>
@@ -406,7 +406,7 @@ p, li { white-space: pre-wrap; }
-
+
Send Message to your Subscribers
@@ -449,12 +449,12 @@ p, li { white-space: pre-wrap; }
-
-
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<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>
@@ -581,7 +581,14 @@ p, li { white-space: pre-wrap; }
- -
+
-
+
+
+ Clear
+
+
+
+ -
@@ -617,7 +624,7 @@ p, li { white-space: pre-wrap; }
-
-
-
+
200
@@ -703,7 +710,7 @@ p, li { white-space: pre-wrap; }
-
-
+
QAbstractItemView::NoEditTriggers
@@ -769,7 +776,7 @@ p, li { white-space: pre-wrap; }
-
-
+
0
@@ -893,7 +900,7 @@ p, li { white-space: pre-wrap; }
-
-
+
QAbstractItemView::NoEditTriggers
@@ -959,7 +966,7 @@ p, li { white-space: pre-wrap; }
-
-
+
0
@@ -977,7 +984,7 @@ p, li { white-space: pre-wrap; }
-
+
:/newPrefix/images/blacklist.png:/newPrefix/images/blacklist.png
@@ -985,91 +992,8 @@ p, li { white-space: pre-wrap; }
Blacklist
-
- -
-
-
- Use a Blacklist (Allow all incoming messages except those on the Blacklist)
-
-
- true
-
-
-
- -
-
-
- Use a Whitelist (Block all incoming messages except those on the Whitelist)
-
-
-
- -
-
-
- Add new entry
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 689
- 20
-
-
-
-
- -
-
-
- true
-
-
- QAbstractItemView::SingleSelection
-
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- true
-
-
- 400
-
-
- false
-
-
- false
-
-
- true
-
-
- false
-
-
-
- Name or Label
-
-
-
-
- Address
-
-
-
-
-
-
+
:/newPrefix/images/networkstatus.png:/newPrefix/images/networkstatus.png
@@ -1077,214 +1001,6 @@ p, li { white-space: pre-wrap; }
Network Status
-
-
-
- 680
- 440
- 21
- 23
-
-
-
-
-
-
-
- :/newPrefix/images/redicon.png:/newPrefix/images/redicon.png
-
-
- true
-
-
-
-
-
- 20
- 70
- 241
- 241
-
-
-
-
-
-
-
-
- 212
- 208
- 200
-
-
-
-
-
-
-
-
- 212
- 208
- 200
-
-
-
-
-
-
-
-
- 212
- 208
- 200
-
-
-
-
-
-
-
- QFrame::Box
-
-
- QFrame::Plain
-
-
- false
-
-
- true
-
-
- QAbstractItemView::NoSelection
-
-
- true
-
-
- false
-
-
- true
-
-
- false
-
-
-
- Stream #
-
-
-
-
- Connections
-
-
-
-
-
-
- 20
- 30
- 401
- 16
-
-
-
- Total connections:
-
-
-
-
-
- 320
- 110
- 331
- 20
-
-
-
- Since startup:
-
-
-
-
-
- 350
- 130
- 361
- 16
-
-
-
- Processed 0 person-to-person messages.
-
-
-
-
-
- 350
- 170
- 331
- 16
-
-
-
- Processed 0 public keys.
-
-
-
-
-
- 350
- 150
- 351
- 16
-
-
-
- Processed 0 broadcasts.
-
-
-
-
-
- 320
- 250
- 291
- 16
-
-
-
- Inventory lookups per second: 0
-
-
-
-
-
- 350
- 210
- 251
- 16
-
-
-
- Down: 0 KB/s
-
-
-
-
-
- 350
- 230
- 251
- 16
-
-
-
- Up: 0 KB/s
-
-
@@ -1296,7 +1012,7 @@ p, li { white-space: pre-wrap; }
0
0
885
- 27
+ 22
@@ -1347,8 +1065,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Manage keys
@@ -1357,8 +1074,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Quit
@@ -1370,8 +1086,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Help
@@ -1383,8 +1098,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
About
@@ -1393,8 +1107,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Settings
@@ -1403,8 +1116,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Regenerate deterministic addresses
@@ -1413,8 +1125,7 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Delete all trashed messages
@@ -1423,14 +1134,55 @@ p, li { white-space: pre-wrap; }
-
-
+ ..
Join / Create chan
+
+
+ Contact Support
+
+
+
+
+ Go offline
+
+
+
+
+ Blacklist
+ QWidget
+
+
+
+ NetworkStatus
+ QWidget
+ bitmessageqt.networkstatus
+
+
+ MessageView
+ QTextEdit
+
+
+
+ STreeWidget
+ QTreeWidget
+ bitmessageqt.settingsmixin
+
+
+ STableWidget
+ QTableWidget
+ bitmessageqt.settingsmixin
+
+
+ MessageCompose
+ QTextEdit
+ bitmessageqt.messagecompose
+
+
tableWidgetInbox
textEditInboxMessage
@@ -1440,12 +1192,6 @@ p, li { white-space: pre-wrap; }
textEditMessage
pushButtonSend
pushButtonAddSubscription
- radioButtonBlacklist
- radioButtonWhitelist
- pushButtonAddBlacklist
- tableWidgetBlacklist
- tableWidgetConnectionCount
- pushButtonStatusIcon
--
2.45.1
From 49c9ef79f9096472d0e35f51b8887e341d4aef38 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Wed, 7 Nov 2018 18:25:11 +0200
Subject: [PATCH 02/14] Loading main window from ui-file
---
src/bitmessageqt/__init__.py | 769 +++++++++++++++---------------
src/bitmessageqt/main.py | 38 ++
src/bitmessageqt/messageview.py | 14 +-
src/bitmessageqt/newchandialog.py | 24 +-
src/bitmessageqt/support.py | 18 +-
src/bitmessageqt/tests/main.py | 2 +-
src/bitmessageqt/tests/support.py | 2 +-
7 files changed, 459 insertions(+), 408 deletions(-)
create mode 100644 src/bitmessageqt/main.py
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index cb3e9147..48180269 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -23,7 +23,6 @@ import state
from debug import logger
from tr import _translate
from addresses import decodeAddress, addBMIfNotPresent
-from bitmessageui import Ui_MainWindow
from bmconfigparser import BMConfigParser
import namecoin
from messageview import MessageView
@@ -33,6 +32,7 @@ from foldertree import (
MessageList_AddressWidget, MessageList_SubjectWidget,
Ui_AddressBookWidgetItemLabel, Ui_AddressBookWidgetItemAddress,
MessageList_TimeWidget)
+from main import Window
import settingsmixin
import support
from helper_sql import sqlQuery, sqlExecute, sqlExecuteChunked, sqlStoredProcedure
@@ -84,7 +84,7 @@ def openKeysFile():
os.startfile(keysfile) # pylint: disable=no-member
-class MyForm(settingsmixin.SMainWindow):
+class MainWindow(Window):
# the maximum frequency of message sounds in seconds
maxSoundFrequencySec = 60
@@ -146,137 +146,137 @@ 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(
+ QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL(
"triggered()"), self.quit)
- QtCore.QObject.connect(self.ui.actionNetworkSwitch, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.actionNetworkSwitch, QtCore.SIGNAL(
"triggered()"), self.network_switch)
- QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.actionManageKeys, QtCore.SIGNAL(
"triggered()"), self.click_actionManageKeys)
- QtCore.QObject.connect(self.ui.actionDeleteAllTrashedMessages,
+ QtCore.QObject.connect(self.actionDeleteAllTrashedMessages,
QtCore.SIGNAL(
"triggered()"),
self.click_actionDeleteAllTrashedMessages)
- QtCore.QObject.connect(self.ui.actionRegenerateDeterministicAddresses,
+ QtCore.QObject.connect(self.actionRegenerateDeterministicAddresses,
QtCore.SIGNAL(
"triggered()"),
self.click_actionRegenerateDeterministicAddresses)
- QtCore.QObject.connect(self.ui.pushButtonAddChan, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonAddChan, QtCore.SIGNAL(
"clicked()"),
self.click_actionJoinChan) # also used for creating chans.
- QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonNewAddress, QtCore.SIGNAL(
"clicked()"), self.click_NewAddressDialog)
- QtCore.QObject.connect(self.ui.pushButtonAddAddressBook, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonAddAddressBook, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddAddressBook)
- QtCore.QObject.connect(self.ui.pushButtonAddSubscription, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonAddSubscription, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonAddSubscription)
- QtCore.QObject.connect(self.ui.pushButtonTTL, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonTTL, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonTTL)
- QtCore.QObject.connect(self.ui.pushButtonClear, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonClear, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonClear)
- QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonSend, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonSend)
- QtCore.QObject.connect(self.ui.pushButtonFetchNamecoinID, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.pushButtonFetchNamecoinID, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonFetchNamecoinID)
- QtCore.QObject.connect(self.ui.actionSettings, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.actionSettings, QtCore.SIGNAL(
"triggered()"), self.click_actionSettings)
- QtCore.QObject.connect(self.ui.actionAbout, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.actionAbout, QtCore.SIGNAL(
"triggered()"), self.click_actionAbout)
- QtCore.QObject.connect(self.ui.actionSupport, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.actionSupport, QtCore.SIGNAL(
"triggered()"), self.click_actionSupport)
- QtCore.QObject.connect(self.ui.actionHelp, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.actionHelp, QtCore.SIGNAL(
"triggered()"), self.click_actionHelp)
def init_inbox_popup_menu(self, connectSignal=True):
# Popup menu for the Inbox tab
- self.ui.inboxContextMenuToolbar = QtGui.QToolBar()
+ self.inboxContextMenuToolbar = QtGui.QToolBar()
# Actions
- self.actionReply = self.ui.inboxContextMenuToolbar.addAction(_translate(
+ self.actionReply = self.inboxContextMenuToolbar.addAction(_translate(
"MainWindow", "Reply to sender"), self.on_action_InboxReply)
- self.actionReplyChan = self.ui.inboxContextMenuToolbar.addAction(_translate(
+ self.actionReplyChan = self.inboxContextMenuToolbar.addAction(_translate(
"MainWindow", "Reply to channel"), self.on_action_InboxReplyChan)
- self.actionAddSenderToAddressBook = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionAddSenderToAddressBook = self.inboxContextMenuToolbar.addAction(
_translate(
"MainWindow", "Add sender to your Address Book"),
self.on_action_InboxAddSenderToAddressBook)
- self.actionAddSenderToBlackList = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionAddSenderToBlackList = self.inboxContextMenuToolbar.addAction(
_translate(
"MainWindow", "Add sender to your Blacklist"),
self.on_action_InboxAddSenderToBlackList)
- self.actionTrashInboxMessage = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionTrashInboxMessage = self.inboxContextMenuToolbar.addAction(
_translate("MainWindow", "Move to Trash"),
self.on_action_InboxTrash)
- self.actionUndeleteTrashedMessage = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionUndeleteTrashedMessage = self.inboxContextMenuToolbar.addAction(
_translate("MainWindow", "Undelete"),
self.on_action_TrashUndelete)
- self.actionForceHtml = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionForceHtml = self.inboxContextMenuToolbar.addAction(
_translate(
"MainWindow", "View HTML code as formatted text"),
self.on_action_InboxMessageForceHtml)
- self.actionSaveMessageAs = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionSaveMessageAs = self.inboxContextMenuToolbar.addAction(
_translate(
"MainWindow", "Save message as..."),
self.on_action_InboxSaveMessageAs)
- self.actionMarkUnread = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionMarkUnread = self.inboxContextMenuToolbar.addAction(
_translate(
"MainWindow", "Mark Unread"), self.on_action_InboxMarkUnread)
# contextmenu messagelists
- self.ui.tableWidgetInbox.setContextMenuPolicy(
+ self.tableWidgetInbox.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
+ self.connect(self.tableWidgetInbox, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuInbox)
- self.ui.tableWidgetInboxSubscriptions.setContextMenuPolicy(
+ self.tableWidgetInboxSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
+ self.connect(self.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuInbox)
- self.ui.tableWidgetInboxChans.setContextMenuPolicy(
+ self.tableWidgetInboxChans.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.tableWidgetInboxChans, QtCore.SIGNAL(
+ self.connect(self.tableWidgetInboxChans, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
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.addressContextMenuToolbarYourIdentities = QtGui.QToolBar()
# Actions
- self.actionNewYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(_translate(
+ self.actionNewYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(_translate(
"MainWindow", "New"), self.on_action_YourIdentitiesNew)
- self.actionEnableYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionEnableYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Enable"), self.on_action_Enable)
- self.actionDisableYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionDisableYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Disable"), self.on_action_Disable)
- self.actionSetAvatarYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionSetAvatarYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Set avatar..."),
self.on_action_TreeWidgetSetAvatar)
- self.actionClipboardYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionClipboardYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Copy address to clipboard"),
self.on_action_Clipboard)
- self.actionSpecialAddressBehaviorYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionSpecialAddressBehaviorYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Special address behavior..."),
self.on_action_SpecialAddressBehaviorDialog)
- self.actionEmailGateway = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionEmailGateway = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Email gateway"),
self.on_action_EmailGatewayDialog)
- self.actionMarkAllRead = self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.actionMarkAllRead = self.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Mark all messages as read"),
self.on_action_MarkAllRead)
- self.ui.treeWidgetYourIdentities.setContextMenuPolicy(
+ self.treeWidgetYourIdentities.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
+ self.connect(self.treeWidgetYourIdentities, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuYourIdentities)
@@ -290,125 +290,125 @@ class MyForm(settingsmixin.SMainWindow):
except TypeError:
continue
self.menu_plugins['address'].append(
- self.ui.addressContextMenuToolbarYourIdentities.addAction(
+ self.addressContextMenuToolbarYourIdentities.addAction(
title, handler
))
def init_chan_popup_menu(self, connectSignal=True):
# Actions
- self.actionNew = self.ui.addressContextMenuToolbar.addAction(_translate(
+ self.actionNew = self.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "New"), self.on_action_YourIdentitiesNew)
- self.actionDelete = self.ui.addressContextMenuToolbar.addAction(
+ self.actionDelete = self.addressContextMenuToolbar.addAction(
_translate("MainWindow", "Delete"),
self.on_action_YourIdentitiesDelete)
- self.actionEnable = self.ui.addressContextMenuToolbar.addAction(
+ self.actionEnable = self.addressContextMenuToolbar.addAction(
_translate(
"MainWindow", "Enable"), self.on_action_Enable)
- self.actionDisable = self.ui.addressContextMenuToolbar.addAction(
+ self.actionDisable = self.addressContextMenuToolbar.addAction(
_translate(
"MainWindow", "Disable"), self.on_action_Disable)
- self.actionSetAvatar = self.ui.addressContextMenuToolbar.addAction(
+ self.actionSetAvatar = self.addressContextMenuToolbar.addAction(
_translate(
"MainWindow", "Set avatar..."),
self.on_action_TreeWidgetSetAvatar)
- self.actionClipboard = self.ui.addressContextMenuToolbar.addAction(
+ self.actionClipboard = self.addressContextMenuToolbar.addAction(
_translate(
"MainWindow", "Copy address to clipboard"),
self.on_action_Clipboard)
- self.actionSend = self.ui.addressContextMenuToolbar.addAction(
+ self.actionSend = self.addressContextMenuToolbar.addAction(
_translate("MainWindow", "Send message to this chan"),
self.on_action_Send)
- self.actionSpecialAddressBehavior = self.ui.addressContextMenuToolbar.addAction(
+ self.actionSpecialAddressBehavior = self.addressContextMenuToolbar.addAction(
_translate(
"MainWindow", "Special address behavior..."),
self.on_action_SpecialAddressBehaviorDialog)
- self.ui.treeWidgetChans.setContextMenuPolicy(
+ self.treeWidgetChans.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
+ self.connect(self.treeWidgetChans, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
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.addressBookContextMenuToolbar = QtGui.QToolBar()
# Actions
- self.actionAddressBookSend = self.ui.addressBookContextMenuToolbar.addAction(
+ self.actionAddressBookSend = self.addressBookContextMenuToolbar.addAction(
_translate(
"MainWindow", "Send message to this address"),
self.on_action_AddressBookSend)
- self.actionAddressBookClipboard = self.ui.addressBookContextMenuToolbar.addAction(
+ self.actionAddressBookClipboard = self.addressBookContextMenuToolbar.addAction(
_translate(
"MainWindow", "Copy address to clipboard"),
self.on_action_AddressBookClipboard)
- self.actionAddressBookSubscribe = self.ui.addressBookContextMenuToolbar.addAction(
+ self.actionAddressBookSubscribe = self.addressBookContextMenuToolbar.addAction(
_translate(
"MainWindow", "Subscribe to this address"),
self.on_action_AddressBookSubscribe)
- self.actionAddressBookSetAvatar = self.ui.addressBookContextMenuToolbar.addAction(
+ self.actionAddressBookSetAvatar = self.addressBookContextMenuToolbar.addAction(
_translate(
"MainWindow", "Set avatar..."),
self.on_action_AddressBookSetAvatar)
self.actionAddressBookSetSound = \
- self.ui.addressBookContextMenuToolbar.addAction(
+ self.addressBookContextMenuToolbar.addAction(
_translate("MainWindow", "Set notification sound..."),
self.on_action_AddressBookSetSound)
- self.actionAddressBookNew = self.ui.addressBookContextMenuToolbar.addAction(
+ self.actionAddressBookNew = self.addressBookContextMenuToolbar.addAction(
_translate(
"MainWindow", "Add New Address"), self.on_action_AddressBookNew)
- self.actionAddressBookDelete = self.ui.addressBookContextMenuToolbar.addAction(
+ self.actionAddressBookDelete = self.addressBookContextMenuToolbar.addAction(
_translate(
"MainWindow", "Delete"), self.on_action_AddressBookDelete)
- self.ui.tableWidgetAddressBook.setContextMenuPolicy(
+ self.tableWidgetAddressBook.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
+ self.connect(self.tableWidgetAddressBook, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuAddressBook)
def init_subscriptions_popup_menu(self, connectSignal=True):
# Actions
- self.actionsubscriptionsNew = self.ui.subscriptionsContextMenuToolbar.addAction(
+ self.actionsubscriptionsNew = self.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "New"), self.on_action_SubscriptionsNew)
- self.actionsubscriptionsDelete = self.ui.subscriptionsContextMenuToolbar.addAction(
+ self.actionsubscriptionsDelete = self.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Delete"),
self.on_action_SubscriptionsDelete)
- self.actionsubscriptionsClipboard = self.ui.subscriptionsContextMenuToolbar.addAction(
+ self.actionsubscriptionsClipboard = self.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Copy address to clipboard"),
self.on_action_SubscriptionsClipboard)
- self.actionsubscriptionsEnable = self.ui.subscriptionsContextMenuToolbar.addAction(
+ self.actionsubscriptionsEnable = self.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Enable"),
self.on_action_SubscriptionsEnable)
- self.actionsubscriptionsDisable = self.ui.subscriptionsContextMenuToolbar.addAction(
+ self.actionsubscriptionsDisable = self.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Disable"),
self.on_action_SubscriptionsDisable)
- self.actionsubscriptionsSetAvatar = self.ui.subscriptionsContextMenuToolbar.addAction(
+ self.actionsubscriptionsSetAvatar = self.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Set avatar..."),
self.on_action_TreeWidgetSetAvatar)
- self.actionsubscriptionsSend = self.ui.addressContextMenuToolbar.addAction(
+ self.actionsubscriptionsSend = self.addressContextMenuToolbar.addAction(
_translate("MainWindow", "Send message to this address"),
self.on_action_Send)
- self.ui.treeWidgetSubscriptions.setContextMenuPolicy(
+ self.treeWidgetSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
+ self.connect(self.treeWidgetSubscriptions, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuSubscriptions)
def init_sent_popup_menu(self, connectSignal=True):
# Actions
- self.actionTrashSentMessage = self.ui.sentContextMenuToolbar.addAction(
+ self.actionTrashSentMessage = self.sentContextMenuToolbar.addAction(
_translate(
"MainWindow", "Move to Trash"), self.on_action_SentTrash)
- self.actionSentClipboard = self.ui.sentContextMenuToolbar.addAction(
+ self.actionSentClipboard = self.sentContextMenuToolbar.addAction(
_translate(
"MainWindow", "Copy destination address to clipboard"),
self.on_action_SentClipboard)
- self.actionForceSend = self.ui.sentContextMenuToolbar.addAction(
+ self.actionForceSend = self.sentContextMenuToolbar.addAction(
_translate(
"MainWindow", "Force send"), self.on_action_ForceSend)
- self.actionSentReply = self.ui.sentContextMenuToolbar.addAction(
+ self.actionSentReply = self.sentContextMenuToolbar.addAction(
_translate("MainWindow", "Send update"),
self.on_action_SentReply)
# self.popMenuSent = QtGui.QMenu( self )
@@ -416,7 +416,7 @@ class MyForm(settingsmixin.SMainWindow):
# self.popMenuSent.addAction( self.actionTrashSentMessage )
def rerenderTabTreeSubscriptions(self):
- treeWidget = self.ui.treeWidgetSubscriptions
+ treeWidget = self.treeWidgetSubscriptions
folders = Ui_FolderWidget.folderWeight.keys()
folders.remove("new")
@@ -500,9 +500,9 @@ class MyForm(settingsmixin.SMainWindow):
def rerenderTabTree(self, tab):
if tab == 'messages':
- treeWidget = self.ui.treeWidgetYourIdentities
+ treeWidget = self.treeWidgetYourIdentities
elif tab == 'chan':
- treeWidget = self.ui.treeWidgetChans
+ treeWidget = self.treeWidgetChans
folders = Ui_FolderWidget.folderWeight.keys()
# sort ascending when creating
@@ -521,10 +521,10 @@ class MyForm(settingsmixin.SMainWindow):
isMaillinglist = BMConfigParser().safeGetBoolean(
toAddress, 'mailinglist')
- if treeWidget == self.ui.treeWidgetYourIdentities:
+ if treeWidget == self.treeWidgetYourIdentities:
if isChan:
continue
- elif treeWidget == self.ui.treeWidgetChans:
+ elif treeWidget == self.treeWidgetChans:
if not isChan:
continue
@@ -542,7 +542,7 @@ class MyForm(settingsmixin.SMainWindow):
total += cnt
if toaddress in db and folder in db[toaddress]:
db[toaddress][folder] = cnt
- if treeWidget == self.ui.treeWidgetYourIdentities:
+ if treeWidget == self.treeWidgetYourIdentities:
db[None] = {}
db[None]["inbox"] = total
db[None]["new"] = total
@@ -614,9 +614,7 @@ class MyForm(settingsmixin.SMainWindow):
treeWidget.setSortingEnabled(True)
def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- self.ui = Ui_MainWindow()
- self.ui.setupUi(self)
+ super(MainWindow, self).__init__(parent)
self.qmytranslator = self.qsystranslator = None
self.indicatorUpdate = None
@@ -666,7 +664,7 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderTabTreeMessages()
# Set welcome message
- self.ui.textEditInboxMessage.setText(_translate("MainWindow", """
+ self.textEditInboxMessage.setText(_translate("MainWindow", """
Welcome to easy and secure Bitmessage
* send messages to other people
* send broadcast messages like twitter or
@@ -680,49 +678,49 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderSubscriptions()
# Initialize the inbox search
- QtCore.QObject.connect(self.ui.inboxSearchLineEdit, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.inboxSearchLineEdit, QtCore.SIGNAL(
"returnPressed()"), self.inboxSearchLineEditReturnPressed)
- QtCore.QObject.connect(self.ui.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
"returnPressed()"), self.inboxSearchLineEditReturnPressed)
- QtCore.QObject.connect(self.ui.inboxSearchLineEditChans, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.inboxSearchLineEditChans, QtCore.SIGNAL(
"returnPressed()"), self.inboxSearchLineEditReturnPressed)
- QtCore.QObject.connect(self.ui.inboxSearchLineEdit, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.inboxSearchLineEdit, QtCore.SIGNAL(
"textChanged(QString)"), self.inboxSearchLineEditUpdated)
- QtCore.QObject.connect(self.ui.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
"textChanged(QString)"), self.inboxSearchLineEditUpdated)
- QtCore.QObject.connect(self.ui.inboxSearchLineEditChans, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.inboxSearchLineEditChans, QtCore.SIGNAL(
"textChanged(QString)"), self.inboxSearchLineEditUpdated)
# Initialize addressbook
- QtCore.QObject.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.tableWidgetAddressBook, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), 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)
+ QtCore.QObject.connect(self.lineEditTo, QtCore.SIGNAL(
+ "cursorPositionChanged(int, int)"), self.lineEditTo.completer().onCursorPositionChanged)
# show messages from message list
- QtCore.QObject.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.tableWidgetInbox, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
- QtCore.QObject.connect(self.ui.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
- QtCore.QObject.connect(self.ui.tableWidgetInboxChans, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.tableWidgetInboxChans, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
# tree address lists
- QtCore.QObject.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.treeWidgetYourIdentities, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetItemClicked)
- QtCore.QObject.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.treeWidgetYourIdentities, QtCore.SIGNAL(
"itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
- QtCore.QObject.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.treeWidgetSubscriptions, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetItemClicked)
- QtCore.QObject.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.treeWidgetSubscriptions, QtCore.SIGNAL(
"itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
- QtCore.QObject.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.treeWidgetChans, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetItemClicked)
- QtCore.QObject.connect(self.ui.treeWidgetChans, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.treeWidgetChans, QtCore.SIGNAL(
"itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
QtCore.QObject.connect(
- self.ui.tabWidget, QtCore.SIGNAL("currentChanged(int)"),
+ self.tabWidget, QtCore.SIGNAL("currentChanged(int)"),
self.tabWidgetCurrentChanged
)
@@ -744,11 +742,11 @@ class MyForm(settingsmixin.SMainWindow):
# Set the icon sizes for the identicons
identicon_size = 3*7
- self.ui.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.ui.treeWidgetChans.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.ui.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.ui.treeWidgetSubscriptions.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.ui.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
+ self.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size))
+ self.treeWidgetChans.setIconSize(QtCore.QSize(identicon_size, identicon_size))
+ self.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size))
+ self.treeWidgetSubscriptions.setIconSize(QtCore.QSize(identicon_size, identicon_size))
+ self.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.UISignalThread = UISignaler.get()
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
@@ -784,22 +782,22 @@ class MyForm(settingsmixin.SMainWindow):
self.UISignalThread.start()
# Key press in tree view
- self.ui.treeWidgetYourIdentities.keyPressEvent = self.treeWidgetKeyPressEvent
- self.ui.treeWidgetSubscriptions.keyPressEvent = self.treeWidgetKeyPressEvent
- self.ui.treeWidgetChans.keyPressEvent = self.treeWidgetKeyPressEvent
+ self.treeWidgetYourIdentities.keyPressEvent = self.treeWidgetKeyPressEvent
+ self.treeWidgetSubscriptions.keyPressEvent = self.treeWidgetKeyPressEvent
+ self.treeWidgetChans.keyPressEvent = self.treeWidgetKeyPressEvent
# Key press in addressbook
- self.ui.tableWidgetAddressBook.keyPressEvent = self.addressbookKeyPressEvent
+ self.tableWidgetAddressBook.keyPressEvent = self.addressbookKeyPressEvent
# Key press in messagelist
- self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetKeyPressEvent
- self.ui.tableWidgetInboxSubscriptions.keyPressEvent = self.tableWidgetKeyPressEvent
- self.ui.tableWidgetInboxChans.keyPressEvent = self.tableWidgetKeyPressEvent
+ self.tableWidgetInbox.keyPressEvent = self.tableWidgetKeyPressEvent
+ self.tableWidgetInboxSubscriptions.keyPressEvent = self.tableWidgetKeyPressEvent
+ self.tableWidgetInboxChans.keyPressEvent = self.tableWidgetKeyPressEvent
# Key press in messageview
- self.ui.textEditInboxMessage.keyPressEvent = self.textEditKeyPressEvent
- self.ui.textEditInboxMessageSubscriptions.keyPressEvent = self.textEditKeyPressEvent
- self.ui.textEditInboxMessageChans.keyPressEvent = self.textEditKeyPressEvent
+ self.textEditInboxMessage.keyPressEvent = self.textEditKeyPressEvent
+ self.textEditInboxMessageSubscriptions.keyPressEvent = self.textEditKeyPressEvent
+ self.textEditInboxMessageChans.keyPressEvent = self.textEditKeyPressEvent
# Below this point, it would be good if all of the necessary global data
# structures were initialized.
@@ -813,10 +811,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.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199))
self.updateHumanFriendlyTTLDescription(TTL)
- QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL(
+ QtCore.QObject.connect(self.horizontalSliderTTL, QtCore.SIGNAL(
"valueChanged(int)"), self.updateTTL)
self.initSettings()
@@ -826,7 +824,7 @@ class MyForm(settingsmixin.SMainWindow):
self.notifierInit()
self.updateStartOnLogon()
- self.ui.updateNetworkSwitchMenuLabel()
+ self.updateNetworkSwitchMenuLabel()
self._firstrun = BMConfigParser().safeGetBoolean(
'bitmessagesettings', 'dontconnect')
@@ -878,7 +876,7 @@ class MyForm(settingsmixin.SMainWindow):
stylesheet = ""
if numberOfHours < 48:
- self.ui.labelHumanFriendlyTTLDescription.setText(
+ self.labelHumanFriendlyTTLDescription.setText(
_translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfHours) +
", " +
_translate("MainWindow", "not recommended for chans", None, QtCore.QCoreApplication.CodecForTr)
@@ -887,10 +885,13 @@ class MyForm(settingsmixin.SMainWindow):
font.setBold(True)
else:
numberOfDays = int(round(TTL / (24*60*60)))
- self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%n day(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfDays))
+ self.labelHumanFriendlyTTLDescription.setText(
+ _translate(
+ "MainWindow", "%n day(s)",
+ None, QtCore.QCoreApplication.CodecForTr, numberOfDays))
font.setBold(False)
- self.ui.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet)
- self.ui.labelHumanFriendlyTTLDescription.setFont(font)
+ self.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet)
+ self.labelHumanFriendlyTTLDescription.setFont(font)
# Show or hide the application window after clicking an item within the
# tray icon or, on Windows, the try icon itself.
@@ -942,38 +943,38 @@ class MyForm(settingsmixin.SMainWindow):
def appIndicatorInbox(self, item=None):
self.appIndicatorShow()
# select inbox
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.inbox)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.inbox)
)
- self.ui.treeWidgetYourIdentities.setCurrentItem(
- self.ui.treeWidgetYourIdentities.topLevelItem(0).child(0)
+ self.treeWidgetYourIdentities.setCurrentItem(
+ self.treeWidgetYourIdentities.topLevelItem(0).child(0)
)
if item:
- self.ui.tableWidgetInbox.setCurrentItem(item)
+ self.tableWidgetInbox.setCurrentItem(item)
self.tableWidgetInboxItemClicked()
else:
- self.ui.tableWidgetInbox.setCurrentCell(0, 0)
+ self.tableWidgetInbox.setCurrentCell(0, 0)
# Show the program window and select send tab
def appIndicatorSend(self):
self.appIndicatorShow()
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
# Show the program window and select subscriptions tab
def appIndicatorSubscribe(self):
self.appIndicatorShow()
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.subscriptions)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.subscriptions)
)
# Show the program window and select channels tab
def appIndicatorChannel(self):
self.appIndicatorShow()
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.chans)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.chans)
)
def updateUnreadStatus(self, widget, row, msgid, unread=True):
@@ -985,7 +986,7 @@ class MyForm(settingsmixin.SMainWindow):
if status != unread:
return
- widgets = [self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans]
+ widgets = [self.tableWidgetInbox, self.tableWidgetInboxChans]
rrow = None
try:
widgets.remove(widget)
@@ -1027,14 +1028,11 @@ class MyForm(settingsmixin.SMainWindow):
totalUnread[fld] += count
except KeyError:
totalUnread[fld] = count
- if widget in (
- self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans):
- widgets = (self.ui.treeWidgetYourIdentities,)
- else:
- widgets = (
- self.ui.treeWidgetYourIdentities,
- self.ui.treeWidgetSubscriptions, self.ui.treeWidgetChans
- )
+ widgets = [self.treeWidgetYourIdentities]
+ if widget not in (
+ self.treeWidgetSubscriptions, self.treeWidgetChans):
+ widgets += [
+ self.treeWidgetSubscriptions, self.treeWidgetChans]
queryReturn = sqlQuery(
'SELECT fromaddress, folder, COUNT(msgid) AS cnt'
' FROM inbox WHERE read = 0 AND toaddress = ?'
@@ -1201,11 +1199,11 @@ class MyForm(settingsmixin.SMainWindow):
# Load Sent items from database
def loadSent(self, tableWidget, account, where="", what=""):
- if tableWidget == self.ui.tableWidgetInboxSubscriptions:
+ if tableWidget == self.tableWidgetInboxSubscriptions:
tableWidget.setColumnHidden(0, True)
tableWidget.setColumnHidden(1, False)
xAddress = 'toaddress'
- elif tableWidget == self.ui.tableWidgetInboxChans:
+ elif tableWidget == self.tableWidgetInboxChans:
tableWidget.setColumnHidden(0, False)
tableWidget.setColumnHidden(1, True)
xAddress = 'both'
@@ -1240,7 +1238,7 @@ class MyForm(settingsmixin.SMainWindow):
self.loadSent(tableWidget, account, where, what)
return
- if tableWidget == self.ui.tableWidgetInboxSubscriptions:
+ if tableWidget == self.tableWidgetInboxSubscriptions:
xAddress = "fromaddress"
if not what:
where = _translate("MainWindow", "To")
@@ -1484,7 +1482,7 @@ class MyForm(settingsmixin.SMainWindow):
self.on_action_AddressBookDelete()
else:
return QtGui.QTableWidget.keyPressEvent(
- self.ui.tableWidgetAddressBook, event)
+ self.tableWidgetAddressBook, event)
# inbox / sent
def tableWidgetKeyPressEvent(self, event):
@@ -1517,7 +1515,7 @@ class MyForm(settingsmixin.SMainWindow):
messagelist.selectRow(currentRow - 1)
event.ignore()
elif event.key() == QtCore.Qt.Key_R:
- if messagelist == self.ui.tableWidgetInboxChans:
+ if messagelist == self.tableWidgetInboxChans:
self.on_action_InboxReplyChan()
else:
self.on_action_InboxReply()
@@ -1526,13 +1524,13 @@ class MyForm(settingsmixin.SMainWindow):
currentAddress = self.getCurrentAccount()
if currentAddress:
self.setSendFromComboBox(currentAddress)
- self.ui.tabWidgetSend.setCurrentIndex(
- self.ui.tabWidgetSend.indexOf(self.ui.sendDirect)
+ self.tabWidgetSend.setCurrentIndex(
+ self.tabWidgetSend.indexOf(self.sendDirect)
)
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
- self.ui.lineEditTo.setFocus()
+ self.lineEditTo.setFocus()
event.ignore()
elif event.key() == QtCore.Qt.Key_F:
try:
@@ -1581,12 +1579,12 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderTabTreeMessages()
self.rerenderTabTreeSubscriptions()
self.rerenderTabTreeChans()
- if self.getCurrentFolder(self.ui.treeWidgetYourIdentities) == "trash":
- self.loadMessagelist(self.ui.tableWidgetInbox, self.getCurrentAccount(self.ui.treeWidgetYourIdentities), "trash")
- elif self.getCurrentFolder(self.ui.treeWidgetSubscriptions) == "trash":
- self.loadMessagelist(self.ui.tableWidgetInboxSubscriptions, self.getCurrentAccount(self.ui.treeWidgetSubscriptions), "trash")
- elif self.getCurrentFolder(self.ui.treeWidgetChans) == "trash":
- self.loadMessagelist(self.ui.tableWidgetInboxChans, self.getCurrentAccount(self.ui.treeWidgetChans), "trash")
+ if self.getCurrentFolder(self.treeWidgetYourIdentities) == "trash":
+ self.loadMessagelist(self.tableWidgetInbox, self.getCurrentAccount(self.treeWidgetYourIdentities), "trash")
+ elif self.getCurrentFolder(self.treeWidgetSubscriptions) == "trash":
+ self.loadMessagelist(self.tableWidgetInboxSubscriptions, self.getCurrentAccount(self.treeWidgetSubscriptions), "trash")
+ elif self.getCurrentFolder(self.treeWidgetChans) == "trash":
+ self.loadMessagelist(self.tableWidgetInboxChans, self.getCurrentAccount(self.treeWidgetChans), "trash")
# menu button 'regenerate deterministic addresses'
def click_actionRegenerateDeterministicAddresses(self):
@@ -1632,8 +1630,8 @@ class MyForm(settingsmixin.SMainWindow):
dialog.lineEditPassphrase.text().toUtf8(),
dialog.checkBoxEighteenByteRipe.isChecked()
))
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.chans)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.chans)
)
# opens 'join chan' dialog
@@ -1644,7 +1642,7 @@ class MyForm(settingsmixin.SMainWindow):
dialog = dialogs.ConnectDialog(self)
if dialog.exec_():
if dialog.radioButtonConnectNow.isChecked():
- self.ui.updateNetworkSwitchMenuLabel(False)
+ self.updateNetworkSwitchMenuLabel(False)
BMConfigParser().remove_option(
'bitmessagesettings', 'dontconnect')
BMConfigParser().save()
@@ -1662,14 +1660,14 @@ class MyForm(settingsmixin.SMainWindow):
def changeEvent(self, event):
if event.type() == QtCore.QEvent.LanguageChange:
- self.ui.retranslateUi(self)
+ self.retranslateUi(self)
self.init_inbox_popup_menu(False)
self.init_identities_popup_menu(False)
self.init_chan_popup_menu(False)
self.init_addressbook_popup_menu(False)
self.init_subscriptions_popup_menu(False)
self.init_sent_popup_menu(False)
- self.ui.blackwhitelist.init_blacklist_popup_menu(False)
+ self.blackwhitelist.init_blacklist_popup_menu(False)
if event.type() == QtCore.QEvent.WindowStateChange:
if self.windowState() & QtCore.Qt.WindowMinimized:
if BMConfigParser().getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform:
@@ -1815,16 +1813,16 @@ class MyForm(settingsmixin.SMainWindow):
def updateSentItemStatusByToAddress(self, toAddress, textToDisplay):
for sent in (
- self.ui.tableWidgetInbox,
- self.ui.tableWidgetInboxSubscriptions,
- self.ui.tableWidgetInboxChans
+ self.tableWidgetInbox,
+ self.tableWidgetInboxSubscriptions,
+ self.tableWidgetInboxChans
):
treeWidget = self.widgetConvert(sent)
if self.getCurrentFolder(treeWidget) != "sent":
continue
if treeWidget in (
- self.ui.treeWidgetSubscriptions,
- self.ui.treeWidgetChans
+ self.treeWidgetSubscriptions,
+ self.treeWidgetChans
) and self.getCurrentAccount(treeWidget) != toAddress:
continue
@@ -1846,9 +1844,9 @@ class MyForm(settingsmixin.SMainWindow):
if type(ackdata) is str:
ackdata = QtCore.QByteArray(ackdata)
for sent in (
- self.ui.tableWidgetInbox,
- self.ui.tableWidgetInboxSubscriptions,
- self.ui.tableWidgetInboxChans
+ self.tableWidgetInbox,
+ self.tableWidgetInboxSubscriptions,
+ self.tableWidgetInboxChans
):
treeWidget = self.widgetConvert(sent)
if self.getCurrentFolder(treeWidget) != "sent":
@@ -1873,9 +1871,9 @@ class MyForm(settingsmixin.SMainWindow):
def removeInboxRowByMsgid(self, msgid):
# msgid and inventoryHash are the same thing
for inbox in (
- self.ui.tableWidgetInbox,
- self.ui.tableWidgetInboxSubscriptions,
- self.ui.tableWidgetInboxChans
+ self.tableWidgetInbox,
+ self.tableWidgetInboxSubscriptions,
+ self.tableWidgetInboxChans
):
i = None
for i in range(inbox.rowCount()):
@@ -1908,32 +1906,32 @@ class MyForm(settingsmixin.SMainWindow):
os._exit(0)
def rerenderMessagelistFromLabels(self):
- for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
+ for messagelist in (self.tableWidgetInbox, self.tableWidgetInboxChans, self.tableWidgetInboxSubscriptions):
for i in range(messagelist.rowCount()):
messagelist.item(i, 1).setLabel()
def rerenderMessagelistToLabels(self):
- for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
+ for messagelist in (self.tableWidgetInbox, self.tableWidgetInboxChans, self.tableWidgetInboxSubscriptions):
for i in range(messagelist.rowCount()):
messagelist.item(i, 0).setLabel()
def rerenderAddressBook(self):
def addRow (address, label, type):
- self.ui.tableWidgetAddressBook.insertRow(0)
+ self.tableWidgetAddressBook.insertRow(0)
newItem = Ui_AddressBookWidgetItemLabel(address, unicode(label, 'utf-8'), type)
- self.ui.tableWidgetAddressBook.setItem(0, 0, newItem)
+ self.tableWidgetAddressBook.setItem(0, 0, newItem)
newItem = Ui_AddressBookWidgetItemAddress(address, unicode(label, 'utf-8'), type)
- self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
+ self.tableWidgetAddressBook.setItem(0, 1, newItem)
oldRows = {}
- for i in range(self.ui.tableWidgetAddressBook.rowCount()):
- item = self.ui.tableWidgetAddressBook.item(i, 0)
+ for i in range(self.tableWidgetAddressBook.rowCount()):
+ item = self.tableWidgetAddressBook.item(i, 0)
oldRows[item.address] = [item.label, item.type, i]
- if self.ui.tableWidgetAddressBook.rowCount() == 0:
- self.ui.tableWidgetAddressBook.horizontalHeader().setSortIndicator(0, QtCore.Qt.AscendingOrder)
- if self.ui.tableWidgetAddressBook.isSortingEnabled():
- self.ui.tableWidgetAddressBook.setSortingEnabled(False)
+ if self.tableWidgetAddressBook.rowCount() == 0:
+ self.tableWidgetAddressBook.horizontalHeader().setSortIndicator(0, QtCore.Qt.AscendingOrder)
+ if self.tableWidgetAddressBook.isSortingEnabled():
+ self.tableWidgetAddressBook.setSortingEnabled(False)
newRows = {}
# subscriptions
@@ -1961,16 +1959,16 @@ class MyForm(settingsmixin.SMainWindow):
completerList.append(
newRows.pop(address)[0] + " <" + address + ">")
except KeyError:
- self.ui.tableWidgetAddressBook.removeRow(oldRows[address][2])
+ self.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 + ">")
# sort
- self.ui.tableWidgetAddressBook.sortByColumn(
+ self.tableWidgetAddressBook.sortByColumn(
0, QtCore.Qt.AscendingOrder)
- self.ui.tableWidgetAddressBook.setSortingEnabled(True)
- self.ui.lineEditTo.completer().model().setStringList(completerList)
+ self.tableWidgetAddressBook.setSortingEnabled(True)
+ self.lineEditTo.completer().model().setStringList(completerList)
def rerenderSubscriptions(self):
self.rerenderTabTreeSubscriptions()
@@ -1983,36 +1981,36 @@ class MyForm(settingsmixin.SMainWindow):
more work your computer must do to send the message. A Time-To-Live of four or five days is often appropriate."""), QtGui.QMessageBox.Ok)
def click_pushButtonClear(self):
- self.ui.lineEditSubject.setText("")
- self.ui.lineEditTo.setText("")
- self.ui.textEditMessage.reset()
- self.ui.comboBoxSendFrom.setCurrentIndex(0)
+ self.lineEditSubject.setText("")
+ self.lineEditTo.setText("")
+ self.textEditMessage.setText("")
+ self.comboBoxSendFrom.setCurrentIndex(0)
def click_pushButtonSend(self):
encoding = 3 if QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier else 2
self.statusbar.clearMessage()
- if self.ui.tabWidgetSend.currentIndex() == \
- self.ui.tabWidgetSend.indexOf(self.ui.sendDirect):
+ if self.tabWidgetSend.currentIndex() == \
+ self.tabWidgetSend.indexOf(self.sendDirect):
# message to specific people
sendMessageToPeople = True
- fromAddress = str(self.ui.comboBoxSendFrom.itemData(
- self.ui.comboBoxSendFrom.currentIndex(),
+ fromAddress = str(self.comboBoxSendFrom.itemData(
+ self.comboBoxSendFrom.currentIndex(),
QtCore.Qt.UserRole).toString())
- toAddresses = str(self.ui.lineEditTo.text().toUtf8())
- subject = str(self.ui.lineEditSubject.text().toUtf8())
+ toAddresses = str(self.lineEditTo.text().toUtf8())
+ subject = str(self.lineEditSubject.text().toUtf8())
message = str(
- self.ui.textEditMessage.document().toPlainText().toUtf8())
+ self.textEditMessage.document().toPlainText().toUtf8())
else:
# broadcast message
sendMessageToPeople = False
- fromAddress = str(self.ui.comboBoxSendFromBroadcast.itemData(
- self.ui.comboBoxSendFromBroadcast.currentIndex(),
+ fromAddress = str(self.comboBoxSendFromBroadcast.itemData(
+ self.comboBoxSendFromBroadcast.currentIndex(),
QtCore.Qt.UserRole).toString())
- subject = str(self.ui.lineEditSubjectBroadcast.text().toUtf8())
+ subject = str(self.lineEditSubjectBroadcast.text().toUtf8())
message = str(
- self.ui.textEditMessageBroadcast.document().toPlainText().toUtf8())
+ self.textEditMessageBroadcast.document().toPlainText().toUtf8())
"""
The whole network message must fit in 2^18 bytes.
Let's assume 500 bytes of overhead. If someone wants to get that
@@ -2182,11 +2180,11 @@ class MyForm(settingsmixin.SMainWindow):
self.click_pushButtonClear()
if self.replyFromTab is not None:
- self.ui.tabWidget.setCurrentIndex(self.replyFromTab)
+ self.tabWidget.setCurrentIndex(self.replyFromTab)
self.replyFromTab = None
self.updateStatusBar(_translate(
"MainWindow", "Message queued."))
- # self.ui.tableWidgetInbox.setCurrentCell(0, 0)
+ # self.tableWidgetInbox.setCurrentCell(0, 0)
else:
self.updateStatusBar(_translate(
"MainWindow", "Your \'To\' field is empty."))
@@ -2217,18 +2215,18 @@ class MyForm(settingsmixin.SMainWindow):
queues.workerQueue.put(('sendbroadcast', ''))
- self.ui.comboBoxSendFromBroadcast.setCurrentIndex(0)
- self.ui.lineEditSubjectBroadcast.setText('')
- self.ui.textEditMessageBroadcast.reset()
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.comboBoxSendFromBroadcast.setCurrentIndex(0)
+ self.lineEditSubjectBroadcast.setText('')
+ self.textEditMessageBroadcast.reset()
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
- self.ui.tableWidgetInboxSubscriptions.setCurrentCell(0, 0)
+ self.tableWidgetInboxSubscriptions.setCurrentCell(0, 0)
self.updateStatusBar(_translate(
"MainWindow", "Broadcast queued."))
def click_pushButtonLoadFromAddressBook(self):
- self.ui.tabWidget.setCurrentIndex(5)
+ self.tabWidget.setCurrentIndex(5)
for i in range(4):
time.sleep(0.1)
self.statusbar.clearMessage()
@@ -2247,22 +2245,22 @@ class MyForm(settingsmixin.SMainWindow):
_translate("MainWindow", "Error: %1").arg(err))
else:
identities[-1] = addr
- self.ui.lineEditTo.setText("; ".join(identities))
+ self.lineEditTo.setText("; ".join(identities))
self.updateStatusBar(_translate(
"MainWindow", "Fetched address from namecoin identity."))
def setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(self, address):
# If this is a chan then don't let people broadcast because no one
# should subscribe to chan addresses.
- self.ui.tabWidgetSend.setCurrentIndex(
- self.ui.tabWidgetSend.indexOf(
- self.ui.sendBroadcast
+ self.tabWidgetSend.setCurrentIndex(
+ self.tabWidgetSend.indexOf(
+ self.sendBroadcast
if BMConfigParser().safeGetBoolean(str(address), 'mailinglist')
- else self.ui.sendDirect
+ else self.sendDirect
))
def rerenderComboBoxSendFrom(self):
- self.ui.comboBoxSendFrom.clear()
+ self.comboBoxSendFrom.clear()
for addressInKeysFile in getSortedAccounts():
isEnabled = BMConfigParser().getboolean(
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
@@ -2271,22 +2269,22 @@ class MyForm(settingsmixin.SMainWindow):
label = unicode(BMConfigParser().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)
- for i in range(self.ui.comboBoxSendFrom.count()):
- address = str(self.ui.comboBoxSendFrom.itemData(
+ self.comboBoxSendFrom.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
+# self.comboBoxSendFrom.model().sort(1, Qt.AscendingOrder)
+ for i in range(self.comboBoxSendFrom.count()):
+ address = str(self.comboBoxSendFrom.itemData(
i, QtCore.Qt.UserRole).toString())
- self.ui.comboBoxSendFrom.setItemData(
+ self.comboBoxSendFrom.setItemData(
i, AccountColor(address).accountColor(),
QtCore.Qt.ForegroundRole)
- self.ui.comboBoxSendFrom.insertItem(0, '', '')
- if(self.ui.comboBoxSendFrom.count() == 2):
- self.ui.comboBoxSendFrom.setCurrentIndex(1)
+ self.comboBoxSendFrom.insertItem(0, '', '')
+ if(self.comboBoxSendFrom.count() == 2):
+ self.comboBoxSendFrom.setCurrentIndex(1)
else:
- self.ui.comboBoxSendFrom.setCurrentIndex(0)
+ self.comboBoxSendFrom.setCurrentIndex(0)
def rerenderComboBoxSendFromBroadcast(self):
- self.ui.comboBoxSendFromBroadcast.clear()
+ self.comboBoxSendFromBroadcast.clear()
for addressInKeysFile in getSortedAccounts():
isEnabled = BMConfigParser().getboolean(
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
@@ -2295,18 +2293,18 @@ class MyForm(settingsmixin.SMainWindow):
label = unicode(BMConfigParser().get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
if label == "":
label = addressInKeysFile
- self.ui.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
- for i in range(self.ui.comboBoxSendFromBroadcast.count()):
- address = str(self.ui.comboBoxSendFromBroadcast.itemData(
+ self.comboBoxSendFromBroadcast.addItem(avatarize(addressInKeysFile), label, addressInKeysFile)
+ for i in range(self.comboBoxSendFromBroadcast.count()):
+ address = str(self.comboBoxSendFromBroadcast.itemData(
i, QtCore.Qt.UserRole).toString())
- self.ui.comboBoxSendFromBroadcast.setItemData(
+ self.comboBoxSendFromBroadcast.setItemData(
i, AccountColor(address).accountColor(),
QtCore.Qt.ForegroundRole)
- self.ui.comboBoxSendFromBroadcast.insertItem(0, '', '')
- if(self.ui.comboBoxSendFromBroadcast.count() == 2):
- self.ui.comboBoxSendFromBroadcast.setCurrentIndex(1)
+ self.comboBoxSendFromBroadcast.insertItem(0, '', '')
+ if(self.comboBoxSendFromBroadcast.count() == 2):
+ self.comboBoxSendFromBroadcast.setCurrentIndex(1)
else:
- self.ui.comboBoxSendFromBroadcast.setCurrentIndex(0)
+ self.comboBoxSendFromBroadcast.setCurrentIndex(0)
# This function is called by the processmsg function when that function
# receives a message to an address that is acting as a
@@ -2319,9 +2317,9 @@ class MyForm(settingsmixin.SMainWindow):
acct.parseMessage(toAddress, fromAddress, subject, message)
tab = -1
for sent in (
- self.ui.tableWidgetInbox,
- self.ui.tableWidgetInboxSubscriptions,
- self.ui.tableWidgetInboxChans
+ self.tableWidgetInbox,
+ self.tableWidgetInboxSubscriptions,
+ self.tableWidgetInboxChans
):
tab += 1
if tab == 1:
@@ -2329,13 +2327,15 @@ class MyForm(settingsmixin.SMainWindow):
treeWidget = self.widgetConvert(sent)
if self.getCurrentFolder(treeWidget) != "sent":
continue
- if treeWidget == self.ui.treeWidgetYourIdentities \
- and self.getCurrentAccount(treeWidget) not in (
- fromAddress, None, False):
+ if (
+ treeWidget == self.treeWidgetYourIdentities
+ and self.getCurrentAccount(treeWidget)
+ not in (fromAddress, None, False)
+ ):
continue
elif treeWidget in (
- self.ui.treeWidgetSubscriptions,
- self.ui.treeWidgetChans
+ self.treeWidgetSubscriptions,
+ self.treeWidgetChans
) and self.getCurrentAccount(treeWidget) != toAddress:
continue
elif not helper_search.check_match(
@@ -2361,9 +2361,9 @@ class MyForm(settingsmixin.SMainWindow):
ret = treeWidget = None
tab = -1
for treeWidget in (
- self.ui.treeWidgetYourIdentities,
- self.ui.treeWidgetSubscriptions,
- self.ui.treeWidgetChans
+ self.treeWidgetYourIdentities,
+ self.treeWidgetSubscriptions,
+ self.treeWidgetChans
):
tab += 1
if tab == 1:
@@ -2381,7 +2381,7 @@ class MyForm(settingsmixin.SMainWindow):
if ((tableWidget == inbox
and current_account == acct.address
and current_folder in ("inbox", None))
- or (treeWidget == self.ui.treeWidgetYourIdentities
+ or (treeWidget == self.treeWidgetYourIdentities
and current_account is None
and current_folder in ("inbox", "new", None))):
ret = self.addMessageListItemInbox(
@@ -2515,9 +2515,9 @@ class MyForm(settingsmixin.SMainWindow):
account_item = self.getCurrentItem()
if not account_item:
return
- self.ui.lineEditTo.setText(account_item.accountString())
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.lineEditTo.setText(account_item.accountString())
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
def on_action_SpecialAddressBehaviorDialog(self):
@@ -2535,24 +2535,24 @@ class MyForm(settingsmixin.SMainWindow):
# Only settings remain here
acct.settings()
- for i in range(self.ui.comboBoxSendFrom.count()):
- if str(self.ui.comboBoxSendFrom.itemData(i).toPyObject()) \
+ for i in range(self.comboBoxSendFrom.count()):
+ if str(self.comboBoxSendFrom.itemData(i).toPyObject()) \
== acct.fromAddress:
- self.ui.comboBoxSendFrom.setCurrentIndex(i)
+ self.comboBoxSendFrom.setCurrentIndex(i)
break
else:
- self.ui.comboBoxSendFrom.setCurrentIndex(0)
+ self.comboBoxSendFrom.setCurrentIndex(0)
- self.ui.lineEditTo.setText(acct.toAddress)
- self.ui.lineEditSubject.setText(acct.subject)
- self.ui.textEditMessage.setText(acct.message)
- self.ui.tabWidgetSend.setCurrentIndex(
- self.ui.tabWidgetSend.indexOf(self.ui.sendDirect)
+ self.lineEditTo.setText(acct.toAddress)
+ self.lineEditSubject.setText(acct.subject)
+ self.textEditMessage.setText(acct.message)
+ self.tabWidgetSend.setCurrentIndex(
+ self.tabWidgetSend.indexOf(self.sendDirect)
)
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
- self.ui.textEditMessage.setFocus()
+ self.textEditMessage.setFocus()
def on_action_MarkAllRead(self):
if QtGui.QMessageBox.question(
@@ -2605,9 +2605,9 @@ class MyForm(settingsmixin.SMainWindow):
BMConfigParser().set(
'bitmessagesettings', 'dontconnect', str(dontconnect_option))
BMConfigParser().save()
- self.ui.updateNetworkSwitchMenuLabel(dontconnect_option)
+ self.updateNetworkSwitchMenuLabel(dontconnect_option)
- self.ui.pushButtonFetchNamecoinID.setHidden(
+ self.pushButtonFetchNamecoinID.setHidden(
dontconnect_option or self.namecoin.test()[0] == 'failed'
)
@@ -2771,7 +2771,7 @@ class MyForm(settingsmixin.SMainWindow):
QtCore.QEventLoop.AllEvents, 1000
)
self.saveSettings()
- for attr, obj in self.ui.__dict__.iteritems():
+ for attr, obj in self.__dict__.iteritems():
if hasattr(obj, "__class__") \
and isinstance(obj, settingsmixin.SettingsMixin):
saveMethod = getattr(obj, "saveSettings", None)
@@ -2899,7 +2899,7 @@ class MyForm(settingsmixin.SMainWindow):
currentInboxRow = messagelist.currentRow()
address = messagelist.item(currentInboxRow, 0).address
for box in (
- self.ui.comboBoxSendFrom, self.ui.comboBoxSendFromBroadcast
+ self.comboBoxSendFrom, self.comboBoxSendFromBroadcast
):
for i in range(box.count()):
if str(box.itemData(i).toPyObject()) == address:
@@ -2925,7 +2925,7 @@ class MyForm(settingsmixin.SMainWindow):
reply_type = self.REPLY_TYPE_SENDER
# save this to return back after reply is done
- self.replyFromTab = self.ui.tabWidget.currentIndex()
+ self.replyFromTab = self.tabWidget.currentIndex()
column_to = 1 if reply_type == self.REPLY_TYPE_UPD else 0
column_from = 0 if reply_type == self.REPLY_TYPE_UPD else 1
@@ -2948,14 +2948,14 @@ class MyForm(settingsmixin.SMainWindow):
tableWidget.item(currentInboxRow, 2).subject,
messageAtCurrentInboxRow)
widget = {
- 'subject': self.ui.lineEditSubject,
- 'from': self.ui.comboBoxSendFrom,
- 'message': self.ui.textEditMessage
+ 'subject': self.lineEditSubject,
+ 'from': self.comboBoxSendFrom,
+ 'message': self.textEditMessage
}
if toAddressAtCurrentInboxRow == str_broadcast_subscribers:
- self.ui.tabWidgetSend.setCurrentIndex(
- self.ui.tabWidgetSend.indexOf(self.ui.sendDirect)
+ self.tabWidgetSend.setCurrentIndex(
+ self.tabWidgetSend.indexOf(self.sendDirect)
)
# toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
elif not BMConfigParser().has_section(toAddressAtCurrentInboxRow):
@@ -2978,24 +2978,24 @@ class MyForm(settingsmixin.SMainWindow):
), QtGui.QMessageBox.Ok)
else:
self.setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(toAddressAtCurrentInboxRow)
- broadcast_tab_index = self.ui.tabWidgetSend.indexOf(
- self.ui.sendBroadcast
+ broadcast_tab_index = self.tabWidgetSend.indexOf(
+ self.sendBroadcast
)
- if self.ui.tabWidgetSend.currentIndex() == broadcast_tab_index:
+ if self.tabWidgetSend.currentIndex() == broadcast_tab_index:
widget = {
- 'subject': self.ui.lineEditSubjectBroadcast,
- 'from': self.ui.comboBoxSendFromBroadcast,
- 'message': self.ui.textEditMessageBroadcast
+ 'subject': self.lineEditSubjectBroadcast,
+ 'from': self.comboBoxSendFromBroadcast,
+ 'message': self.textEditMessageBroadcast
}
- self.ui.tabWidgetSend.setCurrentIndex(broadcast_tab_index)
+ self.tabWidgetSend.setCurrentIndex(broadcast_tab_index)
toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
if fromAddressAtCurrentInboxRow == \
tableWidget.item(currentInboxRow, column_from).label or (
isinstance(acct, GatewayAccount) and
fromAddressAtCurrentInboxRow == acct.relayAddress):
- self.ui.lineEditTo.setText(str(acct.fromAddress))
+ self.lineEditTo.setText(str(acct.fromAddress))
else:
- self.ui.lineEditTo.setText(
+ self.lineEditTo.setText(
tableWidget.item(currentInboxRow, column_from).accountString()
)
@@ -3008,9 +3008,9 @@ class MyForm(settingsmixin.SMainWindow):
' reply to the chan address.')
if toAddressAtCurrentInboxRow == \
tableWidget.item(currentInboxRow, column_to).label:
- self.ui.lineEditTo.setText(str(toAddressAtCurrentInboxRow))
+ self.lineEditTo.setText(str(toAddressAtCurrentInboxRow))
else:
- self.ui.lineEditTo.setText(
+ self.lineEditTo.setText(
tableWidget.item(currentInboxRow, column_to).accountString()
)
@@ -3025,8 +3025,8 @@ class MyForm(settingsmixin.SMainWindow):
else:
widget['subject'].setText(
'Re: ' + tableWidget.item(currentInboxRow, 2).label)
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
widget['message'].setFocus()
@@ -3037,8 +3037,8 @@ class MyForm(settingsmixin.SMainWindow):
currentInboxRow = tableWidget.currentRow()
addressAtCurrentInboxRow = tableWidget.item(
currentInboxRow, 1).data(QtCore.Qt.UserRole)
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
self.click_pushButtonAddAddressBook(
dialogs.AddAddressDialog(self, addressAtCurrentInboxRow))
@@ -3060,7 +3060,7 @@ class MyForm(settingsmixin.SMainWindow):
sqlExecute('''INSERT INTO blacklist VALUES (?,?, ?)''',
label,
addressAtCurrentInboxRow, True)
- self.ui.blackwhitelist.rerenderBlackWhiteList()
+ self.blackwhitelist.rerenderBlackWhiteList()
self.updateStatusBar(_translate(
"MainWindow",
"Entry added to the blacklist. Edit the label to your liking.")
@@ -3076,9 +3076,9 @@ class MyForm(settingsmixin.SMainWindow):
):
if messageLists is None:
messageLists = (
- self.ui.tableWidgetInbox,
- self.ui.tableWidgetInboxChans,
- self.ui.tableWidgetInboxSubscriptions
+ self.tableWidgetInbox,
+ self.tableWidgetInboxChans,
+ self.tableWidgetInboxSubscriptions
)
elif type(messageLists) not in (list, tuple):
messageLists = (messageLists,)
@@ -3206,12 +3206,12 @@ class MyForm(settingsmixin.SMainWindow):
self.updateStatusBar(_translate(
"MainWindow", "Moved items to trash."))
- self.ui.tableWidgetInbox.selectRow(
+ self.tableWidgetInbox.selectRow(
currentRow if currentRow == 0 else currentRow - 1)
def on_action_ForceSend(self):
- currentRow = self.ui.tableWidgetInbox.currentRow()
- addressAtCurrentRow = self.ui.tableWidgetInbox.item(
+ currentRow = self.tableWidgetInbox.currentRow()
+ addressAtCurrentRow = self.tableWidgetInbox.item(
currentRow, 0).data(QtCore.Qt.UserRole)
toRipe = decodeAddress(addressAtCurrentRow)[3]
sqlExecute(
@@ -3225,8 +3225,8 @@ class MyForm(settingsmixin.SMainWindow):
queues.workerQueue.put(('sendmessage', ''))
def on_action_SentClipboard(self):
- currentRow = self.ui.tableWidgetInbox.currentRow()
- addressAtCurrentRow = self.ui.tableWidgetInbox.item(
+ currentRow = self.tableWidgetInbox.currentRow()
+ addressAtCurrentRow = self.tableWidgetInbox.item(
currentRow, 0).data(QtCore.Qt.UserRole)
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
@@ -3236,13 +3236,13 @@ class MyForm(settingsmixin.SMainWindow):
self.click_pushButtonAddAddressBook()
def on_action_AddressBookDelete(self):
- while self.ui.tableWidgetAddressBook.selectedIndexes() != []:
- currentRow = self.ui.tableWidgetAddressBook.selectedIndexes()[
+ while self.tableWidgetAddressBook.selectedIndexes() != []:
+ currentRow = self.tableWidgetAddressBook.selectedIndexes()[
0].row()
- item = self.ui.tableWidgetAddressBook.item(currentRow, 0)
+ item = self.tableWidgetAddressBook.item(currentRow, 0)
sqlExecute(
'DELETE FROM addressbook WHERE address=?', item.address)
- self.ui.tableWidgetAddressBook.removeRow(currentRow)
+ self.tableWidgetAddressBook.removeRow(currentRow)
self.rerenderMessagelistFromLabels()
self.rerenderMessagelistToLabels()
@@ -3264,7 +3264,7 @@ class MyForm(settingsmixin.SMainWindow):
"MainWindow", "No addresses selected."))
addresses_string = unicode(
- self.ui.lineEditTo.text().toUtf8(), 'utf-8')
+ self.lineEditTo.text().toUtf8(), 'utf-8')
for item in selected_items:
address_string = item.accountString()
if not addresses_string:
@@ -3272,10 +3272,10 @@ class MyForm(settingsmixin.SMainWindow):
else:
addresses_string += '; ' + address_string
- self.ui.lineEditTo.setText(addresses_string)
+ self.lineEditTo.setText(addresses_string)
self.statusbar.clearMessage()
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.send)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.send)
)
def on_action_AddressBookSubscribe(self):
@@ -3290,8 +3290,8 @@ class MyForm(settingsmixin.SMainWindow):
" one if you want."))
continue
self.addSubscription(item.address, item.label)
- self.ui.tabWidget.setCurrentIndex(
- self.ui.tabWidget.indexOf(self.ui.subscriptions)
+ self.tabWidget.setCurrentIndex(
+ self.tabWidget.indexOf(self.subscriptions)
)
def on_context_menuAddressBook(self, point):
@@ -3318,7 +3318,7 @@ class MyForm(settingsmixin.SMainWindow):
for plugin in self.menu_plugins['address']:
self.popMenuAddressBook.addAction(plugin)
self.popMenuAddressBook.exec_(
- self.ui.tableWidgetAddressBook.mapToGlobal(point))
+ self.tableWidgetAddressBook.mapToGlobal(point))
# Group of functions for the Subscriptions dialog box
def on_action_SubscriptionsNew(self):
@@ -3399,31 +3399,31 @@ class MyForm(settingsmixin.SMainWindow):
if self.popMenuSubscriptions.isEmpty():
return
self.popMenuSubscriptions.exec_(
- self.ui.treeWidgetSubscriptions.mapToGlobal(point))
+ self.treeWidgetSubscriptions.mapToGlobal(point))
def widgetConvert(self, widget):
- if widget == self.ui.tableWidgetInbox:
- return self.ui.treeWidgetYourIdentities
- elif widget == self.ui.tableWidgetInboxSubscriptions:
- return self.ui.treeWidgetSubscriptions
- elif widget == self.ui.tableWidgetInboxChans:
- return self.ui.treeWidgetChans
- elif widget == self.ui.treeWidgetYourIdentities:
- return self.ui.tableWidgetInbox
- elif widget == self.ui.treeWidgetSubscriptions:
- return self.ui.tableWidgetInboxSubscriptions
- elif widget == self.ui.treeWidgetChans:
- return self.ui.tableWidgetInboxChans
+ if widget == self.tableWidgetInbox:
+ return self.treeWidgetYourIdentities
+ elif widget == self.tableWidgetInboxSubscriptions:
+ return self.treeWidgetSubscriptions
+ elif widget == self.tableWidgetInboxChans:
+ return self.treeWidgetChans
+ elif widget == self.treeWidgetYourIdentities:
+ return self.tableWidgetInbox
+ elif widget == self.treeWidgetSubscriptions:
+ return self.tableWidgetInboxSubscriptions
+ elif widget == self.treeWidgetChans:
+ return self.tableWidgetInboxChans
else:
return None
def getCurrentTreeWidget(self):
- currentIndex = self.ui.tabWidget.currentIndex()
+ currentIndex = self.tabWidget.currentIndex()
treeWidgetList = (
- self.ui.treeWidgetYourIdentities,
+ self.treeWidgetYourIdentities,
False,
- self.ui.treeWidgetSubscriptions,
- self.ui.treeWidgetChans
+ self.treeWidgetSubscriptions,
+ self.treeWidgetChans
)
if currentIndex >= 0 and currentIndex < len(treeWidgetList):
return treeWidgetList[currentIndex]
@@ -3433,21 +3433,21 @@ class MyForm(settingsmixin.SMainWindow):
def getAccountTreeWidget(self, account):
try:
if account.type == AccountMixin.CHAN:
- return self.ui.treeWidgetChans
+ return self.treeWidgetChans
elif account.type == AccountMixin.SUBSCRIPTION:
- return self.ui.treeWidgetSubscriptions
+ return self.treeWidgetSubscriptions
else:
- return self.ui.treeWidgetYourIdentities
+ return self.treeWidgetYourIdentities
except:
- return self.ui.treeWidgetYourIdentities
+ return self.treeWidgetYourIdentities
def getCurrentMessagelist(self):
- currentIndex = self.ui.tabWidget.currentIndex()
+ currentIndex = self.tabWidget.currentIndex()
messagelistList = (
- self.ui.tableWidgetInbox,
+ self.tableWidgetInbox,
False,
- self.ui.tableWidgetInboxSubscriptions,
- self.ui.tableWidgetInboxChans,
+ self.tableWidgetInboxSubscriptions,
+ self.tableWidgetInboxChans,
)
if currentIndex >= 0 and currentIndex < len(messagelistList):
return messagelistList[currentIndex]
@@ -3455,13 +3455,13 @@ class MyForm(settingsmixin.SMainWindow):
def getAccountMessagelist(self, account):
try:
if account.type == AccountMixin.CHAN:
- return self.ui.tableWidgetInboxChans
+ return self.tableWidgetInboxChans
elif account.type == AccountMixin.SUBSCRIPTION:
- return self.ui.tableWidgetInboxSubscriptions
+ return self.tableWidgetInboxSubscriptions
else:
- return self.ui.tableWidgetInbox
+ return self.tableWidgetInbox
except:
- return self.ui.tableWidgetInbox
+ return self.tableWidgetInbox
def getCurrentMessageId(self):
messagelist = self.getCurrentMessagelist()
@@ -3471,12 +3471,12 @@ class MyForm(settingsmixin.SMainWindow):
return messagelist.item(currentRow, 3).data()
def getCurrentMessageTextedit(self):
- currentIndex = self.ui.tabWidget.currentIndex()
+ currentIndex = self.tabWidget.currentIndex()
messagelistList = (
- self.ui.textEditInboxMessage,
+ self.textEditInboxMessage,
False,
- self.ui.textEditInboxMessageSubscriptions,
- self.ui.textEditInboxMessageChans,
+ self.textEditInboxMessageSubscriptions,
+ self.textEditInboxMessageChans,
)
if currentIndex >= 0 and currentIndex < len(messagelistList):
return messagelistList[currentIndex]
@@ -3484,22 +3484,22 @@ class MyForm(settingsmixin.SMainWindow):
def getAccountTextedit(self, account):
try:
if account.type == AccountMixin.CHAN:
- return self.ui.textEditInboxMessageChans
+ return self.textEditInboxMessageChans
elif account.type == AccountMixin.SUBSCRIPTION:
- return self.ui.textEditInboxSubscriptions
+ return self.textEditInboxSubscriptions
else:
- return self.ui.textEditInboxMessage
+ return self.textEditInboxMessage
except:
- return self.ui.textEditInboxMessage
+ return self.textEditInboxMessage
def getCurrentSearchLine(self, currentIndex=None, retObj=False):
if currentIndex is None:
- currentIndex = self.ui.tabWidget.currentIndex()
+ currentIndex = self.tabWidget.currentIndex()
messagelistList = (
- self.ui.inboxSearchLineEdit,
+ self.inboxSearchLineEdit,
False,
- self.ui.inboxSearchLineEditSubscriptions,
- self.ui.inboxSearchLineEditChans,
+ self.inboxSearchLineEditSubscriptions,
+ self.inboxSearchLineEditChans,
)
if currentIndex >= 0 and currentIndex < len(messagelistList):
return (
@@ -3508,12 +3508,12 @@ class MyForm(settingsmixin.SMainWindow):
def getCurrentSearchOption(self, currentIndex=None):
if currentIndex is None:
- currentIndex = self.ui.tabWidget.currentIndex()
+ currentIndex = self.tabWidget.currentIndex()
messagelistList = (
- self.ui.inboxSearchOption,
+ self.inboxSearchOption,
False,
- self.ui.inboxSearchOptionSubscriptions,
- self.ui.inboxSearchOptionChans,
+ self.inboxSearchOptionSubscriptions,
+ self.inboxSearchOptionChans,
)
if currentIndex >= 0 and currentIndex < len(messagelistList):
return messagelistList[currentIndex].currentText()
@@ -3547,8 +3547,8 @@ class MyForm(settingsmixin.SMainWindow):
def getAddressbookSelectedItems(self):
return [
- self.ui.tableWidgetAddressBook.item(i.row(), 0)
- for i in self.ui.tableWidgetAddressBook.selectedIndexes()
+ self.tableWidgetAddressBook.item(i.row(), 0)
+ for i in self.tableWidgetAddressBook.selectedIndexes()
if i.column() == 0
]
@@ -3647,8 +3647,8 @@ class MyForm(settingsmixin.SMainWindow):
self.setAvatar(address)
def on_action_AddressBookSetAvatar(self):
- self.on_action_SetAvatar(self.ui.tableWidgetAddressBook)
-
+ self.on_action_SetAvatar(self.tableWidgetAddressBook)
+
def on_action_SetAvatar(self, thisTableWidget):
currentRow = thisTableWidget.currentRow()
addressAtCurrentRow = thisTableWidget.item(
@@ -3745,14 +3745,14 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderComboBoxSendFromBroadcast()
self.rerenderMessagelistFromLabels()
self.rerenderMessagelistToLabels()
- self.ui.blackwhitelist.rerenderBlackWhiteList()
+ self.blackwhitelist.rerenderBlackWhiteList()
# generate identicon
return False
return True
def on_action_AddressBookSetSound(self):
- widget = self.ui.tableWidgetAddressBook
+ widget = self.tableWidgetAddressBook
self.setAddressSound(widget.item(widget.currentRow(), 0).text())
def setAddressSound(self, addr):
@@ -3822,7 +3822,7 @@ class MyForm(settingsmixin.SMainWindow):
if self.popMenuYourIdentities.isEmpty():
return
self.popMenuYourIdentities.exec_(
- self.ui.treeWidgetYourIdentities.mapToGlobal(point))
+ self.treeWidgetYourIdentities.mapToGlobal(point))
# TODO make one popMenu
def on_context_menuChan(self, point):
@@ -3851,7 +3851,7 @@ class MyForm(settingsmixin.SMainWindow):
if self.popMenu.isEmpty():
return
self.popMenu.exec_(
- self.ui.treeWidgetChans.mapToGlobal(point))
+ self.treeWidgetChans.mapToGlobal(point))
def on_context_menuInbox(self, point):
tableWidget = self.getCurrentMessagelist()
@@ -3875,7 +3875,7 @@ class MyForm(settingsmixin.SMainWindow):
self.popMenuInbox.addAction(self.actionReplyChan)
self.popMenuInbox.addAction(self.actionReply)
self.popMenuInbox.addAction(self.actionAddSenderToAddressBook)
- self.actionClipboardMessagelist = self.ui.inboxContextMenuToolbar.addAction(
+ self.actionClipboardMessagelist = self.inboxContextMenuToolbar.addAction(
_translate("MainWindow", "Copy subject to clipboard")
if tableWidget.currentColumn() == 2 else
_translate("MainWindow", "Copy address to clipboard"),
@@ -3897,10 +3897,10 @@ class MyForm(settingsmixin.SMainWindow):
self.popMenuInbox.exec_(tableWidget.mapToGlobal(point))
def on_context_menuSent(self, point):
- currentRow = self.ui.tableWidgetInbox.currentRow()
+ currentRow = self.tableWidgetInbox.currentRow()
self.popMenuSent = QtGui.QMenu(self)
self.popMenuSent.addAction(self.actionSentClipboard)
- self._contact_selected = self.ui.tableWidgetInbox.item(currentRow, 0)
+ self._contact_selected = self.tableWidgetInbox.item(currentRow, 0)
# preloaded gui.menu plugins with prefix 'address'
for plugin in self.menu_plugins['address']:
self.popMenuSent.addAction(plugin)
@@ -3911,14 +3911,14 @@ class MyForm(settingsmixin.SMainWindow):
# Check to see if this item is toodifficult and display an additional
# menu option (Force Send) if it is.
if currentRow >= 0:
- ackData = self.ui.tableWidgetInbox.item(currentRow, 3).data()
+ ackData = self.tableWidgetInbox.item(currentRow, 3).data()
queryreturn = sqlQuery('''SELECT status FROM sent where ackdata=?''', ackData)
for row in queryreturn:
status, = row
if status == 'toodifficult':
self.popMenuSent.addAction(self.actionForceSend)
- self.popMenuSent.exec_(self.ui.tableWidgetInbox.mapToGlobal(point))
+ self.popMenuSent.exec_(self.tableWidgetInbox.mapToGlobal(point))
def inboxSearchLineEditUpdated(self, text):
# dynamic search for too short text is slow
@@ -4046,17 +4046,17 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderComboBoxSendFrom()
self.rerenderMessagelistFromLabels()
self.rerenderMessagelistToLabels()
- completerList = self.ui.lineEditTo.completer().model().stringList()
+ completerList = self.lineEditTo.completer().model().stringList()
for i in range(len(completerList)):
if unicode(completerList[i]).endswith(" <" + item.address + ">"):
completerList[i] = item.label + " <" + item.address + ">"
- self.ui.lineEditTo.completer().model().setStringList(completerList)
+ self.lineEditTo.completer().model().setStringList(completerList)
def tabWidgetCurrentChanged(self, n):
- if n == self.ui.tabWidget.indexOf(self.ui.networkstatus):
- self.ui.networkstatus.startUpdate()
+ if n == self.tabWidget.indexOf(self.networkstatus):
+ self.networkstatus.startUpdate()
else:
- self.ui.networkstatus.stopUpdate()
+ self.networkstatus.stopUpdate()
def writeNewAddressToTable(self, label, address, streamNumber):
self.rerenderTabTreeMessages()
@@ -4102,7 +4102,7 @@ class MyForm(settingsmixin.SMainWindow):
def initSettings(self):
self.loadSettings()
- for attr, obj in self.ui.__dict__.iteritems():
+ for attr, obj in self.__dict__.iteritems():
if hasattr(obj, "__class__") and \
isinstance(obj, settingsmixin.SettingsMixin):
loadMethod = getattr(obj, "loadSettings", None)
@@ -4181,7 +4181,8 @@ def init():
def run():
global myapp
app = init()
- myapp = MyForm()
+ app.setStyleSheet("QStatusBar::item { border: 0px solid black }")
+ myapp = MainWindow()
myapp.appIndicatorInit(app)
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
new file mode 100644
index 00000000..61ef2388
--- /dev/null
+++ b/src/bitmessageqt/main.py
@@ -0,0 +1,38 @@
+from PyQt4 import QtCore, QtGui
+
+import settingsmixin
+import widgets
+from bmconfigparser import BMConfigParser
+from foldertree import AddressBookCompleter
+from retranslateui import RetranslateMixin
+from tr import _translate
+
+
+class Window(settingsmixin.SMainWindow, RetranslateMixin):
+ """The main PyBitmessage's window"""
+
+ def __init__(self, parent=None):
+ super(Window, self).__init__(parent)
+ widgets.load('bitmessageui.ui', self)
+
+ self.addressBookCompleter = AddressBookCompleter()
+ self.addressBookCompleter.setCompletionMode(
+ QtGui.QCompleter.PopupCompletion)
+ self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ self.addressBookCompleterModel = QtGui.QStringListModel()
+ self.addressBookCompleter.setModel(self.addressBookCompleterModel)
+ self.lineEditTo.setCompleter(self.addressBookCompleter)
+
+ def updateNetworkSwitchMenuLabel(self, dontconnect=None):
+ """
+ Set the label for "Go online"/"Go offline" menu action
+ depending on 'dontconnect' setting
+ """
+ if dontconnect is None:
+ dontconnect = BMConfigParser().safeGetBoolean(
+ 'bitmessagesettings', 'dontconnect')
+ self.actionNetworkSwitch.setText(
+ _translate("MainWindow", "Go online", None)
+ if dontconnect else
+ _translate("MainWindow", "Go offline", None)
+ )
diff --git a/src/bitmessageqt/messageview.py b/src/bitmessageqt/messageview.py
index 13ea16f9..8aada9e6 100644
--- a/src/bitmessageqt/messageview.py
+++ b/src/bitmessageqt/messageview.py
@@ -69,19 +69,19 @@ class MessageView(QtGui.QTextBrowser):
"""Show a dialog requesting URL opening confirmation"""
if link.scheme() == "mailto":
window = QtGui.QApplication.activeWindow()
- window.ui.lineEditTo.setText(link.path())
+ window.lineEditTo.setText(link.path())
if link.hasQueryItem("subject"):
- window.ui.lineEditSubject.setText(
+ window.lineEditSubject.setText(
link.queryItemValue("subject"))
if link.hasQueryItem("body"):
- window.ui.textEditMessage.setText(
+ window.textEditMessage.setText(
link.queryItemValue("body"))
window.setSendFromComboBox()
- window.ui.tabWidgetSend.setCurrentIndex(0)
- window.ui.tabWidget.setCurrentIndex(
- window.ui.tabWidget.indexOf(window.ui.send)
+ window.tabWidgetSend.setCurrentIndex(0)
+ window.tabWidget.setCurrentIndex(
+ window.tabWidget.indexOf(window.send)
)
- window.ui.textEditMessage.setFocus()
+ window.textEditMessage.setFocus()
return
reply = QtGui.QMessageBox.warning(
self,
diff --git a/src/bitmessageqt/newchandialog.py b/src/bitmessageqt/newchandialog.py
index c0629cd7..21c11458 100644
--- a/src/bitmessageqt/newchandialog.py
+++ b/src/bitmessageqt/newchandialog.py
@@ -64,15 +64,27 @@ class NewChanDialog(QtGui.QDialog):
self.chanPassPhrase.text().toUtf8(),
True))
addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(True)
- if addressGeneratorReturnValue and addressGeneratorReturnValue[0] != 'chan name does not match address':
- UISignalQueue.put(('updateStatusBar', _translate(
- "newchandialog", "Successfully created / joined chan %1").arg(unicode(self.chanPassPhrase.text()))))
- self.parent.ui.tabWidget.setCurrentIndex(
- self.parent.ui.tabWidget.indexOf(self.parent.ui.chans)
+ if (
+ addressGeneratorReturnValue and
+ addressGeneratorReturnValue[0] !=
+ 'chan name does not match address'
+ ):
+ UISignalQueue.put((
+ 'updateStatusBar',
+ _translate(
+ "newchandialog",
+ "Successfully created / joined chan %1"
+ ).arg(unicode(self.chanPassPhrase.text()))
+ ))
+ self.parent.tabWidget.setCurrentIndex(
+ self.parent.tabWidget.indexOf(self.parent.chans)
)
self.done(QtGui.QDialog.Accepted)
else:
- UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Chan creation / joining failed")))
+ UISignalQueue.put((
+ 'updateStatusBar',
+ _translate("newchandialog", "Chan creation / joining failed")
+ ))
self.done(QtGui.QDialog.Rejected)
def reject(self):
diff --git a/src/bitmessageqt/support.py b/src/bitmessageqt/support.py
index ac02e2ca..f88f88dc 100644
--- a/src/bitmessageqt/support.py
+++ b/src/bitmessageqt/support.py
@@ -105,14 +105,14 @@ def createSupportMessage(myapp):
if state.shutdown:
return
- myapp.ui.lineEditSubject.setText(SUPPORT_SUBJECT)
- addrIndex = myapp.ui.comboBoxSendFrom.findData(
+ myapp.lineEditSubject.setText(SUPPORT_SUBJECT)
+ addrIndex = myapp.comboBoxSendFrom.findData(
address, QtCore.Qt.UserRole,
QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive)
if addrIndex == -1: # something is very wrong
return
- myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex)
- myapp.ui.lineEditTo.setText(SUPPORT_ADDRESS)
+ myapp.comboBoxSendFrom.setCurrentIndex(addrIndex)
+ myapp.lineEditTo.setText(SUPPORT_ADDRESS)
version = softwareVersion
commit = paths.lastCommit().get('commit')
@@ -149,15 +149,15 @@ def createSupportMessage(myapp):
upnp = BMConfigParser().safeGet('bitmessagesettings', 'upnp', "N/A")
connectedhosts = len(network.stats.connectedHostsList())
- myapp.ui.textEditMessage.setText(unicode(SUPPORT_MESSAGE, 'utf-8').format(
+ myapp.textEditMessage.setText(unicode(SUPPORT_MESSAGE, 'utf-8').format(
version, os, architecture, pythonversion, opensslversion, frozen,
portablemode, cpow, openclpow, locale, socks, upnp, connectedhosts))
# single msg tab
- myapp.ui.tabWidgetSend.setCurrentIndex(
- myapp.ui.tabWidgetSend.indexOf(myapp.ui.sendDirect)
+ myapp.tabWidgetSend.setCurrentIndex(
+ myapp.tabWidgetSend.indexOf(myapp.sendDirect)
)
# send tab
- myapp.ui.tabWidget.setCurrentIndex(
- myapp.ui.tabWidget.indexOf(myapp.ui.send)
+ myapp.tabWidget.setCurrentIndex(
+ myapp.tabWidget.indexOf(myapp.send)
)
diff --git a/src/bitmessageqt/tests/main.py b/src/bitmessageqt/tests/main.py
index b3aa67fa..3e5b024f 100644
--- a/src/bitmessageqt/tests/main.py
+++ b/src/bitmessageqt/tests/main.py
@@ -20,7 +20,7 @@ class TestBase(unittest.TestCase):
or bitmessageqt.BitmessageQtApplication(sys.argv))
self.window = self.app.activeWindow()
if not self.window:
- self.window = bitmessageqt.MyForm()
+ self.window = bitmessageqt.MainWindow()
self.window.appIndicatorInit(self.app)
def tearDown(self):
diff --git a/src/bitmessageqt/tests/support.py b/src/bitmessageqt/tests/support.py
index ba28b73a..39b9ec3d 100644
--- a/src/bitmessageqt/tests/support.py
+++ b/src/bitmessageqt/tests/support.py
@@ -14,7 +14,7 @@ class TestSupport(TestBase):
def test(self):
"""trigger menu action "Contact Support" and check the result"""
- ui = self.window.ui
+ ui = self.window
self.assertEqual(ui.lineEditTo.text(), '')
self.assertEqual(ui.lineEditSubject.text(), '')
--
2.45.1
From bc183adff5c8fe7588bf7d45d8746dfb8f7ab48c Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Wed, 7 Nov 2018 18:28:42 +0200
Subject: [PATCH 03/14] Added splitters
---
src/bitmessageqt/bitmessageui.ui | 552 +++++++++++++++----------------
src/bitmessageqt/main.py | 39 +++
2 files changed, 313 insertions(+), 278 deletions(-)
diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui
index 515de98b..360bbadf 100644
--- a/src/bitmessageqt/bitmessageui.ui
+++ b/src/bitmessageqt/bitmessageui.ui
@@ -21,8 +21,8 @@
QTabWidget::Rounded
-
- -
+
+
-
@@ -64,173 +64,167 @@
Messages
-
-
-
-
-
-
-
-
-
-
-
-
- 200
- 16777215
-
-
-
-
- Identities
-
-
-
- :/newPrefix/images/identities.png
-
-
-
-
-
- -
-
-
-
- 200
- 16777215
-
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ Qt::Vertical
+
+
+
+
+ 200
+ 16777215
+
+
+
+
+ Identities
+
+
+
+ :/newPrefix/images/identities.png
+
+
+
+
+
+
+
+ 200
+ 16777215
+
+
+
+ New Indentitiy
+
+
+
+
+
+ Qt::Vertical
+
+
+
+
-
+
+
+ Search
+
+
+
+ -
+
+
-
- New Indentitiy
+ All
-
-
-
-
- -
-
-
-
-
-
- 0
+
+ -
+
+ To
-
-
-
-
- Search
-
-
-
- -
-
-
-
-
- All
-
-
- -
-
- To
-
-
- -
-
- From
-
-
- -
-
- Subject
-
-
- -
-
- Message
-
-
-
-
-
-
- -
-
-
- QAbstractItemView::NoEditTriggers
+
+ -
+
+ From
-
- true
+
+ -
+
+ Subject
-
- QAbstractItemView::ExtendedSelection
+
+ -
+
+ Message
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- false
-
-
- true
-
-
- 200
-
-
- false
-
-
- 27
-
-
- false
-
-
- true
-
-
- false
-
-
- 26
-
-
-
- To
-
-
-
-
- From
-
-
-
-
- Subject
-
-
-
-
- Received
-
-
-
-
- -
-
-
-
- 0
- 500
-
-
-
- true
-
-
-
-
-
-
+
+
+
+
+
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ true
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ false
+
+
+ true
+
+
+ 200
+
+
+ false
+
+
+ 27
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+ 26
+
+
+
+ To
+
+
+
+
+ From
+
+
+
+
+ Subject
+
+
+
+
+ Received
+
+
+
+
+
+
+ 0
+ 500
+
+
+
+ true
+
+
+
+
@@ -242,12 +236,16 @@
Send
-
- -
-
-
-
-
-
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ Qt::Vertical
+
@@ -298,8 +296,6 @@
-
- -
@@ -311,8 +307,6 @@
Add Contact
-
- -
@@ -329,15 +323,14 @@
Fetch Namecoin ID
-
-
-
- -
-
-
-
+
+
+
+ Qt::Vertical
+
- 1
+ 0
@@ -464,9 +457,9 @@ p, li { white-space: pre-wrap; }
-
- -
-
+
+
+
-
@@ -601,14 +594,12 @@ p, li { white-space: pre-wrap; }
-
-
-
-
-
+
+
+
+
-
@@ -618,12 +609,16 @@ p, li { white-space: pre-wrap; }
Subscriptions
-
- -
-
-
-
-
-
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ Qt::Vertical
+
@@ -651,8 +646,6 @@ p, li { white-space: pre-wrap; }
-
- -
@@ -664,52 +657,51 @@ p, li { white-space: pre-wrap; }
Add new Subscription
-
-
-
- -
-
-
-
-
-
-
-
-
- Search
-
-
-
- -
-
-
-
-
- All
-
-
- -
-
- To
-
-
- -
-
- From
-
-
- -
-
- Subject
-
-
- -
-
- Message
-
-
-
-
-
-
- -
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Search
+
+
+
+ -
+
+
-
+
+ All
+
+
+ -
+
+ To
+
+
+ -
+
+ From
+
+
+ -
+
+ Subject
+
+
+ -
+
+ Message
+
+
+
+
+
+
QAbstractItemView::NoEditTriggers
@@ -774,8 +766,6 @@ p, li { white-space: pre-wrap; }
-
- -
@@ -787,14 +777,12 @@ p, li { white-space: pre-wrap; }
true
-
-
-
-
+
+
-
+
:/newPrefix/images/can-icon-16px.png:/newPrefix/images/can-icon-16px.png
@@ -802,12 +790,16 @@ p, li { white-space: pre-wrap; }
Chans
-
- -
-
-
-
-
-
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ Qt::Vertical
+
@@ -841,8 +833,6 @@ p, li { white-space: pre-wrap; }
-
- -
@@ -854,21 +844,21 @@ p, li { white-space: pre-wrap; }
Add Chan
-
-
-
- -
-
-
-
-
-
-
+
+
+
+ Qt::Vertical
+
+
+
+ -
Search
-
- -
+
+ -
-
@@ -896,10 +886,9 @@ p, li { white-space: pre-wrap; }
-
-
-
- -
+
+
+
QAbstractItemView::NoEditTriggers
@@ -964,8 +953,6 @@ p, li { white-space: pre-wrap; }
-
- -
@@ -977,10 +964,8 @@ p, li { white-space: pre-wrap; }
true
-
-
-
-
+
+
@@ -1177,11 +1162,22 @@ p, li { white-space: pre-wrap; }
QTableWidget
bitmessageqt.settingsmixin
+
+ SSplitter
+ QSplitter
+ bitmessageqt.settingsmixin
+ 1
+
MessageCompose
QTextEdit
bitmessageqt.messagecompose
+
+ MessagelistControl
+ SSplitter
+
+
tableWidgetInbox
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
index 61ef2388..14189b62 100644
--- a/src/bitmessageqt/main.py
+++ b/src/bitmessageqt/main.py
@@ -23,6 +23,45 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
self.addressBookCompleter.setModel(self.addressBookCompleterModel)
self.lineEditTo.setCompleter(self.addressBookCompleter)
+ # splitters
+ for splitter in (
+ self.inboxHorizontalSplitter,
+ self.sendHorizontalSplitter,
+ self.subscriptionsHorizontalSplitter,
+ self.chansHorizontalSplitter
+ ):
+ splitter.setStretchFactor(0, 0)
+ splitter.setStretchFactor(1, 1)
+ splitter.setCollapsible(0, False)
+ splitter.setCollapsible(1, False)
+
+ for splitter in (
+ self.inboxIdentitiesSplitter,
+ self.sendIdentitiesSplitter,
+ self.subscriptionsIdentitiesSplitter,
+ self.chansIdentitiesSplitter
+ ):
+ splitter.setStretchFactor(0, 1)
+ splitter.setStretchFactor(1, 0)
+ splitter.setCollapsible(0, False)
+ splitter.setCollapsible(1, False)
+ splitter.handle(1).setEnabled(False)
+
+ for splitter in (
+ self.inboxMessagecontrolSplitter,
+ self.subscriptionsMessagecontrolSplitter,
+ self.chansMessagecontrolSplitter
+ ):
+ splitter.setStretchFactor(0, 0)
+ splitter.setStretchFactor(1, 1)
+ splitter.setStretchFactor(2, 2)
+ splitter.setCollapsible(0, False)
+ splitter.setCollapsible(1, False)
+ splitter.setCollapsible(2, False)
+ splitter.handle(1).setEnabled(False)
+
+ self.sendMessagecontrolSplitter.handle(1).setEnabled(False)
+
def updateNetworkSwitchMenuLabel(self, dontconnect=None):
"""
Set the label for "Go online"/"Go offline" menu action
--
2.45.1
From d72dbbfd70ea14cafe7705d45552c1b8e7f7fa1e Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Fri, 9 Nov 2018 11:21:03 +0200
Subject: [PATCH 04/14] Less splitters
---
src/bitmessageqt/bitmessageui.ui | 70 ++++++++++++++------------------
src/bitmessageqt/main.py | 12 ------
2 files changed, 30 insertions(+), 52 deletions(-)
diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui
index 360bbadf..e74be78f 100644
--- a/src/bitmessageqt/bitmessageui.ui
+++ b/src/bitmessageqt/bitmessageui.ui
@@ -70,17 +70,10 @@
Qt::Horizontal
-
-
- Qt::Vertical
-
+
+
+ -
-
-
- 200
- 16777215
-
-
Identities
@@ -92,6 +85,8 @@
+
+ -
@@ -103,6 +98,8 @@
New Indentitiy
+
+
@@ -242,17 +239,10 @@
Qt::Horizontal
-
-
- Qt::Vertical
-
+
+
+ -
-
-
- 200
- 16777215
-
-
true
@@ -296,6 +286,8 @@
+
+ -
@@ -307,6 +299,8 @@
Add Contact
+
+ -
@@ -323,6 +317,8 @@
Fetch Namecoin ID
+
+
@@ -615,17 +611,10 @@ p, li { white-space: pre-wrap; }
Qt::Horizontal
-
-
- Qt::Vertical
-
+
+
+ -
-
-
- 200
- 16777215
-
-
true
@@ -646,6 +635,8 @@ p, li { white-space: pre-wrap; }
+
+ -
@@ -657,6 +648,8 @@ p, li { white-space: pre-wrap; }
Add new Subscription
+
+
@@ -796,17 +789,10 @@ p, li { white-space: pre-wrap; }
Qt::Horizontal
-
-
- Qt::Vertical
-
+
+
+ -
-
-
- 200
- 16777215
-
-
QFrame::Sunken
@@ -833,6 +819,8 @@ p, li { white-space: pre-wrap; }
+
+ -
@@ -844,6 +832,8 @@ p, li { white-space: pre-wrap; }
Add Chan
+
+
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
index 14189b62..6768b466 100644
--- a/src/bitmessageqt/main.py
+++ b/src/bitmessageqt/main.py
@@ -35,18 +35,6 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
- for splitter in (
- self.inboxIdentitiesSplitter,
- self.sendIdentitiesSplitter,
- self.subscriptionsIdentitiesSplitter,
- self.chansIdentitiesSplitter
- ):
- splitter.setStretchFactor(0, 1)
- splitter.setStretchFactor(1, 0)
- splitter.setCollapsible(0, False)
- splitter.setCollapsible(1, False)
- splitter.handle(1).setEnabled(False)
-
for splitter in (
self.inboxMessagecontrolSplitter,
self.subscriptionsMessagecontrolSplitter,
--
2.45.1
From fbbd95109f55ccfe41fbbbcf7007bc6896177e93 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Fri, 9 Nov 2018 17:54:56 +0200
Subject: [PATCH 05/14] Moved all connections where receiver is MainWindow and
sender
is defined in ui-file from class definition to ui-file.
---
src/bitmessageqt/__init__.py | 385 +---
src/bitmessageqt/bitmessageui.ui | 2928 +++++++++++++++++++++++-------
src/bitmessageqt/main.py | 28 +-
3 files changed, 2342 insertions(+), 999 deletions(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index 48180269..e3fe265e 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -3,7 +3,6 @@ PyQt based UI for bitmessage, the main module
"""
import hashlib
-import locale
import os
import random
import string
@@ -46,11 +45,9 @@ from account import (
import dialogs
from network.stats import pendingDownload, pendingUpload
from uisignaler import UISignaler
-import paths
from proofofwork import getPowType
import queues
import shutdown
-from statusbar import BMStatusBar
import sound
# This is needed for tray icon
import bitmessage_icons_rc # noqa:F401 pylint: disable=unused-import
@@ -93,192 +90,8 @@ class MainWindow(Window):
REPLY_TYPE_CHAN = 1
REPLY_TYPE_UPD = 2
- def change_translation(self, newlocale=None):
- """Change translation language for the application"""
- if newlocale is None:
- newlocale = l10n.getTranslationLanguage()
- try:
- if not self.qmytranslator.isEmpty():
- QtGui.QApplication.removeTranslator(self.qmytranslator)
- except:
- pass
- try:
- if not self.qsystranslator.isEmpty():
- QtGui.QApplication.removeTranslator(self.qsystranslator)
- except:
- pass
-
- self.qmytranslator = QtCore.QTranslator()
- translationpath = os.path.join(
- paths.codePath(), 'translations', 'bitmessage_' + newlocale)
- self.qmytranslator.load(translationpath)
- QtGui.QApplication.installTranslator(self.qmytranslator)
-
- self.qsystranslator = QtCore.QTranslator()
- if paths.frozen:
- translationpath = os.path.join(
- paths.codePath(), 'translations', 'qt_' + newlocale)
- else:
- translationpath = os.path.join(
- str(QtCore.QLibraryInfo.location(
- QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + newlocale)
- self.qsystranslator.load(translationpath)
- QtGui.QApplication.installTranslator(self.qsystranslator)
-
- lang = locale.normalize(l10n.getTranslationLanguage())
- langs = [
- lang.split(".")[0] + "." + l10n.encoding,
- lang.split(".")[0] + "." + 'UTF-8',
- lang
- ]
- if 'win32' in sys.platform or 'win64' in sys.platform:
- langs = [l10n.getWindowsLocale(lang)]
- for lang in langs:
- try:
- l10n.setlocale(locale.LC_ALL, lang)
- if 'win32' not in sys.platform and 'win64' not in sys.platform:
- l10n.encoding = locale.nl_langinfo(locale.CODESET)
- else:
- l10n.encoding = locale.getlocale()[1]
- logger.info("Successfully set locale to %s", lang)
- break
- except:
- logger.error("Failed to set locale to %s", lang, exc_info=True)
-
- def init_file_menu(self):
- QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL(
- "triggered()"), self.quit)
- QtCore.QObject.connect(self.actionNetworkSwitch, QtCore.SIGNAL(
- "triggered()"), self.network_switch)
- QtCore.QObject.connect(self.actionManageKeys, QtCore.SIGNAL(
- "triggered()"), self.click_actionManageKeys)
- QtCore.QObject.connect(self.actionDeleteAllTrashedMessages,
- QtCore.SIGNAL(
- "triggered()"),
- self.click_actionDeleteAllTrashedMessages)
- QtCore.QObject.connect(self.actionRegenerateDeterministicAddresses,
- QtCore.SIGNAL(
- "triggered()"),
- self.click_actionRegenerateDeterministicAddresses)
- QtCore.QObject.connect(self.pushButtonAddChan, QtCore.SIGNAL(
- "clicked()"),
- self.click_actionJoinChan) # also used for creating chans.
- QtCore.QObject.connect(self.pushButtonNewAddress, QtCore.SIGNAL(
- "clicked()"), self.click_NewAddressDialog)
- QtCore.QObject.connect(self.pushButtonAddAddressBook, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonAddAddressBook)
- QtCore.QObject.connect(self.pushButtonAddSubscription, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonAddSubscription)
- QtCore.QObject.connect(self.pushButtonTTL, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonTTL)
- QtCore.QObject.connect(self.pushButtonClear, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonClear)
- QtCore.QObject.connect(self.pushButtonSend, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonSend)
- QtCore.QObject.connect(self.pushButtonFetchNamecoinID, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonFetchNamecoinID)
- QtCore.QObject.connect(self.actionSettings, QtCore.SIGNAL(
- "triggered()"), self.click_actionSettings)
- QtCore.QObject.connect(self.actionAbout, QtCore.SIGNAL(
- "triggered()"), self.click_actionAbout)
- QtCore.QObject.connect(self.actionSupport, QtCore.SIGNAL(
- "triggered()"), self.click_actionSupport)
- QtCore.QObject.connect(self.actionHelp, QtCore.SIGNAL(
- "triggered()"), self.click_actionHelp)
-
- def init_inbox_popup_menu(self, connectSignal=True):
- # Popup menu for the Inbox tab
- self.inboxContextMenuToolbar = QtGui.QToolBar()
- # Actions
- self.actionReply = self.inboxContextMenuToolbar.addAction(_translate(
- "MainWindow", "Reply to sender"), self.on_action_InboxReply)
- self.actionReplyChan = self.inboxContextMenuToolbar.addAction(_translate(
- "MainWindow", "Reply to channel"), self.on_action_InboxReplyChan)
- self.actionAddSenderToAddressBook = self.inboxContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Add sender to your Address Book"),
- self.on_action_InboxAddSenderToAddressBook)
- self.actionAddSenderToBlackList = self.inboxContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Add sender to your Blacklist"),
- self.on_action_InboxAddSenderToBlackList)
- self.actionTrashInboxMessage = self.inboxContextMenuToolbar.addAction(
- _translate("MainWindow", "Move to Trash"),
- self.on_action_InboxTrash)
- self.actionUndeleteTrashedMessage = self.inboxContextMenuToolbar.addAction(
- _translate("MainWindow", "Undelete"),
- self.on_action_TrashUndelete)
- self.actionForceHtml = self.inboxContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "View HTML code as formatted text"),
- self.on_action_InboxMessageForceHtml)
- self.actionSaveMessageAs = self.inboxContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Save message as..."),
- self.on_action_InboxSaveMessageAs)
- self.actionMarkUnread = self.inboxContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Mark Unread"), self.on_action_InboxMarkUnread)
-
- # contextmenu messagelists
- self.tableWidgetInbox.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.tableWidgetInbox, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuInbox)
- self.tableWidgetInboxSubscriptions.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuInbox)
- self.tableWidgetInboxChans.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.tableWidgetInboxChans, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuInbox)
-
- def init_identities_popup_menu(self, connectSignal=True):
+ def init_identities_popup_menu(self):
# Popup menu for the Your Identities tab
- self.addressContextMenuToolbarYourIdentities = QtGui.QToolBar()
- # Actions
- self.actionNewYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(_translate(
- "MainWindow", "New"), self.on_action_YourIdentitiesNew)
- self.actionEnableYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Enable"), self.on_action_Enable)
- self.actionDisableYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Disable"), self.on_action_Disable)
- self.actionSetAvatarYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Set avatar..."),
- self.on_action_TreeWidgetSetAvatar)
- self.actionClipboardYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Copy address to clipboard"),
- self.on_action_Clipboard)
- self.actionSpecialAddressBehaviorYourIdentities = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Special address behavior..."),
- self.on_action_SpecialAddressBehaviorDialog)
- self.actionEmailGateway = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Email gateway"),
- self.on_action_EmailGatewayDialog)
- self.actionMarkAllRead = self.addressContextMenuToolbarYourIdentities.addAction(
- _translate(
- "MainWindow", "Mark all messages as read"),
- self.on_action_MarkAllRead)
-
- self.treeWidgetYourIdentities.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.treeWidgetYourIdentities, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuYourIdentities)
# load all gui.menu plugins with prefix 'address'
self.menu_plugins = {'address': []}
@@ -294,127 +107,6 @@ class MainWindow(Window):
title, handler
))
- def init_chan_popup_menu(self, connectSignal=True):
- # Actions
- self.actionNew = self.addressContextMenuToolbar.addAction(_translate(
- "MainWindow", "New"), self.on_action_YourIdentitiesNew)
- self.actionDelete = self.addressContextMenuToolbar.addAction(
- _translate("MainWindow", "Delete"),
- self.on_action_YourIdentitiesDelete)
- self.actionEnable = self.addressContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Enable"), self.on_action_Enable)
- self.actionDisable = self.addressContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Disable"), self.on_action_Disable)
- self.actionSetAvatar = self.addressContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Set avatar..."),
- self.on_action_TreeWidgetSetAvatar)
- self.actionClipboard = self.addressContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Copy address to clipboard"),
- self.on_action_Clipboard)
- self.actionSend = self.addressContextMenuToolbar.addAction(
- _translate("MainWindow", "Send message to this chan"),
- self.on_action_Send)
- self.actionSpecialAddressBehavior = self.addressContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Special address behavior..."),
- self.on_action_SpecialAddressBehaviorDialog)
-
- self.treeWidgetChans.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.treeWidgetChans, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuChan)
-
- def init_addressbook_popup_menu(self, connectSignal=True):
- # Popup menu for the Address Book page
- self.addressBookContextMenuToolbar = QtGui.QToolBar()
- # Actions
- self.actionAddressBookSend = self.addressBookContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Send message to this address"),
- self.on_action_AddressBookSend)
- self.actionAddressBookClipboard = self.addressBookContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Copy address to clipboard"),
- self.on_action_AddressBookClipboard)
- self.actionAddressBookSubscribe = self.addressBookContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Subscribe to this address"),
- self.on_action_AddressBookSubscribe)
- self.actionAddressBookSetAvatar = self.addressBookContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Set avatar..."),
- self.on_action_AddressBookSetAvatar)
- self.actionAddressBookSetSound = \
- self.addressBookContextMenuToolbar.addAction(
- _translate("MainWindow", "Set notification sound..."),
- self.on_action_AddressBookSetSound)
- self.actionAddressBookNew = self.addressBookContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Add New Address"), self.on_action_AddressBookNew)
- self.actionAddressBookDelete = self.addressBookContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Delete"), self.on_action_AddressBookDelete)
- self.tableWidgetAddressBook.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.tableWidgetAddressBook, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuAddressBook)
-
- def init_subscriptions_popup_menu(self, connectSignal=True):
- # Actions
- self.actionsubscriptionsNew = self.subscriptionsContextMenuToolbar.addAction(
- _translate("MainWindow", "New"), self.on_action_SubscriptionsNew)
- self.actionsubscriptionsDelete = self.subscriptionsContextMenuToolbar.addAction(
- _translate("MainWindow", "Delete"),
- self.on_action_SubscriptionsDelete)
- self.actionsubscriptionsClipboard = self.subscriptionsContextMenuToolbar.addAction(
- _translate("MainWindow", "Copy address to clipboard"),
- self.on_action_SubscriptionsClipboard)
- self.actionsubscriptionsEnable = self.subscriptionsContextMenuToolbar.addAction(
- _translate("MainWindow", "Enable"),
- self.on_action_SubscriptionsEnable)
- self.actionsubscriptionsDisable = self.subscriptionsContextMenuToolbar.addAction(
- _translate("MainWindow", "Disable"),
- self.on_action_SubscriptionsDisable)
- self.actionsubscriptionsSetAvatar = self.subscriptionsContextMenuToolbar.addAction(
- _translate("MainWindow", "Set avatar..."),
- self.on_action_TreeWidgetSetAvatar)
- self.actionsubscriptionsSend = self.addressContextMenuToolbar.addAction(
- _translate("MainWindow", "Send message to this address"),
- self.on_action_Send)
- self.treeWidgetSubscriptions.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.treeWidgetSubscriptions, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuSubscriptions)
-
- def init_sent_popup_menu(self, connectSignal=True):
- # Actions
- self.actionTrashSentMessage = self.sentContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Move to Trash"), self.on_action_SentTrash)
- self.actionSentClipboard = self.sentContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Copy destination address to clipboard"),
- self.on_action_SentClipboard)
- self.actionForceSend = self.sentContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Force send"), self.on_action_ForceSend)
- self.actionSentReply = self.sentContextMenuToolbar.addAction(
- _translate("MainWindow", "Send update"),
- self.on_action_SentReply)
- # self.popMenuSent = QtGui.QMenu( self )
- # self.popMenuSent.addAction( self.actionSentClipboard )
- # self.popMenuSent.addAction( self.actionTrashSentMessage )
-
def rerenderTabTreeSubscriptions(self):
treeWidget = self.treeWidgetSubscriptions
folders = Ui_FolderWidget.folderWeight.keys()
@@ -649,13 +341,7 @@ class MainWindow(Window):
# so that quit won't loop
self.wait = self.quitAccepted = False
- self.init_file_menu()
- self.init_inbox_popup_menu()
self.init_identities_popup_menu()
- self.init_addressbook_popup_menu()
- self.init_subscriptions_popup_menu()
- self.init_chan_popup_menu()
- self.init_sent_popup_menu()
# Initialize the user's list of addresses on the 'Chan' tab.
self.rerenderTabTreeChans()
@@ -677,77 +363,11 @@ class MainWindow(Window):
# Initialize the Subscriptions
self.rerenderSubscriptions()
- # Initialize the inbox search
- QtCore.QObject.connect(self.inboxSearchLineEdit, QtCore.SIGNAL(
- "returnPressed()"), self.inboxSearchLineEditReturnPressed)
- QtCore.QObject.connect(self.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
- "returnPressed()"), self.inboxSearchLineEditReturnPressed)
- QtCore.QObject.connect(self.inboxSearchLineEditChans, QtCore.SIGNAL(
- "returnPressed()"), self.inboxSearchLineEditReturnPressed)
- QtCore.QObject.connect(self.inboxSearchLineEdit, QtCore.SIGNAL(
- "textChanged(QString)"), self.inboxSearchLineEditUpdated)
- QtCore.QObject.connect(self.inboxSearchLineEditSubscriptions, QtCore.SIGNAL(
- "textChanged(QString)"), self.inboxSearchLineEditUpdated)
- QtCore.QObject.connect(self.inboxSearchLineEditChans, QtCore.SIGNAL(
- "textChanged(QString)"), self.inboxSearchLineEditUpdated)
-
- # Initialize addressbook
- QtCore.QObject.connect(self.tableWidgetAddressBook, QtCore.SIGNAL(
- "itemChanged(QTableWidgetItem *)"), self.tableWidgetAddressBookItemChanged)
- # This is necessary for the completer to work if multiple recipients
- QtCore.QObject.connect(self.lineEditTo, QtCore.SIGNAL(
- "cursorPositionChanged(int, int)"), self.lineEditTo.completer().onCursorPositionChanged)
-
- # show messages from message list
- QtCore.QObject.connect(self.tableWidgetInbox, QtCore.SIGNAL(
- "itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
- QtCore.QObject.connect(self.tableWidgetInboxSubscriptions, QtCore.SIGNAL(
- "itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
- QtCore.QObject.connect(self.tableWidgetInboxChans, QtCore.SIGNAL(
- "itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
-
- # tree address lists
- QtCore.QObject.connect(self.treeWidgetYourIdentities, QtCore.SIGNAL(
- "itemSelectionChanged ()"), self.treeWidgetItemClicked)
- QtCore.QObject.connect(self.treeWidgetYourIdentities, QtCore.SIGNAL(
- "itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
- QtCore.QObject.connect(self.treeWidgetSubscriptions, QtCore.SIGNAL(
- "itemSelectionChanged ()"), self.treeWidgetItemClicked)
- QtCore.QObject.connect(self.treeWidgetSubscriptions, QtCore.SIGNAL(
- "itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
- QtCore.QObject.connect(self.treeWidgetChans, QtCore.SIGNAL(
- "itemSelectionChanged ()"), self.treeWidgetItemClicked)
- QtCore.QObject.connect(self.treeWidgetChans, QtCore.SIGNAL(
- "itemChanged (QTreeWidgetItem *, int)"), self.treeWidgetItemChanged)
- QtCore.QObject.connect(
- self.tabWidget, QtCore.SIGNAL("currentChanged(int)"),
- 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.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.unreadCount = 0
- # Set the icon sizes for the identicons
- identicon_size = 3*7
- self.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.treeWidgetChans.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.treeWidgetSubscriptions.setIconSize(QtCore.QSize(identicon_size, identicon_size))
- self.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
-
self.UISignalThread = UISignaler.get()
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
@@ -813,9 +433,6 @@ class MainWindow(Window):
TTL = 28*24*60*60
self.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199))
self.updateHumanFriendlyTTLDescription(TTL)
-
- QtCore.QObject.connect(self.horizontalSliderTTL, QtCore.SIGNAL(
- "valueChanged(int)"), self.updateTTL)
self.initSettings()
self.resetNamecoinConnection()
diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/bitmessageui.ui
index e74be78f..fb453a55 100644
--- a/src/bitmessageqt/bitmessageui.ui
+++ b/src/bitmessageqt/bitmessageui.ui
@@ -21,8 +21,8 @@
QTabWidget::Rounded
-
- -
+
+
-
@@ -71,81 +71,93 @@
Qt::Horizontal
-
-
-
-
-
-
- Identities
-
-
-
- :/newPrefix/images/identities.png
-
-
-
-
-
- -
-
-
-
- 200
- 16777215
-
-
-
- New Indentitiy
-
-
-
-
+
+ -
+
+
+
+ 200
+ 0
+
+
+
+ Qt::CustomContextMenu
+
+
+
+ Identities
+
+
+
+ :/newPrefix/images/identities.png
+
+
+
+
+
+ -
+
+
+
+ 200
+ 16777215
+
+
+
+ New Indentitiy
+
+
+
+
Qt::Vertical
-
- -
-
-
- Search
-
-
-
- -
-
+
-
-
- All
-
+
+
+ Search
+
+
-
-
- To
-
+
+
-
+
+ All
+
+
+ -
+
+ To
+
+
+ -
+
+ From
+
+
+ -
+
+ Subject
+
+
+ -
+
+ Message
+
+
+
- -
-
- From
-
-
- -
-
- Subject
-
-
- -
-
- Message
-
-
-
-
-
+
+
+ Qt::CustomContextMenu
+
QAbstractItemView::NoEditTriggers
@@ -236,13 +248,16 @@
-
-
- Qt::Horizontal
-
-
-
-
-
+
+ Qt::Horizontal
+
+
+
+
-
+
+ Qt::CustomContextMenu
+
true
@@ -286,8 +301,8 @@
-
- -
+
+ -
@@ -299,8 +314,8 @@
Add Contact
-
- -
+
+ -
@@ -317,282 +332,281 @@
Fetch Namecoin ID
-
-
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 0
+
+
+
+ Send ordinary Message
+
+
+ -
+
+
-
+
+
-
+
+
+ Subject:
+
+
+
+ -
+
+
+ From:
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ To:
+
+
+
+ -
+
+
+
+ 300
+ 0
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<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>
+
+
+
+
+
+
+
+
+
+ Send Message to your Subscribers
+
+
+ -
+
+
-
+
+
-
+
+
+ From:
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Subject:
+
+
+
+ -
+
+
+
+ 300
+ 0
+
+
+
+
+
+
+ -
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+<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>
+
+
+
+
+
+
+
-
-
- Qt::Vertical
-
-
-
- 0
-
-
-
- Send ordinary Message
-
-
- -
-
-
-
-
-
-
-
-
- Subject:
-
-
-
- -
-
-
- From:
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- To:
-
-
-
- -
-
-
-
- 300
- 0
-
-
-
-
- -
-
-
-
-
- -
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
-<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>
-
-
-
-
-
-
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 32
+ 16777215
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 255
+
+
+
+
+
+
+
+
+ 120
+ 120
+ 120
+
+
+
+
+
+
+
+
+ true
+
+
+
+ TTL:
+
+
+ true
+
-
-
- Send Message to your Subscribers
-
-
-
-
-
-
-
-
-
-
-
-
- From:
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Subject:
-
-
-
- -
-
-
-
- 300
- 0
-
-
-
-
-
-
- -
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
-<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>
-
-
-
-
-
-
+
+ -
+
+
+
+ 35
+ 0
+
+
+
+
+ 70
+ 16777215
+
+
+
+ Qt::Horizontal
+
+
+ false
+
+
+ false
+
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 32
- 16777215
-
-
-
-
-
-
-
-
- 0
- 0
- 255
-
-
-
-
-
-
-
-
- 0
- 0
- 255
-
-
-
-
-
-
-
-
- 120
- 120
- 120
-
-
-
-
-
-
-
-
- true
-
-
-
- TTL:
-
-
- true
-
-
-
- -
-
-
-
- 35
- 0
-
-
-
-
- 70
- 16777215
-
-
-
- Qt::Horizontal
-
-
- false
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 45
- 0
-
-
-
-
- 45
- 16777215
-
-
-
- X days
-
-
-
- -
-
-
- Clear
-
-
-
- -
-
-
-
- 16777215
- 16777215
-
-
-
- Send
-
-
-
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 45
+ 0
+
+
+
+
+ 45
+ 16777215
+
+
+
+ X days
+
+
+
+ -
+
+
+ Clear
+
+
+
+ -
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Send
+
+
+
-
+
@@ -611,10 +625,13 @@ p, li { white-space: pre-wrap; }
Qt::Horizontal
-
-
- -
+
+
+
-
+
+ Qt::CustomContextMenu
+
true
@@ -635,8 +652,8 @@ p, li { white-space: pre-wrap; }
-
- -
+
+ -
@@ -648,129 +665,132 @@ p, li { white-space: pre-wrap; }
Add new Subscription
-
-
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Search
+
+
+
+ -
+
+
-
+
+ All
+
+
+ -
+
+ To
+
+
+ -
+
+ From
+
+
+ -
+
+ Subject
+
+
+ -
+
+ Message
+
+
+
+
+
-
-
- Qt::Vertical
+
+
+ Qt::CustomContextMenu
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ true
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ false
+
+
+ true
+
+
+ 200
+
+
+ false
+
+
+ 27
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+ 26
+
+
+
+ To
-
-
- -
-
-
- Search
-
-
-
- -
-
-
-
-
- All
-
-
- -
-
- To
-
-
- -
-
- From
-
-
- -
-
- Subject
-
-
- -
-
- Message
-
-
-
-
-
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
- true
-
-
- QAbstractItemView::ExtendedSelection
-
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- false
-
-
- true
-
-
- 200
-
-
- false
-
-
- 27
-
-
- false
-
-
- true
-
-
- false
-
-
- 26
-
-
-
- To
-
-
-
-
- From
-
-
-
-
- Subject
-
-
-
-
- Received
-
-
-
-
-
-
- 0
- 500
-
-
-
- true
-
-
+
+
+
+ From
+
+
+
+
+ Subject
+
+
+
+
+ Received
+
+
+
+
+
+ 0
+ 500
+
+
+
+ true
+
+
+
@@ -785,14 +805,17 @@ p, li { white-space: pre-wrap; }
-
-
-
- Qt::Horizontal
-
-
-
-
-
+
+
+ Qt::Horizontal
+
+
+
+
-
+
+ Qt::CustomContextMenu
+
QFrame::Sunken
@@ -819,8 +842,8 @@ p, li { white-space: pre-wrap; }
-
- -
+
+ -
@@ -832,129 +855,132 @@ p, li { white-space: pre-wrap; }
Add Chan
-
-
-
-
-
- Qt::Vertical
-
-
-
- -
-
-
- Search
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Search
+
+
+
+ -
+
+
-
+
+ All
-
-
- -
-
-
-
-
- All
-
-
- -
-
- To
-
-
- -
-
- From
-
-
- -
-
- Subject
-
-
- -
-
- Message
-
-
-
-
-
-
-
-
- QAbstractItemView::NoEditTriggers
-
-
- true
-
-
- QAbstractItemView::ExtendedSelection
-
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- false
-
-
- true
-
-
- 200
-
-
- false
-
-
- 27
-
-
- false
-
-
- true
-
-
- false
-
-
- 26
-
-
-
- To
-
-
-
-
- From
-
-
-
-
- Subject
-
-
-
-
- Received
-
-
-
-
-
-
- 0
- 500
-
-
-
- true
-
-
+
+ -
+
+ To
+
+
+ -
+
+ From
+
+
+ -
+
+ Subject
+
+
+ -
+
+ Message
+
+
+
+
+
+
+
+ Qt::CustomContextMenu
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ true
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ false
+
+
+ true
+
+
+ 200
+
+
+ false
+
+
+ 27
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+ 26
+
+
+
+ To
+
+
+
+
+ From
+
+
+
+
+ Subject
+
+
+
+
+ Received
+
+
+
+
+
+
+ 0
+ 500
+
+
+
+ true
+
+
+
@@ -979,6 +1005,47 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 50
+
+
+
+ ArrowCursor
+
+
+ Qt::NoFocus
+
+
+ Qt::LeftToRight
+
+
+
+
+
+
+ :/newPrefix/images/redicon.png:/newPrefix/images/redicon.png
+
+
+
+ 21
+ 23
+
+
+
+ true
+
+
+
-
+
16777215
- 22
+ 25
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+ Reply to sender
+
+
+
+
+ Reply to channel
+
+
+
+
+ Add sender to your Address Book
+
+
+
+
+ Add sender to your Blacklist
+
+
+
+
+ Move to Trash
+
+
+
+
+ Undelete
+
+
+
+
+ View HTML code as formatted text
+
+
+
+
+ Save message as...
+
+
+
+
+ Mark Unread
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+ New
+
+
+
+
+ Enable
+
+
+
+
+ Disable
+
+
+
+
+ Set avatar...
+
+
+
+
+ Copy address to clipboard
+
+
+
+
+ Special address behavior...
+
+
+
+
+ Email gateway
+
+
+
+
+ Mark all messages as read
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+ New
+
+
+
+
+ Delete
+
+
+
+
+ Enable
+
+
+
+
+ Disable
+
+
+
+
+ Set avatar...
+
+
+
+
+ Copy address to clipboard
+
+
+
+
+ Send message to this chan
+
+
+
+
+ Special address behavior...
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+ Send message to this address
+
+
+
+
+ Copy address to clipboard
+
+
+
+
+ Subscribe to this address
+
+
+
+
+ Set avatar...
+
+
+
+
+ Set notification sound...
+
+
+
+
+ Add New Address
+
+
+
+
+ Delete
+
+
+
+
+
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+ New
+
+
+
+
+ Delete
+
+
+
+
+ Copy address to clipboard
+
+
+
+
+ Enable
+
+
+
+
+ Disable
+
+
+
+
+ Set avatar...
+
+
+
+
+ Send message to this address
+
+
+
+
+
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+ Move to Trash
+
+
+
+
+ Copy destination address to clipboard
+
+
+
+
+ Force send
+
+
+
+
+ Send update
+
+
+
+
+
+
+
Import keys
@@ -1127,6 +1500,11 @@ p, li { white-space: pre-wrap; }
+
+ BMStatusBar
+ QStatusBar
+
+
Blacklist
QWidget
@@ -1163,11 +1541,6 @@ p, li { white-space: pre-wrap; }
QTextEdit
bitmessageqt.messagecompose
-
- MessagelistControl
- SSplitter
-
-
tableWidgetInbox
@@ -1182,5 +1555,1342 @@ p, li { white-space: pre-wrap; }
-
+
+
+ actionExit
+ triggered()
+ MainWindow
+ quit()
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionNetworkSwitch
+ triggered()
+ MainWindow
+ network_switch
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionRegenerateDeterministicAddresses
+ triggered()
+ MainWindow
+ click_actionRegenerateDeterministicAddresses
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionDeleteAllTrashedMessages
+ triggered()
+ MainWindow
+ click_actionDeleteAllTrashedMessages
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionManageKeys
+ triggered()
+ MainWindow
+ click_actionManageKeys
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSettings
+ triggered()
+ MainWindow
+ click_actionSettings
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAbout
+ triggered()
+ MainWindow
+ click_actionAbout
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSupport
+ triggered()
+ MainWindow
+ click_actionSupport
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionHelp
+ triggered()
+ MainWindow
+ click_actionHelp
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonNewAddress
+ clicked()
+ MainWindow
+ click_NewAddressDialog
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonAddAddressBook
+ clicked()
+ MainWindow
+ click_pushButtonAddAddressBook
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonFetchNamecoinID
+ clicked()
+ MainWindow
+ click_pushButtonFetchNamecoinID
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonAddSubscription
+ clicked()
+ MainWindow
+ click_pushButtonAddSubscription
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonAddChan
+ clicked()
+ MainWindow
+ click_actionJoinChan
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonTTL
+ clicked()
+ MainWindow
+ click_pushButtonTTL
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonClear
+ clicked()
+ MainWindow
+ click_pushButtonClear
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonSend
+ clicked()
+ MainWindow
+ click_pushButtonSend
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ pushButtonStatusIcon
+ clicked()
+ MainWindow
+ click_pushButtonStatusIcon
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tableWidgetInbox
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuInbox()
+
+
+ 656
+ 366
+
+
+ 442
+ 289
+
+
+
+
+ tableWidgetInboxSubscriptions
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuInbox()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tableWidgetInboxChans
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuInbox()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetYourIdentities
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuYourIdentities()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tableWidgetAddressBook
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuAddressBook()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetSubscriptions
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuSubscriptions()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetChans
+ customContextMenuRequested(QPoint)
+ MainWindow
+ on_context_menuChan()
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ actionReply
+ triggered()
+ MainWindow
+ on_action_InboxReply
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionReplyChan
+ triggered()
+ MainWindow
+ on_action_InboxReplyChan
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddSenderToAddressBook
+ triggered()
+ MainWindow
+ on_action_InboxAddSenderToAddressBook
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddSenderToBlackList
+ triggered()
+ MainWindow
+ on_action_InboxAddSenderToBlackList
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionTrashInboxMessage
+ triggered()
+ MainWindow
+ on_action_InboxTrash
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionUndeleteTrashedMessage
+ triggered()
+ MainWindow
+ on_action_TrashUndelete
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionForceHtml
+ triggered()
+ MainWindow
+ on_action_InboxMessageForceHtml
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSaveMessageAs
+ triggered()
+ MainWindow
+ on_action_InboxSaveMessageAs
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionMarkUnread
+ triggered()
+ MainWindow
+ on_action_InboxMarkUnread
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionNew
+ triggered()
+ MainWindow
+ on_action_YourIdentitiesNew
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionDelete
+ triggered()
+ MainWindow
+ on_action_YourIdentitiesDelete
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionEnable
+ triggered()
+ MainWindow
+ on_action_Enable
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionDisable
+ triggered()
+ MainWindow
+ on_action_Disable
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSetAvatar
+ triggered()
+ MainWindow
+ on_action_TreeWidgetSetAvatar
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionClipboard
+ triggered()
+ MainWindow
+ on_action_Clipboard
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSend
+ triggered()
+ MainWindow
+ on_action_Send
+
+
+ actionSpecialAddressBehavior
+ triggered()
+ MainWindow
+ on_action_SpecialAddressBehaviorDialog
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionNewYourIdentities
+ triggered()
+ MainWindow
+ on_action_YourIdentitiesNew
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionEnableYourIdentities
+ triggered()
+ MainWindow
+ on_action_Enable
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionDisableYourIdentities
+ triggered()
+ MainWindow
+ on_action_Disable
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSetAvatarYourIdentities
+ triggered()
+ MainWindow
+ on_action_TreeWidgetSetAvatar
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionClipboardYourIdentities
+ triggered()
+ MainWindow
+ on_action_Clipboard
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSpecialAddressBehaviorYourIdentities
+ triggered()
+ MainWindow
+ on_action_SpecialAddressBehaviorDialog
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionEmailGateway
+ triggered()
+ MainWindow
+ on_action_EmailGatewayDialog
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionMarkAllRead
+ triggered()
+ MainWindow
+ on_action_MarkAllRead
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookSend
+ triggered()
+ MainWindow
+ on_action_AddressBookSend
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookClipboard
+ triggered()
+ MainWindow
+ on_action_AddressBookClipboard
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookSubscribe
+ triggered()
+ MainWindow
+ on_action_AddressBookSubscribe
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookSetAvatar
+ triggered()
+ MainWindow
+ on_action_AddressBookSetAvatar
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookSetSound
+ triggered()
+ MainWindow
+ on_action_AddressBookSetSound
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookNew
+ triggered()
+ MainWindow
+ on_action_AddressBookNew
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionAddressBookDelete
+ triggered()
+ MainWindow
+ on_action_AddressBookDelete
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsNew
+ triggered()
+ MainWindow
+ on_action_SubscriptionsNew
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsDelete
+ triggered()
+ MainWindow
+ on_action_SubscriptionsDelete
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsClipboard
+ triggered()
+ MainWindow
+ on_action_SubscriptionsClipboard
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsEnable
+ triggered()
+ MainWindow
+ on_action_SubscriptionsEnable
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsDisable
+ triggered()
+ MainWindow
+ on_action_SubscriptionsDisable
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsSetAvatar
+ triggered()
+ MainWindow
+ on_action_TreeWidgetSetAvatar
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionsubscriptionsSend
+ triggered()
+ MainWindow
+ on_action_Send
+
+
+ actionTrashSentMessage
+ triggered()
+ MainWindow
+ on_action_SentTrash
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSentClipboard
+ triggered()
+ MainWindow
+ on_action_SentClipboard
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionForceSend
+ triggered()
+ MainWindow
+ on_action_ForceSend
+
+
+ -1
+ -1
+
+
+ 20
+ 20
+
+
+
+
+ actionSentReply
+ triggered()
+ MainWindow
+ on_action_SentReply
+
+
+ inboxSearchLineEdit
+ returnPressed()
+ MainWindow
+ inboxSearchLineEditReturnPressed
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ inboxSearchLineEditSubscriptions
+ returnPressed()
+ MainWindow
+ inboxSearchLineEditReturnPressed
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ inboxSearchLineEditChans
+ returnPressed()
+ MainWindow
+ inboxSearchLineEditReturnPressed
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ inboxSearchLineEdit
+ textChanged(QString)
+ MainWindow
+ inboxSearchLineEditUpdated
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ inboxSearchLineEditSubscriptions
+ textChanged(QString)
+ MainWindow
+ inboxSearchLineEditUpdated
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ inboxSearchLineEditChans
+ textChanged(QString)
+ MainWindow
+ inboxSearchLineEditUpdated
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tableWidgetAddressBook
+ itemChanged(QTableWidgetItem*)
+ MainWindow
+ tableWidgetAddressBookItemChanged
+
+
+ 67
+ 107
+
+
+ 442
+ 289
+
+
+
+
+ tableWidgetInbox
+ itemSelectionChanged()
+ MainWindow
+ tableWidgetInboxItemClicked
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tableWidgetInboxSubscriptions
+ itemSelectionChanged()
+ MainWindow
+ tableWidgetInboxItemClicked
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tableWidgetInboxChans
+ itemSelectionChanged()
+ MainWindow
+ tableWidgetInboxItemClicked
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetYourIdentities
+ itemSelectionChanged()
+ MainWindow
+ treeWidgetItemClicked
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetSubscriptions
+ itemSelectionChanged()
+ MainWindow
+ treeWidgetItemClicked
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetChans
+ itemSelectionChanged()
+ MainWindow
+ treeWidgetItemClicked
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetYourIdentities
+ itemChanged(QTreeWidgetItem*,int)
+ MainWindow
+ treeWidgetItemChanged
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetSubscriptions
+ itemChanged(QTreeWidgetItem*,int)
+ MainWindow
+ treeWidgetItemChanged
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ treeWidgetChans
+ itemChanged(QTreeWidgetItem*,int)
+ MainWindow
+ treeWidgetItemChanged
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ tabWidget
+ currentChanged(int)
+ MainWindow
+ tabWidgetCurrentChanged
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
+
+
+ horizontalSliderTTL
+ valueChanged(int)
+ MainWindow
+ updateTTL
+
+
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
index 6768b466..e0703a08 100644
--- a/src/bitmessageqt/main.py
+++ b/src/bitmessageqt/main.py
@@ -15,13 +15,29 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
super(Window, self).__init__(parent)
widgets.load('bitmessageui.ui', self)
- self.addressBookCompleter = AddressBookCompleter()
- self.addressBookCompleter.setCompletionMode(
+ self.blackwhitelist.rerenderBlackWhiteList()
+
+ addressBookCompleter = AddressBookCompleter()
+ addressBookCompleter.setCompletionMode(
QtGui.QCompleter.PopupCompletion)
- self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
- self.addressBookCompleterModel = QtGui.QStringListModel()
- self.addressBookCompleter.setModel(self.addressBookCompleterModel)
- self.lineEditTo.setCompleter(self.addressBookCompleter)
+ addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+ addressBookCompleterModel = QtGui.QStringListModel()
+ addressBookCompleter.setModel(addressBookCompleterModel)
+ self.lineEditTo.setCompleter(addressBookCompleter)
+
+ self.lineEditTo.cursorPositionChanged.connect(
+ addressBookCompleter.onCursorPositionChanged)
+
+ # Hide all menu action containers
+ for toolbar in (
+ self.inboxContextMenuToolbar,
+ self.addressContextMenuToolbarYourIdentities,
+ self.addressContextMenuToolbar,
+ self.addressBookContextMenuToolbar,
+ self.subscriptionsContextMenuToolbar,
+ self.sentContextMenuToolbar
+ ):
+ toolbar.setVisible(False)
# splitters
for splitter in (
--
2.45.1
From 0f153e0c2e5aeae619876fec70a38a33d828dc77 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Mon, 12 Nov 2018 12:29:03 +0200
Subject: [PATCH 06/14] Moved welcome message into ui, added explicit margins,
set sizepolicy for labelHumanFriendlyTTLDescription in tab "send"
and renamed bitmessageui.ui to main.ui.
---
src/bitmessageqt/__init__.py | 14 +-
src/bitmessageqt/bitmessageui.py | 788 ------------------
src/bitmessageqt/main.py | 5 +-
src/bitmessageqt/{bitmessageui.ui => main.ui} | 122 ++-
4 files changed, 121 insertions(+), 808 deletions(-)
delete mode 100644 src/bitmessageqt/bitmessageui.py
rename src/bitmessageqt/{bitmessageui.ui => main.ui} (96%)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index e3fe265e..e74ba11b 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -349,23 +349,15 @@ class MainWindow(Window):
# Initialize the user's list of addresses on the 'Messages' tab.
self.rerenderTabTreeMessages()
- # Set welcome message
- self.textEditInboxMessage.setText(_translate("MainWindow", """
- Welcome to easy and secure Bitmessage
- * send messages to other people
- * send broadcast messages like twitter or
- * discuss in chan(nel)s with other people
- """))
-
# Initialize the address book
self.rerenderAddressBook()
# Initialize the Subscriptions
self.rerenderSubscriptions()
- # Put the colored icon on the status bar
- self.statusbar.insertPermanentWidget(0, self.pushButtonStatusIcon)
-
+ self.numberOfMessagesProcessed = 0
+ self.numberOfBroadcastsProcessed = 0
+ self.numberOfPubkeysProcessed = 0
self.unreadCount = 0
self.UISignalThread = UISignaler.get()
diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py
deleted file mode 100644
index 7f2c8c91..00000000
--- a/src/bitmessageqt/bitmessageui.py
+++ /dev/null
@@ -1,788 +0,0 @@
-# -*- 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
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-from bmconfigparser import BMConfigParser
-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)
-
-class Ui_MainWindow(object):
- def setupUi(self, MainWindow):
- MainWindow.setObjectName(_fromUtf8("MainWindow"))
- MainWindow.resize(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)
- 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(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())
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.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.tableWidgetInbox.setAlternatingRowColors(True)
- self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.tableWidgetInbox.setWordWrap(False)
- self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox"))
- self.tableWidgetInbox.setColumnCount(4)
- self.tableWidgetInbox.setRowCount(0)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInbox.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInbox.setHorizontalHeaderItem(1, item)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInbox.setHorizontalHeaderItem(2, item)
- item = QtGui.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.verticalSplitter_7.addWidget(self.tableWidgetInbox)
- self.textEditInboxMessage = MessageView(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)
- 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)
- self.tableWidgetAddressBook.setAlternatingRowColors(True)
- self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook"))
- self.tableWidgetAddressBook.setColumnCount(2)
- self.tableWidgetAddressBook.setRowCount(0)
- self.tableWidgetAddressBook.resize(200, self.tableWidgetAddressBook.height())
- item = QtGui.QTableWidgetItem()
- icon3 = QtGui.QIcon()
- icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/addressbook.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off)
- item.setIcon(icon3)
- self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item)
- item = QtGui.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.addressBookCompleter = AddressBookCompleter()
- self.addressBookCompleter.setCompletionMode(QtGui.QCompleter.PopupCompletion)
- self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
- self.addressBookCompleterModel = QtGui.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.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.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.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1)
- self.label = QtGui.QLabel(self.sendDirect)
- self.label.setObjectName(_fromUtf8("label"))
- self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
- self.comboBoxSendFrom = QtGui.QComboBox(self.sendDirect)
- self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
- self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom"))
- self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1)
- self.lineEditTo = QtGui.QLineEdit(self.sendDirect)
- self.lineEditTo.setObjectName(_fromUtf8("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.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.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1)
- self.label_7 = QtGui.QLabel(self.sendBroadcast)
- self.label_7.setObjectName(_fromUtf8("label_7"))
- self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1)
- self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.sendBroadcast)
- self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0))
- self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("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)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth())
- self.pushButtonTTL.setSizePolicy(sizePolicy)
- 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 = QtGui.QBrush(QtGui.QColor(0, 0, 255))
- brush.setStyle(QtCore.Qt.SolidPattern)
- palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
- brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
- brush.setStyle(QtCore.Qt.SolidPattern)
- palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.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.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)
- 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)
- 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)
- 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())
- icon5 = QtGui.QIcon()
- icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.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.tableWidgetInboxSubscriptions.setAlternatingRowColors(True)
- self.tableWidgetInboxSubscriptions.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.tableWidgetInboxSubscriptions.setWordWrap(False)
- self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions"))
- self.tableWidgetInboxSubscriptions.setColumnCount(4)
- self.tableWidgetInboxSubscriptions.setRowCount(0)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item)
- item = QtGui.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.verticalSplitter_4.addWidget(self.tableWidgetInboxSubscriptions)
- self.textEditInboxMessageSubscriptions = MessageView(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)
- 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)
- 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())
- icon7 = QtGui.QIcon()
- icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.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.tableWidgetInboxChans.setAlternatingRowColors(True)
- self.tableWidgetInboxChans.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetInboxChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.tableWidgetInboxChans.setWordWrap(False)
- self.tableWidgetInboxChans.setObjectName(_fromUtf8("tableWidgetInboxChans"))
- self.tableWidgetInboxChans.setColumnCount(4)
- self.tableWidgetInboxChans.setRowCount(0)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item)
- item = QtGui.QTableWidgetItem()
- self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item)
- item = QtGui.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.verticalSplitter_8.addWidget(self.tableWidgetInboxChans)
- self.textEditInboxMessageChans = MessageView(self.chans)
- 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)
- 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 BMConfigParser().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"), "")
- self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1)
- MainWindow.setCentralWidget(self.centralwidget)
- self.menubar = QtGui.QMenuBar(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"))
- MainWindow.setMenuBar(self.menubar)
- self.statusbar = QtGui.QStatusBar(MainWindow)
- self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22))
- self.statusbar.setObjectName(_fromUtf8("statusbar"))
- MainWindow.setStatusBar(self.statusbar)
- self.actionImport_keys = QtGui.QAction(MainWindow)
- self.actionImport_keys.setObjectName(_fromUtf8("actionImport_keys"))
- self.actionManageKeys = QtGui.QAction(MainWindow)
- self.actionManageKeys.setCheckable(False)
- self.actionManageKeys.setEnabled(True)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("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.actionExit.setIcon(icon)
- self.actionExit.setObjectName(_fromUtf8("actionExit"))
- self.actionHelp = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("help-contents"))
- self.actionHelp.setIcon(icon)
- self.actionHelp.setObjectName(_fromUtf8("actionHelp"))
- self.actionSupport = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("help-support"))
- self.actionSupport.setIcon(icon)
- self.actionSupport.setObjectName(_fromUtf8("actionSupport"))
- self.actionAbout = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("help-about"))
- self.actionAbout.setIcon(icon)
- self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
- self.actionSettings = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("document-properties"))
- self.actionSettings.setIcon(icon)
- self.actionSettings.setObjectName(_fromUtf8("actionSettings"))
- self.actionRegenerateDeterministicAddresses = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("view-refresh"))
- self.actionRegenerateDeterministicAddresses.setIcon(icon)
- self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses"))
- self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("user-trash"))
- self.actionDeleteAllTrashedMessages.setIcon(icon)
- self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages"))
- self.actionJoinChan = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new"))
- self.actionJoinChan.setIcon(icon)
- self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan"))
- 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())
- 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)
- )
- 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)
-
- # Popup menu actions container for the Sent page
- # pylint: disable=attribute-defined-outside-init
- self.sentContextMenuToolbar = QtGui.QToolBar()
- # Popup menu actions container for chans tree
- self.addressContextMenuToolbar = QtGui.QToolBar()
- # Popup menu actions container for subscriptions tree
- self.subscriptionsContextMenuToolbar = QtGui.QToolBar()
-
- def updateNetworkSwitchMenuLabel(self, dontconnect=None):
- if dontconnect is None:
- dontconnect = BMConfigParser().safeGetBoolean(
- 'bitmessagesettings', 'dontconnect')
- self.actionNetworkSwitch.setText(
- _translate("MainWindow", "Go online", None)
- if dontconnect else
- _translate("MainWindow", "Go offline", None)
- )
-
- 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))
- self.tableWidgetInbox.setSortingEnabled(True)
- item = self.tableWidgetInbox.horizontalHeaderItem(0)
- item.setText(_translate("MainWindow", "To", None))
- item = self.tableWidgetInbox.horizontalHeaderItem(1)
- item.setText(_translate("MainWindow", "From", None))
- item = self.tableWidgetInbox.horizontalHeaderItem(2)
- item.setText(_translate("MainWindow", "Subject", None))
- item = self.tableWidgetInbox.horizontalHeaderItem(3)
- item.setText(_translate("MainWindow", "Received", None))
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Messages", None))
- self.tableWidgetAddressBook.setSortingEnabled(True)
- item = self.tableWidgetAddressBook.horizontalHeaderItem(0)
- item.setText(_translate("MainWindow", "Address book", None))
- 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.textEditMessage.setHtml("")
- 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.textEditMessageBroadcast.setHtml("")
- 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(BMConfigParser().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))
- self.tableWidgetInboxSubscriptions.setSortingEnabled(True)
- item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(0)
- item.setText(_translate("MainWindow", "To", None))
- item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(1)
- item.setText(_translate("MainWindow", "From", None))
- item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(2)
- item.setText(_translate("MainWindow", "Subject", None))
- 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))
- self.tableWidgetInboxChans.setSortingEnabled(True)
- item = self.tableWidgetInboxChans.horizontalHeaderItem(0)
- item.setText(_translate("MainWindow", "To", None))
- item = self.tableWidgetInboxChans.horizontalHeaderItem(1)
- item.setText(_translate("MainWindow", "From", None))
- item = self.tableWidgetInboxChans.horizontalHeaderItem(2)
- item.setText(_translate("MainWindow", "Subject", None))
- 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))
- self.updateNetworkSwitchMenuLabel()
-
-
-import bitmessage_icons_rc
-
-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_())
-
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
index e0703a08..6aab8be4 100644
--- a/src/bitmessageqt/main.py
+++ b/src/bitmessageqt/main.py
@@ -13,7 +13,7 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
def __init__(self, parent=None):
super(Window, self).__init__(parent)
- widgets.load('bitmessageui.ui', self)
+ widgets.load('main.ui', self)
self.blackwhitelist.rerenderBlackWhiteList()
@@ -28,6 +28,9 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
self.lineEditTo.cursorPositionChanged.connect(
addressBookCompleter.onCursorPositionChanged)
+ # Put the colored icon on the status bar
+ self.statusbar.insertPermanentWidget(0, self.pushButtonStatusIcon)
+
# Hide all menu action containers
for toolbar in (
self.inboxContextMenuToolbar,
diff --git a/src/bitmessageqt/bitmessageui.ui b/src/bitmessageqt/main.ui
similarity index 96%
rename from src/bitmessageqt/bitmessageui.ui
rename to src/bitmessageqt/main.ui
index fb453a55..a98fabbc 100644
--- a/src/bitmessageqt/bitmessageui.ui
+++ b/src/bitmessageqt/main.ui
@@ -22,6 +22,18 @@
+
+ 8
+
+
+ 8
+
+
+ 8
+
+
+ 8
+
-
@@ -65,6 +77,18 @@
Messages
+
+ 8
+
+
+ 8
+
+
+ 8
+
+
+ 8
+
-
@@ -125,6 +149,9 @@
-
+
+ 3
+
-
All
@@ -231,6 +258,14 @@
true
+
+
+ Welcome to easy and secure Bitmessage
+ * send messages to other people
+ * send broadcast messages like twitter or
+ * discuss in chan(nel)s with other people
+
+
@@ -246,6 +281,18 @@
Send
+
+ 8
+
+
+ 8
+
+
+ 8
+
+
+ 8
+
-
@@ -348,6 +395,18 @@
Send ordinary Message
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
-
-
@@ -415,6 +474,18 @@ p, li { white-space: pre-wrap; }
Send Message to your Subscribers
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
-
-
@@ -562,7 +633,7 @@ p, li { white-space: pre-wrap; }
-
-
+
0
0
@@ -575,12 +646,12 @@ p, li { white-space: pre-wrap; }
- 45
+ 16777215
16777215
- X days
+ X days
@@ -620,6 +691,18 @@ p, li { white-space: pre-wrap; }
Subscriptions
+
+ 8
+
+
+ 8
+
+
+ 8
+
+
+ 8
+
-
@@ -683,16 +766,14 @@ p, li { white-space: pre-wrap; }
-
+
+ 2
+
-
All
- -
-
- To
-
-
-
From
@@ -804,6 +885,18 @@ p, li { white-space: pre-wrap; }
Chans
+
+ 8
+
+
+ 8
+
+
+ 8
+
+
+ 8
+
-
@@ -873,6 +966,9 @@ p, li { white-space: pre-wrap; }
-
+
+ 3
+
-
All
@@ -2891,6 +2987,16 @@ p, li { white-space: pre-wrap; }
valueChanged(int)
MainWindow
updateTTL
+
+
+ 20
+ 20
+
+
+ 20
+ 20
+
+
--
2.45.1
From b26deb9b33f2cbb41e8c8483838ae38e57508ab3 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Tue, 13 Nov 2018 17:04:13 +0200
Subject: [PATCH 07/14] Updated translation project
---
src/translations/bitmessage.pro | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/translations/bitmessage.pro b/src/translations/bitmessage.pro
index b131d8e5..9cbfd32e 100644
--- a/src/translations/bitmessage.pro
+++ b/src/translations/bitmessage.pro
@@ -14,11 +14,11 @@ SOURCES = ../addresses.py\
../bitmessageqt/account.py\
../bitmessageqt/address_dialogs.py\
../bitmessageqt/addressvalidator.py\
- ../bitmessageqt/bitmessageui.py\
../bitmessageqt/blacklist.py\
../bitmessageqt/dialogs.py\
../bitmessageqt/foldertree.py\
../bitmessageqt/languagebox.py\
+ ../bitmessageqt/main.py\
../bitmessageqt/messagecompose.py\
../bitmessageqt/messageview.py\
../bitmessageqt/networkstatus.py\
@@ -36,11 +36,13 @@ FORMS = \
../bitmessageqt/emailgateway.ui\
../bitmessageqt/help.ui\
../bitmessageqt/iconglossary.ui\
+ ../bitmessageqt/main.ui\
../bitmessageqt/networkstatus.ui\
../bitmessageqt/newaddressdialog.ui\
../bitmessageqt/newchandialog.ui\
../bitmessageqt/newsubscriptiondialog.ui\
../bitmessageqt/regenerateaddresses.ui\
+ ../bitmessageqt/settings.ui\
../bitmessageqt/specialaddressbehavior.ui
TRANSLATIONS = \
--
2.45.1
From fe9b2d7188ea8ff4239661e502856083f9cf3d24 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Tue, 13 Nov 2018 18:11:58 +0200
Subject: [PATCH 08/14] Moved actions and connections on tab "Blacklist" back
to ui-file
---
src/bitmessageqt/__init__.py | 6 +-
src/bitmessageqt/blacklist.py | 48 +--------------
src/bitmessageqt/blacklist.ui | 110 +++++++++++++++++++++++++++++++++-
3 files changed, 113 insertions(+), 51 deletions(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index e74ba11b..e3fb58fe 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -1272,11 +1272,7 @@ class MainWindow(Window):
self.retranslateUi(self)
self.init_inbox_popup_menu(False)
self.init_identities_popup_menu(False)
- self.init_chan_popup_menu(False)
- self.init_addressbook_popup_menu(False)
- self.init_subscriptions_popup_menu(False)
- self.init_sent_popup_menu(False)
- self.blackwhitelist.init_blacklist_popup_menu(False)
+ self.blackwhitelist.init_blacklist_popup_menu()
if event.type() == QtCore.QEvent.WindowStateChange:
if self.windowState() & QtCore.Qt.WindowMinimized:
if BMConfigParser().getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform:
diff --git a/src/bitmessageqt/blacklist.py b/src/bitmessageqt/blacklist.py
index 3897bddc..e5d11af8 100644
--- a/src/bitmessageqt/blacklist.py
+++ b/src/bitmessageqt/blacklist.py
@@ -17,21 +17,11 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
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.blacklistContextMenuToolbar.setVisible(False)
self.init_blacklist_popup_menu()
- # Initialize blacklist
- QtCore.QObject.connect(self.tableWidgetBlacklist, QtCore.SIGNAL(
- "itemChanged(QTableWidgetItem *)"), self.tableWidgetBlacklistItemChanged)
-
# Set the icon sizes for the identicons
- identicon_size = 3*7
+ identicon_size = 3 * 7
self.tableWidgetBlacklist.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.UISignalThread = UISignaler.get()
@@ -42,16 +32,12 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
if BMConfigParser().get('bitmessagesettings', 'blackwhitelist') == 'white':
BMConfigParser().set('bitmessagesettings', 'blackwhitelist', 'black')
BMConfigParser().save()
- # self.tableWidgetBlacklist.clearContents()
- self.tableWidgetBlacklist.setRowCount(0)
self.rerenderBlackWhiteList()
def click_radioButtonWhitelist(self):
if BMConfigParser().get('bitmessagesettings', 'blackwhitelist') == 'black':
BMConfigParser().set('bitmessagesettings', 'blackwhitelist', 'white')
BMConfigParser().save()
- # self.tableWidgetBlacklist.clearContents()
- self.tableWidgetBlacklist.setRowCount(0)
self.rerenderBlackWhiteList()
def click_pushButtonAddBlacklist(self):
@@ -116,36 +102,8 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
sqlExecute('''UPDATE whitelist SET label=? WHERE address=?''',
str(item.text()), str(addressitem.text()))
- def init_blacklist_popup_menu(self, connectSignal=True):
+ def init_blacklist_popup_menu(self):
# Popup menu for the Blacklist page
- self.blacklistContextMenuToolbar = QtGui.QToolBar()
- # Actions
- self.actionBlacklistNew = self.blacklistContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Add new entry"), self.on_action_BlacklistNew)
- self.actionBlacklistDelete = self.blacklistContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Delete"), self.on_action_BlacklistDelete)
- self.actionBlacklistClipboard = self.blacklistContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Copy address to clipboard"),
- self.on_action_BlacklistClipboard)
- self.actionBlacklistEnable = self.blacklistContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Enable"), self.on_action_BlacklistEnable)
- self.actionBlacklistDisable = self.blacklistContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Disable"), self.on_action_BlacklistDisable)
- self.actionBlacklistSetAvatar = self.blacklistContextMenuToolbar.addAction(
- _translate(
- "MainWindow", "Set avatar..."),
- self.on_action_BlacklistSetAvatar)
- self.tableWidgetBlacklist.setContextMenuPolicy(
- QtCore.Qt.CustomContextMenu)
- if connectSignal:
- self.connect(self.tableWidgetBlacklist, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuBlacklist)
self.popMenuBlacklist = QtGui.QMenu(self)
# self.popMenuBlacklist.addAction( self.actionBlacklistNew )
self.popMenuBlacklist.addAction(self.actionBlacklistDelete)
diff --git a/src/bitmessageqt/blacklist.ui b/src/bitmessageqt/blacklist.ui
index 80993fac..72d6fa69 100644
--- a/src/bitmessageqt/blacklist.ui
+++ b/src/bitmessageqt/blacklist.ui
@@ -10,6 +10,44 @@
295
+
+
+
+ Add new entry
+
+
+
+
+ Delete
+
+
+
+
+ Copy address to clipboard
+
+
+
+
+ Enable
+
+
+
+
+ Disable
+
+
+
+
+ Set avatar...
+
+
+
+
+
+
+
+
+
-
@@ -62,6 +100,9 @@
true
+
+ Qt::CustomContextMenu
+
true
@@ -104,5 +145,72 @@
-
+
+
+ radioButtonBlacklist
+ clicked()
+ blacklist
+ click_radioButtonBlacklist
+
+
+ radioButtonWhitelist
+ clicked()
+ blacklist
+ click_radioButtonWhitelist
+
+
+ pushButtonAddBlacklist
+ clicked()
+ blacklist
+ click_pushButtonAddBlacklist
+
+
+ tableWidgetBlacklist
+ itemChanged(QTableWidgetItem*)
+ blacklist
+ tableWidgetBlacklistItemChanged
+
+
+ actionBlacklistNew
+ triggered()
+ blacklist
+ on_action_BlacklistNew
+
+
+ actionBlacklistDelete
+ triggered()
+ blacklist
+ on_action_BlacklistDelete
+
+
+ actionBlacklistClipboard
+ triggered()
+ blacklist
+ on_action_BlacklistClipboard
+
+
+ actionBlacklistEnable
+ triggered()
+ blacklist
+ on_action_BlacklistEnable
+
+
+ actionBlacklistDisable
+ triggered()
+ blacklist
+ on_action_BlacklistDisable
+
+
+ actionBlacklistSetAvatar
+ triggered()
+ blacklist
+ on_action_BlacklistSetAvatar
+
+
+ tableWidgetBlacklist
+ customContextMenuRequested(QPoint)
+ blacklist
+ on_context_menuBlacklist
+
+
--
2.45.1
From 25e362c338dbdc4de61817f60074126e08630997 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Tue, 20 Nov 2018 14:11:18 +0200
Subject: [PATCH 09/14] Removing RetranslateMixin from MainWindow
---
src/bitmessageqt/__init__.py | 5 +--
src/bitmessageqt/address_dialogs.py | 9 ++--
src/bitmessageqt/main.py | 69 ++++++++++++++++++++++++++++-
src/bitmessageqt/networkstatus.py | 2 +-
4 files changed, 76 insertions(+), 9 deletions(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index e3fb58fe..69578bda 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -308,7 +308,6 @@ class MainWindow(Window):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
- self.qmytranslator = self.qsystranslator = None
self.indicatorUpdate = None
self.actionStatus = None
@@ -1269,8 +1268,8 @@ class MainWindow(Window):
def changeEvent(self, event):
if event.type() == QtCore.QEvent.LanguageChange:
- self.retranslateUi(self)
- self.init_inbox_popup_menu(False)
+ # FIXME: it's called very often
+ self.retranslateUi()
self.init_identities_popup_menu(False)
self.blackwhitelist.init_blacklist_popup_menu()
if event.type() == QtCore.QEvent.WindowStateChange:
diff --git a/src/bitmessageqt/address_dialogs.py b/src/bitmessageqt/address_dialogs.py
index 56cf7cc5..a5755013 100644
--- a/src/bitmessageqt/address_dialogs.py
+++ b/src/bitmessageqt/address_dialogs.py
@@ -1,7 +1,7 @@
"""
Dialogs that work with BM address.
"""
-# pylint: disable=attribute-defined-outside-init,too-few-public-methods,relative-import
+# pylint: disable=attribute-defined-outside-init,too-few-public-methods
import hashlib
@@ -9,8 +9,11 @@ from PyQt4 import QtCore, QtGui
import queues
import widgets
-from account import AccountMixin, GatewayAccount, MailchuckAccount, accountClass, getSortedAccounts
-from addresses import addBMIfNotPresent, decodeAddress, encodeVarint
+from account import (
+ GatewayAccount, MailchuckAccount, AccountMixin, accountClass,
+ getSortedAccounts
+)
+from addresses import decodeAddress, encodeVarint, addBMIfNotPresent
from inventory import Inventory
from tr import _translate
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
index 6aab8be4..205342e8 100644
--- a/src/bitmessageqt/main.py
+++ b/src/bitmessageqt/main.py
@@ -1,20 +1,26 @@
+import locale
+import os
+import sys
from PyQt4 import QtCore, QtGui
+import l10n
+import paths
import settingsmixin
import widgets
from bmconfigparser import BMConfigParser
+from debug import logger
from foldertree import AddressBookCompleter
-from retranslateui import RetranslateMixin
from tr import _translate
-class Window(settingsmixin.SMainWindow, RetranslateMixin):
+class Window(settingsmixin.SMainWindow):
"""The main PyBitmessage's window"""
def __init__(self, parent=None):
super(Window, self).__init__(parent)
widgets.load('main.ui', self)
+ self.qmytranslator = self.qsystranslator = None
self.blackwhitelist.rerenderBlackWhiteList()
addressBookCompleter = AddressBookCompleter()
@@ -82,3 +88,62 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
if dontconnect else
_translate("MainWindow", "Go offline", None)
)
+
+ def retranslateUi(self):
+ """Update widgets' texts which is not taken from ui-file"""
+ self.updateHumanFriendlyTTLDescription(int(
+ self.horizontalSliderTTL.tickPosition() ** 3.199 + 3600))
+ self.networkstatus.retranslateUi()
+
+ # FIXME: this is not best place for this func
+ def change_translation(self, newlocale=None):
+ """Change translation language for the application"""
+ if newlocale is None:
+ newlocale = l10n.getTranslationLanguage()
+ try:
+ if not self.qmytranslator.isEmpty():
+ QtGui.QApplication.removeTranslator(self.qmytranslator)
+ except:
+ pass
+ try:
+ if not self.qsystranslator.isEmpty():
+ QtGui.QApplication.removeTranslator(self.qsystranslator)
+ except:
+ pass
+
+ self.qmytranslator = QtCore.QTranslator()
+ translationpath = os.path.join(
+ paths.codePath(), 'translations', 'bitmessage_' + newlocale)
+ self.qmytranslator.load(translationpath)
+ QtGui.QApplication.installTranslator(self.qmytranslator)
+
+ self.qsystranslator = QtCore.QTranslator()
+ if paths.frozen:
+ translationpath = os.path.join(
+ paths.codePath(), 'translations', 'qt_' + newlocale)
+ else:
+ translationpath = os.path.join(
+ str(QtCore.QLibraryInfo.location(
+ QtCore.QLibraryInfo.TranslationsPath)), 'qt_' + newlocale)
+ self.qsystranslator.load(translationpath)
+ QtGui.QApplication.installTranslator(self.qsystranslator)
+
+ lang = locale.normalize(l10n.getTranslationLanguage())
+ langs = [
+ lang.split(".")[0] + "." + l10n.encoding,
+ lang.split(".")[0] + "." + 'UTF-8',
+ lang
+ ]
+ if 'win32' in sys.platform or 'win64' in sys.platform:
+ langs = [l10n.getWindowsLocale(lang)]
+ for lang in langs:
+ try:
+ l10n.setlocale(locale.LC_ALL, lang)
+ if 'win32' not in sys.platform and 'win64' not in sys.platform:
+ l10n.encoding = locale.nl_langinfo(locale.CODESET)
+ else:
+ l10n.encoding = locale.getlocale()[1]
+ logger.info("Successfully set locale to %s", lang)
+ break
+ except:
+ logger.error("Failed to set locale to %s", lang, exc_info=True)
diff --git a/src/bitmessageqt/networkstatus.py b/src/bitmessageqt/networkstatus.py
index e7fd9e94..4abda307 100644
--- a/src/bitmessageqt/networkstatus.py
+++ b/src/bitmessageqt/networkstatus.py
@@ -240,7 +240,7 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
self.labelTotalConnections.setText(
_translate(
"networkstatus", "Total Connections: %1").arg(
- str(self.tableWidgetConnectionCount.rowCount())))
+ self.tableWidgetConnectionCount.rowCount()))
self.labelStartupTime.setText(_translate(
"networkstatus", "Since startup on %1"
).arg(l10n.formatTimestamp(self.startup)))
--
2.45.1
From b6c979091fe5303423952ac7d7c5378a9f3e30f2 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Thu, 25 Feb 2021 17:03:57 +0200
Subject: [PATCH 10/14] Fix some formatting
---
src/bitmessageqt/__init__.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index 69578bda..cc0464ab 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -1500,8 +1500,7 @@ class MainWindow(Window):
"MainWindow",
"New version of PyBitmessage is available: %1. Download it"
" from https://github.com/Bitmessage/PyBitmessage/releases/latest"
- ).arg(self.notifiedNewVersion)
- )
+ ).arg(self.notifiedNewVersion))
def displayAlert(self, title, text, exitAfterUserClicksOk):
self.updateStatusBar(text)
@@ -1510,17 +1509,25 @@ class MainWindow(Window):
os._exit(0)
def rerenderMessagelistFromLabels(self):
- for messagelist in (self.tableWidgetInbox, self.tableWidgetInboxChans, self.tableWidgetInboxSubscriptions):
+ for messagelist in (
+ self.tableWidgetInbox,
+ self.tableWidgetInboxChans,
+ self.tableWidgetInboxSubscriptions
+ ):
for i in range(messagelist.rowCount()):
messagelist.item(i, 1).setLabel()
def rerenderMessagelistToLabels(self):
- for messagelist in (self.tableWidgetInbox, self.tableWidgetInboxChans, self.tableWidgetInboxSubscriptions):
+ for messagelist in (
+ self.tableWidgetInbox,
+ self.tableWidgetInboxChans,
+ self.tableWidgetInboxSubscriptions
+ ):
for i in range(messagelist.rowCount()):
messagelist.item(i, 0).setLabel()
def rerenderAddressBook(self):
- def addRow (address, label, type):
+ def addRow(address, label, type):
self.tableWidgetAddressBook.insertRow(0)
newItem = Ui_AddressBookWidgetItemLabel(address, unicode(label, 'utf-8'), type)
self.tableWidgetAddressBook.setItem(0, 0, newItem)
--
2.45.1
From 0dceb7e15cfbff49b3eb48b979740b5acf468e70 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Thu, 25 Feb 2021 17:17:57 +0200
Subject: [PATCH 11/14] Don't import debug in bitmessageqt
---
src/bitmessageqt/__init__.py | 4 +++-
src/bitmessageqt/main.py | 8 +++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index cc0464ab..5927f29e 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -3,6 +3,7 @@ PyQt based UI for bitmessage, the main module
"""
import hashlib
+import logging
import os
import random
import string
@@ -19,7 +20,6 @@ from PyQt4.QtNetwork import QLocalSocket, QLocalServer
import shared
import state
-from debug import logger
from tr import _translate
from addresses import decodeAddress, addBMIfNotPresent
from bmconfigparser import BMConfigParser
@@ -58,6 +58,8 @@ try:
except ImportError:
get_plugins = False
+logger = logging.getLogger('default')
+
# TODO: rewrite
def powQueueSize():
diff --git a/src/bitmessageqt/main.py b/src/bitmessageqt/main.py
index 205342e8..6cdf96a2 100644
--- a/src/bitmessageqt/main.py
+++ b/src/bitmessageqt/main.py
@@ -1,3 +1,4 @@
+import logging
import locale
import os
import sys
@@ -8,7 +9,6 @@ import paths
import settingsmixin
import widgets
from bmconfigparser import BMConfigParser
-from debug import logger
from foldertree import AddressBookCompleter
from tr import _translate
@@ -20,6 +20,8 @@ class Window(settingsmixin.SMainWindow):
super(Window, self).__init__(parent)
widgets.load('main.ui', self)
+ self.logger = logging.getLogger('default')
+
self.qmytranslator = self.qsystranslator = None
self.blackwhitelist.rerenderBlackWhiteList()
@@ -143,7 +145,7 @@ class Window(settingsmixin.SMainWindow):
l10n.encoding = locale.nl_langinfo(locale.CODESET)
else:
l10n.encoding = locale.getlocale()[1]
- logger.info("Successfully set locale to %s", lang)
+ self.logger.info("Successfully set locale to %s", lang)
break
except:
- logger.error("Failed to set locale to %s", lang, exc_info=True)
+ self.logger.error("Failed to set locale to %s", lang, exc_info=True)
--
2.45.1
From ef3f69f75d3e5d7e32c993bb350e0a16bf80df7c Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Fri, 26 Feb 2021 21:14:54 +0200
Subject: [PATCH 12/14] Remove connection hints in main.ui
---
src/bitmessageqt/main.ui | 810 ---------------------------------------
1 file changed, 810 deletions(-)
diff --git a/src/bitmessageqt/main.ui b/src/bitmessageqt/main.ui
index a98fabbc..d415b187 100644
--- a/src/bitmessageqt/main.ui
+++ b/src/bitmessageqt/main.ui
@@ -1657,288 +1657,108 @@ p, li { white-space: pre-wrap; }
triggered()
MainWindow
quit()
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionNetworkSwitch
triggered()
MainWindow
network_switch
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionRegenerateDeterministicAddresses
triggered()
MainWindow
click_actionRegenerateDeterministicAddresses
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionDeleteAllTrashedMessages
triggered()
MainWindow
click_actionDeleteAllTrashedMessages
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionManageKeys
triggered()
MainWindow
click_actionManageKeys
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSettings
triggered()
MainWindow
click_actionSettings
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAbout
triggered()
MainWindow
click_actionAbout
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSupport
triggered()
MainWindow
click_actionSupport
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionHelp
triggered()
MainWindow
click_actionHelp
-
-
- -1
- -1
-
-
- 20
- 20
-
-
pushButtonNewAddress
clicked()
MainWindow
click_NewAddressDialog
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonAddAddressBook
clicked()
MainWindow
click_pushButtonAddAddressBook
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonFetchNamecoinID
clicked()
MainWindow
click_pushButtonFetchNamecoinID
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonAddSubscription
clicked()
MainWindow
click_pushButtonAddSubscription
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonAddChan
clicked()
MainWindow
click_actionJoinChan
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonTTL
clicked()
MainWindow
click_pushButtonTTL
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonClear
clicked()
MainWindow
click_pushButtonClear
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonSend
clicked()
MainWindow
click_pushButtonSend
-
-
- 20
- 20
-
-
- 20
- 20
-
-
pushButtonStatusIcon
clicked()
MainWindow
click_pushButtonStatusIcon
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tableWidgetInbox
@@ -1961,336 +1781,126 @@ p, li { white-space: pre-wrap; }
customContextMenuRequested(QPoint)
MainWindow
on_context_menuInbox()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tableWidgetInboxChans
customContextMenuRequested(QPoint)
MainWindow
on_context_menuInbox()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetYourIdentities
customContextMenuRequested(QPoint)
MainWindow
on_context_menuYourIdentities()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tableWidgetAddressBook
customContextMenuRequested(QPoint)
MainWindow
on_context_menuAddressBook()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetSubscriptions
customContextMenuRequested(QPoint)
MainWindow
on_context_menuSubscriptions()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetChans
customContextMenuRequested(QPoint)
MainWindow
on_context_menuChan()
-
-
- 20
- 20
-
-
- 20
- 20
-
-
actionReply
triggered()
MainWindow
on_action_InboxReply
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionReplyChan
triggered()
MainWindow
on_action_InboxReplyChan
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddSenderToAddressBook
triggered()
MainWindow
on_action_InboxAddSenderToAddressBook
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddSenderToBlackList
triggered()
MainWindow
on_action_InboxAddSenderToBlackList
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionTrashInboxMessage
triggered()
MainWindow
on_action_InboxTrash
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionUndeleteTrashedMessage
triggered()
MainWindow
on_action_TrashUndelete
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionForceHtml
triggered()
MainWindow
on_action_InboxMessageForceHtml
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSaveMessageAs
triggered()
MainWindow
on_action_InboxSaveMessageAs
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionMarkUnread
triggered()
MainWindow
on_action_InboxMarkUnread
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionNew
triggered()
MainWindow
on_action_YourIdentitiesNew
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionDelete
triggered()
MainWindow
on_action_YourIdentitiesDelete
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionEnable
triggered()
MainWindow
on_action_Enable
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionDisable
triggered()
MainWindow
on_action_Disable
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSetAvatar
triggered()
MainWindow
on_action_TreeWidgetSetAvatar
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionClipboard
triggered()
MainWindow
on_action_Clipboard
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSend
@@ -2303,352 +1913,132 @@ p, li { white-space: pre-wrap; }
triggered()
MainWindow
on_action_SpecialAddressBehaviorDialog
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionNewYourIdentities
triggered()
MainWindow
on_action_YourIdentitiesNew
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionEnableYourIdentities
triggered()
MainWindow
on_action_Enable
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionDisableYourIdentities
triggered()
MainWindow
on_action_Disable
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSetAvatarYourIdentities
triggered()
MainWindow
on_action_TreeWidgetSetAvatar
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionClipboardYourIdentities
triggered()
MainWindow
on_action_Clipboard
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSpecialAddressBehaviorYourIdentities
triggered()
MainWindow
on_action_SpecialAddressBehaviorDialog
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionEmailGateway
triggered()
MainWindow
on_action_EmailGatewayDialog
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionMarkAllRead
triggered()
MainWindow
on_action_MarkAllRead
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookSend
triggered()
MainWindow
on_action_AddressBookSend
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookClipboard
triggered()
MainWindow
on_action_AddressBookClipboard
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookSubscribe
triggered()
MainWindow
on_action_AddressBookSubscribe
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookSetAvatar
triggered()
MainWindow
on_action_AddressBookSetAvatar
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookSetSound
triggered()
MainWindow
on_action_AddressBookSetSound
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookNew
triggered()
MainWindow
on_action_AddressBookNew
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionAddressBookDelete
triggered()
MainWindow
on_action_AddressBookDelete
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsNew
triggered()
MainWindow
on_action_SubscriptionsNew
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsDelete
triggered()
MainWindow
on_action_SubscriptionsDelete
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsClipboard
triggered()
MainWindow
on_action_SubscriptionsClipboard
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsEnable
triggered()
MainWindow
on_action_SubscriptionsEnable
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsDisable
triggered()
MainWindow
on_action_SubscriptionsDisable
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsSetAvatar
triggered()
MainWindow
on_action_TreeWidgetSetAvatar
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionsubscriptionsSend
@@ -2661,48 +2051,18 @@ p, li { white-space: pre-wrap; }
triggered()
MainWindow
on_action_SentTrash
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSentClipboard
triggered()
MainWindow
on_action_SentClipboard
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionForceSend
triggered()
MainWindow
on_action_ForceSend
-
-
- -1
- -1
-
-
- 20
- 20
-
-
actionSentReply
@@ -2715,96 +2075,36 @@ p, li { white-space: pre-wrap; }
returnPressed()
MainWindow
inboxSearchLineEditReturnPressed
-
-
- 20
- 20
-
-
- 20
- 20
-
-
inboxSearchLineEditSubscriptions
returnPressed()
MainWindow
inboxSearchLineEditReturnPressed
-
-
- 20
- 20
-
-
- 20
- 20
-
-
inboxSearchLineEditChans
returnPressed()
MainWindow
inboxSearchLineEditReturnPressed
-
-
- 20
- 20
-
-
- 20
- 20
-
-
inboxSearchLineEdit
textChanged(QString)
MainWindow
inboxSearchLineEditUpdated
-
-
- 20
- 20
-
-
- 20
- 20
-
-
inboxSearchLineEditSubscriptions
textChanged(QString)
MainWindow
inboxSearchLineEditUpdated
-
-
- 20
- 20
-
-
- 20
- 20
-
-
inboxSearchLineEditChans
textChanged(QString)
MainWindow
inboxSearchLineEditUpdated
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tableWidgetAddressBook
@@ -2827,176 +2127,66 @@ p, li { white-space: pre-wrap; }
itemSelectionChanged()
MainWindow
tableWidgetInboxItemClicked
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tableWidgetInboxSubscriptions
itemSelectionChanged()
MainWindow
tableWidgetInboxItemClicked
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tableWidgetInboxChans
itemSelectionChanged()
MainWindow
tableWidgetInboxItemClicked
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetYourIdentities
itemSelectionChanged()
MainWindow
treeWidgetItemClicked
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetSubscriptions
itemSelectionChanged()
MainWindow
treeWidgetItemClicked
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetChans
itemSelectionChanged()
MainWindow
treeWidgetItemClicked
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetYourIdentities
itemChanged(QTreeWidgetItem*,int)
MainWindow
treeWidgetItemChanged
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetSubscriptions
itemChanged(QTreeWidgetItem*,int)
MainWindow
treeWidgetItemChanged
-
-
- 20
- 20
-
-
- 20
- 20
-
-
treeWidgetChans
itemChanged(QTreeWidgetItem*,int)
MainWindow
treeWidgetItemChanged
-
-
- 20
- 20
-
-
- 20
- 20
-
-
tabWidget
currentChanged(int)
MainWindow
tabWidgetCurrentChanged
-
-
- 20
- 20
-
-
- 20
- 20
-
-
horizontalSliderTTL
valueChanged(int)
MainWindow
updateTTL
-
-
- 20
- 20
-
-
- 20
- 20
-
-
--
2.45.1
From 54faa2152f18283bee2dabb9c425070dbd19900d Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Fri, 26 Feb 2021 21:19:56 +0200
Subject: [PATCH 13/14] Call self.window().updateStatusBar directly in
blacklist
---
src/bitmessageqt/blacklist.py | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/bitmessageqt/blacklist.py b/src/bitmessageqt/blacklist.py
index e5d11af8..3c099b10 100644
--- a/src/bitmessageqt/blacklist.py
+++ b/src/bitmessageqt/blacklist.py
@@ -5,7 +5,6 @@ from addresses import addBMIfNotPresent
from bmconfigparser import BMConfigParser
from dialogs import AddAddressDialog
from helper_sql import sqlExecute, sqlQuery
-from queues import UISignalQueue
from retranslateui import RetranslateMixin
from tr import _translate
from uisignaler import UISignaler
@@ -75,21 +74,17 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
sql = '''INSERT INTO whitelist VALUES (?,?,?)'''
sqlExecute(sql, *t)
else:
- UISignalQueue.put((
- 'updateStatusBar',
+ self.window().updateStatusBar(
_translate(
"MainWindow",
"Error: You cannot add the same address to your"
" list twice. Perhaps rename the existing one"
- " if you want.")
- ))
+ " if you want."))
else:
- UISignalQueue.put((
- 'updateStatusBar',
+ self.window().updateStatusBar(
_translate(
"MainWindow",
- "The address you entered was invalid. Ignoring it.")
- ))
+ "The address you entered was invalid. Ignoring it."))
def tableWidgetBlacklistItemChanged(self, item):
if item.column() == 0:
--
2.45.1
From 86cbcdd69985e74f951535541b71b1a5f528d849 Mon Sep 17 00:00:00 2001
From: Dmitri Bogomolov <4glitch@gmail.com>
Date: Wed, 3 Mar 2021 19:00:44 +0200
Subject: [PATCH 14/14] No arg in init_identities_popup_menu()
---
src/bitmessageqt/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index 5927f29e..53370c84 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -1272,7 +1272,7 @@ class MainWindow(Window):
if event.type() == QtCore.QEvent.LanguageChange:
# FIXME: it's called very often
self.retranslateUi()
- self.init_identities_popup_menu(False)
+ self.init_identities_popup_menu()
self.blackwhitelist.init_blacklist_popup_menu()
if event.type() == QtCore.QEvent.WindowStateChange:
if self.windowState() & QtCore.Qt.WindowMinimized:
--
2.45.1