diff --git a/Makefile b/Makefile index d49f63fc..6f415786 100755 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ source: tar -cvzf ../$(APP)_$(VERSION).orig.tar.gz ../$(APP)-$(VERSION) --exclude-vcs install: - mkdir -m 755 -p $(DESTDIR)/usr/bin mkdir -m 755 -p $(DEST_APP) mkdir -m 755 -p $(DEST_SHARE)/applications mkdir -m 755 -p $(DEST_APP)/images @@ -35,7 +34,7 @@ install: install -m 644 src/pyelliptic/*.py $(DEST_APP)/pyelliptic install -m 644 src/socks/*.py $(DEST_APP)/socks install -m 644 src/bitmessageqt/*.py $(DEST_APP)/bitmessageqt - install -m 755 debian/pybm $(DESTDIR)/usr/bin/$(APP) + install -m 755 debian/pybm /usr/bin/pybitmessage install -m 644 desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP).desktop install -m 644 src/images/can-icon-24px.png $(DEST_SHARE)/icons/hicolor/24x24/apps/$(APP).png diff --git a/desktop/pybitmessage.desktop b/desktop/pybitmessage.desktop index 2b1b6902..363908dd 100644 --- a/desktop/pybitmessage.desktop +++ b/desktop/pybitmessage.desktop @@ -7,12 +7,12 @@ Comment=Send encrypted messages to another person or to many subscribers Exec=pybitmessage %U Icon=pybitmessage Terminal=false -Categories=Network;Email;Application; -Keywords=Email;E-mail;Newsgroup;Messaging; +Categories=Network;Email;Application +Keywords=Email;E-mail;Newsgroup;Messaging X-MessagingMenu-UsesChatSection=true X-Ubuntu-Gettext-Domain=pybitmessage -Actions=Send;Subscribe;AddressBook; +Actions=Send;Subscribe;AddressBook [Desktop Action Send] Name=Send @@ -27,4 +27,4 @@ OnlyShowIn=Unity; [Desktop Action AddressBook] Name=Address Book Exec=pybitmessage -a -OnlyShowIn=Unity; +OnlyShowIn=Unity; \ No newline at end of file diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index c12be4d3..e53fee3a 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -483,20 +483,12 @@ class receiveDataThread(threading.Thread): hash, = row if hash not in self.objectsOfWhichThisRemoteNodeIsAlreadyAware: bigInvList[hash] = 0 - else: - shared.printLock.acquire() - print 'Not including an object hash in a big inv message because the remote node is already aware of it.'#This line is here to check that this feature is working. - shared.printLock.release() #We also have messages in our inventory in memory (which is a python dictionary). Let's fetch those too. for hash, storedValue in shared.inventory.items(): if hash not in self.objectsOfWhichThisRemoteNodeIsAlreadyAware: objectType, streamNumber, payload, receivedTime = storedValue if streamNumber == self.streamNumber and receivedTime > int(time.time())-maximumAgeOfObjectsThatIAdvertiseToOthers: bigInvList[hash] = 0 - else: - shared.printLock.acquire() - print 'Not including an object hash in a big inv message because the remote node is already aware of it.'#This line is here to check that this feature is working. - shared.printLock.release() numberOfObjectsInInvMessage = 0 payload = '' #Now let us start appending all of these hashes together. They will be sent out in a big inv message to our new peer. @@ -3692,8 +3684,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): shared.sqlReturnQueue.get() shared.sqlSubmitQueue.put('commit') shared.sqlLock.release() - shared.UISignalQueue.put(('updateStatusBar','Per API: Trashed message (assuming message existed). UI not updated.')) - return 'Trashed message (assuming message existed). UI not updated. To double check, run getAllInboxMessages to see that the message disappeared, or restart Bitmessage and look in the normal Bitmessage GUI.' + shared.UISignalQueue.put(('removeInboxRowByMsgid',msgid)) + return 'Trashed message (assuming message existed).' elif method == 'sendMessage': if len(params) == 0: return 'API Error 0000: I need parameters!' diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 435ebec5..bc971563 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -427,6 +427,7 @@ class MyForm(QtGui.QMainWindow): QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("setStatusIcon(PyQt_PyObject)"), self.setStatusIcon) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("rerenderInboxFromLabels()"), self.rerenderInboxFromLabels) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("rerenderSubscriptions()"), self.rerenderSubscriptions) + QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL("removeInboxRowByMsgid(PyQt_PyObject)"), self.removeInboxRowByMsgid) self.UISignalThread.start() #Below this point, it would be good if all of the necessary global data structures were initialized. @@ -937,6 +938,13 @@ class MyForm(QtGui.QMainWindow): #self.ui.tableWidgetSent.item(i,3).setText(unicode(textToDisplay,'utf-8')) self.ui.tableWidgetSent.item(i,3).setText(textToDisplay) + def removeInboxRowByMsgid(self,msgid):#msgid and inventoryHash are the same thing + for i in range(self.ui.tableWidgetInbox.rowCount()): + if msgid == str(self.ui.tableWidgetInbox.item(i,3).data(Qt.UserRole).toPyObject()): + self.statusBar().showMessage('Message trashed') + self.ui.tableWidgetInbox.removeRow(i) + break + def rerenderInboxFromLabels(self): for i in range(self.ui.tableWidgetInbox.rowCount()): addressToLookup = str(self.ui.tableWidgetInbox.item(i,1).data(Qt.UserRole).toPyObject()) @@ -2291,6 +2299,8 @@ class UISignaler(QThread): self.emit(SIGNAL("rerenderInboxFromLabels()")) elif command == 'rerenderSubscriptions': self.emit(SIGNAL("rerenderSubscriptions()")) + elif command == 'removeInboxRowByMsgid': + self.emit(SIGNAL("removeInboxRowByMsgid(PyQt_PyObject)"),data) else: sys.stderr.write('Command sent to UISignaler not recognized: %s\n' % command)