Add option to disable feature for checking for a new update
(cherry picked from commit d26dd55dba066aa4884b00b55173597f49309f0d)
This commit is contained in:
@@ -38,6 +38,7 @@ GeneralConf::GeneralConf(QWidget* parent)
|
||||
initShowSidePanelButton();
|
||||
initShowDesktopNotification();
|
||||
initShowTrayIcon();
|
||||
initCheckForUpdates();
|
||||
initAutostart();
|
||||
initUseJpgForClipboard();
|
||||
initSaveAfterCopy();
|
||||
@@ -93,6 +94,12 @@ void GeneralConf::showTrayIconChanged(bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralConf::checkForUpdatesChanged(bool checked)
|
||||
{
|
||||
ConfigHandler().setCheckForUpdates(checked);
|
||||
Controller::getInstance()->setCheckForUpdatesEnabled(checked);
|
||||
}
|
||||
|
||||
void GeneralConf::autostartChanged(bool checked)
|
||||
{
|
||||
ConfigHandler().setStartupLaunch(checked);
|
||||
@@ -247,6 +254,19 @@ void GeneralConf::initConfigButtons()
|
||||
&GeneralConf::resetConfiguration);
|
||||
}
|
||||
|
||||
void GeneralConf::initCheckForUpdates()
|
||||
{
|
||||
m_checkForUpdates = new QCheckBox(tr("Automatic check for updates"), this);
|
||||
m_checkForUpdates->setChecked(ConfigHandler().checkForUpdates());
|
||||
m_checkForUpdates->setToolTip(tr("Automatic check for updates"));
|
||||
m_layout->addWidget(m_checkForUpdates);
|
||||
|
||||
connect(m_checkForUpdates,
|
||||
&QCheckBox::clicked,
|
||||
this,
|
||||
&GeneralConf::checkForUpdatesChanged);
|
||||
}
|
||||
|
||||
void GeneralConf::initAutostart()
|
||||
{
|
||||
m_autostart = new QCheckBox(tr("Launch at startup"), this);
|
||||
|
||||
Reference in New Issue
Block a user