[Evolution-hackers] Problems with calendar notification under unity (eds >= 3.30)



Hi Milan,


1) 

I was reading https://gitlab.gnome.org/GNOME/gnome-shell/issues/155, and in e-alarm-notify.c#L253 it is adding a notificatio action, i.e a "Reminder" button. The problem is under Unity, notification server (notify-osd) doesn't support notification action. And hence instead of notification-bubble it pops up a dialog which is obtrusive. 

See https://pasteboard.co/HSpZBsW.png

In unity we also set notify-with-tray to false, so both dialog is appearing at the same time. For the time being I set notify-with-tray to true.

Will it be possible to check notification server capabilities before adding an action ? 

notify_get_ server_caps (https://developer.gnome.org/libnotify/unstable/libnotify-notify.html#notify-get-server-caps) simply return a list of strings. And we can compare if it contains "action". If not then the server doesn't support notification action and we can simply show the notification without adding an action.

2) 

That brings the question how in unity  we should show notification. Well in unity we can show notification in messeging menu and clicking it will simply bring forward hidden dialog from notification tray. 

If there is one single alarm pending, it will simply show evnt name with time, for multiple alarms it show "N alarms pending".

See https://pasteboard.co/HSq5AWk.png

See client-e xample.py in libmesseging-menu-dev (https://bazaar.launchpad.net/~indicator-applet-developers/indicator-messages/trunk.16.10/files/head:/libmessaging-menu/), I will come up with a better example later.

And we can check session the same way we can check for gnome. On Ubuntu, XDG_CURRENT_DESKTOP is "Unity7:Unity:Ubuntu"


For long we were doing things from indicator-datetime (https://git.launchpad.net/ubuntu/+source/indicator-datetime/tree/src/engine-eds.cpp?h=applied/ubuntu/devel), since evolution-alarm-notify was a part of evolution and evolution was not installed by default. But now since it is in eds I think it's better that we drop notification related code fr om indicator-datettime. There is no point replicating entire EReminderWatcher code into into it.

For 1) I can file a bug in gitlab. 

For 2) I have a prototype code, it can be patched in eds or we can do it from indicator-datetime or patch downstream.



3) Is there bus signal we can watch when a notification-tray appears ? I am watching "notify" signal from  ca.desrt.dconf.Writer and checking 'reminder-past' in 'org.gnome.evolution-data-server.calendar', but that's not very productive.

Let me know what you think.

Thank You.













[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]