Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const NetworkStyle* networkStyle,
setWindowIcon(networkStyle->getTrayAndWindowIcon());
setWindowTitle(windowTitle);

rpcConsole = new RPCConsole(node, this);
rpcConsole = new RPCConsole(node, this, enableWallet ? Qt::Window : Qt::Widget);
helpMessageDialog = new HelpMessageDialog(node, this, HelpMessageDialog::cmdline);
#ifdef ENABLE_WALLET
if(enableWallet)
Expand Down Expand Up @@ -431,6 +431,7 @@ void BitcoinGUI::createActions()
connect(masternodeAction, SIGNAL(clicked()), this, SLOT(showNormalIfMinimized()));
connect(masternodeAction, SIGNAL(clicked()), this, SLOT(gotoMasternodePage()));
}
#endif // ENABLE_WALLET

// These showNormalIfMinimized are needed because Send Coins and Receive Coins
// can be triggered from the tray menu, and need to show the GUI to be useful.
Expand All @@ -453,12 +454,15 @@ void BitcoinGUI::createActions()

for (auto button : tabGroup->buttons()) {
GUIUtil::setFont({button}, GUIUtil::FontWeight::Normal, 16);
if (walletFrame == nullptr) {
// hide buttons when there is no wallet
button->setVisible(false);
}
}
GUIUtil::updateFonts();

// Give the selected tab button a bolder font.
connect(tabGroup, SIGNAL(buttonToggled(QAbstractButton *, bool)), this, SLOT(highlightTabButton(QAbstractButton *, bool)));
#endif // ENABLE_WALLET

quitAction = new QAction(tr("E&xit"), this);
quitAction->setStatusTip(tr("Quit application"));
Expand Down Expand Up @@ -1177,7 +1181,9 @@ void BitcoinGUI::updatePrivateSendVisibility()
#endif
// PrivateSend button is the third QToolButton, show/hide the underlying QAction
// Hiding the QToolButton itself doesn't work.
appToolBar->actions()[2]->setVisible(fEnabled);
if (appToolBar != nullptr) {
appToolBar->actions()[2]->setVisible(fEnabled);
}
privateSendCoinsMenuAction->setVisible(fEnabled);
showPrivateSendHelpAction->setVisible(fEnabled);
updateToolBarShortcuts();
Expand All @@ -1186,6 +1192,9 @@ void BitcoinGUI::updatePrivateSendVisibility()

void BitcoinGUI::updateWidth()
{
if (walletFrame == nullptr) {
return;
}
if (windowState() & (Qt::WindowMaximized | Qt::WindowFullScreen)) {
return;
}
Expand All @@ -1208,6 +1217,9 @@ void BitcoinGUI::updateWidth()

void BitcoinGUI::updateToolBarShortcuts()
{
if (walletFrame == nullptr) {
return;
}
#ifdef Q_OS_MAC
auto modifier = Qt::CTRL;
#else
Expand Down
10 changes: 4 additions & 6 deletions src/qt/res/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ Loaded in GUIUtil::loadStyleSheet() in guitil.cpp.
Common stuff
******************************************************/

WalletFrame,
QDialog {
background-color: #323233;
}

QMessageBox {
QDialog,
QMainWindow,
QMessageBox
WalletFrame {
background-color: #323233;
}

Expand Down
10 changes: 4 additions & 6 deletions src/qt/res/css/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ Loaded in GUIUtil::loadStyleSheet() in guitil.cpp.
Common stuff
******************************************************/

WalletFrame,
QDialog {
background-color: #f2f2f4;
}

QMessageBox {
QDialog,
QMainWindow,
QMessageBox
WalletFrame {
background-color: #f2f2f4;
}

Expand Down
6 changes: 4 additions & 2 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ void RPCExecutor::request(const QString &command, const QString &walletID)
}
}

RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent) :
QWidget(parent, Qt::Window),
RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags flags) :
QWidget(parent, flags),
m_node(node),
ui(new Ui::RPCConsole),
clientModel(0),
Expand Down Expand Up @@ -532,6 +532,8 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent) :
pageButtons.addButton(ui->btnRepair, pageButtons.buttons().size());
connect(&pageButtons, SIGNAL(buttonClicked(int)), this, SLOT(showPage(int)));

showPage(TAB_INFO);

clear();
}

Expand Down
2 changes: 1 addition & 1 deletion src/qt/rpcconsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class RPCConsole: public QWidget
Q_OBJECT

public:
explicit RPCConsole(interfaces::Node& node, QWidget* parent);
explicit RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags flags);
~RPCConsole();

static bool RPCParseCommandLine(interfaces::Node* node, std::string &strResult, const std::string &strCommand, bool fExecute, std::string * const pstrFilteredOut = nullptr, const std::string *walletID = nullptr);
Expand Down
2 changes: 2 additions & 0 deletions src/qt/splashscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ void SplashScreen::unsubscribeFromCoreSignals()
// Disconnect signals from client
m_handler_init_message->disconnect();
m_handler_show_progress->disconnect();
#ifdef ENABLE_WALLET
m_handler_load_wallet->disconnect();
#endif // ENABLE_WALLET
for (auto& handler : m_connected_wallet_handlers) {
handler->disconnect();
}
Expand Down