diff --git a/COPYING b/COPYING index 2ba2d65e..dfa169ea 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,5 @@ -Copyright (c) 2012-2014 Jonathan Warren -Copyright (c) 2013-2014 The Bitmessage Developers +Copyright (c) 2012-2015 Jonathan Warren +Copyright (c) 2013-2015 The Bitmessage Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/INSTALL.md b/INSTALL.md index 111db5d9..823608fe 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,10 +4,10 @@ For an up-to-date version of these instructions, please visit the [Bitmessage Wiki](https://bitmessage.org/wiki/Compiling_instructions). PyBitmessage can be run either straight from source or from an installed -packaged. +package. ##Dependencies -Before running PyBitmessage, make sure you have all the needed dependencies +Before running PyBitmessage, make sure you have all the necessary dependencies installed on your system. Here's a list of dependencies needed for PyBitmessage @@ -42,7 +42,7 @@ cd PyBitmessage/ && python src/bitmessagemain.py That's it! *Honestly*! ####Windows -In Windows you can download an executable for Bitmessage +On Windows you can download an executable for Bitmessage [here](https://bitmessage.org/download/windows/Bitmessage.exe). However, if you would like to run PyBitmessage via Python in Windows, you can @@ -52,13 +52,12 @@ information on how to do so. ####OS X First off, install Homebrew. ``` -ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" +ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` Now, install the required dependencies ``` -brew install python pyqt -brew install git +brew install git python pyqt ``` Download and run PyBitmessage: diff --git a/osx.sh b/osx.sh index 834a6243..eaa33183 100755 --- a/osx.sh +++ b/osx.sh @@ -1,9 +1,9 @@ #!/bin/bash # OS X Build script wrapper around the py2app script. -# These build can only be generated on OS X. +# This build can only be generated on OS X. # Requires all build dependencies for Bitmessage -# Especially important is openssl installed through brew +# Especially important is OpenSSL installed through brew export ARCHFLAGS="-arch i386 -arch x86_64" diff --git a/src/api.py b/src/api.py index 9e498f46..b395cf02 100644 --- a/src/api.py +++ b/src/api.py @@ -615,14 +615,22 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): elif len(params) == 4: toAddress, fromAddress, subject, message = params encodingType = 2 + TTL = 4*24*60*60 elif len(params) == 5: toAddress, fromAddress, subject, message, encodingType = params + TTL = 4*24*60*60 + elif len(params) == 6: + toAddress, fromAddress, subject, message, encodingType, TTL = params if encodingType != 2: raise APIError(6, 'The encoding type must be 2 because that is the only one this program currently supports.') subject = self._decode(subject, "base64") message = self._decode(message, "base64") if len(subject + message) > (2 ** 18 - 500): raise APIError(27, 'Message is too long.') + if TTL < 60*60: + TTL = 60*60 + if TTL > 28*24*60*60: + TTL = 28*24*60*60 toAddress = addBMIfNotPresent(toAddress) fromAddress = addBMIfNotPresent(fromAddress) status, addressVersionNumber, streamNumber, toRipe = self._verifyAddress(toAddress) @@ -637,8 +645,21 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): ackdata = OpenSSL.rand(32) - t = ('', toAddress, toRipe, fromAddress, subject, message, ackdata, int( - time.time()), 'msgqueued', 1, 1, 'sent', 2) + t = ('', + toAddress, + toRipe, + fromAddress, + subject, + message, + ackdata, + int(time.time()), # sentTime (this won't change) + int(time.time()), # lastActionTime + 0, + 'msgqueued', + 0, + 'sent', + 2, + TTL) helper_sent.insert(t) toLabel = '' @@ -660,14 +681,22 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): if len(params) == 3: fromAddress, subject, message = params encodingType = 2 + TTL = 4*24*60*60 elif len(params) == 4: fromAddress, subject, message, encodingType = params + TTL = 4*24*60*60 + elif len(params) == 5: + fromAddress, subject, message, encodingType, TTL = params if encodingType != 2: raise APIError(6, 'The encoding type must be 2 because that is the only one this program currently supports.') subject = self._decode(subject, "base64") message = self._decode(message, "base64") if len(subject + message) > (2 ** 18 - 500): raise APIError(27, 'Message is too long.') + if TTL < 60*60: + TTL = 60*60 + if TTL > 28*24*60*60: + TTL = 28*24*60*60 fromAddress = addBMIfNotPresent(fromAddress) self._verifyAddress(fromAddress) try: @@ -679,9 +708,21 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): toAddress = '[Broadcast subscribers]' ripe = '' - - t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int( - time.time()), 'broadcastqueued', 1, 1, 'sent', 2) + t = ('', + toAddress, + ripe, + fromAddress, + subject, + message, + ackdata, + int(time.time()), # sentTime (this doesn't change) + int(time.time()), # lastActionTime + 0, + 'broadcastqueued', + 0, + 'sent', + 2, + TTL) helper_sent.insert(t) toLabel = '[Broadcast subscribers]' @@ -918,22 +959,6 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): data += json.dumps({'data':payload.encode('hex')}, indent=4, separators=(',', ': ')) data += ']}' return data - elif method == 'getPubkeyByHash': - # Method will eventually be used by a particular Android app to - # retrieve pubkeys. Please do not yet add this to the api docs. - if len(params) != 1: - raise APIError(0, 'I need 1 parameter!') - requestedHash, = params - if len(requestedHash) != 40: - raise APIError(19, 'The length of hash should be 20 bytes (encoded in hex thus 40 characters).') - requestedHash = self._decode(requestedHash, "hex") - queryreturn = sqlQuery('''SELECT transmitdata FROM pubkeys WHERE hash = ? ; ''', requestedHash) - data = '{"pubkey":[' - for row in queryreturn: - transmitdata, = row - data += json.dumps({'data':transmitdata.encode('hex')}, indent=4, separators=(',', ': ')) - data += ']}' - return data elif method == 'clientStatus': if len(shared.connectedHostsList) == 0: networkStatus = 'notConnected' diff --git a/src/bitmessagecurses/__init__.py b/src/bitmessagecurses/__init__.py index a4546c08..77d09729 100644 --- a/src/bitmessagecurses/__init__.py +++ b/src/bitmessagecurses/__init__.py @@ -760,7 +760,7 @@ def sendMessage(sender="", recv="", broadcast=None, subject="", body="", reply=F exit_label="Continue") ackdata = OpenSSL.rand(32) sqlExecute( - "INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", + "INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", "", addr, ripe, @@ -768,12 +768,14 @@ def sendMessage(sender="", recv="", broadcast=None, subject="", body="", reply=F subject, body, ackdata, - int(time.time()), + int(time.time()), # sentTime (this will never change) + int(time.time()), # lastActionTime + 0, # sleepTill time. This will get set when the POW gets done. "msgqueued", - 1, - 1, + 0, # retryNumber "sent", - 2) + 2, # encodingType + shared.config.getint('bitmessagesettings', 'ttl')) shared.workerQueue.put(("sendmessage", addr)) else: # Broadcast if recv == "": @@ -785,7 +787,7 @@ def sendMessage(sender="", recv="", broadcast=None, subject="", body="", reply=F recv = BROADCAST_STR ripe = "" sqlExecute( - "INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", + "INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", "", recv, ripe, @@ -793,12 +795,14 @@ def sendMessage(sender="", recv="", broadcast=None, subject="", body="", reply=F subject, body, ackdata, - int(time.time()), + int(time.time()), # sentTime (this will never change) + int(time.time()), # lastActionTime + 0, # sleepTill time. This will get set when the POW gets done. "broadcastqueued", - 1, - 1, - "sent", - 2) + 0, # retryNumber + "sent", # folder + 2, # encodingType + shared.config.getint('bitmessagesettings', 'ttl')) shared.workerQueue.put(('sendbroadcast', '')) def loadInbox(): diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index d90234a7..3402676a 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -210,6 +210,8 @@ class MyForm(QtGui.QMainWindow): "clicked()"), self.click_pushButtonAddSubscription) QtCore.QObject.connect(self.ui.pushButtonAddBlacklist, QtCore.SIGNAL( "clicked()"), self.click_pushButtonAddBlacklist) + QtCore.QObject.connect(self.ui.pushButtonTTL, QtCore.SIGNAL( + "clicked()"), self.click_pushButtonTTL) QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL( "clicked()"), self.click_pushButtonSend) #QtCore.QObject.connect(self.ui.pushButtonFetchNamecoinID, QtCore.SIGNAL( @@ -608,7 +610,7 @@ class MyForm(QtGui.QMainWindow): QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateStatusBar(PyQt_PyObject)"), self.updateStatusBar) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( - "updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByHash) + "updateSentItemStatusByToAddress(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByToAddress) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( "updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), self.updateSentItemStatusByAckdata) QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL( @@ -648,6 +650,18 @@ class MyForm(QtGui.QMainWindow): self.rerenderComboBoxSendFrom() + # Put the TTL slider in the correct spot + TTL = shared.config.getint('bitmessagesettings', 'ttl') + if TTL < 3600: # an hour + TTL = 3600 + elif TTL > 28*24*60*60: # 28 days + TTL = 28*24*60*60 + self.ui.horizontalSliderTTL.setSliderPosition((TTL - 3600) ** (1/3.199)) + self.updateHumanFriendlyTTLDescription(TTL) + + QtCore.QObject.connect(self.ui.horizontalSliderTTL, QtCore.SIGNAL( + "valueChanged(int)"), self.updateTTL) + # Check to see whether we can connect to namecoin. Hide the 'Fetch Namecoin ID' button if we can't. try: options = {} @@ -662,7 +676,24 @@ class MyForm(QtGui.QMainWindow): except: print 'There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button' #self.ui.pushButtonFetchNamecoinID.hide() - + + def updateTTL(self, sliderPosition): + TTL = int(sliderPosition ** 3.199 + 3600) + self.updateHumanFriendlyTTLDescription(TTL) + shared.config.set('bitmessagesettings', 'ttl', str(TTL)) + shared.writeKeysFile() + + def updateHumanFriendlyTTLDescription(self, TTL): + numberOfHours = int(round(TTL / (60*60))) + if numberOfHours < 48: + if numberOfHours == 1: + self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "1 hour")) + else: + self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%1 hours").arg(numberOfHours)) + else: + numberOfDays = int(round(TTL / (24*60*60))) + self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%1 days").arg(numberOfDays)) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e # Show or hide the application window after clicking an item within the # tray icon or, on Windows, the try icon itself. @@ -1563,18 +1594,16 @@ class MyForm(QtGui.QMainWindow): self.init_blacklist_popup_menu(False) if event.type() == QtCore.QEvent.WindowStateChange: if self.windowState() & QtCore.Qt.WindowMinimized: - self.actionShow.setChecked(False) - if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: - if event.type() == QtCore.QEvent.WindowStateChange: - if self.windowState() & QtCore.Qt.WindowMinimized: + if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: self.appIndicatorHide() if 'win32' in sys.platform or 'win64' in sys.platform: - self.setWindowFlags(Qt.ToolTip) - elif event.oldState() & QtCore.Qt.WindowMinimized: - # The window state has just been changed to - # Normal/Maximised/FullScreen - pass - # QtGui.QWidget.changeEvent(self, event) + self.setWindowFlags(Qt.ToolTip) + elif event.oldState() & QtCore.Qt.WindowMinimized: + # The window state has just been changed to + # Normal/Maximised/FullScreen + pass + # QtGui.QWidget.changeEvent(self, event) + def __icon_activated(self, reason): if reason == QtGui.QSystemTrayIcon.Trigger: @@ -1779,14 +1808,12 @@ class MyForm(QtGui.QMainWindow): cnt, = row return int(cnt) - def updateSentItemStatusByHash(self, toRipe, textToDisplay): - for i in range(self.ui.tableWidgetInbox.rowCount()): - toAddress = str(self.ui.tableWidgetInbox.item( + def updateSentItemStatusByToAddress(self, toAddress, textToDisplay): + for i in range(self.ui.tableWidgetSent.rowCount()): + rowAddress = str(self.ui.tableWidgetSent.item( i, 0).data(Qt.UserRole).toPyObject()) - status, addressVersionNumber, streamNumber, ripe = decodeAddress( - toAddress) - if ripe == toRipe: - self.ui.tableWidgetInbox.item(i, 3).setToolTip(textToDisplay) + if toAddress == rowAddress: + self.ui.tableWidgetSent.item(i, 3).setToolTip(textToDisplay) try: newlinePosition = textToDisplay.indexOf('\n') except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception. @@ -1983,6 +2010,13 @@ class MyForm(QtGui.QMainWindow): newItem.setTextColor(QtGui.QColor(128, 128, 128)) self.ui.tableWidgetBlacklist.setItem(0, 1, newItem) + def click_pushButtonTTL(self): + QtGui.QMessageBox.information(self, 'Time To Live', _translate( + "MainWindow", "The TTL, or Time-To-Live is the length of time that the network will hold the message. \ +The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it \ +will resend the message automatically. The longer the Time-To-Live, the \ +more work your computer must do to send the message. A Time-To-Live of four or five days is often appropriate."), QMessageBox.Ok) + def click_pushButtonSend(self): self.statusBar().showMessage('') toAddresses = str(self.ui.lineEditTo.text()) @@ -2057,7 +2091,7 @@ class MyForm(QtGui.QMainWindow): ackdata = OpenSSL.rand(32) t = () sqlExecute( - '''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''', + '''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', '', toAddress, ripe, @@ -2065,12 +2099,15 @@ class MyForm(QtGui.QMainWindow): subject, message, ackdata, - int(time.time()), + int(time.time()), # sentTime (this will never change) + int(time.time()), # lastActionTime + 0, # sleepTill time. This will get set when the POW gets done. 'msgqueued', - 1, - 1, - 'sent', - 2) + 0, # retryNumber + 'sent', # folder + 2, # encodingtype + shared.config.getint('bitmessagesettings', 'ttl') + ) toLabel = '' queryreturn = sqlQuery('''select label from addressbook where address=?''', @@ -2104,10 +2141,24 @@ class MyForm(QtGui.QMainWindow): ackdata = OpenSSL.rand(32) toAddress = self.str_broadcast_subscribers ripe = '' - t = ('', toAddress, ripe, fromAddress, subject, message, ackdata, int( - time.time()), 'broadcastqueued', 1, 1, 'sent', 2) + t = ('', # msgid. We don't know what this will be until the POW is done. + toAddress, + ripe, + fromAddress, + subject, + message, + ackdata, + int(time.time()), # sentTime (this will never change) + int(time.time()), # lastActionTime + 0, # sleepTill time. This will get set when the POW gets done. + 'broadcastqueued', + 0, # retryNumber + 'sent', # folder + 2, # encoding type + shared.config.getint('bitmessagesettings', 'ttl') + ) sqlExecute( - '''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)''', *t) + '''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''', *t) toLabel = self.str_broadcast_subscribers @@ -2526,13 +2577,6 @@ class MyForm(QtGui.QMainWindow): self.settingsDialogInstance.ui.lineEditDays.text()))) shared.config.set('bitmessagesettings', 'stopresendingafterxmonths', str(float( self.settingsDialogInstance.ui.lineEditMonths.text()))) - #end - - # if str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()) == 'All': - # shared.config.set('bitmessagesettings', 'maxcores', '99999') - # else: - # shared.config.set('bitmessagesettings', 'maxcores', - # str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText())) shared.writeKeysFile() @@ -3542,9 +3586,6 @@ class settingsDialog(QtGui.QDialog): self.ui.checkBoxStartOnLogon.setDisabled(True) self.ui.checkBoxStartOnLogon.setText(_translate( "MainWindow", "Start-on-login not yet supported on your OS.")) - self.ui.checkBoxMinimizeToTray.setDisabled(True) - self.ui.checkBoxMinimizeToTray.setText(_translate( - "MainWindow", "Minimize-to-tray not yet supported on your OS.")) # On the Network settings tab: self.ui.lineEditTCPPort.setText(str( shared.config.get('bitmessagesettings', 'port'))) @@ -3855,8 +3896,6 @@ class NewAddressDialog(QtGui.QDialog): # the 'Your Identities' tab. while self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1): self.ui.radioButtonExisting.click() - # print - # self.parent.ui.tableWidgetYourIdentities.item(row-1,1).text() self.ui.comboBoxExisting.addItem( self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1).text()) row += 1 @@ -3908,10 +3947,10 @@ class UISignaler(QThread): "writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), label, address, str(streamNumber)) elif command == 'updateStatusBar': self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"), data) - elif command == 'updateSentItemStatusByHash': - hash, message = data + elif command == 'updateSentItemStatusByToAddress': + toAddress, message = data self.emit(SIGNAL( - "updateSentItemStatusByHash(PyQt_PyObject,PyQt_PyObject)"), hash, message) + "updateSentItemStatusByToAddress(PyQt_PyObject,PyQt_PyObject)"), toAddress, message) elif command == 'updateSentItemStatusByAckdata': ackData, message = data self.emit(SIGNAL( diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index b4762f43..073dd457 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -2,8 +2,13 @@ # Form implementation generated from reading ui file 'bitmessageui.ui' # +<<<<<<< HEAD # Created: Wed Mar 4 00:11:02 2015 # by: PyQt4 UI code generator 4.10.4 +======= +# Created: Sun Mar 08 22:07:43 2015 +# by: PyQt4 UI code generator 4.10.3 +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e # # WARNING! All changes made in this file will be lost! @@ -158,6 +163,7 @@ class Ui_MainWindow(object): self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) +<<<<<<< HEAD self.comboBoxSendFrom = QtGui.QComboBox(self.tab) self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0)) self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) @@ -272,6 +278,149 @@ class Ui_MainWindow(object): self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions")) self.tableWidgetInboxSubscriptions.setColumnCount(4) self.tableWidgetInboxSubscriptions.setRowCount(0) +======= + self.pushButtonLoadFromAddressBook = QtGui.QPushButton(self.send) + font = QtGui.QFont() + font.setPointSize(7) + self.pushButtonLoadFromAddressBook.setFont(font) + self.pushButtonLoadFromAddressBook.setObjectName(_fromUtf8("pushButtonLoadFromAddressBook")) + self.gridLayout_2.addWidget(self.pushButtonLoadFromAddressBook, 3, 2, 1, 1) + self.label_3 = QtGui.QLabel(self.send) + self.label_3.setObjectName(_fromUtf8("label_3")) + self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1) + self.pushButtonSend = QtGui.QPushButton(self.send) + self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) + self.gridLayout_2.addWidget(self.pushButtonSend, 7, 8, 1, 1) + self.horizontalSliderTTL = QtGui.QSlider(self.send) + self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0)) + self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, 16777215)) + self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal) + self.horizontalSliderTTL.setInvertedAppearance(False) + self.horizontalSliderTTL.setInvertedControls(False) + self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL")) + self.gridLayout_2.addWidget(self.horizontalSliderTTL, 7, 6, 1, 1) + spacerItem = QtGui.QSpacerItem(20, 297, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.gridLayout_2.addItem(spacerItem, 6, 0, 1, 1) + self.comboBoxSendFrom = QtGui.QComboBox(self.send) + self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0)) + self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom")) + self.gridLayout_2.addWidget(self.comboBoxSendFrom, 2, 1, 1, 1) + self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth()) + self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy) + self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0)) + self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, 16777215)) + self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription")) + self.gridLayout_2.addWidget(self.labelHumanFriendlyTTLDescription, 7, 7, 1, 1) + self.label_4 = QtGui.QLabel(self.send) + self.label_4.setObjectName(_fromUtf8("label_4")) + self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1) + self.label = QtGui.QLabel(self.send) + self.label.setObjectName(_fromUtf8("label")) + self.gridLayout_2.addWidget(self.label, 3, 0, 1, 1) + self.radioButtonSpecific = QtGui.QRadioButton(self.send) + self.radioButtonSpecific.setChecked(True) + self.radioButtonSpecific.setObjectName(_fromUtf8("radioButtonSpecific")) + self.gridLayout_2.addWidget(self.radioButtonSpecific, 0, 1, 1, 1) + self.labelSendBroadcastWarning = QtGui.QLabel(self.send) + self.labelSendBroadcastWarning.setEnabled(True) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.labelSendBroadcastWarning.sizePolicy().hasHeightForWidth()) + self.labelSendBroadcastWarning.setSizePolicy(sizePolicy) + self.labelSendBroadcastWarning.setIndent(-1) + self.labelSendBroadcastWarning.setObjectName(_fromUtf8("labelSendBroadcastWarning")) + self.gridLayout_2.addWidget(self.labelSendBroadcastWarning, 7, 1, 1, 4) + self.radioButtonBroadcast = QtGui.QRadioButton(self.send) + self.radioButtonBroadcast.setObjectName(_fromUtf8("radioButtonBroadcast")) + self.gridLayout_2.addWidget(self.radioButtonBroadcast, 1, 1, 1, 2) + self.pushButtonTTL = QtGui.QPushButton(self.send) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth()) + self.pushButtonTTL.setSizePolicy(sizePolicy) + self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, 16777215)) + palette = QtGui.QPalette() + brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) + brush.setStyle(QtCore.Qt.SolidPattern) + palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) + brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) + brush.setStyle(QtCore.Qt.SolidPattern) + palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) + brush = QtGui.QBrush(QtGui.QColor(120, 120, 120)) + brush.setStyle(QtCore.Qt.SolidPattern) + palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) + self.pushButtonTTL.setPalette(palette) + font = QtGui.QFont() + font.setUnderline(True) + self.pushButtonTTL.setFont(font) + self.pushButtonTTL.setFlat(True) + self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL")) + self.gridLayout_2.addWidget(self.pushButtonTTL, 7, 5, 1, 1) + self.label_2 = QtGui.QLabel(self.send) + self.label_2.setObjectName(_fromUtf8("label_2")) + self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1) + self.lineEditTo = QtGui.QLineEdit(self.send) + self.lineEditTo.setObjectName(_fromUtf8("lineEditTo")) + self.gridLayout_2.addWidget(self.lineEditTo, 3, 1, 1, 1) + self.textEditMessage = QtGui.QTextEdit(self.send) + self.textEditMessage.setObjectName(_fromUtf8("textEditMessage")) + self.gridLayout_2.addWidget(self.textEditMessage, 5, 1, 2, 8) + self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send) + font = QtGui.QFont() + font.setPointSize(7) + self.pushButtonFetchNamecoinID.setFont(font) + self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID")) + self.gridLayout_2.addWidget(self.pushButtonFetchNamecoinID, 3, 3, 1, 1) + self.labelFrom = QtGui.QLabel(self.send) + self.labelFrom.setText(_fromUtf8("")) + self.labelFrom.setObjectName(_fromUtf8("labelFrom")) + self.gridLayout_2.addWidget(self.labelFrom, 2, 2, 1, 7) + self.lineEditSubject = QtGui.QLineEdit(self.send) + self.lineEditSubject.setText(_fromUtf8("")) + self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject")) + self.gridLayout_2.addWidget(self.lineEditSubject, 4, 1, 1, 8) + icon2 = QtGui.QIcon() + icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.tabWidget.addTab(self.send, icon2, _fromUtf8("")) + self.sent = QtGui.QWidget() + self.sent.setObjectName(_fromUtf8("sent")) + self.verticalLayout = QtGui.QVBoxLayout(self.sent) + self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) + self.horizontalLayout = QtGui.QHBoxLayout() + self.horizontalLayout.setContentsMargins(-1, 0, -1, -1) + self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) + self.sentSearchLineEdit = QtGui.QLineEdit(self.sent) + self.sentSearchLineEdit.setObjectName(_fromUtf8("sentSearchLineEdit")) + self.horizontalLayout.addWidget(self.sentSearchLineEdit) + self.sentSearchOptionCB = QtGui.QComboBox(self.sent) + self.sentSearchOptionCB.setObjectName(_fromUtf8("sentSearchOptionCB")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.sentSearchOptionCB.addItem(_fromUtf8("")) + self.horizontalLayout.addWidget(self.sentSearchOptionCB) + self.verticalLayout.addLayout(self.horizontalLayout) + self.splitter_2 = QtGui.QSplitter(self.sent) + self.splitter_2.setOrientation(QtCore.Qt.Vertical) + self.splitter_2.setObjectName(_fromUtf8("splitter_2")) + self.tableWidgetSent = QtGui.QTableWidget(self.splitter_2) + self.tableWidgetSent.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) + self.tableWidgetSent.setDragDropMode(QtGui.QAbstractItemView.DragDrop) + self.tableWidgetSent.setAlternatingRowColors(True) + self.tableWidgetSent.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) + self.tableWidgetSent.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) + self.tableWidgetSent.setWordWrap(False) + self.tableWidgetSent.setObjectName(_fromUtf8("tableWidgetSent")) + self.tableWidgetSent.setColumnCount(4) + self.tableWidgetSent.setRowCount(0) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e item = QtGui.QTableWidgetItem() self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() @@ -303,12 +452,21 @@ class Ui_MainWindow(object): self.tab_3.setObjectName(_fromUtf8("tab_3")) self.gridLayout_3 = QtGui.QGridLayout(self.tab_3) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) +<<<<<<< HEAD self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.verticalLayout_17 = QtGui.QVBoxLayout() self.verticalLayout_17.setObjectName(_fromUtf8("verticalLayout_17")) self.tableWidgetYourIdentities = QtGui.QTableWidget(self.tab_3) self.tableWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215)) +======= + self.pushButtonNewAddress = QtGui.QPushButton(self.youridentities) + self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) + self.gridLayout_3.addWidget(self.pushButtonNewAddress, 0, 0, 1, 1) + spacerItem1 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_3.addItem(spacerItem1, 0, 1, 1, 1) + self.tableWidgetYourIdentities = QtGui.QTableWidget(self.youridentities) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e self.tableWidgetYourIdentities.setFrameShadow(QtGui.QFrame.Sunken) self.tableWidgetYourIdentities.setLineWidth(1) self.tableWidgetYourIdentities.setAlternatingRowColors(True) @@ -336,6 +494,7 @@ class Ui_MainWindow(object): self.tableWidgetYourIdentities.verticalHeader().setDefaultSectionSize(26) self.tableWidgetYourIdentities.verticalHeader().setSortIndicatorShown(False) self.tableWidgetYourIdentities.verticalHeader().setStretchLastSection(False) +<<<<<<< HEAD self.verticalLayout_17.addWidget(self.tableWidgetYourIdentities) self.pushButtonAddChanel = QtGui.QPushButton(self.tab_3) self.pushButtonAddChanel.setMaximumSize(QtCore.QSize(200, 16777215)) @@ -360,10 +519,70 @@ class Ui_MainWindow(object): self.tableWidgetInbox_2.setObjectName(_fromUtf8("tableWidgetInbox_2")) self.tableWidgetInbox_2.setColumnCount(4) self.tableWidgetInbox_2.setRowCount(0) +======= + self.gridLayout_3.addWidget(self.tableWidgetYourIdentities, 1, 0, 1, 2) + icon4 = QtGui.QIcon() + icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.tabWidget.addTab(self.youridentities, icon4, _fromUtf8("")) + self.subscriptions = QtGui.QWidget() + self.subscriptions.setObjectName(_fromUtf8("subscriptions")) + self.gridLayout_4 = QtGui.QGridLayout(self.subscriptions) + self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) + self.label_5 = QtGui.QLabel(self.subscriptions) + self.label_5.setWordWrap(True) + self.label_5.setObjectName(_fromUtf8("label_5")) + self.gridLayout_4.addWidget(self.label_5, 0, 0, 1, 2) + self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions) + self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription")) + self.gridLayout_4.addWidget(self.pushButtonAddSubscription, 1, 0, 1, 1) + spacerItem2 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_4.addItem(spacerItem2, 1, 1, 1, 1) + self.tableWidgetSubscriptions = QtGui.QTableWidget(self.subscriptions) + self.tableWidgetSubscriptions.setAlternatingRowColors(True) + self.tableWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) + self.tableWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) + self.tableWidgetSubscriptions.setObjectName(_fromUtf8("tableWidgetSubscriptions")) + self.tableWidgetSubscriptions.setColumnCount(2) + self.tableWidgetSubscriptions.setRowCount(0) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e item = QtGui.QTableWidgetItem() self.tableWidgetInbox_2.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() +<<<<<<< HEAD self.tableWidgetInbox_2.setHorizontalHeaderItem(1, item) +======= + self.tableWidgetSubscriptions.setHorizontalHeaderItem(1, item) + self.tableWidgetSubscriptions.horizontalHeader().setCascadingSectionResizes(True) + self.tableWidgetSubscriptions.horizontalHeader().setDefaultSectionSize(400) + self.tableWidgetSubscriptions.horizontalHeader().setHighlightSections(False) + self.tableWidgetSubscriptions.horizontalHeader().setSortIndicatorShown(False) + self.tableWidgetSubscriptions.horizontalHeader().setStretchLastSection(True) + self.tableWidgetSubscriptions.verticalHeader().setVisible(False) + self.gridLayout_4.addWidget(self.tableWidgetSubscriptions, 2, 0, 1, 2) + icon5 = QtGui.QIcon() + icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.tabWidget.addTab(self.subscriptions, icon5, _fromUtf8("")) + self.addressbook = QtGui.QWidget() + self.addressbook.setObjectName(_fromUtf8("addressbook")) + self.gridLayout_5 = QtGui.QGridLayout(self.addressbook) + self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) + self.label_6 = QtGui.QLabel(self.addressbook) + self.label_6.setWordWrap(True) + self.label_6.setObjectName(_fromUtf8("label_6")) + self.gridLayout_5.addWidget(self.label_6, 0, 0, 1, 2) + self.pushButtonAddAddressBook = QtGui.QPushButton(self.addressbook) + self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook")) + self.gridLayout_5.addWidget(self.pushButtonAddAddressBook, 1, 0, 1, 1) + spacerItem3 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_5.addItem(spacerItem3, 1, 1, 1, 1) + self.tableWidgetAddressBook = QtGui.QTableWidget(self.addressbook) + self.tableWidgetAddressBook.setAlternatingRowColors(True) + self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection) + self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) + self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook")) + self.tableWidgetAddressBook.setColumnCount(2) + self.tableWidgetAddressBook.setRowCount(0) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e item = QtGui.QTableWidgetItem() self.tableWidgetInbox_2.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() @@ -401,8 +620,13 @@ class Ui_MainWindow(object): self.pushButtonAddBlacklist = QtGui.QPushButton(self.blackwhitelist) self.pushButtonAddBlacklist.setObjectName(_fromUtf8("pushButtonAddBlacklist")) self.gridLayout_6.addWidget(self.pushButtonAddBlacklist, 2, 0, 1, 1) +<<<<<<< HEAD spacerItem = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.gridLayout_6.addItem(spacerItem, 2, 1, 1, 1) +======= + spacerItem4 = QtGui.QSpacerItem(689, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout_6.addItem(spacerItem4, 2, 1, 1, 1) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e self.tableWidgetBlacklist = QtGui.QTableWidget(self.blackwhitelist) self.tableWidgetBlacklist.setAlternatingRowColors(True) self.tableWidgetBlacklist.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) @@ -585,6 +809,7 @@ class Ui_MainWindow(object): item.setText(_translate("MainWindow", "Subject", None)) item = self.tableWidgetInbox.horizontalHeaderItem(3) item.setText(_translate("MainWindow", "Received", None)) +<<<<<<< HEAD self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Received", None)) self.tableWidgetAddressBook.setSortingEnabled(True) item = self.tableWidgetAddressBook.horizontalHeaderItem(0) @@ -594,10 +819,24 @@ class Ui_MainWindow(object): self.pushButtonAddAddressBook.setText(_translate("MainWindow", "Add Contact", None)) self.label.setText(_translate("MainWindow", "To:", None)) self.label_3.setText(_translate("MainWindow", "Subject:", None)) +======= + self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Inbox", None)) + self.pushButtonLoadFromAddressBook.setText(_translate("MainWindow", "Load from Address book", None)) + self.label_3.setText(_translate("MainWindow", "Subject:", None)) + self.pushButtonSend.setText(_translate("MainWindow", "Send", None)) + self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "X days", None)) + self.label_4.setText(_translate("MainWindow", "Message:", None)) + self.label.setText(_translate("MainWindow", "To:", None)) + self.radioButtonSpecific.setText(_translate("MainWindow", "Send to one or more specific people", None)) + self.labelSendBroadcastWarning.setText(_translate("MainWindow", "Be aware that broadcasts are only encrypted with your address. Anyone who knows your address can read them.", None)) + self.radioButtonBroadcast.setText(_translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None)) + self.pushButtonTTL.setText(_translate("MainWindow", "TTL:", None)) +>>>>>>> bbb8c645afd8900b15ec35a1f1b632e095f41f6e self.label_2.setText(_translate("MainWindow", "From:", None)) self.textEditMessage.setHtml(_translate("MainWindow", "\n" "
\n" "