]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
minimize ALL windows; add toggle to disable logs
authorgg <chown_tee@proton.me>
Mon, 12 Jan 2026 20:11:26 +0000 (15:11 -0500)
committergg <chown_tee@proton.me>
Mon, 12 Jan 2026 20:12:13 +0000 (15:12 -0500)
src/MainWindow.cpp
src/SettingsDialog.cpp
src/dialog/TxImportDialog.cpp
src/utils/Utils.cpp
src/utils/config.cpp
src/utils/config.h

index c5497d55f9c6e93f3b5849e1dad61c2143f491dc..c9ae746fc3489ac681ca30f18fbad2c879f10747 100644 (file)
@@ -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();
                     }
                 }
             }
index b9f6a4b190e37d9cc4d20010d28c0f93bac22c30..4c0f40ef4f0d70cc084b7acb27f85ebc33a7801f 100644 (file)
@@ -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<int>::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);
        }
index 3f1b2685eab04e7b199087c28edc635034b187e3..a2e49deb61405537bc729e21146adda397829f1b 100644 (file)
@@ -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);
 }
 
index 8977e56deceba11a41c2b5b54dfb218b70be3e2b..53566aae7e7a43cbfe64b6a1923aabe186a69c91 100644 (file)
@@ -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();
index 9da3d876ffc28286255126db2b8900bb9f10ff65..72c94a0157653db27827fd3a9cc872040039de82 100644 (file)
@@ -93,6 +93,7 @@ static const QHash<Config::ConfigKey, ConfigDirective> 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}},
 
index 085c1331075f755b757dcb66b8a12058031c631a..3bd7224c921855b1a9edd7e1db949894561c5cb7 100644 (file)
@@ -94,6 +94,7 @@ public:
         // Storage -> Logging
         writeStackTraceToDisk,
         disableLogging,
+        disableLoggingStdout,
         logLevel,
 
         // Storage -> Misc