Browse Source

Hide help button and disable close button on connection and disconnection dialogs.

Keep connection dialog displayed a bit longer.
pull/45/head
FireMartZ 5 years ago
parent
commit
9033b1048f
  1. 7
      src/connection.cpp
  2. 1
      src/rpc.cpp

7
src/connection.cpp

@ -14,6 +14,7 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, RPC* rpc) {
this->rpc = rpc;
d = new QDialog(main);
d->setWindowFlags(d->windowFlags() & ~(Qt::WindowCloseButtonHint | Qt::WindowContextHelpButtonHint));
connD = new Ui_ConnectionDialog();
connD->setupUi(d);
QPixmap logo(":/img/res/logobig.gif");
@ -459,10 +460,10 @@ void ConnectionLoader::refreshZcashdState(Connection* connection, std::function<
};
connection->doRPC(payload,
[=] (auto) {
// Success, hide the dialog if it was shown.
d->hide();
// Success
main->logger->write("hushd is online.");
this->doRPCSetConnection(connection);
// Delay 1 second to ensure loading (splash) is seen at least 1 second.
QTimer::singleShot(1000, [=]() { this->doRPCSetConnection(connection); });
},
[=] (auto reply, auto res) {
// Failed, see what it is.

1
src/rpc.cpp

@ -1125,6 +1125,7 @@ void RPC::shutdownZcashd() {
conn->shutdown();
QDialog d(main);
d.setWindowFlags(d.windowFlags() & ~(Qt::WindowCloseButtonHint | Qt::WindowContextHelpButtonHint));
Ui_ConnectionDialog connD;
connD.setupUi(&d);
connD.topIcon->setBasePixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256));

Loading…
Cancel
Save