Merge pull request #5 from Atheros1/master
Fixed bug that prevents user from deleting a recently received message
This commit is contained in:
commit
e869b55d00
|
@ -492,11 +492,11 @@ class receiveDataThread(QThread):
|
||||||
if messageEncodingType <> 0:
|
if messageEncodingType <> 0:
|
||||||
sqlLock.acquire()
|
sqlLock.acquire()
|
||||||
t = (inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox')
|
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)
|
sqlSubmitQueue.put(t)
|
||||||
sqlReturnQueue.get()
|
sqlReturnQueue.get()
|
||||||
sqlLock.release()
|
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.
|
#We have received a msg message.
|
||||||
def recmsg(self):
|
def recmsg(self):
|
||||||
|
@ -707,7 +707,7 @@ class receiveDataThread(QThread):
|
||||||
else:
|
else:
|
||||||
body = 'Unknown encoding type.\n\n' + repr(message)
|
body = 'Unknown encoding type.\n\n' + repr(message)
|
||||||
subject = ''
|
subject = ''
|
||||||
|
print 'within recmsg, inventoryHash is', inventoryHash
|
||||||
if messageEncodingType <> 0:
|
if messageEncodingType <> 0:
|
||||||
sqlLock.acquire()
|
sqlLock.acquire()
|
||||||
t = (inventoryHash,toAddress,fromAddress,subject,int(time.time()),body,'inbox')
|
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)'))
|
newItem.setData(Qt.UserRole,unicode(message,'utf-8)'))
|
||||||
self.ui.tableWidgetInbox.setItem(0,2,newItem)
|
self.ui.tableWidgetInbox.setItem(0,2,newItem)
|
||||||
newItem = QtGui.QTableWidgetItem(strftime(config.get('bitmessagesettings', 'timeformat'),localtime(int(time.time()))))
|
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.tableWidgetInbox.setItem(0,3,newItem)
|
||||||
|
|
||||||
self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(0,2).data(Qt.UserRole).toPyObject())
|
self.ui.textEditInboxMessage.setText(self.ui.tableWidgetInbox.item(0,2).data(Qt.UserRole).toPyObject())
|
||||||
|
|
Reference in New Issue
Block a user