Add settings option to enable/disable logging to file, default to enabled
This commit is contained in:
parent
7b454ce5f4
commit
02db89f7fc
5 changed files with 255 additions and 216 deletions
|
|
@ -186,10 +186,23 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
|
|||
/*---------------------------------------------------------*\
|
||||
| Checkboxes |
|
||||
\*---------------------------------------------------------*/
|
||||
if(log_manager_settings.contains("log_file"))
|
||||
{
|
||||
ui->CheckboxLogFile->setChecked(log_manager_settings["log_file"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->CheckboxLogFile->setChecked(true);
|
||||
}
|
||||
|
||||
if(log_manager_settings.contains("log_console"))
|
||||
{
|
||||
ui->CheckboxLogConsole->setChecked(log_manager_settings["log_console"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->CheckboxLogConsole->setChecked(false);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load drivers settings (Windows only) |
|
||||
|
|
@ -946,6 +959,14 @@ void Ui::OpenRGBSettingsPage::on_CheckboxLogConsole_clicked()
|
|||
SaveSettings();
|
||||
}
|
||||
|
||||
void Ui::OpenRGBSettingsPage::on_CheckboxLogFile_clicked()
|
||||
{
|
||||
json log_manager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("LogManager");
|
||||
log_manager_settings["log_file"] = ui->CheckboxLogFile->isChecked();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("LogManager", log_manager_settings);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
void Ui::OpenRGBSettingsPage::on_CheckboxAMDSMBusReduceCPU_clicked()
|
||||
{
|
||||
json drivers_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Drivers");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue