start changing QTreeWiget

This commit is contained in:
sbkaf 2015-03-21 11:37:08 +01:00 committed by Peter Surda
parent 4763fb1238
commit f6f68dc975
3 changed files with 921 additions and 557 deletions

View File

@ -214,8 +214,8 @@ class MyForm(QtGui.QMainWindow):
"clicked()"), self.click_pushButtonTTL) "clicked()"), self.click_pushButtonTTL)
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
"clicked()"), self.click_pushButtonSend) "clicked()"), self.click_pushButtonSend)
#QtCore.QObject.connect(self.ui.pushButtonFetchNamecoinID, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.pushButtonFetchNamecoinID, QtCore.SIGNAL(
#"clicked()"), self.click_pushButtonFetchNamecoinID) "clicked()"), self.click_pushButtonFetchNamecoinID)
QtCore.QObject.connect(self.ui.radioButtonBlacklist, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.radioButtonBlacklist, QtCore.SIGNAL(
"clicked()"), self.click_radioButtonBlacklist) "clicked()"), self.click_radioButtonBlacklist)
QtCore.QObject.connect(self.ui.radioButtonWhitelist, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.radioButtonWhitelist, QtCore.SIGNAL(
@ -271,35 +271,77 @@ class MyForm(QtGui.QMainWindow):
def init_identities_popup_menu(self, connectSignal=True): def init_identities_popup_menu(self, connectSignal=True):
# Popup menu for the Your Identities tab # Popup menu for the Your Identities tab
self.ui.addressContextMenuToolbarYourIdentities = QtGui.QToolBar()
# Actions
self.actionNewYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(_translate(
"MainWindow", "New"), self.on_action_YourIdentitiesNew)
self.actionEnableYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Enable"), self.on_action_Enable)
self.actionDisableYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Disable"), self.on_action_Disable)
self.actionSetAvatarYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Set avatar..."),
self.on_action_TreeWidgetSetAvatar)
self.actionClipboardYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Copy address to clipboard"),
self.on_action_Clipboard)
self.actionSpecialAddressBehaviorYourIdentities = self.ui.addressContextMenuToolbarYourIdentities.addAction(
_translate(
"MainWindow", "Special address behavior..."),
self.on_action_SpecialAddressBehaviorDialog)
self.ui.treeWidgetYourIdentities.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
self.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'),
self.on_context_menuYourIdentities)
self.popMenuYourIdentities = QtGui.QMenu(self)
self.popMenuYourIdentities.addAction(self.actionNewYourIdentities)
self.popMenuYourIdentities.addSeparator()
self.popMenuYourIdentities.addAction(self.actionClipboardYourIdentities)
self.popMenuYourIdentities.addSeparator()
self.popMenuYourIdentities.addAction(self.actionEnableYourIdentities)
self.popMenuYourIdentities.addAction(self.actionDisableYourIdentities)
self.popMenuYourIdentities.addAction(self.actionSetAvatarYourIdentities)
self.popMenuYourIdentities.addAction(self.actionSpecialAddressBehaviorYourIdentities)
def init_chan_popup_menu(self, connectSignal=True):
# Popup menu for the Chanels tab
self.ui.addressContextMenuToolbar = QtGui.QToolBar() self.ui.addressContextMenuToolbar = QtGui.QToolBar()
# Actions # Actions
self.actionNew = self.ui.addressContextMenuToolbar.addAction(_translate( self.actionNew = self.ui.addressContextMenuToolbar.addAction(_translate(
"MainWindow", "New"), self.on_action_YourIdentitiesNew) "MainWindow", "New"), self.on_action_YourIdentitiesNew)
self.actionEnable = self.ui.addressContextMenuToolbar.addAction( self.actionEnable = self.ui.addressContextMenuToolbar.addAction(
_translate( _translate(
"MainWindow", "Enable"), self.on_action_YourIdentitiesEnable) "MainWindow", "Enable"), self.on_action_Enable)
self.actionDisable = self.ui.addressContextMenuToolbar.addAction( self.actionDisable = self.ui.addressContextMenuToolbar.addAction(
_translate( _translate(
"MainWindow", "Disable"), self.on_action_YourIdentitiesDisable) "MainWindow", "Disable"), self.on_action_Disable)
self.actionSetAvatar = self.ui.addressContextMenuToolbar.addAction( self.actionSetAvatar = self.ui.addressContextMenuToolbar.addAction(
_translate( _translate(
"MainWindow", "Set avatar..."), "MainWindow", "Set avatar..."),
self.on_action_YourIdentitiesSetAvatar) self.on_action_TreeWidgetSetAvatar)
self.actionClipboard = self.ui.addressContextMenuToolbar.addAction( self.actionClipboard = self.ui.addressContextMenuToolbar.addAction(
_translate( _translate(
"MainWindow", "Copy address to clipboard"), "MainWindow", "Copy address to clipboard"),
self.on_action_YourIdentitiesClipboard) self.on_action_Clipboard)
self.actionSpecialAddressBehavior = self.ui.addressContextMenuToolbar.addAction( self.actionSpecialAddressBehavior = self.ui.addressContextMenuToolbar.addAction(
_translate( _translate(
"MainWindow", "Special address behavior..."), "MainWindow", "Special address behavior..."),
self.on_action_SpecialAddressBehaviorDialog) self.on_action_SpecialAddressBehaviorDialog)
self.ui.tableWidgetYourIdentities.setContextMenuPolicy( self.ui.treeWidgetChanList.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL( self.connect(self.ui.treeWidgetChanList, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), 'customContextMenuRequested(const QPoint&)'),
self.on_context_menuYourIdentities) self.on_context_menuChan)
self.popMenu = QtGui.QMenu(self) self.popMenu = QtGui.QMenu(self)
self.popMenu.addAction(self.actionNew) self.popMenu.addAction(self.actionNew)
@ -372,11 +414,11 @@ class MyForm(QtGui.QMainWindow):
self.on_action_SubscriptionsDisable) self.on_action_SubscriptionsDisable)
self.actionsubscriptionsSetAvatar = self.ui.subscriptionsContextMenuToolbar.addAction( self.actionsubscriptionsSetAvatar = self.ui.subscriptionsContextMenuToolbar.addAction(
_translate("MainWindow", "Set avatar..."), _translate("MainWindow", "Set avatar..."),
self.on_action_SubscriptionsSetAvatar) self.on_action_TreeWidgetSetAvatar)
self.ui.tableWidgetSubscriptions.setContextMenuPolicy( self.ui.treeWidgetSubscriptions.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu) QtCore.Qt.CustomContextMenu)
if connectSignal: if connectSignal:
self.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL( self.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
'customContextMenuRequested(const QPoint&)'), 'customContextMenuRequested(const QPoint&)'),
self.on_context_menuSubscriptions) self.on_context_menuSubscriptions)
self.popMenuSubscriptions = QtGui.QMenu(self) self.popMenuSubscriptions = QtGui.QMenu(self)
@ -447,6 +489,58 @@ class MyForm(QtGui.QMainWindow):
self.popMenuBlacklist.addAction(self.actionBlacklistDisable) self.popMenuBlacklist.addAction(self.actionBlacklistDisable)
self.popMenuBlacklist.addAction(self.actionBlacklistSetAvatar) self.popMenuBlacklist.addAction(self.actionBlacklistSetAvatar)
def rerenderTabTree(self, tab):
if tab == 'messages':
treeWidget = self.ui.treeWidgetYourIdentities
folders = ['inbox', 'sent', 'trash']
elif tab == 'subscriptions':
treeWidget = self.ui.treeWidgetSubscriptions
folders = ['inbox', 'trash']
elif tab == 'chan':
treeWidget = self.ui.treeWidgetChanList
folders = ['inbox', 'sent', 'trash']
treeWidget.clear()
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled')
isChan = shared.safeConfigGetBoolean(
addressInKeysFile, 'chan')
isMaillinglist = shared.safeConfigGetBoolean(
addressInKeysFile, 'mailinglist')
if tab == 'messages':
if isChan or isMaillinglist:
continue
elif tab == 'subscriptions':
if not isMaillinglist:
continue
elif tab == 'chan':
if not isChan:
continue
newItem = QtGui.QTreeWidgetItem(treeWidget)
newItem.setIcon(0, avatarize(addressInKeysFile))
newItem.setText(0, unicode(
shared.config.get(addressInKeysFile, 'label'), 'utf-8)')
+ ' (' + addressInKeysFile + ')')
newItem.setData(0, Qt.UserRole, [str(addressInKeysFile), "inbox"])
#set text color
if isEnabled:
brush = QtGui.QBrush(QApplication.palette().text().color())
else:
brush = QtGui.QBrush(QtGui.QColor(128, 128, 128))
brush.setStyle(QtCore.Qt.NoBrush)
newItem.setForeground(0, brush)
for folder in folders:
newSubItem = QtGui.QTreeWidgetItem(newItem)
newSubItem.setText(0, _translate("MainWindow", folder))
newSubItem.setData(0, Qt.UserRole, [str(addressInKeysFile), folder])
def __init__(self, parent=None): def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.ui = Ui_MainWindow() self.ui = Ui_MainWindow()
@ -499,66 +593,61 @@ class MyForm(QtGui.QMainWindow):
self.init_identities_popup_menu() self.init_identities_popup_menu()
self.init_addressbook_popup_menu() self.init_addressbook_popup_menu()
self.init_subscriptions_popup_menu() self.init_subscriptions_popup_menu()
self.init_chan_popup_menu()
self.init_sent_popup_menu() self.init_sent_popup_menu()
self.init_blacklist_popup_menu() self.init_blacklist_popup_menu()
# Initialize the user's list of addresses on the 'Your Identities' table. # Initialize the user's list of addresses on the 'Chan' tab.
self.rerenderTabTree('chan')
"""
TODO remove
configSections = shared.config.sections() configSections = shared.config.sections()
for addressInKeysFile in configSections: for addressInKeysFile in configSections:
if addressInKeysFile != 'bitmessagesettings': if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean( isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled') addressInKeysFile, 'enabled')
newItem = QtGui.QTableWidgetItem(unicode(
shared.config.get(addressInKeysFile, 'label'), 'utf-8)'))
if not isEnabled:
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.insertRow(0)
newItem.setIcon(avatarize(addressInKeysFile))
self.ui.tableWidgetYourIdentities.setItem(0, 0, newItem)
newItem = QtGui.QTableWidgetItem(addressInKeysFile)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if shared.safeConfigGetBoolean(addressInKeysFile, 'chan'): if shared.safeConfigGetBoolean(addressInKeysFile, 'chan'):
newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange newItem = QtGui.QTableWidgetItem(unicode(
if not isEnabled: shared.config.get(addressInKeysFile, 'label'), 'utf-8)'))
newItem.setTextColor(QtGui.QColor(128, 128, 128)) if not isEnabled:
if shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist'): newItem.setTextColor(QtGui.QColor(128, 128, 128))
newItem.setTextColor(QtGui.QColor(137, 04, 177)) # magenta self.ui.tableWidgetChanList.insertRow(0)
self.ui.tableWidgetYourIdentities.setItem(0, 1, newItem) newItem.setIcon(avatarize(addressInKeysFile))
newItem = QtGui.QTableWidgetItem(str( self.ui.tableWidgetChanList.setItem(0, 0, newItem)
decodeAddress(addressInKeysFile)[2])) newItem = QtGui.QTableWidgetItem(addressInKeysFile)
newItem.setFlags( newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not isEnabled: if shared.safeConfigGetBoolean(addressInKeysFile, 'chan'):
newItem.setTextColor(QtGui.QColor(128, 128, 128)) newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange
self.ui.tableWidgetYourIdentities.setItem(0, 2, newItem) if not isEnabled:
if isEnabled: newItem.setTextColor(QtGui.QColor(128, 128, 128))
status, addressVersionNumber, streamNumber, hash = decodeAddress( if shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist'):
addressInKeysFile) newItem.setTextColor(QtGui.QColor(137, 04, 177)) # magenta
self.ui.tableWidgetChanList.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(str(
decodeAddress(addressInKeysFile)[2]))
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not isEnabled:
newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetChanList.setItem(0, 2, newItem)
if isEnabled:
status, addressVersionNumber, streamNumber, hash = decodeAddress(
addressInKeysFile)
"""
# Initialize the user's list of addresses on the 'Received' tab. # Initialize the user's list of addresses on the 'Messages' tab.
configSections = shared.config.sections() self.rerenderTabTree('messages')
for addressInKeysFile in configSections:
if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled')
if isEnabled and not shared.safeConfigGetBoolean(addressInKeysFile, 'chan') and not shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist'): # Set welcome message
newItem = QtGui.QTreeWidgetItem(self.ui.treeWidgetYourIdentities) self.ui.textEditInboxMessage.setText(
newItem.setIcon(0, avatarize(addressInKeysFile)) """
newItem.setText(0, unicode( Welcome to easy and secure Bitmessage
shared.config.get(addressInKeysFile, 'label'), 'utf-8)') * send messages like e-mails
+ ' (' + addressInKeysFile + ')') * send broadcast messages like twitter or
newSubItem = QtGui.QTreeWidgetItem(newItem) * discuss in chan(el)s with other people
newSubItem.setText(0, _translate("MainWindow", "inbox")) """
newSubItem = QtGui.QTreeWidgetItem(newItem) )
newSubItem.setText(0, _translate("MainWindow", "sent"))
newSubItem = QtGui.QTreeWidgetItem(newItem)
newSubItem.setText(0, _translate("MainWindow", "trash"))
# Load inbox from messages database file
#self.loadInbox()
self.loadMessagelist("BM-2cTxBr9RxjorkjvkgTkD1AgjhUJBwDnVKY");
# Initialize the address book # Initialize the address book
self.rerenderAddressBook() self.rerenderAddressBook()
@ -576,14 +665,24 @@ class MyForm(QtGui.QMainWindow):
self.ui.radioButtonWhitelist.click() self.ui.radioButtonWhitelist.click()
self.rerenderBlackWhiteList() self.rerenderBlackWhiteList()
QtCore.QObject.connect(self.ui.tableWidgetYourIdentities, QtCore.SIGNAL( # Initialize addresslists
"itemChanged(QTableWidgetItem *)"), self.tableWidgetYourIdentitiesItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.tableWidgetAddressBook, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.tableWidgetAddressBookItemChanged) "itemChanged(QTableWidgetItem *)"), self.tableWidgetAddressBookItemChanged)
QtCore.QObject.connect(self.ui.tableWidgetSubscriptions, QtCore.SIGNAL( """
"itemChanged(QTableWidgetItem *)"), self.tableWidgetSubscriptionsItemChanged) TODO implement
QtCore.QObject.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.treeWidgetSubscriptionsItemChanged)
QtCore.QObject.connect(self.ui.treeWidgetChanList, QtCore.SIGNAL(
"itemChanged(QTableWidgetItem *)"), self.treeWidgetChanListItemChanged)
"""
QtCore.QObject.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL( QtCore.QObject.connect(self.ui.tableWidgetInbox, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.tableWidgetInboxItemClicked) "itemSelectionChanged ()"), self.tableWidgetInboxItemClicked)
QtCore.QObject.connect(self.ui.treeWidgetYourIdentities, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetYourIdentitiesItemClicked)
QtCore.QObject.connect(self.ui.treeWidgetSubscriptions, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetSubscribtionsItemClicked)
QtCore.QObject.connect(self.ui.treeWidgetChanList, QtCore.SIGNAL(
"itemSelectionChanged ()"), self.treeWidgetChanListItemClicked)
# Put the colored icon on the status bar # Put the colored icon on the status bar
# self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/yellowicon.png")) # self.ui.pushButtonStatusIcon.setIcon(QIcon(":/newPrefix/images/yellowicon.png"))
@ -598,9 +697,9 @@ class MyForm(QtGui.QMainWindow):
# Set the icon sizes for the identicons # Set the icon sizes for the identicons
identicon_size = 3*7 identicon_size = 3*7
self.ui.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.tableWidgetInbox.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.tableWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.treeWidgetChanList.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.treeWidgetYourIdentities.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.tableWidgetSubscriptions.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.ui.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
self.ui.tableWidgetBlacklist.setIconSize(QtCore.QSize(identicon_size, identicon_size)) self.ui.tableWidgetBlacklist.setIconSize(QtCore.QSize(identicon_size, identicon_size))
@ -649,6 +748,7 @@ class MyForm(QtGui.QMainWindow):
# structures were initialized. # structures were initialized.
self.rerenderComboBoxSendFrom() self.rerenderComboBoxSendFrom()
self.rerenderComboBoxSendFromBroadcast()
# Put the TTL slider in the correct spot # Put the TTL slider in the correct spot
TTL = shared.config.getint('bitmessagesettings', 'ttl') TTL = shared.config.getint('bitmessagesettings', 'ttl')
@ -671,11 +771,11 @@ class MyForm(QtGui.QMainWindow):
options["user"] = shared.config.get('bitmessagesettings', 'namecoinrpcuser') options["user"] = shared.config.get('bitmessagesettings', 'namecoinrpcuser')
options["password"] = shared.config.get('bitmessagesettings', 'namecoinrpcpassword') options["password"] = shared.config.get('bitmessagesettings', 'namecoinrpcpassword')
nc = namecoinConnection(options) nc = namecoinConnection(options)
#if nc.test()[0] == 'failed': if nc.test()[0] == 'failed':
#self.ui.pushButtonFetchNamecoinID.hide() self.ui.pushButtonFetchNamecoinID.hide()
except: except:
print 'There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button' print 'There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button'
#self.ui.pushButtonFetchNamecoinID.hide() self.ui.pushButtonFetchNamecoinID.hide()
def updateTTL(self, sliderPosition): def updateTTL(self, sliderPosition):
TTL = int(sliderPosition ** 3.199 + 3600) TTL = int(sliderPosition ** 3.199 + 3600)
@ -918,7 +1018,7 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent
# Load inbox from messages database file # Load inbox from messages database file
def loadMessagelist(self, account, folder="inbox", where="", what=""): def loadMessagelist(self, tableWidget, account, folder="inbox", where="", what=""):
what = "%" + what + "%" what = "%" + what + "%"
if where == "To": if where == "To":
where = "toaddress" where = "toaddress"
@ -932,9 +1032,9 @@ class MyForm(QtGui.QMainWindow):
where = "toaddress || fromaddress || subject || message" where = "toaddress || fromaddress || subject || message"
if folder == "sent": if folder == "sent":
accountaddress = "fromaddress" accounttype = "fromaddress"
else: else:
accountaddress = "toaddress" accounttype = "toaddress"
sqlStatement = ''' sqlStatement = '''
SELECT msgid, toaddress, fromaddress, subject, received, read SELECT msgid, toaddress, fromaddress, subject, received, read
@ -942,8 +1042,8 @@ class MyForm(QtGui.QMainWindow):
ORDER BY received ORDER BY received
''' % (accounttype, where) ''' % (accounttype, where)
while self.ui.tableWidgetInbox.rowCount() > 0: while tableWidget.rowCount() > 0:
self.ui.tableWidgetInbox.removeRow(0) tableWidget.removeRow(0)
font = QFont() font = QFont()
font.setBold(True) font.setBold(True)
@ -982,7 +1082,7 @@ class MyForm(QtGui.QMainWindow):
fromLabel = fromAddress fromLabel = fromAddress
# message row # message row
self.ui.tableWidgetInbox.insertRow(0) tableWidget.insertRow(0)
# to # to
to_item = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8')) to_item = QtGui.QTableWidgetItem(unicode(toLabel, 'utf-8'))
to_item.setToolTip(unicode(toLabel, 'utf-8')) to_item.setToolTip(unicode(toLabel, 'utf-8'))
@ -996,7 +1096,7 @@ class MyForm(QtGui.QMainWindow):
if shared.safeConfigGetBoolean(str(toAddress), 'chan'): if shared.safeConfigGetBoolean(str(toAddress), 'chan'):
to_item.setTextColor(QtGui.QColor(216, 119, 0)) # orange to_item.setTextColor(QtGui.QColor(216, 119, 0)) # orange
to_item.setIcon(avatarize(toAddress)) to_item.setIcon(avatarize(toAddress))
self.ui.tableWidgetInbox.setItem(0, 0, to_item) tableWidget.setItem(0, 0, to_item)
# from # from
from_item = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8')) from_item = QtGui.QTableWidgetItem(unicode(fromLabel, 'utf-8'))
from_item.setToolTip(unicode(fromLabel, 'utf-8')) from_item.setToolTip(unicode(fromLabel, 'utf-8'))
@ -1008,7 +1108,7 @@ class MyForm(QtGui.QMainWindow):
if shared.safeConfigGetBoolean(str(fromAddress), 'chan'): if shared.safeConfigGetBoolean(str(fromAddress), 'chan'):
from_item.setTextColor(QtGui.QColor(216, 119, 0)) # orange from_item.setTextColor(QtGui.QColor(216, 119, 0)) # orange
from_item.setIcon(avatarize(fromAddress)) from_item.setIcon(avatarize(fromAddress))
self.ui.tableWidgetInbox.setItem(0, 1, from_item) tableWidget.setItem(0, 1, from_item)
# subject # subject
subject_item = QtGui.QTableWidgetItem(unicode(subject, 'utf-8')) subject_item = QtGui.QTableWidgetItem(unicode(subject, 'utf-8'))
subject_item.setToolTip(unicode(subject, 'utf-8')) subject_item.setToolTip(unicode(subject, 'utf-8'))
@ -1016,7 +1116,7 @@ class MyForm(QtGui.QMainWindow):
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read: if not read:
subject_item.setFont(font) subject_item.setFont(font)
self.ui.tableWidgetInbox.setItem(0, 2, subject_item) tableWidget.setItem(0, 2, subject_item)
# time received # time received
time_item = myTableWidgetItem(l10n.formatTimestamp(received)) time_item = myTableWidgetItem(l10n.formatTimestamp(received))
time_item.setToolTip(l10n.formatTimestamp(received)) time_item.setToolTip(l10n.formatTimestamp(received))
@ -1026,10 +1126,10 @@ class MyForm(QtGui.QMainWindow):
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not read: if not read:
time_item.setFont(font) time_item.setFont(font)
self.ui.tableWidgetInbox.setItem(0, 3, time_item) tableWidget.setItem(0, 3, time_item)
self.ui.tableWidgetInbox.sortItems(3, Qt.DescendingOrder) tableWidget.sortItems(3, Qt.DescendingOrder)
self.ui.tableWidgetInbox.keyPressEvent = self.tableWidgetInboxKeyPressEvent tableWidget.keyPressEvent = self.tableWidgetInboxKeyPressEvent
# Load inbox from messages database file # Load inbox from messages database file
def loadInbox(self, where="", what=""): def loadInbox(self, where="", what=""):
@ -1586,7 +1686,7 @@ class MyForm(QtGui.QMainWindow):
if event.type() == QtCore.QEvent.LanguageChange: if event.type() == QtCore.QEvent.LanguageChange:
self.ui.retranslateUi(self) self.ui.retranslateUi(self)
self.init_inbox_popup_menu(False) 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_addressbook_popup_menu(False)
self.init_subscriptions_popup_menu(False) self.init_subscriptions_popup_menu(False)
self.init_sent_popup_menu(False) self.init_sent_popup_menu(False)
@ -1972,6 +2072,9 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetAddressBook.setItem(0, 1, newItem) self.ui.tableWidgetAddressBook.setItem(0, 1, newItem)
def rerenderSubscriptions(self): def rerenderSubscriptions(self):
self.rerenderTabTree('subscriptions')
"""
TODO remove
self.ui.tableWidgetSubscriptions.setRowCount(0) self.ui.tableWidgetSubscriptions.setRowCount(0)
queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions') queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions')
for row in queryreturn: for row in queryreturn:
@ -1988,6 +2091,7 @@ class MyForm(QtGui.QMainWindow):
if not enabled: if not enabled:
newItem.setTextColor(QtGui.QColor(128, 128, 128)) newItem.setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetSubscriptions.setItem(0, 1, newItem) self.ui.tableWidgetSubscriptions.setItem(0, 1, newItem)
"""
def rerenderBlackWhiteList(self): def rerenderBlackWhiteList(self):
self.ui.tableWidgetBlacklist.setRowCount(0) self.ui.tableWidgetBlacklist.setRowCount(0)
@ -2020,10 +2124,18 @@ more work your computer must do to send the message. A Time-To-Live of four or f
def click_pushButtonSend(self): def click_pushButtonSend(self):
self.statusBar().showMessage('') self.statusBar().showMessage('')
toAddresses = str(self.ui.lineEditTo.text())
subject = str(self.ui.lineEditSubject.text().toUtf8()) if self.ui.tabWidgetSend.currentIndex() == 0:
message = str( sendMessageToPeople = True
self.ui.textEditMessage.document().toPlainText().toUtf8()) toAddresses = str(self.ui.lineEditTo.text())
subject = str(self.ui.lineEditSubject.text().toUtf8())
message = str(
self.ui.textEditMessage.document().toPlainText().toUtf8())
else:
sendMessageToPeople = False
subject = str(self.ui.lineEditSubjectBroadcast.text().toUtf8())
message = str(
self.ui.textEditMessageBroadcast.document().toPlainText().toUtf8())
""" """
The whole network message must fit in 2^18 bytes. Let's assume 500 The whole network message must fit in 2^18 bytes. Let's assume 500
bytes of overhead. If someone wants to get that too an exact bytes of overhead. If someone wants to get that too an exact
@ -2035,7 +2147,13 @@ more work your computer must do to send the message. A Time-To-Live of four or f
QMessageBox.about(self, _translate("MainWindow", "Message too long"), _translate( QMessageBox.about(self, _translate("MainWindow", "Message too long"), _translate(
"MainWindow", "The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.").arg(len(message) - (2 ** 18 - 500))) "MainWindow", "The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.").arg(len(message) - (2 ** 18 - 500)))
return return
if self.ui.radioButtonSpecific.isChecked(): # To send a message to specific people (rather than broadcast)
if toAddresses:
print toAddresses
print subject
print message
return
if sendMessageToPeople: # To send a message to specific people (rather than broadcast)
toAddressesList = [s.strip() toAddressesList = [s.strip()
for s in toAddresses.replace(',', ';').split(';')] for s in toAddresses.replace(',', ';').split(';')]
toAddressesList = list(set( toAddressesList = list(set(
@ -2168,11 +2286,10 @@ more work your computer must do to send the message. A Time-To-Live of four or f
shared.workerQueue.put(('sendbroadcast', '')) shared.workerQueue.put(('sendbroadcast', ''))
self.ui.comboBoxSendFrom.setCurrentIndex(0) self.ui.comboBoxSendFromBroadcast.setCurrentIndex(0)
self.ui.lineEditTo.setText('') self.ui.lineEditSubjectBroadcast.setText('')
self.ui.lineEditSubject.setText('') self.ui.textEditMessageBroadcast.setText('')
self.ui.textEditMessage.setText('') self.ui.tabWidget.setCurrentIndex(1)
self.ui.tabWidget.setCurrentIndex(2)
self.ui.tableWidgetInbox.setCurrentCell(0, 0) self.ui.tableWidgetInbox.setCurrentCell(0, 0)
def click_pushButtonLoadFromAddressBook(self): def click_pushButtonLoadFromAddressBook(self):
@ -2199,10 +2316,9 @@ more work your computer must do to send the message. A Time-To-Live of four or f
# If this is a chan then don't let people broadcast because no one # If this is a chan then don't let people broadcast because no one
# should subscribe to chan addresses. # should subscribe to chan addresses.
if shared.safeConfigGetBoolean(str(address), 'chan'): if shared.safeConfigGetBoolean(str(address), 'chan'):
self.ui.radioButtonSpecific.click() self.ui.tabWidgetSend.setCurrentIndex(0)
self.ui.radioButtonBroadcast.setEnabled(False)
else: else:
self.ui.radioButtonBroadcast.setEnabled(True) self.ui.tabWidgetSend.setCurrentIndex(1)
def rerenderComboBoxSendFrom(self): def rerenderComboBoxSendFrom(self):
self.ui.comboBoxSendFrom.clear() self.ui.comboBoxSendFrom.clear()
@ -2211,7 +2327,8 @@ more work your computer must do to send the message. A Time-To-Live of four or f
if addressInKeysFile != 'bitmessagesettings': if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean( isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read. addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
if isEnabled: isMaillinglist = shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist')
if isEnabled and not isMaillinglist:
self.ui.comboBoxSendFrom.insertItem(0, avatarize(addressInKeysFile), unicode(shared.config.get( self.ui.comboBoxSendFrom.insertItem(0, avatarize(addressInKeysFile), unicode(shared.config.get(
addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile) addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile)
self.ui.comboBoxSendFrom.insertItem(0, '', '') self.ui.comboBoxSendFrom.insertItem(0, '', '')
@ -2220,6 +2337,23 @@ more work your computer must do to send the message. A Time-To-Live of four or f
else: else:
self.ui.comboBoxSendFrom.setCurrentIndex(0) self.ui.comboBoxSendFrom.setCurrentIndex(0)
def rerenderComboBoxSendFromBroadcast(self):
self.ui.comboBoxSendFromBroadcast.clear()
configSections = shared.config.sections()
for addressInKeysFile in configSections:
if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean(
addressInKeysFile, 'enabled') # I realize that this is poor programming practice but I don't care. It's easier for others to read.
isMaillinglist = shared.safeConfigGetBoolean(addressInKeysFile, 'mailinglist')
if isEnabled and isMaillinglist:
self.ui.comboBoxSendFromBroadcast.insertItem(0, avatarize(addressInKeysFile), unicode(shared.config.get(
addressInKeysFile, 'label'), 'utf-8'), addressInKeysFile)
self.ui.comboBoxSendFromBroadcast.insertItem(0, '', '')
if(self.ui.comboBoxSendFromBroadcast.count() == 2):
self.ui.comboBoxSendFromBroadcast.setCurrentIndex(1)
else:
self.ui.comboBoxSendFromBroadcast.setCurrentIndex(0)
# This function is called by the processmsg function when that function # This function is called by the processmsg function when that function
# receives a message to an address that is acting as a # receives a message to an address that is acting as a
# pseudo-mailing-list. The message will be broadcast out. This function # pseudo-mailing-list. The message will be broadcast out. This function
@ -2378,7 +2512,9 @@ more work your computer must do to send the message. A Time-To-Live of four or f
#This should be handled outside of this function, for error displaying and such, but it must also be checked here. #This should be handled outside of this function, for error displaying and such, but it must also be checked here.
if shared.isAddressInMySubscriptionsList(address): if shared.isAddressInMySubscriptionsList(address):
return return
"""
#Add to UI list #Add to UI list
TODO remove
self.ui.tableWidgetSubscriptions.setSortingEnabled(False) self.ui.tableWidgetSubscriptions.setSortingEnabled(False)
self.ui.tableWidgetSubscriptions.insertRow(0) self.ui.tableWidgetSubscriptions.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8')) newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
@ -2388,11 +2524,14 @@ more work your computer must do to send the message. A Time-To-Live of four or f
newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled ) newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )
self.ui.tableWidgetSubscriptions.setItem(0,1,newItem) self.ui.tableWidgetSubscriptions.setItem(0,1,newItem)
self.ui.tableWidgetSubscriptions.setSortingEnabled(True) self.ui.tableWidgetSubscriptions.setSortingEnabled(True)
"""
#Add to database (perhaps this should be separated from the MyForm class) #Add to database (perhaps this should be separated from the MyForm class)
sqlExecute('''INSERT INTO subscriptions VALUES (?,?,?)''',str(label),address,True) sqlExecute('''INSERT INTO subscriptions VALUES (?,?,?)''',str(label),address,True)
self.rerenderInboxFromLabels() self.rerenderInboxFromLabels()
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
self.rerenderTabTree('subscriptions')
def click_pushButtonAddSubscription(self): def click_pushButtonAddSubscription(self):
self.NewSubscriptionDialogInstance = NewSubscriptionDialog(self) self.NewSubscriptionDialogInstance = NewSubscriptionDialog(self)
if self.NewSubscriptionDialogInstance.exec_(): if self.NewSubscriptionDialogInstance.exec_():
@ -2402,7 +2541,7 @@ more work your computer must do to send the message. A Time-To-Live of four or f
address = addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text())) address = addBMIfNotPresent(str(self.NewSubscriptionDialogInstance.ui.lineEditSubscriptionAddress.text()))
# We must check to see if the address is already in the subscriptions list. The user cannot add it again or else it will cause problems when updating and deleting the entry. # We must check to see if the address is already in the subscriptions list. The user cannot add it again or else it will cause problems when updating and deleting the entry.
if shared.isAddressInMySubscriptionsList(address): if shared.isAddressInMySubscriptionsList(address):
self.statusBar().showMessage(_translate("MainWindow", "Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want.")) self.statusBar().showMessage(_translate("MainWindow", "Error: You cannot add the same address to your subscriptions twice. Perhaps rename the existing one if you want."))
return return
label = self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8() label = self.NewSubscriptionDialogInstance.ui.newsubscriptionlabel.text().toUtf8()
self.addSubscription(address, label) self.addSubscription(address, label)
@ -2702,9 +2841,7 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.dialog = SpecialAddressBehaviorDialog(self) self.dialog = SpecialAddressBehaviorDialog(self)
# For Modal dialogs # For Modal dialogs
if self.dialog.exec_(): if self.dialog.exec_():
currentRow = self.ui.tableWidgetYourIdentities.currentRow() addressAtCurrentRow = self.getCurrentAccount()
addressAtCurrentRow = str(
self.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'):
return return
if self.dialog.ui.radioButtonBehaveNormalAddress.isChecked(): if self.dialog.ui.radioButtonBehaveNormalAddress.isChecked():
@ -2712,20 +2849,50 @@ more work your computer must do to send the message. A Time-To-Live of four or f
addressAtCurrentRow), 'mailinglist', 'false') addressAtCurrentRow), 'mailinglist', 'false')
# Set the color to either black or grey # Set the color to either black or grey
if shared.config.getboolean(addressAtCurrentRow, 'enabled'): if shared.config.getboolean(addressAtCurrentRow, 'enabled'):
self.ui.tableWidgetYourIdentities.item( self.setCurrentItemColor(QApplication.palette()
.text().color())
else:
self.setCurrentItemColor(QtGui.QColor(128, 128, 128))
else:
shared.config.set(str(
addressAtCurrentRow), 'mailinglist', 'true')
shared.config.set(str(addressAtCurrentRow), 'mailinglistname', str(
self.dialog.ui.lineEditMailingListName.text().toUtf8()))
self.setCurrentItemColor(QtGui.QColor(137, 04, 177)) #magenta
shared.writeKeysFile()
self.rerenderInboxToLabels()
"""
TODO remove
def on_action_ChanSpecialAddressBehaviorDialog(self):
self.dialog = SpecialAddressBehaviorDialog(self)
# For Modal dialogs
if self.dialog.exec_():
currentRow = self.ui.tableWidgetChanList.currentRow()
addressAtCurrentRow = str(
self.ui.tableWidgetChanList.item(currentRow, 1).text())
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'):
return
if self.dialog.ui.radioButtonBehaveNormalAddress.isChecked():
shared.config.set(str(
addressAtCurrentRow), 'mailinglist', 'false')
# Set the color to either black or grey
if shared.config.getboolean(addressAtCurrentRow, 'enabled'):
self.ui.tableWidgetChanList.item(
currentRow, 1).setTextColor(QApplication.palette() currentRow, 1).setTextColor(QApplication.palette()
.text().color()) .text().color())
else: else:
self.ui.tableWidgetYourIdentities.item( self.ui.tableWidgetChanList.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128)) currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
else: else:
shared.config.set(str( shared.config.set(str(
addressAtCurrentRow), 'mailinglist', 'true') addressAtCurrentRow), 'mailinglist', 'true')
shared.config.set(str(addressAtCurrentRow), 'mailinglistname', str( shared.config.set(str(addressAtCurrentRow), 'mailinglistname', str(
self.dialog.ui.lineEditMailingListName.text().toUtf8())) self.dialog.ui.lineEditMailingListName.text().toUtf8()))
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) # magenta self.ui.tableWidgetChanList.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) # magenta
shared.writeKeysFile() shared.writeKeysFile()
self.rerenderInboxToLabels() self.rerenderInboxToLabels()
"""
def click_NewAddressDialog(self): def click_NewAddressDialog(self):
self.dialog = NewAddressDialog(self) self.dialog = NewAddressDialog(self)
@ -2912,7 +3079,7 @@ more work your computer must do to send the message. A Time-To-Live of four or f
else: else:
self.ui.lineEditSubject.setText( self.ui.lineEditSubject.setText(
'Re: ' + self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()) 'Re: ' + self.ui.tableWidgetInbox.item(currentInboxRow, 2).text())
self.ui.radioButtonSpecific.setChecked(True) self.ui.tabWidgetSend.setCurrentIndex(0)
self.ui.tabWidget.setCurrentIndex(1) self.ui.tabWidget.setCurrentIndex(1)
def on_action_InboxAddSenderToAddressBook(self): def on_action_InboxAddSenderToAddressBook(self):
@ -3088,7 +3255,7 @@ more work your computer must do to send the message. A Time-To-Live of four or f
addressAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow,1).text()) addressAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow,1).text())
# Then subscribe to it... provided it's not already in the address book # Then subscribe to it... provided it's not already in the address book
if shared.isAddressInMySubscriptionsList(addressAtCurrentRow): if shared.isAddressInMySubscriptionsList(addressAtCurrentRow):
self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your subsciptions twice. Perhaps rename the existing one if you want.")) self.statusBar().showMessage(QtGui.QApplication.translate("MainWindow", "Error: You cannot add the same address to your subscriptions twice. Perhaps rename the existing one if you want."))
continue continue
labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8() labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()
self.addSubscription(addressAtCurrentRow, labelAtCurrentRow) self.addSubscription(addressAtCurrentRow, labelAtCurrentRow)
@ -3104,6 +3271,8 @@ more work your computer must do to send the message. A Time-To-Live of four or f
def on_action_SubscriptionsDelete(self): def on_action_SubscriptionsDelete(self):
print 'clicked Delete' print 'clicked Delete'
"""
TODO implement
currentRow = self.ui.tableWidgetSubscriptions.currentRow() currentRow = self.ui.tableWidgetSubscriptions.currentRow()
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item( labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8() currentRow, 0).text().toUtf8()
@ -3114,15 +3283,21 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.ui.tableWidgetSubscriptions.removeRow(currentRow) self.ui.tableWidgetSubscriptions.removeRow(currentRow)
self.rerenderInboxFromLabels() self.rerenderInboxFromLabels()
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
"""
def on_action_SubscriptionsClipboard(self): def on_action_SubscriptionsClipboard(self):
"""
TODO implement
currentRow = self.ui.tableWidgetSubscriptions.currentRow() currentRow = self.ui.tableWidgetSubscriptions.currentRow()
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item( addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 1).text() currentRow, 1).text()
clipboard = QtGui.QApplication.clipboard() clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow)) clipboard.setText(str(addressAtCurrentRow))
"""
def on_action_SubscriptionsEnable(self): def on_action_SubscriptionsEnable(self):
"""
TODO implement
currentRow = self.ui.tableWidgetSubscriptions.currentRow() currentRow = self.ui.tableWidgetSubscriptions.currentRow()
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item( labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8() currentRow, 0).text().toUtf8()
@ -3136,8 +3311,11 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.ui.tableWidgetSubscriptions.item( self.ui.tableWidgetSubscriptions.item(
currentRow, 1).setTextColor(QApplication.palette().text().color()) currentRow, 1).setTextColor(QApplication.palette().text().color())
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
"""
def on_action_SubscriptionsDisable(self): def on_action_SubscriptionsDisable(self):
"""
TODO implement
currentRow = self.ui.tableWidgetSubscriptions.currentRow() currentRow = self.ui.tableWidgetSubscriptions.currentRow()
labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item( labelAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
currentRow, 0).text().toUtf8() currentRow, 0).text().toUtf8()
@ -3151,10 +3329,14 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.ui.tableWidgetSubscriptions.item( self.ui.tableWidgetSubscriptions.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128)) currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
shared.reloadBroadcastSendersForWhichImWatching() shared.reloadBroadcastSendersForWhichImWatching()
"""
def on_context_menuSubscriptions(self, point): def on_context_menuSubscriptions(self, point):
"""
TODO implement
self.popMenuSubscriptions.exec_( self.popMenuSubscriptions.exec_(
self.ui.tableWidgetSubscriptions.mapToGlobal(point)) self.ui.tableWidgetSubscriptions.mapToGlobal(point))
"""
# Group of functions for the Blacklist dialog box # Group of functions for the Blacklist dialog box
def on_action_BlacklistNew(self): def on_action_BlacklistNew(self):
@ -3219,70 +3401,151 @@ more work your computer must do to send the message. A Time-To-Live of four or f
sqlExecute( sqlExecute(
'''UPDATE whitelist SET enabled=0 WHERE address=?''', str(addressAtCurrentRow)) '''UPDATE whitelist SET enabled=0 WHERE address=?''', str(addressAtCurrentRow))
def getCurrentTreeWidget(self):
currentIndex = self.ui.tabWidget.currentIndex();
treeWidgetList = [
self.ui.treeWidgetYourIdentities,
False,
self.ui.treeWidgetSubscriptions,
self.ui.treeWidgetChans
]
if currentIndex >= 0 and currentIndex < len(treeWidgetList):
return treeWidgetList[currentIndex]
else:
return False
# Group of functions for the Your Identities dialog box # Group of functions for the Your Identities dialog box
def getCurrentAccount(self):
treeWidget = self.getCurrentTreeWidget()
if treeWidget:
currentItem = treeWidget.currentItem()
if currentItem:
accountFolder = currentItem.data(0, Qt.UserRole).toPyObject()
account = accountFolder[0]
return str(account)
else:
# TODO need debug msg?
return False
def getCurrentFolder(self):
treeWidget = self.getCurrentTreeWidget()
if treeWidget:
currentItem = treeWidget.currentItem()
if currentItem:
accountFolder = currentItem.data(0, Qt.UserRole).toPyObject()
folder = accountFolder[1]
return str(folder)
else:
# TODO need debug msg?
return False
def setCurrentItemColor(self, color):
treeWidget = self.getCurrentTreeWidget()
if treeWidget:
brush = QtGui.QBrush()
brush.setStyle(QtCore.Qt.NoBrush)
currentItem = treeWidget.currentItem()
currentItem.setForeground(0, brush)
def on_action_YourIdentitiesNew(self): def on_action_YourIdentitiesNew(self):
self.click_NewAddressDialog() self.click_NewAddressDialog()
def on_action_YourIdentitiesEnable(self): def on_action_Enable(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow() addressAtCurrentRow = self.getCurrentAccount()
self.enableIdentity(addressAtCurrentRow)
self.setCurrentItemColor(QApplication.palette().text().color())
"""
TODO remove
def on_action_ChanEnable(self):
currentRow = self.ui.tableWidgetChanList.currentRow()
addressAtCurrentRow = str( addressAtCurrentRow = str(
self.ui.tableWidgetYourIdentities.item(currentRow, 1).text()) self.ui.tableWidgetChanList.item(currentRow, 1).text())
shared.config.set(addressAtCurrentRow, 'enabled', 'true') self.ui.tableWidgetChanList.item(
shared.writeKeysFile()
self.ui.tableWidgetYourIdentities.item(
currentRow, 0).setTextColor(QApplication.palette().text().color()) currentRow, 0).setTextColor(QApplication.palette().text().color())
self.ui.tableWidgetYourIdentities.item( self.ui.tableWidgetChanList.item(
currentRow, 1).setTextColor(QApplication.palette().text().color()) currentRow, 1).setTextColor(QApplication.palette().text().color())
self.ui.tableWidgetYourIdentities.item( self.ui.tableWidgetChanList.item(
currentRow, 2).setTextColor(QApplication.palette().text().color()) currentRow, 2).setTextColor(QApplication.palette().text().color())
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'): if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) # magenta self.ui.tableWidgetChanList.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) # magenta
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): if shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'):
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(216, 119, 0)) # orange self.ui.tableWidgetChanList.item(currentRow, 1).setTextColor(QtGui.QColor(216, 119, 0)) # orange
shared.reloadMyAddressHashes() self.enableIdentity(addressAtCurrentRow)
"""
def on_action_YourIdentitiesDisable(self): def enableIdentity(self, address):
currentRow = self.ui.tableWidgetYourIdentities.currentRow() shared.config.set(address, 'enabled', 'true')
addressAtCurrentRow = str(
self.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
shared.config.set(str(addressAtCurrentRow), 'enabled', 'false')
self.ui.tableWidgetYourIdentities.item(
currentRow, 0).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetYourIdentities.item(
currentRow, 2).setTextColor(QtGui.QColor(128, 128, 128))
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.tableWidgetYourIdentities.item(currentRow, 1).setTextColor(QtGui.QColor(137, 04, 177)) # magenta
shared.writeKeysFile() shared.writeKeysFile()
shared.reloadMyAddressHashes() shared.reloadMyAddressHashes()
def on_action_YourIdentitiesClipboard(self): def on_action_Disable(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow() address = self.getCurrentAccount()
addressAtCurrentRow = self.ui.tableWidgetYourIdentities.item( self.disableIdentity(address)
currentRow, 1).text() self.setCurrentItemColor(QtGui.QColor(128, 128, 128))
"""
TODO remove
def on_action_ChanDisable(self):
currentRow = self.ui.tableWidgetChanList.currentRow()
addressAtCurrentRow = str(
self.ui.tableWidgetChanList.item(currentRow, 1).text())
self.ui.tableWidgetChanList.item(
currentRow, 0).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetChanList.item(
currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
self.ui.tableWidgetChanList.item(
currentRow, 2).setTextColor(QtGui.QColor(128, 128, 128))
self.disableIdentity(address)
"""
def disableIdentity(self, address):
shared.config.set(str(addressAtCurrentRow), 'enabled', 'false')
shared.writeKeysFile()
shared.reloadMyAddressHashes()
def on_action_Clipboard(self):
addressAtCurrentRow = self.getCurrentAccount()
clipboard = QtGui.QApplication.clipboard() clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow)) clipboard.setText(str(addressAtCurrentRow))
def on_action_YourIdentitiesSetAvatar(self): """
self.on_action_SetAvatar(self.ui.tableWidgetYourIdentities) TODO remove
def on_action_ChanClipboard(self):
currentRow = self.ui.tableWidgetChanList.currentRow()
addressAtCurrentRow = self.ui.tableWidgetChanList.item(
currentRow, 1).text()
clipboard = QtGui.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
"""
#set avatar functions
def on_action_TreeWidgetSetAvatar(self):
addressAtCurrentRow = self.getCurrentAccount()
treeWidget = self.getCurrentTreeWidget()
setToIdenticon = not self.setAvatar(addressAtCurrentRow)
if treeWidget and setToIdenticon:
currentItem = treeWidget.currentItem()
currentItem.setIcon(0, avatarize(addressAtCurrentRow))
def on_action_AddressBookSetAvatar(self): def on_action_AddressBookSetAvatar(self):
self.on_action_SetAvatar(self.ui.tableWidgetAddressBook) self.on_action_SetAvatar(self.ui.tableWidgetAddressBook)
def on_action_SubscriptionsSetAvatar(self):
self.on_action_SetAvatar(self.ui.tableWidgetSubscriptions)
def on_action_BlacklistSetAvatar(self): def on_action_BlacklistSetAvatar(self):
self.on_action_SetAvatar(self.ui.tableWidgetBlacklist) self.on_action_SetAvatar(self.ui.tableWidgetBlacklist)
def on_action_SetAvatar(self, thisTableWidget): def on_action_SetAvatar(self, thisTableWidget):
# thisTableWidget = self.ui.tableWidgetYourIdentities
if not os.path.exists(shared.appdata + 'avatars/'):
os.makedirs(shared.appdata + 'avatars/')
currentRow = thisTableWidget.currentRow() currentRow = thisTableWidget.currentRow()
addressAtCurrentRow = thisTableWidget.item( addressAtCurrentRow = thisTableWidget.item(
currentRow, 1).text() currentRow, 1).text()
setToIdenticon = not self.setAvatar(addressAtCurrentRow)
if setToIdenticon:
thisTableWidget.item(
currentRow, 0).setIcon(avatarize(addressAtCurrentRow))
def setAvatar(self, addressAtCurrentRow):
if not os.path.exists(shared.appdata + 'avatars/'):
os.makedirs(shared.appdata + 'avatars/')
hash = hashlib.md5(addBMIfNotPresent(addressAtCurrentRow)).hexdigest() hash = hashlib.md5(addBMIfNotPresent(addressAtCurrentRow)).hexdigest()
extensions = ['PNG', 'GIF', 'JPG', 'JPEG', 'SVG', 'BMP', 'MNG', 'PBM', 'PGM', 'PPM', 'TIFF', 'XBM', 'XPM', 'TGA'] extensions = ['PNG', 'GIF', 'JPG', 'JPEG', 'SVG', 'BMP', 'MNG', 'PBM', 'PGM', 'PPM', 'TIFF', 'XBM', 'XPM', 'TGA']
# http://pyqt.sourceforge.net/Docs/PyQt4/qimagereader.html#supportedImageFormats # http://pyqt.sourceforge.net/Docs/PyQt4/qimagereader.html#supportedImageFormats
@ -3333,21 +3596,28 @@ more work your computer must do to send the message. A Time-To-Live of four or f
copied = QtCore.QFile.copy(sourcefile, destination) copied = QtCore.QFile.copy(sourcefile, destination)
if not copied: if not copied:
print 'couldn\'t copy :(' print 'couldn\'t copy :('
return False
# set the icon # set the icon
thisTableWidget.item(
currentRow, 0).setIcon(avatarize(addressAtCurrentRow))
self.rerenderSubscriptions() self.rerenderSubscriptions()
self.rerenderComboBoxSendFrom() self.rerenderComboBoxSendFrom()
self.rerenderComboBoxSendFromBroadcast()
self.rerenderInboxFromLabels() self.rerenderInboxFromLabels()
self.rerenderInboxToLabels() self.rerenderInboxToLabels()
self.rerenderSentFromLabels() self.rerenderSentFromLabels()
self.rerenderSentToLabels() self.rerenderSentToLabels()
self.rerenderBlackWhiteList() self.rerenderBlackWhiteList()
# generate identicon
return False
return True
# TODO make one popMenu
def on_context_menuYourIdentities(self, point): def on_context_menuYourIdentities(self, point):
self.popMenuYourIdentities.exec_(
self.ui.treeWidgetYourIdentities.mapToGlobal(point))
def on_context_menuChan(self, point):
self.popMenu.exec_( self.popMenu.exec_(
self.ui.tableWidgetYourIdentities.mapToGlobal(point)) self.ui.treeWidgetChanList.mapToGlobal(point))
def on_context_menuInbox(self, point): def on_context_menuInbox(self, point):
self.popMenuInbox.exec_(self.ui.tableWidgetInbox.mapToGlobal(point)) self.popMenuInbox.exec_(self.ui.tableWidgetInbox.mapToGlobal(point))
@ -3376,60 +3646,28 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.ui.textEditInboxMessage.setPlainText(QString("")) self.ui.textEditInboxMessage.setPlainText(QString(""))
self.loadInbox(searchOption, searchKeyword) self.loadInbox(searchOption, searchKeyword)
def treeWidgetYourIdentitiesItemClicked(self):
currentItem = self.ui.treeWidgetYourIdentities.currentItem()
if currentItem:
accountFolder = currentItem.data(0, Qt.UserRole).toPyObject()
account = accountFolder[0]
folder = accountFolder[1]
self.loadMessagelist(self.ui.tableWidgetInbox, str(account), str(folder))
# TODO trees
def treeWidgetSubscribtionsItemClicked(self):
pass
def treeWidgetChanListItemClicked(self):
pass
def tableWidgetInboxItemClicked(self): def tableWidgetInboxItemClicked(self):
currentRow = self.ui.tableWidgetInbox.currentRow() currentRow = self.ui.tableWidgetInbox.currentRow()
if currentRow >= 0: if currentRow >= 0:
font = QFont()
font.setBold(False)
self.ui.textEditInboxMessage.setCurrentFont(font)
fromAddress = str(self.ui.tableWidgetInbox.item(
currentRow, 1).data(Qt.UserRole).toPyObject())
msgid = str(self.ui.tableWidgetInbox.item( msgid = str(self.ui.tableWidgetInbox.item(
currentRow, 3).data(Qt.UserRole).toPyObject()) currentRow, 3).data(Qt.UserRole).toPyObject())
queryreturn = sqlQuery( queryreturn = sqlQuery(
'''select message from inbox where msgid=?''', msgid) '''select message from inbox where msgid=?''', msgid)
if queryreturn != []:
for row in queryreturn:
messageText, = row
messageText = shared.fixPotentiallyInvalidUTF8Data(messageText)
messageText = unicode(messageText, 'utf-8)')
if len(messageText) > 30000:
messageText = (
messageText[:30000] + '\n' +
'--- Display of the remainder of the message ' +
'truncated because it is too long.\n' +
'--- To see the full message, right-click in the ' +
'Inbox view and select "View HTML code as formatted ' +
'text",\n' +
'--- or select "Save message as..." to save it to a ' +
'file, or select "Reply" and ' +
'view the full message in the quote.')
# If we have received this message from either a broadcast address
# or from someone in our address book, display as HTML
if decodeAddress(fromAddress)[3] in shared.broadcastSendersForWhichImWatching or shared.isAddressInMyAddressBook(fromAddress):
self.ui.textEditInboxMessage.setText(messageText)
else:
self.ui.textEditInboxMessage.setPlainText(messageText)
self.ui.tableWidgetInbox.item(currentRow, 0).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 1).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 2).setFont(font)
self.ui.tableWidgetInbox.item(currentRow, 3).setFont(font)
inventoryHash = str(self.ui.tableWidgetInbox.item(
currentRow, 3).data(Qt.UserRole).toPyObject())
self.ubuntuMessagingMenuClear(inventoryHash)
sqlExecute('''update inbox set read=1 WHERE msgid=?''', inventoryHash)
self.changedInboxUnread()
def tableWidgetInboxItemClicked(self):
currentRow = self.ui.tableWidgetInbox.currentRow()
if currentRow >= 0:
ackdata = str(self.ui.tableWidgetInbox.item(
currentRow, 3).data(Qt.UserRole).toPyObject())
queryreturn = sqlQuery(
'''select message from sent where ackdata=?''', ackdata)
if queryreturn != []: if queryreturn != []:
for row in queryreturn: for row in queryreturn:
message, = row message, = row
@ -3438,20 +3676,6 @@ more work your computer must do to send the message. A Time-To-Live of four or f
message = unicode(message, 'utf-8)') message = unicode(message, 'utf-8)')
self.ui.textEditInboxMessage.setPlainText(message) self.ui.textEditInboxMessage.setPlainText(message)
def tableWidgetYourIdentitiesItemChanged(self):
currentRow = self.ui.tableWidgetYourIdentities.currentRow()
if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetYourIdentities.item(
currentRow, 1).text()
shared.config.set(str(addressAtCurrentRow), 'label', str(
self.ui.tableWidgetYourIdentities.item(currentRow, 0).text().toUtf8()))
shared.writeKeysFile()
self.rerenderComboBoxSendFrom()
# self.rerenderInboxFromLabels()
self.rerenderInboxToLabels()
self.rerenderSentFromLabels()
# self.rerenderSentToLabels()
def tableWidgetAddressBookItemChanged(self): def tableWidgetAddressBookItemChanged(self):
currentRow = self.ui.tableWidgetAddressBook.currentRow() currentRow = self.ui.tableWidgetAddressBook.currentRow()
if currentRow >= 0: if currentRow >= 0:
@ -3463,7 +3687,9 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.rerenderInboxFromLabels() self.rerenderInboxFromLabels()
self.rerenderSentToLabels() self.rerenderSentToLabels()
def tableWidgetSubscriptionsItemChanged(self): """
TODO implement
def treeWidgetSubscriptionsItemChanged(self):
currentRow = self.ui.tableWidgetSubscriptions.currentRow() currentRow = self.ui.tableWidgetSubscriptions.currentRow()
if currentRow >= 0: if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item( addressAtCurrentRow = self.ui.tableWidgetSubscriptions.item(
@ -3474,25 +3700,46 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.rerenderInboxFromLabels() self.rerenderInboxFromLabels()
self.rerenderSentToLabels() self.rerenderSentToLabels()
def treeWidgetChanListItemChanged(self):
currentRow = self.ui.tableWidgetChanList.currentRow()
if currentRow >= 0:
addressAtCurrentRow = self.ui.tableWidgetChanList.item(
currentRow, 1).text()
shared.config.set(str(addressAtCurrentRow), 'label', str(
self.ui.tableWidgetChanList.item(currentRow, 0).text().toUtf8()))
shared.writeKeysFile()
self.rerenderComboBoxSendFrom()
self.rerenderComboBoxSendFromBroadcast()
# self.rerenderInboxFromLabels()
self.rerenderInboxToLabels()
self.rerenderSentFromLabels()
# self.rerenderSentToLabels()
"""
def writeNewAddressToTable(self, label, address, streamNumber): def writeNewAddressToTable(self, label, address, streamNumber):
self.ui.tableWidgetYourIdentities.setSortingEnabled(False) pass
self.ui.tableWidgetYourIdentities.insertRow(0) """
TODO implement
self.ui.tableWidgetChanList.setSortingEnabled(False)
self.ui.tableWidgetChanList.insertRow(0)
newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8')) newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
newItem.setIcon(avatarize(address)) newItem.setIcon(avatarize(address))
self.ui.tableWidgetYourIdentities.setItem( self.ui.tableWidgetChanList.setItem(
0, 0, newItem) 0, 0, newItem)
newItem = QtGui.QTableWidgetItem(address) newItem = QtGui.QTableWidgetItem(address)
newItem.setFlags( newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if shared.safeConfigGetBoolean(address, 'chan'): if shared.safeConfigGetBoolean(address, 'chan'):
newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange newItem.setTextColor(QtGui.QColor(216, 119, 0)) # orange
self.ui.tableWidgetYourIdentities.setItem(0, 1, newItem) self.ui.tableWidgetChanList.setItem(0, 1, newItem)
newItem = QtGui.QTableWidgetItem(streamNumber) newItem = QtGui.QTableWidgetItem(streamNumber)
newItem.setFlags( newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.ui.tableWidgetYourIdentities.setItem(0, 2, newItem) self.ui.tableWidgetChanList.setItem(0, 2, newItem)
# self.ui.tableWidgetYourIdentities.setSortingEnabled(True) # self.ui.tableWidgetChanList.setSortingEnabled(True)
self.rerenderComboBoxSendFrom() self.rerenderComboBoxSendFrom()
self.rerenderComboBoxSendFromBroadcast()
"""
def updateStatusBar(self, data): def updateStatusBar(self, data):
if data != "": if data != "":
@ -3751,8 +3998,8 @@ class settingsDialog(QtGui.QDialog):
responseStatus = response[0] responseStatus = response[0]
responseText = response[1] responseText = response[1]
self.ui.labelNamecoinTestResult.setText(responseText) self.ui.labelNamecoinTestResult.setText(responseText)
#if responseStatus== 'success': if responseStatus== 'success':
#self.parent.ui.pushButtonFetchNamecoinID.show() self.parent.ui.pushButtonFetchNamecoinID.show()
class SpecialAddressBehaviorDialog(QtGui.QDialog): class SpecialAddressBehaviorDialog(QtGui.QDialog):
@ -3762,9 +4009,7 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
self.ui = Ui_SpecialAddressBehaviorDialog() self.ui = Ui_SpecialAddressBehaviorDialog()
self.ui.setupUi(self) self.ui.setupUi(self)
self.parent = parent self.parent = parent
currentRow = parent.ui.tableWidgetYourIdentities.currentRow() addressAtCurrentRow = parent.getCurrentAccount()
addressAtCurrentRow = str(
parent.ui.tableWidgetYourIdentities.item(currentRow, 1).text())
if not shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'): if not shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'):
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'): if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.radioButtonBehaviorMailingList.click() self.ui.radioButtonBehaviorMailingList.click()
@ -3784,6 +4029,38 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
"""
TODO remove
class SpecialAddressBehaviorDialog(QtGui.QDialog):
def __init__(self, parent):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_SpecialAddressBehaviorDialog()
self.ui.setupUi(self)
self.parent = parent
currentRow = parent.ui.tableWidgetChanList.currentRow()
addressAtCurrentRow = str(
parent.ui.tableWidgetChanList.item(currentRow, 1).text())
if not shared.safeConfigGetBoolean(addressAtCurrentRow, 'chan'):
if shared.safeConfigGetBoolean(addressAtCurrentRow, 'mailinglist'):
self.ui.radioButtonBehaviorMailingList.click()
else:
self.ui.radioButtonBehaveNormalAddress.click()
try:
mailingListName = shared.config.get(
addressAtCurrentRow, 'mailinglistname')
except:
mailingListName = ''
self.ui.lineEditMailingListName.setText(
unicode(mailingListName, 'utf-8'))
else: # if addressAtCurrentRow is a chan address
self.ui.radioButtonBehaviorMailingList.setDisabled(True)
self.ui.lineEditMailingListName.setText(_translate(
"MainWindow", "This is a chan address. You cannot use it as a pseudo-mailing list."))
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
"""
class AddAddressDialog(QtGui.QDialog): class AddAddressDialog(QtGui.QDialog):
@ -3888,6 +4165,8 @@ class NewSubscriptionDialog(QtGui.QDialog):
class NewAddressDialog(QtGui.QDialog): class NewAddressDialog(QtGui.QDialog):
def __init__(self, parent): def __init__(self, parent):
"""
TODO implement
QtGui.QWidget.__init__(self, parent) QtGui.QWidget.__init__(self, parent)
self.ui = Ui_NewAddressDialog() self.ui = Ui_NewAddressDialog()
self.ui.setupUi(self) self.ui.setupUi(self)
@ -3895,13 +4174,14 @@ class NewAddressDialog(QtGui.QDialog):
row = 1 row = 1
# Let's fill out the 'existing address' combo box with addresses from # Let's fill out the 'existing address' combo box with addresses from
# the 'Your Identities' tab. # the 'Your Identities' tab.
while self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1): while self.parent.ui.tableWidgetChanList.item(row - 1, 1):
self.ui.radioButtonExisting.click() self.ui.radioButtonExisting.click()
self.ui.comboBoxExisting.addItem( self.ui.comboBoxExisting.addItem(
self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1).text()) self.parent.ui.tableWidgetChanList.item(row - 1, 1).text())
row += 1 row += 1
self.ui.groupBoxDeterministic.setHidden(True) self.ui.groupBoxDeterministic.setHidden(True)
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
"""
class newChanDialog(QtGui.QDialog): class newChanDialog(QtGui.QDialog):

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'bitmessageui.ui' # Form implementation generated from reading ui file 'bitmessageui.ui'
# #
# Created: Wed Mar 4 00:11:02 2015 # Created: Fri Mar 20 19:19:21 2015
# by: PyQt4 UI code generator 4.10.4 # by: PyQt4 UI code generator 4.10.4
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -116,8 +116,8 @@ class Ui_MainWindow(object):
self.tabWidget.addTab(self.inbox, icon2, _fromUtf8("")) self.tabWidget.addTab(self.inbox, icon2, _fromUtf8(""))
self.send = QtGui.QWidget() self.send = QtGui.QWidget()
self.send.setObjectName(_fromUtf8("send")) self.send.setObjectName(_fromUtf8("send"))
self.gridLayout_11 = QtGui.QGridLayout(self.send) self.gridLayout_7 = QtGui.QGridLayout(self.send)
self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11")) self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2 = QtGui.QVBoxLayout()
@ -147,27 +147,26 @@ class Ui_MainWindow(object):
self.pushButtonAddAddressBook.setMaximumSize(QtCore.QSize(200, 16777215)) self.pushButtonAddAddressBook.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook")) self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook"))
self.verticalLayout_2.addWidget(self.pushButtonAddAddressBook) self.verticalLayout_2.addWidget(self.pushButtonAddAddressBook)
self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send)
self.pushButtonFetchNamecoinID.setMaximumSize(QtCore.QSize(200, 16777215))
font = QtGui.QFont()
font.setPointSize(9)
self.pushButtonFetchNamecoinID.setFont(font)
self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID"))
self.verticalLayout_2.addWidget(self.pushButtonFetchNamecoinID)
self.horizontalLayout.addLayout(self.verticalLayout_2) self.horizontalLayout.addLayout(self.verticalLayout_2)
self.tabWidget_2 = QtGui.QTabWidget(self.send) self.verticalLayout = QtGui.QVBoxLayout()
self.tabWidget_2.setObjectName(_fromUtf8("tabWidget_2")) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.tabWidgetSend = QtGui.QTabWidget(self.send)
self.tabWidgetSend.setObjectName(_fromUtf8("tabWidgetSend"))
self.tab = QtGui.QWidget() self.tab = QtGui.QWidget()
self.tab.setObjectName(_fromUtf8("tab")) self.tab.setObjectName(_fromUtf8("tab"))
self.gridLayout_8 = QtGui.QGridLayout(self.tab) self.gridLayout_8 = QtGui.QGridLayout(self.tab)
self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2 = QtGui.QGridLayout()
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.comboBoxSendFrom = QtGui.QComboBox(self.tab)
self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom"))
self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1)
self.label = QtGui.QLabel(self.tab)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
self.lineEditTo = QtGui.QLineEdit(self.tab)
self.lineEditTo.setObjectName(_fromUtf8("lineEditTo"))
self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1)
self.label_3 = QtGui.QLabel(self.tab) self.label_3 = QtGui.QLabel(self.tab)
self.label_3.setObjectName(_fromUtf8("label_3")) self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1) self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
@ -178,48 +177,102 @@ class Ui_MainWindow(object):
self.lineEditSubject.setText(_fromUtf8("")) self.lineEditSubject.setText(_fromUtf8(""))
self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject"))
self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1) self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1)
self.verticalLayout.addLayout(self.gridLayout_2) self.label = QtGui.QLabel(self.tab)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
self.comboBoxSendFrom = QtGui.QComboBox(self.tab)
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.tab)
self.lineEditTo.setObjectName(_fromUtf8("lineEditTo"))
self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1)
self.verticalLayout_5.addLayout(self.gridLayout_2)
self.textEditMessage = QtGui.QTextEdit(self.tab) self.textEditMessage = QtGui.QTextEdit(self.tab)
self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) self.textEditMessage.setObjectName(_fromUtf8("textEditMessage"))
self.verticalLayout.addWidget(self.textEditMessage) self.verticalLayout_5.addWidget(self.textEditMessage)
self.pushButtonSend = QtGui.QPushButton(self.tab) self.gridLayout_8.addLayout(self.verticalLayout_5, 0, 0, 1, 1)
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) self.tabWidgetSend.addTab(self.tab, _fromUtf8(""))
self.verticalLayout.addWidget(self.pushButtonSend)
self.gridLayout_8.addLayout(self.verticalLayout, 0, 0, 1, 1)
self.tabWidget_2.addTab(self.tab, _fromUtf8(""))
self.tab_2 = QtGui.QWidget() self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2")) self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.gridLayout_9 = QtGui.QGridLayout(self.tab_2) self.gridLayout_9 = QtGui.QGridLayout(self.tab_2)
self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
self.verticalLayout_5 = QtGui.QVBoxLayout() self.verticalLayout_6 = QtGui.QVBoxLayout()
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6"))
self.gridLayout_5 = QtGui.QGridLayout() self.gridLayout_5 = QtGui.QGridLayout()
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.label_8 = QtGui.QLabel(self.tab_2) self.label_8 = QtGui.QLabel(self.tab_2)
self.label_8.setObjectName(_fromUtf8("label_8")) self.label_8.setObjectName(_fromUtf8("label_8"))
self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1) self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1)
self.lineEditSubject_2 = QtGui.QLineEdit(self.tab_2) self.lineEditSubjectBroadcast = QtGui.QLineEdit(self.tab_2)
self.lineEditSubject_2.setText(_fromUtf8("")) self.lineEditSubjectBroadcast.setText(_fromUtf8(""))
self.lineEditSubject_2.setObjectName(_fromUtf8("lineEditSubject_2")) self.lineEditSubjectBroadcast.setObjectName(_fromUtf8("lineEditSubjectBroadcast"))
self.gridLayout_5.addWidget(self.lineEditSubject_2, 1, 1, 1, 1) self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1)
self.label_7 = QtGui.QLabel(self.tab_2) self.label_7 = QtGui.QLabel(self.tab_2)
self.label_7.setObjectName(_fromUtf8("label_7")) self.label_7.setObjectName(_fromUtf8("label_7"))
self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1) self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1)
self.comboBoxSendFrom_2 = QtGui.QComboBox(self.tab_2) self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.tab_2)
self.comboBoxSendFrom_2.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0))
self.comboBoxSendFrom_2.setObjectName(_fromUtf8("comboBoxSendFrom_2")) self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("comboBoxSendFromBroadcast"))
self.gridLayout_5.addWidget(self.comboBoxSendFrom_2, 0, 1, 1, 1) self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1)
self.verticalLayout_5.addLayout(self.gridLayout_5) self.verticalLayout_6.addLayout(self.gridLayout_5)
self.textEditMessage_2 = QtGui.QTextEdit(self.tab_2) self.textEditMessageBroadcast = QtGui.QTextEdit(self.tab_2)
self.textEditMessage_2.setObjectName(_fromUtf8("textEditMessage_2")) self.textEditMessageBroadcast.setObjectName(_fromUtf8("textEditMessageBroadcast"))
self.verticalLayout_5.addWidget(self.textEditMessage_2) self.verticalLayout_6.addWidget(self.textEditMessageBroadcast)
self.pushButtonSend_3 = QtGui.QPushButton(self.tab_2) self.gridLayout_9.addLayout(self.verticalLayout_6, 0, 0, 1, 1)
self.pushButtonSend_3.setObjectName(_fromUtf8("pushButtonSend_3")) self.tabWidgetSend.addTab(self.tab_2, _fromUtf8(""))
self.verticalLayout_5.addWidget(self.pushButtonSend_3) self.verticalLayout.addWidget(self.tabWidgetSend)
self.gridLayout_9.addLayout(self.verticalLayout_5, 0, 0, 1, 1) self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.tabWidget_2.addTab(self.tab_2, _fromUtf8("")) self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.horizontalLayout.addWidget(self.tabWidget_2) self.pushButtonTTL = QtGui.QPushButton(self.send)
self.gridLayout_11.addLayout(self.horizontalLayout, 0, 0, 1, 1) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth())
self.pushButtonTTL.setSizePolicy(sizePolicy)
self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, 16777215))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
brush = 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)
self.horizontalSliderTTL = QtGui.QSlider(self.send)
self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0))
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, 16777215))
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)
self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth())
self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy)
self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0))
self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, 16777215))
self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription"))
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription)
self.pushButtonSend = QtGui.QPushButton(self.send)
self.pushButtonSend.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
self.horizontalLayout_5.addWidget(self.pushButtonSend)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.horizontalLayout.addLayout(self.verticalLayout)
self.gridLayout_7.addLayout(self.horizontalLayout, 0, 0, 1, 1)
icon4 = QtGui.QIcon() icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.tabWidget.addTab(self.send, icon4, _fromUtf8("")) self.tabWidget.addTab(self.send, icon4, _fromUtf8(""))
@ -231,28 +284,16 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.tableWidgetSubscriptions = QtGui.QTableWidget(self.subscriptions) self.treeWidgetSubscriptions = QtGui.QTreeWidget(self.subscriptions)
self.tableWidgetSubscriptions.setMaximumSize(QtCore.QSize(200, 16777215)) self.treeWidgetSubscriptions.setMaximumSize(QtCore.QSize(200, 16777215))
self.tableWidgetSubscriptions.setAlternatingRowColors(True) self.treeWidgetSubscriptions.setAlternatingRowColors(True)
self.tableWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.tableWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tableWidgetSubscriptions.setObjectName(_fromUtf8("tableWidgetSubscriptions")) self.treeWidgetSubscriptions.setObjectName(_fromUtf8("treeWidgetSubscriptions"))
self.tableWidgetSubscriptions.setColumnCount(2)
self.tableWidgetSubscriptions.setRowCount(0)
item = QtGui.QTableWidgetItem()
icon5 = QtGui.QIcon() icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off)
item.setIcon(icon5) self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5)
self.tableWidgetSubscriptions.setHorizontalHeaderItem(0, item) self.verticalLayout_3.addWidget(self.treeWidgetSubscriptions)
item = QtGui.QTableWidgetItem()
self.tableWidgetSubscriptions.setHorizontalHeaderItem(1, item)
self.tableWidgetSubscriptions.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetSubscriptions.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetSubscriptions.horizontalHeader().setHighlightSections(False)
self.tableWidgetSubscriptions.horizontalHeader().setSortIndicatorShown(False)
self.tableWidgetSubscriptions.horizontalHeader().setStretchLastSection(True)
self.tableWidgetSubscriptions.verticalHeader().setVisible(False)
self.verticalLayout_3.addWidget(self.tableWidgetSubscriptions)
self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions) self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions)
self.pushButtonAddSubscription.setMaximumSize(QtCore.QSize(200, 16777215)) self.pushButtonAddSubscription.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription")) self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription"))
@ -307,36 +348,18 @@ class Ui_MainWindow(object):
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.verticalLayout_17 = QtGui.QVBoxLayout() self.verticalLayout_17 = QtGui.QVBoxLayout()
self.verticalLayout_17.setObjectName(_fromUtf8("verticalLayout_17")) self.verticalLayout_17.setObjectName(_fromUtf8("verticalLayout_17"))
self.tableWidgetYourIdentities = QtGui.QTableWidget(self.tab_3) self.treeWidgetChanList = QtGui.QTreeWidget(self.tab_3)
self.tableWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215)) self.treeWidgetChanList.setMaximumSize(QtCore.QSize(200, 16777215))
self.tableWidgetYourIdentities.setFrameShadow(QtGui.QFrame.Sunken) self.treeWidgetChanList.setFrameShadow(QtGui.QFrame.Sunken)
self.tableWidgetYourIdentities.setLineWidth(1) self.treeWidgetChanList.setLineWidth(1)
self.tableWidgetYourIdentities.setAlternatingRowColors(True) self.treeWidgetChanList.setAlternatingRowColors(True)
self.tableWidgetYourIdentities.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) self.treeWidgetChanList.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
self.tableWidgetYourIdentities.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) self.treeWidgetChanList.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.tableWidgetYourIdentities.setObjectName(_fromUtf8("tableWidgetYourIdentities")) self.treeWidgetChanList.setObjectName(_fromUtf8("treeWidgetChanList"))
self.tableWidgetYourIdentities.setColumnCount(3) icon7 = QtGui.QIcon()
self.tableWidgetYourIdentities.setRowCount(0) icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off)
item = QtGui.QTableWidgetItem() self.treeWidgetChanList.headerItem().setIcon(0, icon7)
font = QtGui.QFont() self.verticalLayout_17.addWidget(self.treeWidgetChanList)
font.setKerning(True)
item.setFont(font)
item.setIcon(icon1)
self.tableWidgetYourIdentities.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
self.tableWidgetYourIdentities.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
self.tableWidgetYourIdentities.setHorizontalHeaderItem(2, item)
self.tableWidgetYourIdentities.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetYourIdentities.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetYourIdentities.horizontalHeader().setMinimumSectionSize(52)
self.tableWidgetYourIdentities.horizontalHeader().setSortIndicatorShown(True)
self.tableWidgetYourIdentities.horizontalHeader().setStretchLastSection(True)
self.tableWidgetYourIdentities.verticalHeader().setVisible(False)
self.tableWidgetYourIdentities.verticalHeader().setDefaultSectionSize(26)
self.tableWidgetYourIdentities.verticalHeader().setSortIndicatorShown(False)
self.tableWidgetYourIdentities.verticalHeader().setStretchLastSection(False)
self.verticalLayout_17.addWidget(self.tableWidgetYourIdentities)
self.pushButtonAddChanel = QtGui.QPushButton(self.tab_3) self.pushButtonAddChanel = QtGui.QPushButton(self.tab_3)
self.pushButtonAddChanel.setMaximumSize(QtCore.QSize(200, 16777215)) self.pushButtonAddChanel.setMaximumSize(QtCore.QSize(200, 16777215))
self.pushButtonAddChanel.setObjectName(_fromUtf8("pushButtonAddChanel")) self.pushButtonAddChanel.setObjectName(_fromUtf8("pushButtonAddChanel"))
@ -384,9 +407,9 @@ class Ui_MainWindow(object):
self.verticalLayout_13.addWidget(self.textEditInboxMessage_2) self.verticalLayout_13.addWidget(self.textEditInboxMessage_2)
self.horizontalLayout_4.addLayout(self.verticalLayout_13) self.horizontalLayout_4.addLayout(self.verticalLayout_13)
self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 1) self.gridLayout_3.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
icon7 = QtGui.QIcon() icon8 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.tabWidget.addTab(self.tab_3, icon7, _fromUtf8("")) self.tabWidget.addTab(self.tab_3, icon8, _fromUtf8(""))
self.blackwhitelist = QtGui.QWidget() self.blackwhitelist = QtGui.QWidget()
self.blackwhitelist.setObjectName(_fromUtf8("blackwhitelist")) self.blackwhitelist.setObjectName(_fromUtf8("blackwhitelist"))
self.gridLayout_6 = QtGui.QGridLayout(self.blackwhitelist) self.gridLayout_6 = QtGui.QGridLayout(self.blackwhitelist)
@ -421,17 +444,17 @@ class Ui_MainWindow(object):
self.tableWidgetBlacklist.horizontalHeader().setStretchLastSection(True) self.tableWidgetBlacklist.horizontalHeader().setStretchLastSection(True)
self.tableWidgetBlacklist.verticalHeader().setVisible(False) self.tableWidgetBlacklist.verticalHeader().setVisible(False)
self.gridLayout_6.addWidget(self.tableWidgetBlacklist, 3, 0, 1, 2) self.gridLayout_6.addWidget(self.tableWidgetBlacklist, 3, 0, 1, 2)
icon8 = QtGui.QIcon() icon9 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/blacklist.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon9.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/blacklist.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.tabWidget.addTab(self.blackwhitelist, icon8, _fromUtf8("")) self.tabWidget.addTab(self.blackwhitelist, icon9, _fromUtf8(""))
self.networkstatus = QtGui.QWidget() self.networkstatus = QtGui.QWidget()
self.networkstatus.setObjectName(_fromUtf8("networkstatus")) self.networkstatus.setObjectName(_fromUtf8("networkstatus"))
self.pushButtonStatusIcon = QtGui.QPushButton(self.networkstatus) self.pushButtonStatusIcon = QtGui.QPushButton(self.networkstatus)
self.pushButtonStatusIcon.setGeometry(QtCore.QRect(680, 440, 21, 23)) self.pushButtonStatusIcon.setGeometry(QtCore.QRect(680, 440, 21, 23))
self.pushButtonStatusIcon.setText(_fromUtf8("")) self.pushButtonStatusIcon.setText(_fromUtf8(""))
icon9 = QtGui.QIcon() icon10 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/redicon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon10.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/redicon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.pushButtonStatusIcon.setIcon(icon9) self.pushButtonStatusIcon.setIcon(icon10)
self.pushButtonStatusIcon.setFlat(True) self.pushButtonStatusIcon.setFlat(True)
self.pushButtonStatusIcon.setObjectName(_fromUtf8("pushButtonStatusIcon")) self.pushButtonStatusIcon.setObjectName(_fromUtf8("pushButtonStatusIcon"))
self.tableWidgetConnectionCount = QtGui.QTableWidget(self.networkstatus) self.tableWidgetConnectionCount = QtGui.QTableWidget(self.networkstatus)
@ -487,9 +510,9 @@ class Ui_MainWindow(object):
self.labelBytesSentCount = QtGui.QLabel(self.networkstatus) self.labelBytesSentCount = QtGui.QLabel(self.networkstatus)
self.labelBytesSentCount.setGeometry(QtCore.QRect(350, 230, 251, 16)) self.labelBytesSentCount.setGeometry(QtCore.QRect(350, 230, 251, 16))
self.labelBytesSentCount.setObjectName(_fromUtf8("labelBytesSentCount")) self.labelBytesSentCount.setObjectName(_fromUtf8("labelBytesSentCount"))
icon10 = QtGui.QIcon() icon11 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/networkstatus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon11.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/networkstatus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.tabWidget.addTab(self.networkstatus, icon10, _fromUtf8("")) self.tabWidget.addTab(self.networkstatus, icon11, _fromUtf8(""))
self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1) self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget) MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow) self.menubar = QtGui.QMenuBar(MainWindow)
@ -555,15 +578,14 @@ class Ui_MainWindow(object):
self.retranslateUi(MainWindow) self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0) self.tabWidget.setCurrentIndex(0)
self.tabWidget_2.setCurrentIndex(0) self.tabWidgetSend.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage) MainWindow.setTabOrder(self.tableWidgetInbox, self.textEditInboxMessage)
MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom) MainWindow.setTabOrder(self.textEditInboxMessage, self.comboBoxSendFrom)
MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo) MainWindow.setTabOrder(self.comboBoxSendFrom, self.lineEditTo)
MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject) MainWindow.setTabOrder(self.lineEditTo, self.lineEditSubject)
MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage) MainWindow.setTabOrder(self.lineEditSubject, self.textEditMessage)
MainWindow.setTabOrder(self.textEditMessage, self.pushButtonSend) MainWindow.setTabOrder(self.textEditMessage, self.pushButtonAddSubscription)
MainWindow.setTabOrder(self.pushButtonSend, self.pushButtonAddSubscription)
MainWindow.setTabOrder(self.pushButtonAddSubscription, self.radioButtonBlacklist) MainWindow.setTabOrder(self.pushButtonAddSubscription, self.radioButtonBlacklist)
MainWindow.setTabOrder(self.radioButtonBlacklist, self.radioButtonWhitelist) MainWindow.setTabOrder(self.radioButtonBlacklist, self.radioButtonWhitelist)
MainWindow.setTabOrder(self.radioButtonWhitelist, self.pushButtonAddBlacklist) MainWindow.setTabOrder(self.radioButtonWhitelist, self.pushButtonAddBlacklist)
@ -585,38 +607,36 @@ class Ui_MainWindow(object):
item.setText(_translate("MainWindow", "Subject", None)) item.setText(_translate("MainWindow", "Subject", None))
item = self.tableWidgetInbox.horizontalHeaderItem(3) item = self.tableWidgetInbox.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received", None)) item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Received", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Messages", None))
self.tableWidgetAddressBook.setSortingEnabled(True) self.tableWidgetAddressBook.setSortingEnabled(True)
item = self.tableWidgetAddressBook.horizontalHeaderItem(0) item = self.tableWidgetAddressBook.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Name", None)) item.setText(_translate("MainWindow", "Name", None))
item = self.tableWidgetAddressBook.horizontalHeaderItem(1) item = self.tableWidgetAddressBook.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address", None)) item.setText(_translate("MainWindow", "Address", None))
self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact", None)) self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact", None))
self.label.setText(_translate("MainWindow", "To:", None)) self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID", None))
self.label_3.setText(_translate("MainWindow", "Subject:", None)) self.label_3.setText(_translate("MainWindow", "Subject:", None))
self.label_2.setText(_translate("MainWindow", "From:", None)) self.label_2.setText(_translate("MainWindow", "From:", None))
self.label.setText(_translate("MainWindow", "To:", None))
self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n" "p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>", None)) "<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>", None))
self.pushButtonSend.setText(_translate("MainWindow", "Send", None)) self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab), _translate("MainWindow", "Send ordinary Message", None))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab), _translate("MainWindow", "Send ordinary Message", None))
self.label_8.setText(_translate("MainWindow", "From:", None)) self.label_8.setText(_translate("MainWindow", "From:", None))
self.label_7.setText(_translate("MainWindow", "Subject:", None)) self.label_7.setText(_translate("MainWindow", "Subject:", None))
self.textEditMessage_2.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" self.textEditMessageBroadcast.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n" "p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "</style></head><body style=\" font-family:\'Droid Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:\'MS Shell Dlg 2\';\"><br /></p></body></html>", None)) "<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>", None))
self.pushButtonSend_3.setText(_translate("MainWindow", "Send", None)) self.tabWidgetSend.setTabText(self.tabWidgetSend.indexOf(self.tab_2), _translate("MainWindow", "Send Message to your Subscribers", None))
self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_2), _translate("MainWindow", "Send Message to your Subscribers", None)) self.pushButtonTTL.setText(_translate("MainWindow", "TTL:", None))
self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "X days", None))
self.pushButtonSend.setText(_translate("MainWindow", "Send", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
self.tableWidgetSubscriptions.setSortingEnabled(True) self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions", None))
item = self.tableWidgetSubscriptions.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Name", None))
item = self.tableWidgetSubscriptions.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address", None))
self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription", None)) self.pushButtonAddSubscription.setText(_translate("MainWindow", "Add new Subscription", None))
self.inboxSearchLineSubscriptions.setPlaceholderText(_translate("MainWindow", "Search", None)) self.inboxSearchLineSubscriptions.setPlaceholderText(_translate("MainWindow", "Search", None))
self.tableWidgetInboxSubscriptions.setSortingEnabled(True) self.tableWidgetInboxSubscriptions.setSortingEnabled(True)
@ -629,13 +649,7 @@ class Ui_MainWindow(object):
item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3) item = self.tableWidgetInboxSubscriptions.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received", None)) item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.subscriptions), _translate("MainWindow", "Subscriptions", None))
self.tableWidgetYourIdentities.setSortingEnabled(True) self.treeWidgetChanList.headerItem().setText(0, _translate("MainWindow", "Chans", None))
item = self.tableWidgetYourIdentities.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Name", None))
item = self.tableWidgetYourIdentities.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Address", None))
item = self.tableWidgetYourIdentities.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Stream", None))
self.pushButtonAddChanel.setText(_translate("MainWindow", "Add Chanel", None)) self.pushButtonAddChanel.setText(_translate("MainWindow", "Add Chanel", None))
self.inboxSearchLineEdit_2.setPlaceholderText(_translate("MainWindow", "Search", None)) self.inboxSearchLineEdit_2.setPlaceholderText(_translate("MainWindow", "Search", None))
self.tableWidgetInbox_2.setSortingEnabled(True) self.tableWidgetInbox_2.setSortingEnabled(True)
@ -647,7 +661,7 @@ class Ui_MainWindow(object):
item.setText(_translate("MainWindow", "Subject", None)) item.setText(_translate("MainWindow", "Subject", None))
item = self.tableWidgetInbox_2.horizontalHeaderItem(3) item = self.tableWidgetInbox_2.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Received", None)) item.setText(_translate("MainWindow", "Received", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Chanels", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Chans", None))
self.radioButtonBlacklist.setText(_translate("MainWindow", "Use a Blacklist (Allow all incoming messages except those on the Blacklist)", None)) self.radioButtonBlacklist.setText(_translate("MainWindow", "Use a Blacklist (Allow all incoming messages except those on the Blacklist)", None))
self.radioButtonWhitelist.setText(_translate("MainWindow", "Use a Whitelist (Block all incoming messages except those on the Whitelist)", None)) self.radioButtonWhitelist.setText(_translate("MainWindow", "Use a Whitelist (Block all incoming messages except those on the Whitelist)", None))
self.pushButtonAddBlacklist.setText(_translate("MainWindow", "Add new entry", None)) self.pushButtonAddBlacklist.setText(_translate("MainWindow", "Add new entry", None))

View File

@ -62,7 +62,7 @@
<normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset> <normaloff>:/newPrefix/images/inbox.png</normaloff>:/newPrefix/images/inbox.png</iconset>
</attribute> </attribute>
<attribute name="title"> <attribute name="title">
<string>Received</string> <string>Messages</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
@ -213,7 +213,7 @@
<attribute name="title"> <attribute name="title">
<string>Send</string> <string>Send</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_11"> <layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -283,156 +283,297 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="pushButtonFetchNamecoinID">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Fetch Namecoin ID</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QTabWidget" name="tabWidget_2"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="currentIndex"> <item>
<number>0</number> <widget class="QTabWidget" name="tabWidgetSend">
</property> <property name="currentIndex">
<widget class="QWidget" name="tab"> <number>0</number>
<attribute name="title"> </property>
<string>Send ordinary Message</string> <widget class="QWidget" name="tab">
</attribute> <attribute name="title">
<layout class="QGridLayout" name="gridLayout_8"> <string>Send ordinary Message</string>
<item row="0" column="0"> </attribute>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QGridLayout" name="gridLayout_8">
<item> <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item row="0" column="1"> <item>
<widget class="QComboBox" name="comboBoxSendFrom"> <layout class="QGridLayout" name="gridLayout_2">
<property name="minimumSize"> <item row="2" column="0">
<size> <widget class="QLabel" name="label_3">
<width>300</width> <property name="text">
<height>0</height> <string>Subject:</string>
</size> </property>
</property> </widget>
</widget> </item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>From:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditSubject">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>To:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxSendFrom">
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditTo"/>
</item>
</layout>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QLabel" name="label"> <widget class="QTextEdit" name="textEditMessage">
<property name="text"> <property name="html">
<string>To:</string> <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
</property> &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
</widget> p, li { white-space: pre-wrap; }
</item> &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
<item row="1" column="1"> &lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<widget class="QLineEdit" name="lineEditTo"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Subject:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>From:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditSubject">
<property name="text">
<string/>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> </layout>
<widget class="QTextEdit" name="textEditMessage"> </widget>
<property name="html"> <widget class="QWidget" name="tab_2">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <attribute name="title">
<string>Send Message to your Subscribers</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>From:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditSubjectBroadcast">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Subject:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxSendFromBroadcast">
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTextEdit" name="textEditMessageBroadcast">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonSend">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Send Message to your Subscribers</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>From:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditSubject_2">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Subject:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxSendFrom_2">
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QTextEdit" name="textEditMessage_2">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-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';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonSend_3">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout> </layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QPushButton" name="pushButtonTTL">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>16777215</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<underline>true</underline>
</font>
</property>
<property name="text">
<string>TTL:</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="horizontalSliderTTL">
<property name="minimumSize">
<size>
<width>35</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>16777215</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="invertedControls">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelHumanFriendlyTTLDescription">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>45</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>X days</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonSend">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Send</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </item>
</widget> </layout>
</item> </item>
</layout> </layout>
</item> </item>
</layout> </layout>
<zorder></zorder>
<zorder>pushButtonFetchNamecoinID</zorder>
</widget> </widget>
<widget class="QWidget" name="subscriptions"> <widget class="QWidget" name="subscriptions">
<attribute name="icon"> <attribute name="icon">
@ -448,7 +589,7 @@ p, li { white-space: pre-wrap; }
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<widget class="QTableWidget" name="tableWidgetSubscriptions"> <widget class="QTreeWidget" name="treeWidgetSubscriptions">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -464,30 +605,9 @@ p, li { white-space: pre-wrap; }
<property name="selectionBehavior"> <property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum> <enum>QAbstractItemView::SelectRows</enum>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>200</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column> <column>
<property name="text"> <property name="text">
<string>Name</string> <string>Subscriptions</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset>
@ -495,11 +615,6 @@ p, li { white-space: pre-wrap; }
</iconset> </iconset>
</property> </property>
</column> </column>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
</widget> </widget>
</item> </item>
<item> <item>
@ -617,7 +732,7 @@ p, li { white-space: pre-wrap; }
<normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset> <normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset>
</attribute> </attribute>
<attribute name="title"> <attribute name="title">
<string>Chanels</string> <string>Chans</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0">
@ -625,7 +740,7 @@ p, li { white-space: pre-wrap; }
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_17"> <layout class="QVBoxLayout" name="verticalLayout_17">
<item> <item>
<widget class="QTableWidget" name="tableWidgetYourIdentities"> <widget class="QTreeWidget" name="treeWidgetChanList">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -647,61 +762,16 @@ p, li { white-space: pre-wrap; }
<property name="selectionBehavior"> <property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum> <enum>QAbstractItemView::SelectRows</enum>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>200</number>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>52</number>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>26</number>
</attribute>
<attribute name="verticalHeaderShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<column> <column>
<property name="text"> <property name="text">
<string>Name</string> <string>Chans</string>
</property>
<property name="font">
<font>
<kerning>true</kerning>
</font>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset>
<selectedoff>:/newPrefix/images/identities.png</selectedoff> <selectedoff>:/newPrefix/images/can-icon-16px.png</selectedoff>
</iconset> </iconset>
</property> </property>
</column> </column>
<column>
<property name="text">
<string>Address</string>
</property>
</column>
<column>
<property name="text">
<string>Stream</string>
</property>
</column>
</widget> </widget>
</item> </item>
<item> <item>