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




Hi,

On Wed, Jan 2, 2019 at 5:32 PM, Milan Crha via evolution-hackers <evolution-hackers gnome org> wrote:
There's used GNotification and after a brief look I do not see any glib API which would allow to verify whether the notifications can have actions or not. That might be a call to them, to add such API, then evolution-data-server (eds) can use it. The eds doesn't use libnotify directly intentionally (it has less dependencies, especially when the same/similar API is provided by glib).

We can always query org.freedesktop.Notifications for that. Here is basic patch that is working.

https://paste.ubuntu.com/p/Td4nGvWq2v/

By default it doesn't add action if server doesn't support it, but it can be made to do it.




I'm afraid it's not a question for me. You can disable evolution-alarm- notify autostart in its .desktop file for Unity and have things working as before, regardless whether users have installed also Evolution or not. At least for the time being, until that GNOME Shell's #155 is done.

I rather use evolution-alarm-notify in unity. 

The implementation in indicator-datetime was for phone only. It has no concept of snoozing alarms on desktop. Alarm-notify was part of evolution before and evolution isn't default app in unity, hence the unity dev allowed to show notification in desktop too which never worked properly before. And phone is dead now, the code doesn't work anymore and we are thinking of removing entire phone-relate code from indicator-datetime to reduce workload.

But now that alarm-notify is in eds, there is not harm using it and it works way better with new dialog.




What would you exactly change on the eds side?


I have made a small patch. https://paste.ubuntu.com/p/xYdbJfHCyb/

Atm, it just checks if current_desktop == 'unity', and doesn't check if indicator-messages is running or the app we are registering with is valid (can be done with g_desktop_app_info_new), but it works. I use gnome-calendar since it's the default app.

Here is a screen-cast with both patch applied : https://youtu.be/oppUC-PWB7k

This probably can't go in upstream since indicator-messages is not in debian, but ayatana-indicator-messages is. Everything is same just the library name changes and we are in transition to ayatana indicators. I am not sure how it can be made to work with both library, but network-manager-applet already did that. I will take a look later.


I think the GNotification works on D-Bus, thus look there. Whether you'd be able to distinguish between notifications sent by evolution- alarm-notify and other notifications I do not know. Alarm notify itself doesn't send any special D-Bus signals. Again, all your work and time spent on this is only due to GNOME Shell's #155 not being fixed yet (well, as long as Unity derives from GNOME Shell).


I just realized that I can use EReminderWatcher::triggered signal and it will work.


Thanks.


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