Skip to content

Commit 23b9fa2

Browse files
committed
gui: Add detailed text to BitcoinGUI::message
1 parent b549cb1 commit 23b9fa2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/qt/bitcoingui.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
10391039
progressBar->setToolTip(tooltip);
10401040
}
10411041

1042-
void BitcoinGUI::message(const QString& title, QString message, unsigned int style, bool* ret)
1042+
void BitcoinGUI::message(const QString& title, QString message, unsigned int style, bool* ret, const QString& detailed_message)
10431043
{
10441044
// Default title. On macOS, the window title is ignored (as required by the macOS Guidelines).
10451045
QString strTitle{PACKAGE_NAME};
@@ -1093,6 +1093,7 @@ void BitcoinGUI::message(const QString& title, QString message, unsigned int sty
10931093
showNormalIfMinimized();
10941094
QMessageBox mBox(static_cast<QMessageBox::Icon>(nMBoxIcon), strTitle, message, buttons, this);
10951095
mBox.setTextFormat(Qt::PlainText);
1096+
mBox.setDetailedText(detailed_message);
10961097
int r = mBox.exec();
10971098
if (ret != nullptr)
10981099
*ret = r == QMessageBox::Ok;

src/qt/bitcoingui.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,14 @@ public Q_SLOTS:
216216
void setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers);
217217

218218
/** Notify the user of an event from the core network or transaction handling code.
219-
@param[in] title the message box / notification title
220-
@param[in] message the displayed text
221-
@param[in] style modality and style definitions (icon and used buttons - buttons only for message boxes)
222-
@see CClientUIInterface::MessageBoxFlags
223-
@param[in] ret pointer to a bool that will be modified to whether Ok was clicked (modal only)
219+
@param[in] title the message box / notification title
220+
@param[in] message the displayed text
221+
@param[in] style modality and style definitions (icon and used buttons - buttons only for message boxes)
222+
@see CClientUIInterface::MessageBoxFlags
223+
@param[in] ret pointer to a bool that will be modified to whether Ok was clicked (modal only)
224+
@param[in] detailed_message the text to be displayed in the details area
224225
*/
225-
void message(const QString& title, QString message, unsigned int style, bool* ret = nullptr);
226+
void message(const QString& title, QString message, unsigned int style, bool* ret = nullptr, const QString& detailed_message = QString());
226227

227228
#ifdef ENABLE_WALLET
228229
void setCurrentWallet(WalletModel* wallet_model);

0 commit comments

Comments
 (0)