Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/MainDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include <iostream>

MainDialog::MainDialog(QWidget *parent):QDialog(parent),_layout(this) {
_options = new QGroupBox(tr("Would you like to keep your system up to date automatically?"));
_options = new QGroupBox(tr("Would you like OpenMandriva Lx to update automatically?"));
_layout.addWidget(_options);

QVBoxLayout *optionsLayout = new QVBoxLayout(_options);
_configs[0] = new QRadioButton(tr("Do not install updates automatically"), _options);
_configs[1] = new QRadioButton(tr("Download updates automatically, install manually"), _options);
_configs[2] = new QRadioButton(tr("Download and install updates automatically"), _options);
_configs[0] = new QRadioButton(tr("No, do not check nor download updates automatically"), _options);
_configs[1] = new QRadioButton(tr("Yes, download updates automatically, but do not install them"), _options);
_configs[2] = new QRadioButton(tr("Yes, download and install updates automatically"), _options);
for(int i=0; i<3; i++)
optionsLayout->addWidget(_configs[i]);

Expand All @@ -34,7 +34,7 @@ MainDialog::MainDialog(QWidget *parent):QDialog(parent),_layout(this) {
bool MainDialog::updateConfig(QString config) {
QSettings s("/etc/dnf/automatic.conf", QSettings::IniFormat);
if(s.isWritable()) {
s.setValue("downnload_updates", _configs[0]->isChecked() ? "no" : "yes");
s.setValue("download_updates", _configs[0]->isChecked() ? "no" : "yes");
s.setValue("apply_updates", _configs[2]->isChecked() ? "yes" : "no");
} else
return QProcess::execute("/usr/bin/pkexec", QStringList() << "/usr/bin/om-update-config" << config);
Expand Down