properly enable notification checkboxes (#4356)
This commit is contained in:
parent
19a7c4092c
commit
66d24f086e
2 changed files with 8 additions and 3 deletions
|
@ -411,7 +411,7 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
|
||||||
notificationsEnabledCheckBox.setChecked(SettingsCache::instance().getNotificationsEnabled());
|
notificationsEnabledCheckBox.setChecked(SettingsCache::instance().getNotificationsEnabled());
|
||||||
connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(),
|
connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(),
|
||||||
SLOT(setNotificationsEnabled(int)));
|
SLOT(setNotificationsEnabled(int)));
|
||||||
connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setSpecNotificationEnabled(int)));
|
connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setNotificationEnabled(int)));
|
||||||
|
|
||||||
specNotificationsEnabledCheckBox.setChecked(SettingsCache::instance().getSpectatorNotificationsEnabled());
|
specNotificationsEnabledCheckBox.setChecked(SettingsCache::instance().getSpectatorNotificationsEnabled());
|
||||||
specNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled());
|
specNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled());
|
||||||
|
@ -473,9 +473,14 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserInterfaceSettingsPage::setSpecNotificationEnabled(int i)
|
void UserInterfaceSettingsPage::setNotificationEnabled(int i)
|
||||||
{
|
{
|
||||||
specNotificationsEnabledCheckBox.setEnabled(i != 0);
|
specNotificationsEnabledCheckBox.setEnabled(i != 0);
|
||||||
|
buddyConnectNotificationsEnabledCheckBox.setEnabled(i != 0);
|
||||||
|
if (i == 0) {
|
||||||
|
specNotificationsEnabledCheckBox.setChecked(false);
|
||||||
|
buddyConnectNotificationsEnabledCheckBox.setChecked(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserInterfaceSettingsPage::retranslateUi()
|
void UserInterfaceSettingsPage::retranslateUi()
|
||||||
|
|
|
@ -108,7 +108,7 @@ class UserInterfaceSettingsPage : public AbstractSettingsPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private slots:
|
||||||
void setSpecNotificationEnabled(int);
|
void setNotificationEnabled(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QCheckBox notificationsEnabledCheckBox;
|
QCheckBox notificationsEnabledCheckBox;
|
||||||
|
|
Loading…
Reference in a new issue