From: gg Date: Mon, 12 Jan 2026 20:11:26 +0000 (-0500) Subject: minimize ALL windows; add toggle to disable logs X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=135cfcbe24e9c47077bd5b4b2dce632c74811f16;p=gamesguru%2Ffeather.git minimize ALL windows; add toggle to disable logs --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index c5497d55..c9ae746f 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -211,9 +211,8 @@ void MainWindow::initStatusBar() { QAction *fullSyncAction = new QAction(tr("Full Sync"), this); m_statusLabelStatus->addAction(fullSyncAction); - QAction *scanTxAction = new QAction(tr("Scan Transaction"), this); + QAction *scanTxAction = new QAction(tr("Import Transaction"), this); m_statusLabelStatus->addAction(scanTxAction); - ui->menuTools->addAction(scanTxAction); connect(pauseSyncAction, &QAction::toggled, this, [this](bool checked) { qInfo() << "Pause Sync toggled. Checked =" << checked; @@ -1537,11 +1536,9 @@ void MainWindow::changeEvent(QEvent* event) bool showTray = conf()->get(Config::showTrayIcon).toBool(); bool minimizeToTray = conf()->get(Config::minimizeToTray).toBool(); if (showTray && minimizeToTray) { - // Hide all widgets and dialogs, not just MainWindow + // Hide all widgets and dialogs, not just MainWindow for (const auto &widget : QApplication::topLevelWidgets()) { - if (widget->isVisible() && !widget->windowFlags().testFlag(Qt::Popup) && !widget->windowFlags().testFlag(Qt::ToolTip)) { - widget->hide(); - } + widget->hide(); } } } diff --git a/src/SettingsDialog.cpp b/src/SettingsDialog.cpp index b9f6a4b1..4c0f40ef 100644 --- a/src/SettingsDialog.cpp +++ b/src/SettingsDialog.cpp @@ -234,11 +234,25 @@ void Settings::setupStorageTab() { WalletManager::instance()->setLogLevel(toggled ? conf()->get(Config::logLevel).toInt() : -1); }); + // [Disable terminal output] + QCheckBox *cbDisableStdout = new QCheckBox("Disable terminal output (silence most logs)", this); + cbDisableStdout->setChecked(conf()->get(Config::disableLoggingStdout).toBool()); + connect(cbDisableStdout, &QCheckBox::toggled, [](bool toggled){ + conf()->set(Config::disableLoggingStdout, toggled); + }); + // Insert into the logging layout (verticalLayout_2) + // We add it after checkBox_enableLogging + int index = ui->verticalLayout_2->indexOf(ui->checkBox_enableLogging); + ui->verticalLayout_2->insertWidget(index + 1, cbDisableStdout); + // [Log level] + ui->comboBox_logLevel->clear(); + ui->comboBox_logLevel->addItems({"Error", "Warning", "Info", "Debug", "Trace"}); ui->comboBox_logLevel->setCurrentIndex(conf()->get(Config::logLevel).toInt()); + connect(ui->comboBox_logLevel, QOverload::of(&QComboBox::currentIndexChanged), [](int index){ conf()->set(Config::logLevel, index); - qDebug() << "Log level changed to:" << index; + qInfo() << "Log level changed to:" << index; if (!conf()->get(Config::disableLogging).toBool()) { WalletManager::instance()->setLogLevel(index); } diff --git a/src/dialog/TxImportDialog.cpp b/src/dialog/TxImportDialog.cpp index 3f1b2685..a2e49deb 100644 --- a/src/dialog/TxImportDialog.cpp +++ b/src/dialog/TxImportDialog.cpp @@ -18,8 +18,8 @@ TxImportDialog::TxImportDialog(QWidget *parent, Wallet *wallet) connect(ui->btn_import, &QPushButton::clicked, this, &TxImportDialog::onImport); ui->line_txid->setMinimumWidth(600); - this->adjustSize(); + this->layout()->setSizeConstraint(QLayout::SetFixedSize); } diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 8977e56d..53566aae 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -559,7 +559,7 @@ QTextCharFormat addressTextFormat(const SubaddressIndex &index, quint64 amount) } void applicationLogHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { - if (conf()->get(Config::disableLogging).toBool()) + if (conf()->get(Config::disableLoggingStdout).toBool()) return; int level = conf()->get(Config::logLevel).toInt(); diff --git a/src/utils/config.cpp b/src/utils/config.cpp index 9da3d876..72c94a01 100644 --- a/src/utils/config.cpp +++ b/src/utils/config.cpp @@ -93,6 +93,7 @@ static const QHash configStrings = { {Config::hideNotifications, {QS("hideNotifications"), false}}, {Config::hideUpdateNotifications, {QS("hideUpdateNotifications"), false}}, {Config::disableLogging, {QS("disableLogging"), true}}, + {Config::disableLoggingStdout, {QS("disableLoggingStdout"), false}}, {Config::writeStackTraceToDisk, {QS("writeStackTraceToDisk"), true}}, {Config::writeRecentlyOpenedWallets, {QS("writeRecentlyOpenedWallets"), true}}, diff --git a/src/utils/config.h b/src/utils/config.h index 085c1331..3bd7224c 100644 --- a/src/utils/config.h +++ b/src/utils/config.h @@ -94,6 +94,7 @@ public: // Storage -> Logging writeStackTraceToDisk, disableLogging, + disableLoggingStdout, logLevel, // Storage -> Misc