connect(m_updateNetworkInfoAction, &QAction::triggered, this, [this]() {
if (!m_wallet) return;
+ this->setStatusText(tr("Fetching network info..."));
m_wallet->updateNetworkStatus();
});
// [Log level]
ui->comboBox_logLevel->clear();
- ui->comboBox_logLevel->addItems({"Error", "Warning", "Info", "Debug", "Trace"});
+ ui->comboBox_logLevel->addItems({"Fatal", "Warning", "Info", "Debug"});
ui->comboBox_logLevel->setCurrentIndex(conf()->get(Config::logLevel).toInt());
connect(ui->comboBox_logLevel, QOverload<int>::of(&QComboBox::currentIndexChanged), [](int index){
connect(ui->checkBox_showTrayIcon, &QCheckBox::toggled, [this](bool toggled) {
conf()->set(Config::showTrayIcon, toggled);
ui->checkBox_minimizeToTray->setEnabled(toggled);
- ui->checkBox_trayLeftClickToggles->setEnabled(toggled);
+ ui->checkBox_trayLeftClickTogglesFocus->setEnabled(toggled);
emit showTrayIcon(toggled);
});
});
// [Left click system tray icon to toggle focus]
- ui->checkBox_trayLeftClickToggles->setEnabled(ui->checkBox_showTrayIcon->isChecked());
- ui->checkBox_trayLeftClickToggles->setChecked(conf()->get(Config::trayLeftClickToggles).toBool());
- connect(ui->checkBox_trayLeftClickToggles, &QCheckBox::toggled, [this](bool toggled) {
- conf()->set(Config::trayLeftClickToggles, toggled);
- });
+ ui->checkBox_trayLeftClickTogglesFocus->setEnabled(ui->checkBox_showTrayIcon->isChecked());
+ ui->checkBox_trayLeftClickTogglesFocus->setChecked(conf()->get(Config::trayLeftClickTogglesFocus).toBool());
+ connect(ui->checkBox_trayLeftClickTogglesFocus, &QCheckBox::toggled,
+ [this](bool toggled) { conf()->set(Config::trayLeftClickTogglesFocus, toggled); });
}
void Settings::setupMemoryTab() {
</spacer>
</item>
<item>
- <widget class="QCheckBox" name="checkBox_trayLeftClickToggles">
+ <widget class="QCheckBox" name="checkBox_trayLeftClickTogglesFocus">
<property name="enabled">
<bool>false</bool>
</property>
connect(m_tray, &QSystemTrayIcon::activated, [this](QSystemTrayIcon::ActivationReason reason) {
if (reason == QSystemTrayIcon::Trigger) {
- if (conf()->get(Config::trayLeftClickToggles).toBool()) {
+ if (conf()->get(Config::trayLeftClickTogglesFocus).toBool()) {
for (const auto &window : m_windows) {
if (window->isVisible()) {
window->hide();
auto node = m_nodes->connection();
ui->label_remoteNode->setText(node.toAddress());
- ui->label_walletStatus->setText(this->statusToString(m_wallet->connectionStatus()));
+ QString statusStr = this->statusToString(m_wallet->connectionStatus());
+ if (conf()->get(Config::syncPaused).toBool()) {
+ statusStr += " (Paused)";
+ }
+ ui->label_walletStatus->setText(statusStr);
QString websocketStatus = Utils::QtEnumToString(websocketNotifier()->websocketClient->webSocket->state()).remove("State");
if (conf()->get(Config::disableWebsocket).toBool()) {
websocketStatus = "Disabled";
}
QFile file(filename);
- file.open(QIODevice::WriteOnly);
+ if (!file.open(QIODevice::WriteOnly)) {
+ QMessageBox::warning(this, tr("Error"), tr("Could not save image to file: %1").arg(file.errorString()));
+ qWarning() << "Could not save image to file: " << file.errorString();
+ return;
+ }
m_qrCode->toPixmap(1).scaled(500, 500, Qt::KeepAspectRatio).save(&file, "PNG");
QMessageBox::information(this, "Information", "QR code saved to file");
}
{Config::inactivityLockTimeout, {QS("inactivityLockTimeout"), 10}},
{Config::lockOnMinimize, {QS("lockOnMinimize"), false}},
{Config::showTrayIcon, {QS("showTrayIcon"), true}},
- {Config::minimizeToTray, {QS("minimizeToTray"), false}},
- {Config::trayLeftClickToggles, {QS("trayLeftClickToggles"), false}},
+ {Config::minimizeToTray, {QS("minimizeToTray"), true}},
+ {Config::trayLeftClickTogglesFocus, {QS("trayLeftClickTogglesFocus"), true}},
{Config::disableWebsocket, {QS("disableWebsocket"), false}},
{Config::disableAutoRefresh, {QS("disableAutoRefresh"), false}},
{Config::offlineMode, {QS("offlineMode"), false}},
lockOnMinimize,
showTrayIcon,
minimizeToTray,
- trayLeftClickToggles,
+ trayLeftClickTogglesFocus,
// Transactions
multiBroadcast,