Support select multiple items in inbox and Sent box
This commit is contained in:
parent
c7efc06e83
commit
af87503ec7
|
@ -4663,36 +4663,36 @@ class MyForm(QtGui.QMainWindow):
|
|||
|
||||
#Send item on the Inbox tab to trash
|
||||
def on_action_InboxTrash(self):
|
||||
currentRow = self.ui.tableWidgetInbox.currentRow()
|
||||
if currentRow >= 0:
|
||||
while self.ui.tableWidgetInbox.selectedIndexes() != []:
|
||||
currentRow = self.ui.tableWidgetInbox.selectedIndexes()[0].row()
|
||||
inventoryHashToTrash = str(self.ui.tableWidgetInbox.item(currentRow,3).data(Qt.UserRole).toPyObject())
|
||||
t = (inventoryHashToTrash,)
|
||||
sqlLock.acquire()
|
||||
#sqlSubmitQueue.put('''delete from inbox where msgid=?''')
|
||||
sqlSubmitQueue.put('''UPDATE inbox SET folder='trash' WHERE msgid=?''')
|
||||
sqlSubmitQueue.put(t)
|
||||
sqlReturnQueue.get()
|
||||
sqlSubmitQueue.put('commit')
|
||||
sqlLock.release()
|
||||
self.ui.textEditInboxMessage.setText("")
|
||||
self.ui.tableWidgetInbox.removeRow(currentRow)
|
||||
self.statusBar().showMessage('Moved item 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')
|
||||
|
||||
#Send item on the Sent tab to trash
|
||||
def on_action_SentTrash(self):
|
||||
currentRow = self.ui.tableWidgetSent.currentRow()
|
||||
if currentRow >= 0:
|
||||
#currentRow = self.ui.tableWidgetSent.currentRow()
|
||||
while self.ui.tableWidgetSent.selectedIndexes() != []:
|
||||
currentRow = self.ui.tableWidgetSent.selectedIndexes()[0].row()
|
||||
ackdataToTrash = str(self.ui.tableWidgetSent.item(currentRow,3).data(Qt.UserRole).toPyObject())
|
||||
t = (ackdataToTrash,)
|
||||
sqlLock.acquire()
|
||||
sqlSubmitQueue.put('''UPDATE sent SET folder='trash' WHERE ackdata=?''')
|
||||
sqlSubmitQueue.put(t)
|
||||
sqlReturnQueue.get()
|
||||
sqlSubmitQueue.put('commit')
|
||||
sqlLock.release()
|
||||
self.ui.textEditSentMessage.setPlainText("")
|
||||
self.ui.tableWidgetSent.removeRow(currentRow)
|
||||
self.statusBar().showMessage('Moved item 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')
|
||||
def on_action_SentClipboard(self):
|
||||
currentRow = self.ui.tableWidgetSent.currentRow()
|
||||
addressAtCurrentRow = str(self.ui.tableWidgetSent.item(currentRow,0).data(Qt.UserRole).toPyObject())
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'bitmessageui.ui'
|
||||
#
|
||||
# Created: Wed Mar 27 17:23:59 2013
|
||||
# Created: Fri Apr 05 17:47:21 2013
|
||||
# by: PyQt4 UI code generator 4.9.4
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
@ -47,7 +47,7 @@ class Ui_MainWindow(object):
|
|||
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
|
||||
self.tableWidgetInbox = QtGui.QTableWidget(self.inbox)
|
||||
self.tableWidgetInbox.setAlternatingRowColors(True)
|
||||
self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
|
||||
self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
|
||||
self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
||||
self.tableWidgetInbox.setWordWrap(False)
|
||||
self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox"))
|
||||
|
@ -144,7 +144,7 @@ class Ui_MainWindow(object):
|
|||
self.tableWidgetSent = QtGui.QTableWidget(self.sent)
|
||||
self.tableWidgetSent.setDragDropMode(QtGui.QAbstractItemView.DragDrop)
|
||||
self.tableWidgetSent.setAlternatingRowColors(True)
|
||||
self.tableWidgetSent.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
|
||||
self.tableWidgetSent.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
|
||||
self.tableWidgetSent.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
|
||||
self.tableWidgetSent.setWordWrap(False)
|
||||
self.tableWidgetSent.setObjectName(_fromUtf8("tableWidgetSent"))
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
|
@ -319,7 +319,7 @@ p, li { white-space: pre-wrap; }
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
|
|
|
@ -88,12 +88,12 @@ def takeSentMessagesOutOfTrash():
|
|||
conn.commit()
|
||||
print 'done'
|
||||
|
||||
#takeInboxMessagesOutOfTrash()
|
||||
takeInboxMessagesOutOfTrash()
|
||||
#takeSentMessagesOutOfTrash()
|
||||
#readInbox()
|
||||
#readSent()
|
||||
#readPubkeys()
|
||||
#readSubscriptions()
|
||||
readInventory()
|
||||
#readInventory()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user