xpra icon
Bug tracker and wiki

Opened 15 months ago

Last modified 2 weeks ago

#1305 assigned enhancement

native OSX notifications

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: minor Milestone: 2.3
Component: client Version: trunk
Keywords: osx notifications Cc:

Description

See wiki/Notifications: replace the existing GTK notifier code with native macos notifications:

Maybe wait for the newer build environment (#840) to make it easier to test?

Attachments (1)

osx-notifications.patch (5.3 KB) - added by Antoine Martin 10 months ago.
try to use native code for notifications

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 months ago by Antoine Martin

Milestone: 1.0future
Status: newassigned

I tried a quick test and there are issues with the notification code: NSUserNotificationCenter.defaultUserNotificationCenter() returns None in python and NSUserNotificationCenter.defaultUserNotificationCenter() returning None using PyInstaller.
The same code works when using the system installed python!
So we either have to fix this (not sure how) or use a subprocess... yuk.

Changed 10 months ago by Antoine Martin

Attachment: osx-notifications.patch added

try to use native code for notifications

comment:2 Changed 10 months ago by Antoine Martin

The notification center API just isn't accessible from our environment - no idea why, changing the CFBundleIdentifier (lowercase or whatever) does not help, neither does signing the app, installing using a PKG, etc..

We can run the exact same code from the system python interpreter though...
So the patch above attempted to load the notification center directly and when that fails resorts to running the same code using the system interpreter via exec. And that also fails mysteriously.
I even tried calling "osascript -e .." and using applescript via pyobjc. None of these solutions work.
I give up.

comment:3 Changed 4 weeks ago by Antoine Martin

See #1688

comment:4 Changed 2 weeks ago by Antoine Martin

Milestone: future2.3

Let's try again..

Note: See TracTickets for help on using tickets.