desktop-notifier 6.1.1.dev0__tar.gz → 6.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {desktop_notifier-6.1.1.dev0/src/desktop_notifier.egg-info → desktop_notifier-6.2.0}/PKG-INFO +2 -2
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/pyproject.toml +2 -2
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/__init__.py +1 -1
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/dbus.py +33 -1
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/winrt.py +6 -2
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0/src/desktop_notifier.egg-info}/PKG-INFO +2 -2
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier.egg-info/requires.txt +1 -1
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/LICENSE +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/README.md +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/setup.cfg +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/__init__.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/base.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/dummy.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/macos.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/macos_support.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/common.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/main.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/py.typed +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/resources/__init__.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/resources/python.png +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/sync.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier.egg-info/SOURCES.txt +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier.egg-info/dependency_links.txt +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier.egg-info/top_level.txt +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/tests/test_api.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/tests/test_callbacks.py +0 -0
- {desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/tests/test_sync_api.py +0 -0
{desktop_notifier-6.1.1.dev0/src/desktop_notifier.egg-info → desktop_notifier-6.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: desktop-notifier
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.2.0
|
|
4
4
|
Summary: Python library for cross-platform desktop notifications
|
|
5
5
|
Author-email: Sam Schott <sam.schott@outlook.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -49,7 +49,7 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
49
49
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
50
50
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
51
51
|
Provides-Extra: docs
|
|
52
|
-
Requires-Dist: furo==
|
|
52
|
+
Requires-Dist: furo==2025.7.19; extra == "docs"
|
|
53
53
|
Requires-Dist: sphinx==8.1.3; extra == "docs"
|
|
54
54
|
Requires-Dist: sphinx-autoapi==3.6.0; extra == "docs"
|
|
55
55
|
Requires-Dist: sphinx-mdinclude==0.6.2; extra == "docs"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "desktop-notifier"
|
|
7
|
-
version = "6.
|
|
7
|
+
version = "6.2.0"
|
|
8
8
|
authors = [{name = "Sam Schott", email = "sam.schott@outlook.com"}]
|
|
9
9
|
license = "MIT"
|
|
10
10
|
description = "Python library for cross-platform desktop notifications"
|
|
@@ -70,7 +70,7 @@ dev = [
|
|
|
70
70
|
"pytest-cov",
|
|
71
71
|
]
|
|
72
72
|
docs = [
|
|
73
|
-
"furo==
|
|
73
|
+
"furo==2025.7.19",
|
|
74
74
|
"sphinx==8.1.3",
|
|
75
75
|
"sphinx-autoapi==3.6.0",
|
|
76
76
|
"sphinx-mdinclude==0.6.2",
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/dbus.py
RENAMED
|
@@ -31,6 +31,8 @@ NOTIFICATION_CLOSED_PROGRAMMATICALLY = 3
|
|
|
31
31
|
NOTIFICATION_CLOSED_UNDEFINED = 4
|
|
32
32
|
|
|
33
33
|
DEFAULT_ACTION_KEY = "default"
|
|
34
|
+
INLINE_REPLY_ACTION_KEY = "inline-reply"
|
|
35
|
+
INLINE_REPLY_BUTTON_TEXT_KEY = "x-kde-reply-submit-button-text"
|
|
34
36
|
|
|
35
37
|
|
|
36
38
|
class DBusDesktopNotifier(DesktopNotifierBackend):
|
|
@@ -90,6 +92,9 @@ class DBusDesktopNotifier(DesktopNotifierBackend):
|
|
|
90
92
|
if hasattr(self.interface, "on_action_invoked"):
|
|
91
93
|
self.interface.on_action_invoked(self._on_action)
|
|
92
94
|
|
|
95
|
+
if hasattr(self.interface, "on_notification_replied"):
|
|
96
|
+
self.interface.on_notification_replied(self._on_reply)
|
|
97
|
+
|
|
93
98
|
return self.interface
|
|
94
99
|
|
|
95
100
|
async def _send(self, notification: Notification) -> None:
|
|
@@ -102,6 +107,7 @@ class DBusDesktopNotifier(DesktopNotifierBackend):
|
|
|
102
107
|
self.interface = await self._init_dbus()
|
|
103
108
|
|
|
104
109
|
actions = []
|
|
110
|
+
hints_v: dict[str, Variant] = dict()
|
|
105
111
|
|
|
106
112
|
# The "default" action is invoked when clicking on the notification body.
|
|
107
113
|
if Capability.ON_CLICKED in await self.get_capabilities():
|
|
@@ -110,7 +116,15 @@ class DBusDesktopNotifier(DesktopNotifierBackend):
|
|
|
110
116
|
for button in notification.buttons:
|
|
111
117
|
actions += [button.identifier, button.title]
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
if (
|
|
120
|
+
notification.reply_field
|
|
121
|
+
and Capability.REPLY_FIELD in await self.get_capabilities()
|
|
122
|
+
):
|
|
123
|
+
actions += [INLINE_REPLY_ACTION_KEY, notification.reply_field.title]
|
|
124
|
+
hints_v[INLINE_REPLY_BUTTON_TEXT_KEY] = Variant(
|
|
125
|
+
"s", notification.reply_field.button_title
|
|
126
|
+
)
|
|
127
|
+
|
|
114
128
|
hints_v["urgency"] = self.to_native_urgency[notification.urgency]
|
|
115
129
|
|
|
116
130
|
if notification.sound:
|
|
@@ -237,6 +251,22 @@ class DBusDesktopNotifier(DesktopNotifierBackend):
|
|
|
237
251
|
|
|
238
252
|
self.handle_button(identifier, action_key, notification)
|
|
239
253
|
|
|
254
|
+
def _on_reply(self, nid: int, reply_text: str) -> None:
|
|
255
|
+
"""
|
|
256
|
+
Called when the user replies to the notification. This will invoke the
|
|
257
|
+
handler callback.
|
|
258
|
+
|
|
259
|
+
:param nid: The platform's notification ID as an integer.
|
|
260
|
+
:param reply_text: The text of the user's reply.
|
|
261
|
+
"""
|
|
262
|
+
identifier = self._platform_to_interface_notification_identifier.pop(nid, "")
|
|
263
|
+
notification = self._clear_notification_from_cache(identifier)
|
|
264
|
+
|
|
265
|
+
if not notification:
|
|
266
|
+
return
|
|
267
|
+
|
|
268
|
+
self.handle_replied(identifier, reply_text, notification)
|
|
269
|
+
|
|
240
270
|
def _on_closed(self, nid: int, reason: int) -> None:
|
|
241
271
|
"""
|
|
242
272
|
Called when the user closes a notification. This will invoke the registered
|
|
@@ -290,6 +320,8 @@ class DBusDesktopNotifier(DesktopNotifierBackend):
|
|
|
290
320
|
if "sound" in cps:
|
|
291
321
|
capabilities.add(Capability.SOUND)
|
|
292
322
|
capabilities.add(Capability.SOUND_NAME)
|
|
323
|
+
if "inline-reply" in cps:
|
|
324
|
+
capabilities.add(Capability.REPLY_FIELD)
|
|
293
325
|
|
|
294
326
|
hints_signature = get_hints_signature(self.interface)
|
|
295
327
|
if hints_signature not in self.supported_hint_signatures:
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/winrt.py
RENAMED
|
@@ -51,7 +51,7 @@ BUTTON_ACTION_PREFIX = "action=button&id="
|
|
|
51
51
|
REPLY_TEXTBOX_NAME = "textBox"
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
def register_hkey(app_id: str, app_name: str) -> None:
|
|
54
|
+
def register_hkey(app_id: str, app_name: str, app_icon: Icon | None = None) -> None:
|
|
55
55
|
# mypy type guard
|
|
56
56
|
if not sys.platform == "win32":
|
|
57
57
|
return
|
|
@@ -60,6 +60,10 @@ def register_hkey(app_id: str, app_name: str) -> None:
|
|
|
60
60
|
key_path = f"SOFTWARE\\Classes\\AppUserModelId\\{app_id}"
|
|
61
61
|
with winreg.CreateKeyEx(winreg.HKEY_CURRENT_USER, key_path) as master_key:
|
|
62
62
|
winreg.SetValueEx(master_key, "DisplayName", 0, winreg.REG_SZ, app_name)
|
|
63
|
+
if app_icon is not None and app_icon.is_file():
|
|
64
|
+
winreg.SetValueEx(
|
|
65
|
+
master_key, "IconUri", 0, winreg.REG_SZ, app_icon.as_uri()
|
|
66
|
+
)
|
|
63
67
|
|
|
64
68
|
|
|
65
69
|
class WinRTDesktopNotifier(DesktopNotifierBackend):
|
|
@@ -90,7 +94,7 @@ class WinRTDesktopNotifier(DesktopNotifierBackend):
|
|
|
90
94
|
self.app_id = CoreApplication.id
|
|
91
95
|
else:
|
|
92
96
|
self.app_id = app_name
|
|
93
|
-
register_hkey(app_id=app_name, app_name=app_name)
|
|
97
|
+
register_hkey(app_id=app_name, app_name=app_name, app_icon=app_icon)
|
|
94
98
|
|
|
95
99
|
notifier = self.manager.create_toast_notifier_with_id(self.app_id)
|
|
96
100
|
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0/src/desktop_notifier.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: desktop-notifier
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.2.0
|
|
4
4
|
Summary: Python library for cross-platform desktop notifications
|
|
5
5
|
Author-email: Sam Schott <sam.schott@outlook.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -49,7 +49,7 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
49
49
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
50
50
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
51
51
|
Provides-Extra: docs
|
|
52
|
-
Requires-Dist: furo==
|
|
52
|
+
Requires-Dist: furo==2025.7.19; extra == "docs"
|
|
53
53
|
Requires-Dist: sphinx==8.1.3; extra == "docs"
|
|
54
54
|
Requires-Dist: sphinx-autoapi==3.6.0; extra == "docs"
|
|
55
55
|
Requires-Dist: sphinx-mdinclude==0.6.2; extra == "docs"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/__init__.py
RENAMED
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/base.py
RENAMED
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/dummy.py
RENAMED
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/backends/macos.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/resources/__init__.py
RENAMED
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier/resources/python.png
RENAMED
|
File without changes
|
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{desktop_notifier-6.1.1.dev0 → desktop_notifier-6.2.0}/src/desktop_notifier.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|