some specifyTTL work completed
This commit is contained in:
parent
3384869299
commit
9044e84093
|
@ -212,6 +212,8 @@ class MyForm(QtGui.QMainWindow):
|
||||||
"clicked()"), self.click_pushButtonAddSubscription)
|
"clicked()"), self.click_pushButtonAddSubscription)
|
||||||
QtCore.QObject.connect(self.ui.pushButtonAddBlacklist, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.pushButtonAddBlacklist, QtCore.SIGNAL(
|
||||||
"clicked()"), self.click_pushButtonAddBlacklist)
|
"clicked()"), self.click_pushButtonAddBlacklist)
|
||||||
|
QtCore.QObject.connect(self.ui.pushButtonTTL, QtCore.SIGNAL(
|
||||||
|
"clicked()"), self.click_pushButtonTTL)
|
||||||
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
|
||||||
"clicked()"), self.click_pushButtonSend)
|
"clicked()"), self.click_pushButtonSend)
|
||||||
QtCore.QObject.connect(self.ui.pushButtonLoadFromAddressBook,
|
QtCore.QObject.connect(self.ui.pushButtonLoadFromAddressBook,
|
||||||
|
@ -648,6 +650,18 @@ class MyForm(QtGui.QMainWindow):
|
||||||
|
|
||||||
self.rerenderComboBoxSendFrom()
|
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.
|
# Check to see whether we can connect to namecoin. Hide the 'Fetch Namecoin ID' button if we can't.
|
||||||
try:
|
try:
|
||||||
options = {}
|
options = {}
|
||||||
|
@ -662,7 +676,23 @@ class MyForm(QtGui.QMainWindow):
|
||||||
except:
|
except:
|
||||||
print 'There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button'
|
print 'There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button'
|
||||||
self.ui.pushButtonFetchNamecoinID.hide()
|
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))
|
||||||
|
|
||||||
# Show or hide the application window after clicking an item within the
|
# Show or hide the application window after clicking an item within the
|
||||||
# tray icon or, on Windows, the try icon itself.
|
# tray icon or, on Windows, the try icon itself.
|
||||||
|
@ -1868,6 +1898,14 @@ class MyForm(QtGui.QMainWindow):
|
||||||
newItem.setTextColor(QtGui.QColor(128, 128, 128))
|
newItem.setTextColor(QtGui.QColor(128, 128, 128))
|
||||||
self.ui.tableWidgetBlacklist.setItem(0, 1, newItem)
|
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 client does not hear an acknowledgement, your \
|
||||||
|
Bitmessage client will resend the message automatically if it is open. 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):
|
def click_pushButtonSend(self):
|
||||||
self.statusBar().showMessage('')
|
self.statusBar().showMessage('')
|
||||||
toAddresses = str(self.ui.lineEditTo.text())
|
toAddresses = str(self.ui.lineEditTo.text())
|
||||||
|
@ -1953,10 +1991,11 @@ class MyForm(QtGui.QMainWindow):
|
||||||
ackdata,
|
ackdata,
|
||||||
int(time.time()),
|
int(time.time()),
|
||||||
'msgqueued',
|
'msgqueued',
|
||||||
1,
|
1, # pubkeyretrynumber
|
||||||
1,
|
1, # msgretrynumber
|
||||||
'sent',
|
'sent',
|
||||||
2)
|
2 # encodingtype
|
||||||
|
)
|
||||||
|
|
||||||
toLabel = ''
|
toLabel = ''
|
||||||
queryreturn = sqlQuery('''select label from addressbook where address=?''',
|
queryreturn = sqlQuery('''select label from addressbook where address=?''',
|
||||||
|
@ -2421,13 +2460,6 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.settingsDialogInstance.ui.lineEditDays.text())))
|
self.settingsDialogInstance.ui.lineEditDays.text())))
|
||||||
shared.config.set('bitmessagesettings', 'stopresendingafterxmonths', str(float(
|
shared.config.set('bitmessagesettings', 'stopresendingafterxmonths', str(float(
|
||||||
self.settingsDialogInstance.ui.lineEditMonths.text())))
|
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()
|
shared.writeKeysFile()
|
||||||
|
|
||||||
|
@ -3756,8 +3788,6 @@ class NewAddressDialog(QtGui.QDialog):
|
||||||
# the 'Your Identities' tab.
|
# the 'Your Identities' tab.
|
||||||
while self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1):
|
while self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1):
|
||||||
self.ui.radioButtonExisting.click()
|
self.ui.radioButtonExisting.click()
|
||||||
# print
|
|
||||||
# self.parent.ui.tableWidgetYourIdentities.item(row-1,1).text()
|
|
||||||
self.ui.comboBoxExisting.addItem(
|
self.ui.comboBoxExisting.addItem(
|
||||||
self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1).text())
|
self.parent.ui.tableWidgetYourIdentities.item(row - 1, 1).text())
|
||||||
row += 1
|
row += 1
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'bitmessageui.ui'
|
# Form implementation generated from reading ui file 'bitmessageui.ui'
|
||||||
#
|
#
|
||||||
# Created: Mon Jan 05 16:21:20 2015
|
# Created: Fri Feb 27 18:48:36 2015
|
||||||
# by: PyQt4 UI code generator 4.10.3
|
# by: PyQt4 UI code generator 4.10.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
@ -109,62 +109,55 @@ class Ui_MainWindow(object):
|
||||||
self.send.setObjectName(_fromUtf8("send"))
|
self.send.setObjectName(_fromUtf8("send"))
|
||||||
self.gridLayout_2 = QtGui.QGridLayout(self.send)
|
self.gridLayout_2 = QtGui.QGridLayout(self.send)
|
||||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||||
|
self.lineEditSubject = QtGui.QLineEdit(self.send)
|
||||||
|
self.lineEditSubject.setText(_fromUtf8(""))
|
||||||
|
self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject"))
|
||||||
|
self.gridLayout_2.addWidget(self.lineEditSubject, 4, 1, 1, 1)
|
||||||
self.pushButtonLoadFromAddressBook = QtGui.QPushButton(self.send)
|
self.pushButtonLoadFromAddressBook = QtGui.QPushButton(self.send)
|
||||||
font = QtGui.QFont()
|
font = QtGui.QFont()
|
||||||
font.setPointSize(7)
|
font.setPointSize(7)
|
||||||
self.pushButtonLoadFromAddressBook.setFont(font)
|
self.pushButtonLoadFromAddressBook.setFont(font)
|
||||||
self.pushButtonLoadFromAddressBook.setObjectName(_fromUtf8("pushButtonLoadFromAddressBook"))
|
self.pushButtonLoadFromAddressBook.setObjectName(_fromUtf8("pushButtonLoadFromAddressBook"))
|
||||||
self.gridLayout_2.addWidget(self.pushButtonLoadFromAddressBook, 3, 2, 1, 1)
|
self.gridLayout_2.addWidget(self.pushButtonLoadFromAddressBook, 3, 2, 1, 1)
|
||||||
self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send)
|
self.label_3 = QtGui.QLabel(self.send)
|
||||||
font = QtGui.QFont()
|
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||||
font.setPointSize(7)
|
self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1)
|
||||||
self.pushButtonFetchNamecoinID.setFont(font)
|
self.pushButtonSend = QtGui.QPushButton(self.send)
|
||||||
self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID"))
|
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
|
||||||
self.gridLayout_2.addWidget(self.pushButtonFetchNamecoinID, 3, 3, 1, 1)
|
self.gridLayout_2.addWidget(self.pushButtonSend, 7, 8, 1, 1)
|
||||||
self.label_4 = QtGui.QLabel(self.send)
|
self.horizontalSliderTTL = QtGui.QSlider(self.send)
|
||||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, 16777215))
|
||||||
self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1)
|
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 = QtGui.QComboBox(self.send)
|
||||||
self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
|
self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
|
||||||
self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom"))
|
self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom"))
|
||||||
self.gridLayout_2.addWidget(self.comboBoxSendFrom, 2, 1, 1, 1)
|
self.gridLayout_2.addWidget(self.comboBoxSendFrom, 2, 1, 1, 1)
|
||||||
self.label_3 = QtGui.QLabel(self.send)
|
self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send)
|
||||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
|
||||||
self.gridLayout_2.addWidget(self.label_3, 4, 0, 1, 1)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
self.labelFrom = QtGui.QLabel(self.send)
|
sizePolicy.setVerticalStretch(0)
|
||||||
self.labelFrom.setText(_fromUtf8(""))
|
sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth())
|
||||||
self.labelFrom.setObjectName(_fromUtf8("labelFrom"))
|
self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy)
|
||||||
self.gridLayout_2.addWidget(self.labelFrom, 2, 2, 1, 3)
|
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 = QtGui.QRadioButton(self.send)
|
||||||
self.radioButtonSpecific.setChecked(True)
|
self.radioButtonSpecific.setChecked(True)
|
||||||
self.radioButtonSpecific.setObjectName(_fromUtf8("radioButtonSpecific"))
|
self.radioButtonSpecific.setObjectName(_fromUtf8("radioButtonSpecific"))
|
||||||
self.gridLayout_2.addWidget(self.radioButtonSpecific, 0, 1, 1, 1)
|
self.gridLayout_2.addWidget(self.radioButtonSpecific, 0, 1, 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, 5)
|
|
||||||
self.label = QtGui.QLabel(self.send)
|
|
||||||
self.label.setObjectName(_fromUtf8("label"))
|
|
||||||
self.gridLayout_2.addWidget(self.label, 3, 0, 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)
|
|
||||||
spacerItem = QtGui.QSpacerItem(20, 297, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
|
||||||
self.gridLayout_2.addItem(spacerItem, 6, 0, 1, 1)
|
|
||||||
self.radioButtonBroadcast = QtGui.QRadioButton(self.send)
|
|
||||||
self.radioButtonBroadcast.setObjectName(_fromUtf8("radioButtonBroadcast"))
|
|
||||||
self.gridLayout_2.addWidget(self.radioButtonBroadcast, 1, 1, 1, 3)
|
|
||||||
self.lineEditSubject = QtGui.QLineEdit(self.send)
|
|
||||||
self.lineEditSubject.setText(_fromUtf8(""))
|
|
||||||
self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject"))
|
|
||||||
self.gridLayout_2.addWidget(self.lineEditSubject, 4, 1, 1, 5)
|
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
|
||||||
self.gridLayout_2.addItem(spacerItem1, 3, 4, 1, 1)
|
|
||||||
self.pushButtonSend = QtGui.QPushButton(self.send)
|
|
||||||
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
|
|
||||||
self.gridLayout_2.addWidget(self.pushButtonSend, 7, 5, 1, 1)
|
|
||||||
self.labelSendBroadcastWarning = QtGui.QLabel(self.send)
|
self.labelSendBroadcastWarning = QtGui.QLabel(self.send)
|
||||||
self.labelSendBroadcastWarning.setEnabled(True)
|
self.labelSendBroadcastWarning.setEnabled(True)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Preferred)
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Preferred)
|
||||||
|
@ -175,6 +168,54 @@ class Ui_MainWindow(object):
|
||||||
self.labelSendBroadcastWarning.setIndent(-1)
|
self.labelSendBroadcastWarning.setIndent(-1)
|
||||||
self.labelSendBroadcastWarning.setObjectName(_fromUtf8("labelSendBroadcastWarning"))
|
self.labelSendBroadcastWarning.setObjectName(_fromUtf8("labelSendBroadcastWarning"))
|
||||||
self.gridLayout_2.addWidget(self.labelSendBroadcastWarning, 7, 1, 1, 4)
|
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.labelFrom = QtGui.QLabel(self.send)
|
||||||
|
self.labelFrom.setText(_fromUtf8(""))
|
||||||
|
self.labelFrom.setObjectName(_fromUtf8("labelFrom"))
|
||||||
|
self.gridLayout_2.addWidget(self.labelFrom, 2, 2, 1, 1)
|
||||||
|
spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
|
self.gridLayout_2.addItem(spacerItem1, 3, 4, 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)
|
||||||
icon2 = QtGui.QIcon()
|
icon2 = QtGui.QIcon()
|
||||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
self.tabWidget.addTab(self.send, icon2, _fromUtf8(""))
|
self.tabWidget.addTab(self.send, icon2, _fromUtf8(""))
|
||||||
|
@ -556,20 +597,22 @@ class Ui_MainWindow(object):
|
||||||
item.setText(_translate("MainWindow", "Received", None))
|
item.setText(_translate("MainWindow", "Received", None))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Inbox", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.inbox), _translate("MainWindow", "Inbox", None))
|
||||||
self.pushButtonLoadFromAddressBook.setText(_translate("MainWindow", "Load from Address book", None))
|
self.pushButtonLoadFromAddressBook.setText(_translate("MainWindow", "Load from Address book", None))
|
||||||
self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID", None))
|
|
||||||
self.label_4.setText(_translate("MainWindow", "Message:", None))
|
|
||||||
self.label_3.setText(_translate("MainWindow", "Subject:", 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.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))
|
||||||
|
self.label_2.setText(_translate("MainWindow", "From:", None))
|
||||||
self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
self.textEditMessage.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||||
"p, li { white-space: pre-wrap; }\n"
|
"p, li { white-space: pre-wrap; }\n"
|
||||||
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
||||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
|
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
|
||||||
self.label.setText(_translate("MainWindow", "To:", None))
|
self.pushButtonFetchNamecoinID.setText(_translate("MainWindow", "Fetch Namecoin ID", None))
|
||||||
self.label_2.setText(_translate("MainWindow", "From:", None))
|
|
||||||
self.radioButtonBroadcast.setText(_translate("MainWindow", "Broadcast to everyone who is subscribed to your address", None))
|
|
||||||
self.pushButtonSend.setText(_translate("MainWindow", "Send", 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.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
|
||||||
self.sentSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search", None))
|
self.sentSearchLineEdit.setPlaceholderText(_translate("MainWindow", "Search", None))
|
||||||
self.sentSearchOptionCB.setItemText(0, _translate("MainWindow", "All", None))
|
self.sentSearchOptionCB.setItemText(0, _translate("MainWindow", "All", None))
|
||||||
|
|
|
@ -204,6 +204,13 @@
|
||||||
<string>Send</string>
|
<string>Send</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditSubject">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QPushButton" name="pushButtonLoadFromAddressBook">
|
<widget class="QPushButton" name="pushButtonLoadFromAddressBook">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
|
@ -216,35 +223,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3">
|
|
||||||
<widget class="QPushButton" name="pushButtonFetchNamecoinID">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>7</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Fetch Namecoin ID</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Message:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBoxSendFrom">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -252,48 +230,29 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2" colspan="3">
|
<item row="7" column="8">
|
||||||
<widget class="QLabel" name="labelFrom">
|
<widget class="QPushButton" name="pushButtonSend">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>Send</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="7" column="6">
|
||||||
<widget class="QRadioButton" name="radioButtonSpecific">
|
<widget class="QSlider" name="horizontalSliderTTL">
|
||||||
<property name="text">
|
<property name="maximumSize">
|
||||||
<string>Send to one or more specific people</string>
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="orientation">
|
||||||
<bool>true</bool>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="invertedAppearance">
|
||||||
</item>
|
<bool>false</bool>
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineEditTo"/>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1" rowspan="2" colspan="5">
|
|
||||||
<widget class="QTextEdit" name="textEditMessage">
|
|
||||||
<property name="html">
|
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="invertedControls">
|
||||||
</item>
|
<bool>false</bool>
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>To:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>From:</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -310,37 +269,62 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="3">
|
<item row="2" column="1">
|
||||||
<widget class="QRadioButton" name="radioButtonBroadcast">
|
<widget class="QComboBox" name="comboBoxSendFrom">
|
||||||
<property name="text">
|
<property name="minimumSize">
|
||||||
<string>Broadcast to everyone who is subscribed to your address</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1" colspan="5">
|
|
||||||
<widget class="QLineEdit" name="lineEditSubject">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="4">
|
|
||||||
<spacer name="horizontalSpacer_6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>300</width>
|
||||||
<height>20</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="5">
|
<item row="7" column="7">
|
||||||
<widget class="QPushButton" name="pushButtonSend">
|
<widget class="QLabel" name="labelHumanFriendlyTTLDescription">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>45</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>45</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Send</string>
|
<string>X days</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Message:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>To:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QRadioButton" name="radioButtonSpecific">
|
||||||
|
<property name="text">
|
||||||
|
<string>Send to one or more specific people</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -363,6 +347,130 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QRadioButton" name="radioButtonBroadcast">
|
||||||
|
<property name="text">
|
||||||
|
<string>Broadcast to everyone who is subscribed to your address</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="5">
|
||||||
|
<widget class="QPushButton" name="pushButtonTTL">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="palette">
|
||||||
|
<palette>
|
||||||
|
<active>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</active>
|
||||||
|
<inactive>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</inactive>
|
||||||
|
<disabled>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>120</red>
|
||||||
|
<green>120</green>
|
||||||
|
<blue>120</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</disabled>
|
||||||
|
</palette>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<underline>true</underline>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TTL:</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>From:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QLabel" name="labelFrom">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditTo"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1" rowspan="2" colspan="8">
|
||||||
|
<widget class="QTextEdit" name="textEditMessage">
|
||||||
|
<property name="html">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<widget class="QPushButton" name="pushButtonFetchNamecoinID">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>7</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Fetch Namecoin ID</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="sent">
|
<widget class="QWidget" name="sent">
|
||||||
|
|
|
@ -375,6 +375,10 @@ class sqlThread(threading.Thread):
|
||||||
item = '''update settings set value=? WHERE key='version';'''
|
item = '''update settings set value=? WHERE key='version';'''
|
||||||
parameters = (9,)
|
parameters = (9,)
|
||||||
self.cur.execute(item, parameters)
|
self.cur.execute(item, parameters)
|
||||||
|
|
||||||
|
# TTL is now user-specifyable. Let's add an option to save whatever the user selects.
|
||||||
|
if not shared.config.has_option('bitmessagesettings', 'ttl'):
|
||||||
|
shared.config.set('bitmessagesettings', 'ttl', '367200')
|
||||||
|
|
||||||
# Are you hoping to add a new option to the keys.dat file of existing
|
# Are you hoping to add a new option to the keys.dat file of existing
|
||||||
# Bitmessage users or modify the SQLite database? Add it right above this line!
|
# Bitmessage users or modify the SQLite database? Add it right above this line!
|
||||||
|
|
|
@ -104,6 +104,7 @@ def loadConfig():
|
||||||
shared.config.set('bitmessagesettings', 'replybelow', 'False')
|
shared.config.set('bitmessagesettings', 'replybelow', 'False')
|
||||||
shared.config.set('bitmessagesettings', 'maxdownloadrate', '0')
|
shared.config.set('bitmessagesettings', 'maxdownloadrate', '0')
|
||||||
shared.config.set('bitmessagesettings', 'maxuploadrate', '0')
|
shared.config.set('bitmessagesettings', 'maxuploadrate', '0')
|
||||||
|
shared.config.set('bitmessagesettings', 'ttl', '367200')
|
||||||
|
|
||||||
#start:UI setting to stop trying to send messages after X days/months
|
#start:UI setting to stop trying to send messages after X days/months
|
||||||
shared.config.set(
|
shared.config.set(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user