Remove opening of notification centre from date
This commit is contained in:
1 parent
0c91178aaf
commit
f5d3172cef
1 file changed
+9
-6
@@ -130,7 +130,6 @@ class Panel(Window):
|
|||||||
# Clickable DateTime for notification center
|
# Clickable DateTime for notification center
|
||||||
self.datetime_button = Button(
|
self.datetime_button = Button(
|
||||||
name="datetime-button",
|
name="datetime-button",
|
||||||
on_clicked=self.notification_center.toggle_mousecapture,
|
|
||||||
child=DateTime(name="date-time", formatters=["%a %-d %b %I:%M %P"]),
|
child=DateTime(name="date-time", formatters=["%a %-d %b %I:%M %P"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -173,8 +172,10 @@ class Panel(Window):
|
|||||||
modus_service.connect("dont-disturb-changed", self.on_dnd_changed)
|
modus_service.connect("dont-disturb-changed", self.on_dnd_changed)
|
||||||
|
|
||||||
# Connect to notification service for icon state updates
|
# Connect to notification service for icon state updates
|
||||||
notification_service.connect("notify::count", self.on_notification_count_changed)
|
notification_service.connect(
|
||||||
|
"notify::count", self.on_notification_count_changed
|
||||||
|
)
|
||||||
|
|
||||||
# Set initial notification icon state
|
# Set initial notification icon state
|
||||||
self.update_notification_icon()
|
self.update_notification_icon()
|
||||||
|
|
||||||
@@ -216,7 +217,7 @@ class Panel(Window):
|
|||||||
"""Update the notification icon based on count and DND state."""
|
"""Update the notification icon based on count and DND state."""
|
||||||
count = notification_service.count
|
count = notification_service.count
|
||||||
dnd_enabled = modus_service.dont_disturb
|
dnd_enabled = modus_service.dont_disturb
|
||||||
|
|
||||||
if dnd_enabled:
|
if dnd_enabled:
|
||||||
# DND is enabled - show disabled icon
|
# DND is enabled - show disabled icon
|
||||||
icon_file = "notification-disabled.svg"
|
icon_file = "notification-disabled.svg"
|
||||||
@@ -226,6 +227,8 @@ class Panel(Window):
|
|||||||
else:
|
else:
|
||||||
# No notifications - show inactive icon
|
# No notifications - show inactive icon
|
||||||
icon_file = "notification-inactive.svg"
|
icon_file = "notification-inactive.svg"
|
||||||
|
|
||||||
icon_path = get_relative_path(f"../../config/assets/icons/notifications/{icon_file}")
|
icon_path = get_relative_path(
|
||||||
|
f"../../config/assets/icons/notifications/{icon_file}"
|
||||||
|
)
|
||||||
self.notification_icon.set_from_file(icon_path)
|
self.notification_icon.set_from_file(icon_path)
|
||||||
Reference in new issue
Block a user