use sock.sendall instead of sock.send to fix Ubuntu restart-hang issue #119

Merged
Atheros1 merged 2 commits from master into master 2013-04-09 07:26:45 +02:00
2 changed files with 20 additions and 3 deletions
Showing only changes of commit d38f6f3f40 - Show all commits

View File

@ -4688,7 +4688,10 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetInbox.removeRow(currentRow) self.ui.tableWidgetInbox.removeRow(currentRow)
self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.') self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.')
sqlSubmitQueue.put('commit') sqlSubmitQueue.put('commit')
if currentRow == 0:
self.ui.tableWidgetInbox.selectRow(currentRow) self.ui.tableWidgetInbox.selectRow(currentRow)
else:
self.ui.tableWidgetInbox.selectRow(currentRow-1)
#Send item on the Sent tab to trash #Send item on the Sent tab to trash
def on_action_SentTrash(self): def on_action_SentTrash(self):
@ -4705,6 +4708,11 @@ class MyForm(QtGui.QMainWindow):
self.ui.tableWidgetSent.removeRow(currentRow) self.ui.tableWidgetSent.removeRow(currentRow)
self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.') self.statusBar().showMessage('Moved items to trash. There is no user interface to view your trash, but it is still on disk if you are desperate to get it back.')
sqlSubmitQueue.put('commit') sqlSubmitQueue.put('commit')
if currentRow == 0:
self.ui.tableWidgetSent.selectRow(currentRow)
else:
self.ui.tableWidgetSent.selectRow(currentRow-1)
def on_action_SentClipboard(self): def on_action_SentClipboard(self):
currentRow = self.ui.tableWidgetSent.currentRow() currentRow = self.ui.tableWidgetSent.currentRow()
addressAtCurrentRow = str(self.ui.tableWidgetSent.item(currentRow,0).data(Qt.UserRole).toPyObject()) addressAtCurrentRow = str(self.ui.tableWidgetSent.item(currentRow,0).data(Qt.UserRole).toPyObject())

View File

@ -88,9 +88,18 @@ def takeSentMessagesOutOfTrash():
conn.commit() conn.commit()
print 'done' print 'done'
takeInboxMessagesOutOfTrash() def markAllInboxMessagesAsUnread():
item = '''update inbox set read='0' '''
parameters = ''
cur.execute(item, parameters)
output = cur.fetchall()
conn.commit()
print 'done'
#takeInboxMessagesOutOfTrash()
#takeSentMessagesOutOfTrash() #takeSentMessagesOutOfTrash()
#readInbox() #markAllInboxMessagesAsUnread()
readInbox()
#readSent() #readSent()
#readPubkeys() #readPubkeys()
#readSubscriptions() #readSubscriptions()