From cfa41e7e4036bcaa67729eb3982c499729397a49 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 28 Nov 2012 16:14:17 -0500 Subject: [PATCH 1/2] Fixed bug that prevented user from deleting a recently received message --- bitmessagemain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index f992e31f..d2bb6f09 100644 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -496,7 +496,7 @@ class receiveDataThread(QThread): sqlSubmitQueue.put(t) sqlReturnQueue.get() sqlLock.release() - self.emit(SIGNAL("displayNewMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),inventoryHasy,toAddress,fromAddress,subject,body) + self.emit(SIGNAL("displayNewMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),inventoryHash,toAddress,fromAddress,subject,body) #We have received a msg message. def recmsg(self): From 2d36ec686f653b9a19c39e1f2cf7a277c6a84cb7 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 28 Nov 2012 17:49:53 -0500 Subject: [PATCH 2/2] Corrected bug that prevented user from deleting a recently received message --- bitmessagemain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index d2bb6f09..5ed73c76 100644 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -492,7 +492,7 @@ class receiveDataThread(QThread): if messageEncodingType <> 0: sqlLock.acquire() t = (inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox') - sqlSubmitQueue.put('''INSERT INTO inbox VALUES (,?,?,?,?,?,?)''') + sqlSubmitQueue.put('''INSERT INTO inbox VALUES (?,?,?,?,?,?,?)''') sqlSubmitQueue.put(t) sqlReturnQueue.get() sqlLock.release() @@ -707,7 +707,7 @@ class receiveDataThread(QThread): else: body = 'Unknown encoding type.\n\n' + repr(message) subject = '' - + print 'within recmsg, inventoryHash is', inventoryHash if messageEncodingType <> 0: sqlLock.acquire() t = (inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox') @@ -2881,7 +2881,7 @@ class MyForm(QtGui.QMainWindow): newItem.setData(Qt.UserRole,unicode(message,'utf-8)')) self.ui.tableWidgetInbox.setItem(0,2,newItem) newItem = QtGui.QTableWidgetItem(strftime(config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time())))) - newItem.setData(Qt.UserRole,inventoryHash) + newItem.setData(Qt.UserRole,QByteArray(inventoryHash)) self.ui.tableWidgetInbox.setItem(0,3,newItem) self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(0,2).data(Qt.UserRole).toPyObject())