Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
66d24f08
Unverified
Commit
66d24f08
authored
May 17, 2021
by
ebbit1q
Committed by
GitHub
May 17, 2021
Browse files
properly enable notification checkboxes (#4356)
parent
19a7c409
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/dlg_settings.cpp
View file @
66d24f08
...
...
@@ -411,7 +411,7 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
notificationsEnabledCheckBox
.
setChecked
(
SettingsCache
::
instance
().
getNotificationsEnabled
());
connect
(
&
notificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
&
SettingsCache
::
instance
(),
SLOT
(
setNotificationsEnabled
(
int
)));
connect
(
&
notificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
set
Spec
NotificationEnabled
(
int
)));
connect
(
&
notificationsEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
setNotificationEnabled
(
int
)));
specNotificationsEnabledCheckBox
.
setChecked
(
SettingsCache
::
instance
().
getSpectatorNotificationsEnabled
());
specNotificationsEnabledCheckBox
.
setEnabled
(
SettingsCache
::
instance
().
getNotificationsEnabled
());
...
...
@@ -473,9 +473,14 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
setLayout
(
mainLayout
);
}
void
UserInterfaceSettingsPage
::
set
Spec
NotificationEnabled
(
int
i
)
void
UserInterfaceSettingsPage
::
setNotificationEnabled
(
int
i
)
{
specNotificationsEnabledCheckBox
.
setEnabled
(
i
!=
0
);
buddyConnectNotificationsEnabledCheckBox
.
setEnabled
(
i
!=
0
);
if
(
i
==
0
)
{
specNotificationsEnabledCheckBox
.
setChecked
(
false
);
buddyConnectNotificationsEnabledCheckBox
.
setChecked
(
false
);
}
}
void
UserInterfaceSettingsPage
::
retranslateUi
()
...
...
cockatrice/src/dlg_settings.h
View file @
66d24f08
...
...
@@ -108,7 +108,7 @@ class UserInterfaceSettingsPage : public AbstractSettingsPage
{
Q_OBJECT
private
slots
:
void
set
Spec
NotificationEnabled
(
int
);
void
setNotificationEnabled
(
int
);
private:
QCheckBox
notificationsEnabledCheckBox
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment