Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications improvement. #1522

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

real-yfprojects
Copy link
Collaborator

Closes #609.

I went a bit overboard and reimplemented the notifications module. It now supports the full org.freedesktop.Notifications feature set and uses the new MacOS UserNotifications API. The symbolic icon added in #563 is removed because notifications use the normal app icon afaik.

It would be a miracle if the MacOS code worked. Testing and fixing it is up to you.
The linux code works as expected:

Bildschirmfoto vom 2022-12-28 08-36-07
notification-screenshot

* src/vorta/notifications.py (DBusNotifications._dbus_notify): Cleanup code.
	Use colourful icon for notifcations.

* Makefile (flatpack-install): Don't copy symbolic app icon.
* src/vorta/notifications.py (DBusNotifications): Rename `_dbus_notify` to `_notify`.

* src/vorta/notifications.py (DBusNotifications): Add `close`.

* src/vorta/notifications.py (DBusNotifications): Add `__init__` retrieving server capabilities.

* src/vorta/notifications.py (DBusNotifications): Extend capabilities of `_notify` with actions and more.
* setup.cfg (options.install_requires): Add requirement `pyobjc-framework-UserNotifications`.

* src/vorta/notifications.py : Implement MacOS notifications.

* src/vorta/notifications.py (DBusNotifications): Refactor.

* src/vorta/application.py : Create one notification instance on launch
	and use this instance to deliver notifications.

* src/vorta/scheduler.py
* src/vorta/views/export_window.py
* src/vorta/views/main_window.py : Use the global notification instance.
@real-yfprojects
Copy link
Collaborator Author

The linux code works as expected

I also checked XFCE. Works and looks very similar to GNOME.

@real-yfprojects
Copy link
Collaborator Author

@m3nu Have you got time for this in the near future? Or should I exclude the MacOS changes from this PR?

@m3nu
Copy link
Contributor

m3nu commented Feb 18, 2023

Nice rewrite. Will work on it for macOS of course.

@m3nu
Copy link
Contributor

m3nu commented Feb 19, 2023

Fixed up macOS notifications to the point where they don't cause an error and open the main window when clicked.

@stale
Copy link

stale bot commented Jul 19, 2023

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@sammcj
Copy link
Contributor

sammcj commented Aug 13, 2023

This is definitely still needed - #1773

@real-yfprojects
Copy link
Collaborator Author

Yeah, the Linux part is all done, but the MacOS code needs to be tested and completed. I can't do that because I dont have MacOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted This issue is available, comment if you want to fix it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants