Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
9339e454
Commit
9339e454
authored
Jul 11, 2025
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed do not disturb widget not properly reflecting the state. Fixes: #419
parent
55b599c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
dnd.vala
src/controlCenter/widgets/dnd/dnd.vala
+6
-7
No files found.
src/controlCenter/widgets/dnd/dnd.vala
View file @
9339e454
...
@@ -30,13 +30,13 @@ namespace SwayNotificationCenter.Widgets {
...
@@ -30,13 +30,13 @@ namespace SwayNotificationCenter.Widgets {
// Dnd button
// Dnd button
dnd_button
=
new
Gtk
.
Switch
()
{
dnd_button
=
new
Gtk
.
Switch
()
{
stat
e
=
noti_daemon
.
dnd
,
activ
e
=
noti_daemon
.
dnd
,
};
};
dnd_button
.
state_set
.
connect
(
state_set
);
dnd_button
.
notify
[
"active"
].
connect
(
switch_active_changed_cb
);
noti_daemon
.
on_dnd_toggle
.
connect
((
dnd
)
=>
{
noti_daemon
.
on_dnd_toggle
.
connect
((
dnd
)
=>
{
dnd_button
.
state_set
.
disconnect
(
state_set
);
dnd_button
.
notify
[
"active"
].
disconnect
(
switch_active_changed_cb
);
dnd_button
.
set_active
(
dnd
);
dnd_button
.
set_active
(
dnd
);
dnd_button
.
state_set
.
connect
(
state_set
);
dnd_button
.
notify
[
"active"
].
connect
(
switch_active_changed_cb
);
});
});
dnd_button
.
set_can_focus
(
false
);
dnd_button
.
set_can_focus
(
false
);
...
@@ -46,9 +46,8 @@ namespace SwayNotificationCenter.Widgets {
...
@@ -46,9 +46,8 @@ namespace SwayNotificationCenter.Widgets {
append
(
dnd_button
);
append
(
dnd_button
);
}
}
private
bool
state_set
(
Gtk
.
Widget
widget
,
bool
state
)
{
private
void
switch_active_changed_cb
()
{
noti_daemon
.
dnd
=
state
;
noti_daemon
.
dnd
=
dnd_button
.
active
;
return
false
;
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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