aboutQtAction(0),
trayIcon(0),
notificator(0),
- rpcConsole(0)
+ rpcConsole(0),
+ aboutDialog(0)
{
resize(850, 550);
setWindowTitle(tr("NovaCoin") + " - " + tr("Wallet"));
// Double-clicking on a transaction on the transaction history page shows details
connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));
- rpcConsole = new RPCConsole(this);
+ rpcConsole = new RPCConsole(0);
connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
+ aboutDialog = new AboutDialog(0);
+
// Clicking on "Verify Message" in the address book sends you to the verify message tab
connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));
// Clicking on "Sign Message" in the receive coins page sends you to the sign message tab
#ifdef Q_OS_MAC
delete appMenuBar;
#endif
+
+ delete rpcConsole;
+ delete aboutDialog;
}
void BitcoinGUI::createActions()
#ifndef Q_OS_MAC
// This is built-in on Mac
trayIconMenu->addSeparator();
- trayIconMenu->addAction(quitAction);
-
- notificator = new Notificator(qApp->applicationName(), trayIcon, 0);
+ trayIconMenu->addAction(quitAction);
#endif
+ notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
}
#ifndef Q_OS_MAC
void BitcoinGUI::aboutClicked()
{
- AboutDialog dlg;
- dlg.setModel(clientModel);
- dlg.exec();
+ aboutDialog->setModel(clientModel);
+ aboutDialog->setWindowModality(Qt::ApplicationModal);
+ aboutDialog->show();
}
void BitcoinGUI::setNumConnections(int count)
{
labelMiningIcon->setPixmap(QIcon(":/icons/mining_active").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
- uint64 nNetworkWeight = clientModel->getPoSKernelPS();
+ uint64_t nNetworkWeight = clientModel->getPoSKernelPS();
/*
double dDifficulty = clientModel->getDifficulty(true);
QString msg;
labelMiningIcon->setToolTip(tr("Stake miner is active\nYour current stake weight is %1\nNetwork weight is %2\nAverage block generation time is %3").arg(nTotalWeight).arg(dNetworkWeight).arg(msg));
*/
- labelMiningIcon->setToolTip(tr("Stake miner is active\nKernel rate is %1 k/s\nCD rate is %2 CD/s\nNetwork weight is %3").arg(nKernelsRate).arg(nCoinDaysRate).arg(nNetworkWeight));
+ labelMiningIcon->setToolTip(QString("<nobr>")+tr("Stake miner is active<br>Kernel rate is %1 k/s<br>CD rate is %2 CD/s<br>Network weight is %3").arg(nKernelsRate).arg(nCoinDaysRate).arg(nNetworkWeight)+QString("<\nobr>"));
}
else
labelMiningIcon->setToolTip(tr("No suitable inputs were found"));
}
#endif
}
+ // close rpcConsole in case it was open to make some space for the shutdown window
+ rpcConsole->close();
+
QMainWindow::closeEvent(event);
}
{
raise();
activateWindow();
- Sleep(1);
- if (GUIUtil::isObscured(this))
- hide();
+ if(fToggleHidden)
+ {
+ Sleep(1);
+ if (GUIUtil::isObscured(this))
+ hide();
+ }
}
else if(fToggleHidden)
hide();