Merge pull request 'Menu: add rescan spent' (#221) from tobtoht/feather:rescan_spent into master

Reviewed-on: https://git.wownero.com/feather/feather/pulls/221
This commit is contained in:
tobtoht 2020-12-14 19:45:26 +00:00
commit 15211ce5fa
3 changed files with 19 additions and 3 deletions

View file

@ -433,15 +433,16 @@ void MainWindow::initMenu() {
connect(ui->actionPassword, &QAction::triggered, this, &MainWindow::showPasswordDialog);
connect(ui->actionKeys, &QAction::triggered, this, &MainWindow::showKeysDialog);
connect(ui->actionViewOnly, &QAction::triggered, this, &MainWindow::showViewOnlyDialog);
connect(ui->actionStore_wallet, &QAction::triggered, [&]{
connect(ui->actionStore_wallet, &QAction::triggered, [this]{
m_ctx->currentWallet->store();
});
connect(ui->actionRefresh_tabs, &QAction::triggered, [&]{
connect(ui->actionRefresh_tabs, &QAction::triggered, [this]{
m_ctx->refreshModels();
});
connect(ui->actionUpdate_balance, &QAction::triggered, [&]{
connect(ui->actionUpdate_balance, &QAction::triggered, [this]{
m_ctx->updateBalance();
});
connect(ui->actionRescan_spent, &QAction::triggered, this, &MainWindow::rescanSpent);
connect(ui->actionExportKeyImages, &QAction::triggered, this, &MainWindow::exportKeyImages);
connect(ui->actionImportKeyImages, &QAction::triggered, this, &MainWindow::importKeyImages);
connect(ui->actionExportOutputs, &QAction::triggered, this, &MainWindow::exportOutputs);
@ -1302,6 +1303,14 @@ void MainWindow::updateNetStats() {
m_statusLabelNetStats->setText(QString("(D: %1)").arg(Utils::formatBytes(m_ctx->currentWallet->getBytesReceived())));
}
void MainWindow::rescanSpent() {
if (!m_ctx->currentWallet->rescanSpent()) {
QMessageBox::warning(this, "Rescan spent", m_ctx->currentWallet->errorString());
} else {
QMessageBox::information(this, "Rescan spent", "Successfully rescanned spent outputs.");
}
}
MainWindow::~MainWindow() {
delete ui;
}

View file

@ -167,6 +167,7 @@ private:
void touchbarShowWallet();
void updatePasswordIcon();
void updateNetStats();
void rescanSpent();
WalletWizard *createWizard(WalletWizard::Page startPage);

View file

@ -429,6 +429,7 @@
<addaction name="actionStore_wallet"/>
<addaction name="actionUpdate_balance"/>
<addaction name="actionRefresh_tabs"/>
<addaction name="actionRescan_spent"/>
<addaction name="separator"/>
<addaction name="actionChange_restore_height"/>
<addaction name="menuExport"/>
@ -734,6 +735,11 @@
<string>Show Exchange</string>
</property>
</action>
<action name="actionRescan_spent">
<property name="text">
<string>Rescan spent</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>