Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
// Copyright (c) 2011-2019 The Bitcoin Core developers | // Copyright (c) 2011-2019 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include <qt/bitcoingui.h> | #include <qt/bitcoingui.h> | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <config.h> | #include <config.h> | ||||
#include <interfaces/handler.h> | #include <interfaces/handler.h> | ||||
#include <interfaces/node.h> | #include <interfaces/node.h> | ||||
#include <noui.h> | |||||
#include <qt/bitcoinunits.h> | #include <qt/bitcoinunits.h> | ||||
#include <qt/clientmodel.h> | #include <qt/clientmodel.h> | ||||
#include <qt/guiconstants.h> | #include <qt/guiconstants.h> | ||||
#include <qt/guiutil.h> | #include <qt/guiutil.h> | ||||
#ifdef Q_OS_MAC | #ifdef Q_OS_MAC | ||||
#include <qt/macdockiconhandler.h> | #include <qt/macdockiconhandler.h> | ||||
#endif | #endif | ||||
#include <qt/modaloverlay.h> | #include <qt/modaloverlay.h> | ||||
▲ Show 20 Lines • Show All 1,347 Lines • ▼ Show 20 Lines | if (modalOverlay && | ||||
(progressBar->isVisible() || modalOverlay->isLayerVisible())) { | (progressBar->isVisible() || modalOverlay->isLayerVisible())) { | ||||
modalOverlay->toggleVisibility(); | modalOverlay->toggleVisibility(); | ||||
} | } | ||||
} | } | ||||
static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string &message, | static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string &message, | ||||
const std::string &caption, | const std::string &caption, | ||||
unsigned int style) { | unsigned int style) { | ||||
// Redundantly log and print message in non-gui fashion | |||||
noui_ThreadSafeMessageBox(message, caption, style); | |||||
bool modal = (style & CClientUIInterface::MODAL); | bool modal = (style & CClientUIInterface::MODAL); | ||||
// The SECURE flag has no effect in the Qt GUI. | // The SECURE flag has no effect in the Qt GUI. | ||||
// bool secure = (style & CClientUIInterface::SECURE); | // bool secure = (style & CClientUIInterface::SECURE); | ||||
style &= ~CClientUIInterface::SECURE; | style &= ~CClientUIInterface::SECURE; | ||||
bool ret = false; | bool ret = false; | ||||
// In case of modal message, use blocking connection to wait for user to | // In case of modal message, use blocking connection to wait for user to | ||||
// click a button | // click a button | ||||
QMetaObject::invokeMethod(gui, "message", | QMetaObject::invokeMethod(gui, "message", | ||||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |