Skip to content

Commit 66bed6c

Browse files
committed
Merge branch '1116' into v0.6
2 parents 3d1fa47 + d083c53 commit 66bed6c

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/bitmessageqt/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def init_file_menu(self):
147147
"clicked()"), self.click_pushButtonAddSubscription)
148148
QtCore.QObject.connect(self.ui.pushButtonTTL, QtCore.SIGNAL(
149149
"clicked()"), self.click_pushButtonTTL)
150+
QtCore.QObject.connect(self.ui.pushButtonClear, QtCore.SIGNAL(
151+
"clicked()"), self.click_pushButtonClear)
150152
QtCore.QObject.connect(self.ui.pushButtonSend, QtCore.SIGNAL(
151153
"clicked()"), self.click_pushButtonSend)
152154
QtCore.QObject.connect(self.ui.pushButtonFetchNamecoinID, QtCore.SIGNAL(
@@ -1840,14 +1842,19 @@ def addRow (address, label, type):
18401842
def rerenderSubscriptions(self):
18411843
self.rerenderTabTreeSubscriptions()
18421844

1843-
18441845
def click_pushButtonTTL(self):
18451846
QtGui.QMessageBox.information(self, 'Time To Live', _translate(
18461847
"MainWindow", """The TTL, or Time-To-Live is the length of time that the network will hold the message.
18471848
The recipient must get it during this time. If your Bitmessage client does not hear an acknowledgement, it
18481849
will resend the message automatically. The longer the Time-To-Live, the
18491850
more work your computer must do to send the message. A Time-To-Live of four or five days is often appropriate."""), QtGui.QMessageBox.Ok)
18501851

1852+
def click_pushButtonClear(self):
1853+
self.ui.lineEditSubject.setText("")
1854+
self.ui.lineEditTo.setText("")
1855+
self.ui.textEditMessage.setText("")
1856+
self.ui.comboBoxSendFrom.setCurrentIndex(0)
1857+
18511858
def click_pushButtonSend(self):
18521859
encoding = 3 if QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier else 2
18531860

src/bitmessageqt/bitmessageui.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@ def setupUi(self, MainWindow):
337337
self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0))
338338
self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription"))
339339
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription, 1, QtCore.Qt.AlignLeft)
340+
self.pushButtonClear = QtGui.QPushButton(self.send)
341+
self.pushButtonClear.setObjectName(_fromUtf8("pushButtonClear"))
342+
self.horizontalLayout_5.addWidget(self.pushButtonClear, 0, QtCore.Qt.AlignRight)
340343
self.pushButtonSend = QtGui.QPushButton(self.send)
341344
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
342345
self.horizontalLayout_5.addWidget(self.pushButtonSend, 0, QtCore.Qt.AlignRight)
@@ -701,6 +704,7 @@ def retranslateUi(self, MainWindow):
701704
except:
702705
pass
703706
self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, hours))
707+
self.pushButtonClear.setText(_translate("MainWindow", "Clear", None))
704708
self.pushButtonSend.setText(_translate("MainWindow", "Send", None))
705709
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
706710
self.treeWidgetSubscriptions.headerItem().setText(0, _translate("MainWindow", "Subscriptions", None))

0 commit comments

Comments
 (0)