diff --git a/README.md b/README.md index aa0b2294..c164c03a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,14 @@ sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs. +Development +---------- +If you plan to put a non-trivial amount of work into coding new features, it +is recommended that you first solicit feedback on the DevTalk pseudo-mailing +list: +BM-2D9QKN4teYRvoq2fyzpiftPh9WP9qggtzh + + references ---------- * [project website](https://bitmessage.org) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 26a2a92d..ef2a2ddd 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -461,7 +461,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): if len(params) == 0: raise APIError(0, 'I need parameters!') toAddress = params[0] - queryreturn = sqlQuery('''SELECT msgid, toaddress, fromaddress, subject, received, message, encodingtype FROM inbox WHERE folder='inbox' AND toAddress=?''', toAddress) + queryReturn = sqlQuery('''SELECT msgid, toaddress, fromaddress, subject, received, message, encodingtype FROM inbox WHERE folder='inbox' AND toAddress=?''', toAddress) data = '{"inboxMessages":[' for row in queryreturn: msgid, toAddress, fromAddress, subject, received, message, encodingtype = row diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index f8ba57a8..7fd32a11 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2711,23 +2711,26 @@ class MyForm(QtGui.QMainWindow): '''select message from inbox where msgid=?''', msgid) if queryreturn != []: for row in queryreturn: - message, = row - message = unicode(message, 'utf-8)') + messageText, = row + 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): - if len(message) < 30000: - self.ui.textEditInboxMessage.setText(message) # Only show the first 30K characters - else: - self.ui.textEditInboxMessage.setText(message[ - :30000] + '\n\nDisplay of the remainder of the message truncated because it is too long.') # Only show the first 30K characters + self.ui.textEditInboxMessage.setText(messageText) else: - if len(message) < 30000: - self.ui.textEditInboxMessage.setPlainText(message) # Only show the first 30K characters - else: - self.ui.textEditInboxMessage.setPlainText(message[ - :30000] + '\n\nDisplay of the remainder of the message truncated because it is too long.') # Only show the first 30K characters - + 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)