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;
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();
}
}
}
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);
}
connect(ui->btn_import, &QPushButton::clicked, this, &TxImportDialog::onImport);
ui->line_txid->setMinimumWidth(600);
-
this->adjustSize();
+
this->layout()->setSizeConstraint(QLayout::SetFixedSize);
}
}
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();
{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}},
// Storage -> Logging
writeStackTraceToDisk,
disableLogging,
+ disableLoggingStdout,
logLevel,
// Storage -> Misc