-
Notifications
You must be signed in to change notification settings - Fork 314
macOS: Post user notifications using QSystemTrayIcon #114
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
Conversation
Will this still use macOS'es Notification Center? |
Yes, it will.
Tested on non code signed apps: |
Concept ACK |
How do I produce a notification on macOS this way?
But sending transactions back and forth doesn't trigger a notification. I tried making a DMG and installing from that locally. I don't mind making things a bit more annoying for self-compilation on macOS if it allows dropping a whole bunch of deprecated code. |
Tested on macOS 10.15:
|
No.
This error happens when you run I tested this branch and notifications seem to work fine, although I don't remember seeing the cloud with the exclamation point before: |
macOS 10.15.7. Qt 5.15.1. |
I've re-tested one more time.
Correct. To make this PR work on macOS one should run Some screenshots: |
|
Is the current notification support on macOS in master broken? If so, this qualifies as a bugfix I'd say. |
No, it isn't. |
Thank you for reviewing!
I think some behavior could be assigned to the tray icon, but it would be unusual for macOS UX, no?
Do we need to avoid it? |
I'd leave adding tray icon functionality for a follow up as it will probably raise another discussion.
Ok, Going to patch it. |
Notification TitleNitpick for the notification title. Since the logo is already included its not necessary to repeat "Bitcoin Core". Context MenuWRT the menu bar context menu options. Personally I'd like to be able to quickly start/stop syncing cause I'm not always on a consistent connection.
Menu Bar App: Concept@GBKS took conceptual look at what the design for a menu bar app could look like. Perhaps he can give some input - it also focused on network activity switch.
|
@johnsBeharry macOS notifications always have the application name in the title. It's also good for accessibility, think voice readers. |
I missed the new tray icon in my tests and only focused on the actual notification. |
This is the mac Qt code for further analysis: https://github.com/qt/qtbase/blob/81e09ae404b632a92e1e4c27f5875bdf027c5401/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm |
No.
If a tray icon is hidden, |
It uses the deprecated |
While the menu app concept looks nice, I do think users should be able to disable it if they want, and shouldn't lose notifications by doing so... |
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Only visible icon allows notifications via Another approach is to use the new I'll readily close this PR in favor of any alternative one. |
MacOS 10.14.6 (18G103) I agree with @jonasschnelli on the menu icon. build command used...rm -f src/bitcoind && rm -rf Bitcoin-Qt.app && rm -rf ~/Library/Saved\ Application\ State/org.bitcoinfoundation.Bitcoin-Qt.savedState && rm -rf ~/Library/Preferences/org.bitcoin.Bitcoin-Qt.plist && make appbundle && wait && ./Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt |
Closing as I cannot see the way to provide notifications in Qt way without the visible global menu icon. |
@jonasschnelli Could be labeled "Up for grabs" :) |
Pros:
NSUserNotificationCenter
Cons:
Close #112
Note: no Growl is required :)