// Menus
QMenu *file = menuBar()->addMenu(tr("&File"));
- file->addAction(sendCoinsAction);
- file->addAction(receiveCoinsAction);
- file->addSeparator();
file->addAction(quitAction);
QMenu *settings = menuBar()->addMenu(tr("&Settings"));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
- quitAction = new QAction(QIcon(":/icons/quit"), tr("&Exit"), this);
+ quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
quitAction->setToolTip(tr("Quit application"));
+ quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About"), this);
aboutAction->setToolTip(tr("Show information about Bitcoin"));
optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
- connect(openBitcoinAction, SIGNAL(triggered()), this, SLOT(show()));
+ connect(openBitcoinAction, SIGNAL(triggered()), this, SLOT(showNormal()));
connect(encryptWalletAction, SIGNAL(triggered(bool)), this, SLOT(encryptWallet(bool)));
connect(changePassphraseAction, SIGNAL(triggered()), this, SLOT(changePassphrase()));
}
{
if(reason == QSystemTrayIcon::Trigger)
{
- // Doubleclick on system tray icon triggers "open bitcoin"
+ // Click on system tray icon triggers "open bitcoin"
openBitcoinAction->trigger();
}
+
}
void BitcoinGUI::optionsClicked()
void BitcoinGUI::setNumBlocks(int count)
{
- int total = clientModel->getTotalBlocksEstimate();
+ int initTotal = clientModel->getNumBlocksAtStartup();
+ int total = clientModel->getNumBlocksOfPeers();
QString tooltip;
if(count < total)
{
progressBarLabel->setVisible(true);
progressBar->setVisible(true);
- progressBar->setMaximum(total);
- progressBar->setValue(count);
+ progressBar->setMaximum(total - initTotal);
+ progressBar->setValue(count - initTotal);
tooltip = tr("Downloaded %1 of %2 blocks of transaction history.").arg(count).arg(total);
}
else
}
else
{
+ show();
e->accept();
}
}
void BitcoinGUI::gotoSendCoinsPage()
{
sendCoinsAction->setChecked(true);
- if(centralWidget->currentWidget() != sendCoinsPage)
- {
- // Clear the current contents if we arrived from another tab
- sendCoinsPage->clear();
- }
centralWidget->setCurrentWidget(sendCoinsPage);
exportAction->setEnabled(false);