From c0ad2bfd4db04e1883f06c5800b11ce9d4c24ad3 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 10 Apr 2013 10:54:59 -0400 Subject: [PATCH] Load label for subscriptions on startup --- bitmessagemain.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bitmessagemain.py b/bitmessagemain.py index e56ff2e9..1396d36e 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -3507,6 +3507,16 @@ class MyForm(QtGui.QMainWindow): for row in queryreturn: fromLabel, = row + if fromLabel == '': #If this address wasn't in our address book.. + t = (fromAddress,) + sqlSubmitQueue.put('''select label from subscriptions where address=?''') + sqlSubmitQueue.put(t) + queryreturn = sqlReturnQueue.get() + + if queryreturn <> []: + for row in queryreturn: + fromLabel, = row + self.ui.tableWidgetInbox.insertRow(0) newItem = QtGui.QTableWidgetItem(unicode(toLabel,'utf-8')) newItem.setFlags( QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled )