Removed 33 E501 line-too-long errors from pycodestyle (3 left).
Fixed some other styling issues too.
This commit is contained in:
parent
99be6bbf73
commit
12de1fc3f0
|
@ -162,8 +162,9 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
QtCore.SIGNAL(
|
QtCore.SIGNAL(
|
||||||
"triggered()"),
|
"triggered()"),
|
||||||
self.click_actionRegenerateDeterministicAddresses)
|
self.click_actionRegenerateDeterministicAddresses)
|
||||||
QtCore.QObject.connect(self.ui.pushButtonAddChan, QtCore.SIGNAL(
|
QtCore.QObject.connect(
|
||||||
"clicked()"),
|
self.ui.pushButtonAddChan,
|
||||||
|
QtCore.SIGNAL("clicked()"),
|
||||||
self.click_actionJoinChan) # also used for creating chans.
|
self.click_actionJoinChan) # also used for creating chans.
|
||||||
QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.pushButtonNewAddress, QtCore.SIGNAL(
|
||||||
"clicked()"), self.click_NewAddressDialog)
|
"clicked()"), self.click_NewAddressDialog)
|
||||||
|
@ -479,7 +480,13 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
for toAddress in db:
|
for toAddress in db:
|
||||||
widget = Ui_SubscriptionWidget(treeWidget, i, toAddress, db[toAddress]["inbox"]['count'], db[toAddress]["inbox"]['label'], db[toAddress]["inbox"]['enabled'])
|
widget = Ui_SubscriptionWidget(
|
||||||
|
treeWidget,
|
||||||
|
i,
|
||||||
|
toAddress,
|
||||||
|
db[toAddress]["inbox"]['count'],
|
||||||
|
db[toAddress]["inbox"]['label'],
|
||||||
|
db[toAddress]["inbox"]['enabled'])
|
||||||
j = 0
|
j = 0
|
||||||
unread = 0
|
unread = 0
|
||||||
for folder in folders:
|
for folder in folders:
|
||||||
|
@ -538,7 +545,11 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
# get number of (unread) messages
|
# get number of (unread) messages
|
||||||
total = 0
|
total = 0
|
||||||
queryreturn = sqlQuery('SELECT toaddress, folder, count(msgid) as cnt FROM inbox WHERE read = 0 GROUP BY toaddress, folder')
|
queryreturn = sqlQuery(
|
||||||
|
"SELECT toaddress, folder, count(msgid) as cnt "
|
||||||
|
"FROM inbox "
|
||||||
|
"WHERE read = 0 "
|
||||||
|
"GROUP BY toaddress, folder")
|
||||||
for row in queryreturn:
|
for row in queryreturn:
|
||||||
toaddress, folder, cnt = row
|
toaddress, folder, cnt = row
|
||||||
total += cnt
|
total += cnt
|
||||||
|
@ -634,8 +645,10 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
addressInKeysFile)
|
addressInKeysFile)
|
||||||
if addressVersionNumber == 1:
|
if addressVersionNumber == 1:
|
||||||
displayMsg = _translate(
|
displayMsg = _translate(
|
||||||
"MainWindow", "One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. "
|
"MainWindow",
|
||||||
+ "May we delete it now?").arg(addressInKeysFile)
|
"One of your addresses, %1, is an old version 1 address. "
|
||||||
|
"Version 1 addresses are no longer supported. "
|
||||||
|
"May we delete it now?").arg(addressInKeysFile)
|
||||||
reply = QtGui.QMessageBox.question(
|
reply = QtGui.QMessageBox.question(
|
||||||
self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
|
self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
|
||||||
if reply == QtGui.QMessageBox.Yes:
|
if reply == QtGui.QMessageBox.Yes:
|
||||||
|
@ -753,6 +766,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self.ui.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
|
self.ui.tableWidgetAddressBook.setIconSize(QtCore.QSize(identicon_size, identicon_size))
|
||||||
|
|
||||||
self.UISignalThread = UISignaler.get()
|
self.UISignalThread = UISignaler.get()
|
||||||
|
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
|
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.writeNewAddressToTable)
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
|
@ -762,9 +776,12 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
"updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata)
|
"updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata)
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
"displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewInboxMessage)
|
"displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
|
||||||
|
self.displayNewInboxMessage)
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
"displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.displayNewSentMessage)
|
"displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,"
|
||||||
|
"PyQt_PyObject,PyQt_PyObject)"),
|
||||||
|
self.displayNewSentMessage)
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
"setStatusIcon(PyQt_PyObject)"), self.setStatusIcon)
|
"setStatusIcon(PyQt_PyObject)"), self.setStatusIcon)
|
||||||
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
|
||||||
|
@ -889,7 +906,13 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
else:
|
else:
|
||||||
numberOfDays = int(round(TTL / (24*60*60)))
|
numberOfDays = int(round(TTL / (24*60*60)))
|
||||||
self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%n day(s)", None, QtCore.QCoreApplication.CodecForTr, numberOfDays))
|
self.ui.labelHumanFriendlyTTLDescription.setText(
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"%n day(s)",
|
||||||
|
None,
|
||||||
|
QtCore.QCoreApplication.CodecForTr,
|
||||||
|
numberOfDays))
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
self.ui.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet)
|
self.ui.labelHumanFriendlyTTLDescription.setStyleSheet(stylesheet)
|
||||||
self.ui.labelHumanFriendlyTTLDescription.setFont(font)
|
self.ui.labelHumanFriendlyTTLDescription.setFont(font)
|
||||||
|
@ -1559,36 +1582,81 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
# may manage your keys by editing the keys.dat file stored in
|
# may manage your keys by editing the keys.dat file stored in
|
||||||
# the same directory as this program. It is important that you
|
# the same directory as this program. It is important that you
|
||||||
# back up this file.', QMessageBox.Ok)
|
# back up this file.', QMessageBox.Ok)
|
||||||
reply = QtGui.QMessageBox.information(self, 'keys.dat?', _translate(
|
reply = QtGui.QMessageBox.information(
|
||||||
"MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file."), QtGui.QMessageBox.Ok)
|
self,
|
||||||
|
'keys.dat?',
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"You may manage your keys by editing the keys.dat file stored in the same directory"
|
||||||
|
"as this program. It is important that you back up this file."
|
||||||
|
),
|
||||||
|
QtGui.QMessageBox.Ok)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.information(self, 'keys.dat?', _translate(
|
QtGui.QMessageBox.information(
|
||||||
"MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file.").arg(state.appdata), QtGui.QMessageBox.Ok)
|
self,
|
||||||
|
'keys.dat?',
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"You may manage your keys by editing the keys.dat file stored in"
|
||||||
|
"\n %1 \n"
|
||||||
|
"It is important that you back up this file."
|
||||||
|
).arg(state.appdata),
|
||||||
|
QtGui.QMessageBox.Ok)
|
||||||
elif sys.platform == 'win32' or sys.platform == 'win64':
|
elif sys.platform == 'win32' or sys.platform == 'win64':
|
||||||
if state.appdata == '':
|
if state.appdata == '':
|
||||||
reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Open keys.dat?"), _translate(
|
reply = QtGui.QMessageBox.question(
|
||||||
"MainWindow", "You may manage your keys by editing the keys.dat file stored in the same directory as this program. It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
|
self,
|
||||||
|
_translate("MainWindow", "Open keys.dat?"),
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"You may manage your keys by editing the keys.dat file stored in the same directory as"
|
||||||
|
"this program. It is important that you back up this file."
|
||||||
|
"Would you like to open the file now?"
|
||||||
|
"(Be sure to close Bitmessage before making any changes.)"),
|
||||||
|
QtGui.QMessageBox.Yes,
|
||||||
|
QtGui.QMessageBox.No)
|
||||||
else:
|
else:
|
||||||
reply = QtGui.QMessageBox.question(self, _translate("MainWindow", "Open keys.dat?"), _translate(
|
reply = QtGui.QMessageBox.question(
|
||||||
"MainWindow", "You may manage your keys by editing the keys.dat file stored in\n %1 \nIt is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)").arg(state.appdata), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
|
self,
|
||||||
|
_translate("MainWindow", "Open keys.dat?"),
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"You may manage your keys by editing the keys.dat file stored in\n %1 \n"
|
||||||
|
"It is important that you back up this file. Would you like to open the file now?"
|
||||||
|
"(Be sure to close Bitmessage before making any changes.)").arg(state.appdata),
|
||||||
|
QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
|
||||||
if reply == QtGui.QMessageBox.Yes:
|
if reply == QtGui.QMessageBox.Yes:
|
||||||
openKeysFile()
|
openKeysFile()
|
||||||
|
|
||||||
# menu button 'delete all treshed messages'
|
# menu button 'delete all treshed messages'
|
||||||
def click_actionDeleteAllTrashedMessages(self):
|
def click_actionDeleteAllTrashedMessages(self):
|
||||||
if QtGui.QMessageBox.question(self, _translate("MainWindow", "Delete trash?"), _translate("MainWindow", "Are you sure you want to delete all trashed messages?"), QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
|
if QtGui.QMessageBox.question(
|
||||||
|
self,
|
||||||
|
_translate("MainWindow", "Delete trash?"),
|
||||||
|
_translate("MainWindow", "Are you sure you want to delete all trashed messages?"),
|
||||||
|
QtGui.QMessageBox.Yes,
|
||||||
|
QtGui.QMessageBox.No) == QtGui.QMessageBox.No:
|
||||||
return
|
return
|
||||||
sqlStoredProcedure('deleteandvacuume')
|
sqlStoredProcedure('deleteandvacuume')
|
||||||
self.rerenderTabTreeMessages()
|
self.rerenderTabTreeMessages()
|
||||||
self.rerenderTabTreeSubscriptions()
|
self.rerenderTabTreeSubscriptions()
|
||||||
self.rerenderTabTreeChans()
|
self.rerenderTabTreeChans()
|
||||||
if self.getCurrentFolder(self.ui.treeWidgetYourIdentities) == "trash":
|
if self.getCurrentFolder(self.ui.treeWidgetYourIdentities) == "trash":
|
||||||
self.loadMessagelist(self.ui.tableWidgetInbox, self.getCurrentAccount(self.ui.treeWidgetYourIdentities), "trash")
|
self.loadMessagelist(
|
||||||
|
self.ui.tableWidgetInbox,
|
||||||
|
self.getCurrentAccount(self.ui.treeWidgetYourIdentities),
|
||||||
|
"trash")
|
||||||
elif self.getCurrentFolder(self.ui.treeWidgetSubscriptions) == "trash":
|
elif self.getCurrentFolder(self.ui.treeWidgetSubscriptions) == "trash":
|
||||||
self.loadMessagelist(self.ui.tableWidgetInboxSubscriptions, self.getCurrentAccount(self.ui.treeWidgetSubscriptions), "trash")
|
self.loadMessagelist(
|
||||||
|
self.ui.tableWidgetInboxSubscriptions,
|
||||||
|
self.getCurrentAccount(self.ui.treeWidgetSubscriptions),
|
||||||
|
"trash")
|
||||||
elif self.getCurrentFolder(self.ui.treeWidgetChans) == "trash":
|
elif self.getCurrentFolder(self.ui.treeWidgetChans) == "trash":
|
||||||
self.loadMessagelist(self.ui.tableWidgetInboxChans, self.getCurrentAccount(self.ui.treeWidgetChans), "trash")
|
self.loadMessagelist(
|
||||||
|
self.ui.tableWidgetInboxChans,
|
||||||
|
self.getCurrentAccount(self.ui.treeWidgetChans),
|
||||||
|
"trash")
|
||||||
|
|
||||||
# menu button 'regenerate deterministic addresses'
|
# menu button 'regenerate deterministic addresses'
|
||||||
def click_actionRegenerateDeterministicAddresses(self):
|
def click_actionRegenerateDeterministicAddresses(self):
|
||||||
|
@ -1836,7 +1904,9 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
sent.item(i, 3).setToolTip(textToDisplay)
|
sent.item(i, 3).setToolTip(textToDisplay)
|
||||||
try:
|
try:
|
||||||
newlinePosition = textToDisplay.indexOf('\n')
|
newlinePosition = textToDisplay.indexOf('\n')
|
||||||
except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
|
except:
|
||||||
|
# If someone misses adding a "_translate" to a string before passing it to this function,
|
||||||
|
# this function won't receive a qstring which will cause an exception.
|
||||||
newlinePosition = 0
|
newlinePosition = 0
|
||||||
if newlinePosition > 1:
|
if newlinePosition > 1:
|
||||||
sent.item(i, 3).setText(
|
sent.item(i, 3).setText(
|
||||||
|
@ -1864,7 +1934,9 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
sent.item(i, 3).setToolTip(textToDisplay)
|
sent.item(i, 3).setToolTip(textToDisplay)
|
||||||
try:
|
try:
|
||||||
newlinePosition = textToDisplay.indexOf('\n')
|
newlinePosition = textToDisplay.indexOf('\n')
|
||||||
except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
|
except:
|
||||||
|
# If someone misses adding a "_translate" to a string before passing it to this function,
|
||||||
|
# this function won't receive a qstring which will cause an exception.
|
||||||
newlinePosition = 0
|
newlinePosition = 0
|
||||||
if newlinePosition > 1:
|
if newlinePosition > 1:
|
||||||
sent.item(i, 3).setText(
|
sent.item(i, 3).setText(
|
||||||
|
@ -1910,12 +1982,16 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
|
|
||||||
def rerenderMessagelistFromLabels(self):
|
def rerenderMessagelistFromLabels(self):
|
||||||
for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
|
for messagelist in (self.ui.tableWidgetInbox,
|
||||||
|
self.ui.tableWidgetInboxChans,
|
||||||
|
self.ui.tableWidgetInboxSubscriptions):
|
||||||
for i in range(messagelist.rowCount()):
|
for i in range(messagelist.rowCount()):
|
||||||
messagelist.item(i, 1).setLabel()
|
messagelist.item(i, 1).setLabel()
|
||||||
|
|
||||||
def rerenderMessagelistToLabels(self):
|
def rerenderMessagelistToLabels(self):
|
||||||
for messagelist in (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions):
|
for messagelist in (self.ui.tableWidgetInbox,
|
||||||
|
self.ui.tableWidgetInboxChans,
|
||||||
|
self.ui.tableWidgetInboxSubscriptions):
|
||||||
for i in range(messagelist.rowCount()):
|
for i in range(messagelist.rowCount()):
|
||||||
messagelist.item(i, 0).setLabel()
|
messagelist.item(i, 0).setLabel()
|
||||||
|
|
||||||
|
@ -1978,11 +2054,16 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self.rerenderTabTreeSubscriptions()
|
self.rerenderTabTreeSubscriptions()
|
||||||
|
|
||||||
def click_pushButtonTTL(self):
|
def click_pushButtonTTL(self):
|
||||||
QtGui.QMessageBox.information(self, 'Time To Live', _translate(
|
QtGui.QMessageBox.information(
|
||||||
|
self,
|
||||||
|
'Time To Live',
|
||||||
|
_translate(
|
||||||
"MainWindow", """The TTL, or Time-To-Live is the length of time that the network will hold the message.
|
"MainWindow", """The TTL, or Time-To-Live is the length of time that the network will hold the message.
|
||||||
The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it
|
The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement
|
||||||
will resend the message automatically. The longer the Time-To-Live, the
|
,it will resend the message automatically. The longer the Time-To-Live, the
|
||||||
more work your computer must do to send the message. A Time-To-Live of four or five days is often appropriate."""), QtGui.QMessageBox.Ok)
|
more work your computer must do to send the message.
|
||||||
|
A Time-To-Live of four or five days is often appropriate."""),
|
||||||
|
QtGui.QMessageBox.Ok)
|
||||||
|
|
||||||
def click_pushButtonClear(self):
|
def click_pushButtonClear(self):
|
||||||
self.ui.lineEditSubject.setText("")
|
self.ui.lineEditSubject.setText("")
|
||||||
|
@ -2055,14 +2136,21 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
subject = acct.subject
|
subject = acct.subject
|
||||||
toAddress = acct.toAddress
|
toAddress = acct.toAddress
|
||||||
else:
|
else:
|
||||||
if QtGui.QMessageBox.question(self, "Sending an email?", _translate("MainWindow",
|
if QtGui.QMessageBox.question(
|
||||||
"You are trying to send an email instead of a bitmessage. This requires registering with a gateway. Attempt to register?"),
|
self,
|
||||||
|
"Sending an email?",
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"You are trying to send an email instead of a bitmessage. "
|
||||||
|
"This requires registering with a gateway. Attempt to register?"),
|
||||||
QtGui.QMessageBox.Yes|QtGui.QMessageBox.No) != QtGui.QMessageBox.Yes:
|
QtGui.QMessageBox.Yes|QtGui.QMessageBox.No) != QtGui.QMessageBox.Yes:
|
||||||
continue
|
continue
|
||||||
email = acct.getLabel()
|
email = acct.getLabel()
|
||||||
if email[-14:] != "@mailchuck.com": # attempt register
|
if email[-14:] != "@mailchuck.com": # attempt register
|
||||||
# 12 character random email address
|
# 12 character random email address
|
||||||
email = ''.join(random.SystemRandom().choice(string.ascii_lowercase) for _ in range(12)) + "@mailchuck.com"
|
email = ''.join(
|
||||||
|
random.SystemRandom().choice(string.ascii_lowercase) for _ in range(12)
|
||||||
|
) + "@mailchuck.com"
|
||||||
acct = MailchuckAccount(fromAddress)
|
acct = MailchuckAccount(fromAddress)
|
||||||
acct.register(email)
|
acct.register(email)
|
||||||
config.set(fromAddress, 'label', email)
|
config.set(fromAddress, 'label', email)
|
||||||
|
@ -2152,12 +2240,24 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
toAddress = addBMIfNotPresent(toAddress)
|
toAddress = addBMIfNotPresent(toAddress)
|
||||||
|
|
||||||
if addressVersionNumber > 4 or addressVersionNumber <= 1:
|
if addressVersionNumber > 4 or addressVersionNumber <= 1:
|
||||||
QtGui.QMessageBox.about(self, _translate("MainWindow", "Address version number"), _translate(
|
QtGui.QMessageBox.about(
|
||||||
"MainWindow", "Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(addressVersionNumber)))
|
self,
|
||||||
|
_translate("MainWindow", "Address version number"),
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"Concerning the address %1, Bitmessage cannot understand address version numbers"
|
||||||
|
" of %2. Perhaps upgrade Bitmessage to the latest version."
|
||||||
|
).arg(toAddress).arg(str(addressVersionNumber)))
|
||||||
continue
|
continue
|
||||||
if streamNumber > 1 or streamNumber == 0:
|
if streamNumber > 1 or streamNumber == 0:
|
||||||
QtGui.QMessageBox.about(self, _translate("MainWindow", "Stream number"), _translate(
|
QtGui.QMessageBox.about(
|
||||||
"MainWindow", "Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.").arg(toAddress).arg(str(streamNumber)))
|
self,
|
||||||
|
_translate("MainWindow", "Stream number"),
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"Concerning the address %1, Bitmessage cannot handle stream numbers of %2."
|
||||||
|
" Perhaps upgrade Bitmessage to the latest version."
|
||||||
|
).arg(toAddress).arg(str(streamNumber)))
|
||||||
continue
|
continue
|
||||||
self.statusbar.clearMessage()
|
self.statusbar.clearMessage()
|
||||||
if state.statusIconColor == 'red':
|
if state.statusIconColor == 'red':
|
||||||
|
@ -2267,7 +2367,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self.ui.comboBoxSendFrom.clear()
|
self.ui.comboBoxSendFrom.clear()
|
||||||
for addressInKeysFile in getSortedAccounts():
|
for addressInKeysFile in getSortedAccounts():
|
||||||
isEnabled = config.getboolean(
|
isEnabled = 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')
|
||||||
isMaillinglist = config.safeGetBoolean(addressInKeysFile, 'mailinglist')
|
isMaillinglist = config.safeGetBoolean(addressInKeysFile, 'mailinglist')
|
||||||
if isEnabled and not isMaillinglist:
|
if isEnabled and not isMaillinglist:
|
||||||
label = unicode(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
|
label = unicode(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
|
||||||
|
@ -2291,7 +2391,7 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
self.ui.comboBoxSendFromBroadcast.clear()
|
self.ui.comboBoxSendFromBroadcast.clear()
|
||||||
for addressInKeysFile in getSortedAccounts():
|
for addressInKeysFile in getSortedAccounts():
|
||||||
isEnabled = config.getboolean(
|
isEnabled = 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')
|
||||||
isChan = config.safeGetBoolean(addressInKeysFile, 'chan')
|
isChan = config.safeGetBoolean(addressInKeysFile, 'chan')
|
||||||
if isEnabled and not isChan:
|
if isEnabled and not isChan:
|
||||||
label = unicode(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
|
label = unicode(config.get(addressInKeysFile, 'label'), 'utf-8', 'ignore').strip()
|
||||||
|
@ -3178,7 +3278,11 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
message, = row
|
message, = row
|
||||||
|
|
||||||
defaultFilename = "".join(x for x in subjectAtCurrentInboxRow if x.isalnum()) + '.txt'
|
defaultFilename = "".join(x for x in subjectAtCurrentInboxRow if x.isalnum()) + '.txt'
|
||||||
filename = QtGui.QFileDialog.getSaveFileName(self, _translate("MainWindow","Save As..."), defaultFilename, "Text files (*.txt);;All files (*.*)")
|
filename = QtGui.QFileDialog.getSaveFileName(
|
||||||
|
self,
|
||||||
|
_translate("MainWindow","Save As..."),
|
||||||
|
defaultFilename,
|
||||||
|
"Text files (*.txt);;All files (*.*)")
|
||||||
if filename == '':
|
if filename == '':
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
@ -3968,7 +4072,9 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
if column != 0:
|
if column != 0:
|
||||||
return
|
return
|
||||||
# only account names of normal addresses (no chans/mailinglists)
|
# only account names of normal addresses (no chans/mailinglists)
|
||||||
if (not isinstance(item, Ui_AddressWidget)) or (not self.getCurrentTreeWidget()) or self.getCurrentTreeWidget().currentItem() is None:
|
if (not isinstance(item, Ui_AddressWidget)) or \
|
||||||
|
(not self.getCurrentTreeWidget()) or \
|
||||||
|
self.getCurrentTreeWidget().currentItem() is None:
|
||||||
return
|
return
|
||||||
# not visible
|
# not visible
|
||||||
if (not self.getCurrentItem()) or (not isinstance(self.getCurrentItem(), Ui_AddressWidget)):
|
if (not self.getCurrentItem()) or (not isinstance(self.getCurrentItem(), Ui_AddressWidget)):
|
||||||
|
|
|
@ -13,6 +13,8 @@ class RetranslateMixin(object):
|
||||||
getattr(self, attr).setText(getattr(defaults, attr).text())
|
getattr(self, attr).setText(getattr(defaults, attr).text())
|
||||||
elif isinstance(value, QtGui.QTableWidget):
|
elif isinstance(value, QtGui.QTableWidget):
|
||||||
for i in range (value.columnCount()):
|
for i in range (value.columnCount()):
|
||||||
getattr(self, attr).horizontalHeaderItem(i).setText(getattr(defaults, attr).horizontalHeaderItem(i).text())
|
getattr(self, attr).horizontalHeaderItem(i).setText(
|
||||||
|
getattr(defaults, attr).horizontalHeaderItem(i).text())
|
||||||
for i in range (value.rowCount()):
|
for i in range (value.rowCount()):
|
||||||
getattr(self, attr).verticalHeaderItem(i).setText(getattr(defaults, attr).verticalHeaderItem(i).text())
|
getattr(self, attr).verticalHeaderItem(i).setText(
|
||||||
|
getattr(defaults, attr).verticalHeaderItem(i).text())
|
||||||
|
|
|
@ -22,8 +22,11 @@ class UISignaler(QThread):
|
||||||
command, data = queues.UISignalQueue.get()
|
command, data = queues.UISignalQueue.get()
|
||||||
if command == 'writeNewAddressToTable':
|
if command == 'writeNewAddressToTable':
|
||||||
label, address, streamNumber = data
|
label, address, streamNumber = data
|
||||||
self.emit(SIGNAL(
|
self.emit(
|
||||||
"writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), label, address, str(streamNumber))
|
SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
|
||||||
|
label,
|
||||||
|
address,
|
||||||
|
str(streamNumber))
|
||||||
elif command == 'updateStatusBar':
|
elif command == 'updateStatusBar':
|
||||||
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"), data)
|
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"), data)
|
||||||
elif command == 'updateSentItemStatusByToAddress':
|
elif command == 'updateSentItemStatusByToAddress':
|
||||||
|
@ -46,7 +49,11 @@ class UISignaler(QThread):
|
||||||
toAddress, fromLabel, fromAddress, subject, message, ackdata)
|
toAddress, fromLabel, fromAddress, subject, message, ackdata)
|
||||||
elif command == 'updateNetworkStatusTab':
|
elif command == 'updateNetworkStatusTab':
|
||||||
outbound, add, destination = data
|
outbound, add, destination = data
|
||||||
self.emit(SIGNAL("updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), outbound, add, destination)
|
self.emit(
|
||||||
|
SIGNAL("updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
|
||||||
|
outbound,
|
||||||
|
add,
|
||||||
|
destination)
|
||||||
elif command == 'updateNumberOfMessagesProcessed':
|
elif command == 'updateNumberOfMessagesProcessed':
|
||||||
self.emit(SIGNAL("updateNumberOfMessagesProcessed()"))
|
self.emit(SIGNAL("updateNumberOfMessagesProcessed()"))
|
||||||
elif command == 'updateNumberOfPubkeysProcessed':
|
elif command == 'updateNumberOfPubkeysProcessed':
|
||||||
|
@ -73,7 +80,11 @@ class UISignaler(QThread):
|
||||||
self.emit(SIGNAL("newVersionAvailable(PyQt_PyObject)"), data)
|
self.emit(SIGNAL("newVersionAvailable(PyQt_PyObject)"), data)
|
||||||
elif command == 'alert':
|
elif command == 'alert':
|
||||||
title, text, exitAfterUserClicksOk = data
|
title, text, exitAfterUserClicksOk = data
|
||||||
self.emit(SIGNAL("displayAlert(PyQt_PyObject, PyQt_PyObject, PyQt_PyObject)"), title, text, exitAfterUserClicksOk)
|
self.emit(
|
||||||
|
SIGNAL("displayAlert(PyQt_PyObject, PyQt_PyObject, PyQt_PyObject)"),
|
||||||
|
title,
|
||||||
|
text,
|
||||||
|
exitAfterUserClicksOk)
|
||||||
else:
|
else:
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
'Command sent to UISignaler not recognized: %s\n' % command)
|
'Command sent to UISignaler not recognized: %s\n' % command)
|
||||||
|
|
Reference in New Issue
Block a user