Community
Participate
Working Groups
It would be nice if SWT gives way to apps to make use of OS notification services. Preliminary research shows that all supported WSs have some sort of support for that. • Win https://msdn.microsoft.com/en-us/library/windows/desktop/ee330740(v=vs.85).aspx • Gtk https://wiki.gnome.org/HowDoI/GNotification • Mac https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/Introduction.html I particularly like the simplicity of GNotification (https://developer.gnome.org/gio//2.40/gio-GNotification.html) API and find it good model to base SWT API on. Refer to bug 229823 for ideas/work on implementing it at Platform.UI level.
Alex, have you done any research on what the different platforms allow and how their API is different?
It's worth noting that GtkStatusIcon is deprecated in favour of using GNotifications. Currently we use GtkStatusIcon in TrayItem so porting to GNotifications would be useful.
Further to Eric's comment on GTK, on the Mac the TrayItem widget is not using the OS Notification services but provides what can only be graciously described as a Windows-equivalent experience. Moving to the Mac OS notification services would be a huge improvement.
So if we have someone on the Mac/Cocoa side and assuming we have on the Gtk/Linux side we can start shaping API. 2 out of 3 is fine and win32 can catch up later.
(In reply to Alexander Kurtakov from comment #4) > So if we have someone on the Mac/Cocoa side and assuming we have on the > Gtk/Linux side we can start shaping API. 2 out of 3 is fine and win32 can > catch up later. Bug 502090 will be a blocker for Cocoa as NSNotification framework is not in bridge support files.
(In reply to Mikaël Barbero from comment #5) > Bug 502090 will be a blocker for Cocoa as NSNotification framework is not in > bridge support files. I meant NSUserNotification framework (In reply to Alexander Kurtakov from comment #0) > I particularly like the simplicity of GNotification > (https://developer.gnome.org/gio//2.40/gio-GNotification.html) API and find > it good model to base SWT API on. Here is the API on macOS https://developer.apple.com/reference/foundation/nsusernotification. A common API with GTK should not be hard to find.
*** Bug 376820 has been marked as a duplicate of this bug. ***
*** Bug 508153 has been marked as a duplicate of this bug. ***
Probably this will be a good start from : mac os x http://www.gbosystems.com/projects/pn0001/
Moving to 4.9, please re-target as required.
Moving out of 4.9. Please re-target as required.
Is there already work in progress ? Can I contribute something (with some help) ?
(In reply to Philippe Brossel from comment #12) > Is there already work in progress ? I don't think so. > Can I contribute something (with some help) ? Sure, any help is welcome! Alex, can you hold hands here?
(In reply to Dani Megert from comment #13) > (In reply to Philippe Brossel from comment #12) > > Is there already work in progress ? > I don't think so. > > > > Can I contribute something (with some help) ? > Sure, any help is welcome! Alex, can you hold hands here? IMHO getting bug 229823 first is better and we have pure JFace notification for apps to use (like Mylyn notifications) as it will allow apps to have smth. I have experimented with Gnotifications one only to face some limitations like mandatory need for desktop file to activate the app in order for notification to be shown on Gnome and IIRC Mikael Barbero pointed me to something similar that has to be set in some config file foreach app to be set in order for notifications to work on Mac OS. Later on, there could be preference on Platform UI level whether to use JFace or SWT notifications, but I'm afraid we will need changes in many places (including distribution) in order to get native notifications to work proper. P.S. I have no idea about Windows.
(In reply to Alexander Kurtakov from comment #14) > (In reply to Dani Megert from comment #13) > > (In reply to Philippe Brossel from comment #12) > > > Is there already work in progress ? > > I don't think so. > > > > > > > Can I contribute something (with some help) ? > > Sure, any help is welcome! Alex, can you hold hands here? > > IMHO getting bug 229823 first is better and we have pure JFace notification > for apps to use (like Mylyn notifications) as it will allow apps to have > smth. > I have experimented with Gnotifications one only to face some limitations > like mandatory need for desktop file to activate the app in order for > notification to be shown on Gnome and IIRC Mikael Barbero pointed me to > something similar that has to be set in some config file foreach app to be > set in order for notifications to work on Mac OS. > Later on, there could be preference on Platform UI level whether to use > JFace or SWT notifications, but I'm afraid we will need changes in many > places (including distribution) in order to get native notifications to work > proper. > P.S. I have no idea about Windows. I've already started with bug 229823 because there was hope to get a working solution more quickly : https://git.eclipse.org/r/133272 Would you mind taking a look into it if you find some time to spend ?
(In reply to Philippe Brossel from comment #15) > (In reply to Alexander Kurtakov from comment #14) > > (In reply to Dani Megert from comment #13) > > > (In reply to Philippe Brossel from comment #12) > > > > Is there already work in progress ? > > > I don't think so. > > > > > > > > > > Can I contribute something (with some help) ? > > > Sure, any help is welcome! Alex, can you hold hands here? > > > > IMHO getting bug 229823 first is better and we have pure JFace notification > > for apps to use (like Mylyn notifications) as it will allow apps to have > > smth. > > I have experimented with Gnotifications one only to face some limitations > > like mandatory need for desktop file to activate the app in order for > > notification to be shown on Gnome and IIRC Mikael Barbero pointed me to > > something similar that has to be set in some config file foreach app to be > > set in order for notifications to work on Mac OS. > > Later on, there could be preference on Platform UI level whether to use > > JFace or SWT notifications, but I'm afraid we will need changes in many > > places (including distribution) in order to get native notifications to work > > proper. > > P.S. I have no idea about Windows. > > I've already started with bug 229823 because there was hope to get a working > solution more quickly : https://git.eclipse.org/r/133272 > Would you mind taking a look into it if you find some time to spend ? Sure, either me or someone else from my team will have a look once 4.11 development opens.
Created attachment 276778 [details] Simple solution based on ToolTip SWT.BALLOON Simple solution based on : org.eclipse.swt.widgets.ToolTip.ToolTip (style=SWT.BALLOON) org.eclipse.swt.widgets.TrayItem
(In reply to Philippe Brossel from comment #17) > Created attachment 276778 [details] > Simple solution based on ToolTip SWT.BALLOON > > Simple solution based on : > > org.eclipse.swt.widgets.ToolTip.ToolTip (style=SWT.BALLOON) > org.eclipse.swt.widgets.TrayItem I developped this simple solution running on windows a couple of years ago using SWT. There are some drawbacks : - only simple messages with 1 image and 1 text - needs an entry in the system tray - cannot control how long it shows - no way to see a 'missed' notification again I understand that you are looking for a more 'modern' approach. Is there already a clear idea of the expected behaviour/functionnalty ? Can I help to further investigate on that ?
(In reply to Philippe Brossel from comment #18) > I understand that you are looking for a more 'modern' approach. > > Is there already a clear idea of the expected behaviour/functionnalty ? It sounds like you want to discuss this in bug 229823. This one here is pretty limited to what the OS offers, i.e. Notification Center on macOS, Windows and Gnome.
Hopefully here is all about native OS notification...
(In reply to Gunnar Wagenknecht from comment #19) > (In reply to Philippe Brossel from comment #18) > > > I understand that you are looking for a more 'modern' approach. > > > > Is there already a clear idea of the expected behaviour/functionnalty ? > > > It sounds like you want to discuss this in bug 229823. This one here is > pretty limited to what the OS offers, i.e. Notification Center on macOS, > Windows and Gnome. Right, bug 229823 is more what I was looking for. I'm currently trying to contribute an SWT-Based solution there : https://git.eclipse.org/r/133272 In any case, many thanks to all for the time spent.