libera/#maemo-leste/ Wednesday, 2023-10-25

dsc_good day15:11
dsc_< uvos__> lots of notifcations behavior is simply hardcoded per origin15:11
dsc_I do not understand this 100%, so Hildon looks at the 'incoming dbus origin' ?15:13
dsc_e.g: I would change https://github.com/maemo-leste/conversations/blob/libnotify-qt/src/lib/libnotify-qt/Notification.cpp#L3515:13
dsc_to reflect: https://github.com/maemo-leste/hildon-home/blob/0d32a53e8a18b69e9472d56ea26a19cba210a649/src/notification-groups.conf#L1515:13
dsc_?15:13
dsc_even then, how would hildon know to map it to the conversations window?15:13
dsc_via `Destination=Rtcom-messaging-ui` ?15:14
dsc_so it would become `Destination=conversations` ?15:14
dsc_and then Hildon can find a window named 'conversations'15:17
Wizzupdsc_: I think that might be the binary name, not sure if it matches some other name15:21
WizzupI was thinking the same but wanted to research before asking you to try it :)15:22
dsc_ill try it :)15:22
uvosno15:23
uvosso theres some extended vendor proparty that specifices the "group"15:23
uvosthe dbus call in the config file is the call used to call the application on user interaction15:23
uvosi think the Destination is used by the implementor of RtcomNotificationUi but not sure15:24
uvosmainly i would say: all of this is horrible15:24
dsc_even if it is horrible, I just dont understand how to implement a notification that maps to a specific window15:25
uvosit makes mutch more sense to properly implement this using libnotify extensions15:25
uvosok so for mapping to a specific window15:27
uvosh-d must have the information15:27
uvosit dosent know what process a window comes from really15:27
uvosso i would expect that the notfication sets an atom and the applciation sets an atom on its window15:28
uvosthis could be destination15:28
Wizzupdsc_: maybe sphone's src/modules/notify-libnotify.c can help15:28
uvosexaming the atoms of a window pair that implements this is what you need15:28
uvosno sphone wont help you with this15:29
Wizzupdon't you do this on new sms?15:29
uvosits a well behaved xda compliant user of libnotify15:29
uvosno it dosent use any of this machinery15:29
Wizzupdsc_: I think we can start with what sphone does15:29
dsc_what does sphone do?15:29
Wizzupuvos ^ :)15:30
Wizzupgetting it on top of the conversations window is just a minor detail for me atm15:30
uvosit uses libnotify to span a regular xdg notification15:30
dsc_ok ill just do that15:30
uvosh-h then has a hardcoded subset of behaviors it dose when it cant find a "group"15:30
uvosit also dosent implement the full xdg spec15:31
dsc_oh, I spoke to soon. I wont do that.15:31
uvos(you get no led or sound for instance)15:31
uvossphoen compensates by playing a sound itself15:31
uvosanother problem you have to be carefull about is that there is a assumption that there is a notifaction que that h-h dose not implement, it simply spawns a new window for eatch notification15:32
Wizzupwe can fix the led/sound by fixing hildon-home, so don't worry about it for conversations15:33
uvosthis is quite broken, you can for instance crash hildon with gpodder by downloading a podcast15:33
uvossince eatch download generates a notification15:33
uvosand h-h will spawn windows untill the device runns out of resources15:33
uvosthis is a problem for sphone too15:33
uvoswhen manny sms are recieved when the device comes online again15:34
uvosso we rate limit this15:34
dsc_ill just use libnotify to spawn a notification, it will have its own window15:36
dsc_can fix this later by looking at hd in-depth15:36
Wizzupagreed, thanks15:36
Wizzupwhat you might want to do is save the notification id15:36
dsc_sure15:37
Wizzupso you can match that to the relevant action15:37
uvosh-h support only one action15:37
uvoswell 2 one is close15:37
Wizzupwhat I mean is open the right conversation15:37
uvosthis is conformant to a old version of the xdg protocoll15:37
uvosright ok15:37
uvosi gues you could also make converstaions a ui plugin for sphone and not worry about this :P15:39
Wizzupnot at this stage, but potentially later15:40
freemangordonuvos: I will start working on h-h, however, I still don;t get it how recent specs deal with what we have as vendor extension here17:06
freemangordonlike - is dbus callback in the specs?17:06
freemangordon"desktop-entry" hint?17:07
uvosyou could use that, or just have a dbus call vendor hint17:07
freemangordonok, but then we are still not in the specs17:07
uvoshaving vendor hints is in spec17:08
freemangordonok, but this will not work ouside of maemo17:08
freemangordonso what is the point?17:08
uvossure17:08
uvosthe point is that having hardcoded behavior is bad, having the bavior defined by hints is much better17:09
uvosalso things like the sounds one could implemt in base spec17:09
freemangordonyou mean "sound-file" etc?17:10
uvosyeah17:10
uvosthat would be nice17:10
freemangordonyeah, but that's a detail17:10
freemangordonok, lemme see17:10
uvosthe main thing is that it is imo assinine that if you want to have a email notification17:10
uvosyou must be the implementor of the modest dbus api17:10
uvosby simply passing the dbus api as a hint17:10
uvosthis would be resolved17:10
uvossame thing with the special behavior17:11
uvoslike stacking etc17:11
freemangordonso, you want me to remove that .conf file and used some hint instead?17:11
uvoswhy must i be a specifc application to get stackin notifications17:11
freemangordon*use17:11
uvosyeah essentally just shoeve all the stuff in that conf file into hints17:11
uvosyou could even have both17:12
uvosfor backward compatability17:12
freemangordonok, but what about multiple apps handling the same type of event?17:12
freemangordonthe same 'group'17:12
uvoswhat about that, if you have everything as hints it works fine17:12
freemangordonlike, if we have 2 mail clients17:12
uvosit dosent work at all atm17:12
freemangordonand bot set categoty to email17:13
freemangordon*both17:13
freemangordonwith separate dbus callbacks17:13
uvosif you have 2 mail clients theres no problem because eatch notification has the dbus api hint of what client to use to handle it17:13
freemangordonthis will go to one stack, no?17:13
freemangordonok, but the stack is only one17:13
freemangordonso, what the user clicks on the stack, which client shall we run?17:14
freemangordon*when the user17:14
uvosyour designing a new interface here17:14
uvosthe client has to send the Destination hint anyhow17:14
uvosuse that to make 2 stacks17:14
freemangordonI know, but if we allow everyone to set a 'callback' hint, we shall resolve the conflicts somehow17:14
freemangordonok17:15
uvosalso maybe notifications should allways be stacking17:15
uvosand use the dbus caller to make stacks (regardless of hints)17:15
uvossince the new window for eatch notification is a problem with lots of apps17:16
uvossince they expect a que17:16
freemangordonwhat specs say about that?17:16
freemangordon(if you know)17:16
freemangordonhmm, we have app_name17:17
uvosafaik nothing, but in practice telegram for instance will send a notification for eatch message that came in while you where offline when you log in, can easly be 100s of notifications17:17
freemangordonI see17:17
uvosalso gpodder will create a notification for eatch downloaded epsiode when you download a podcast17:17
freemangordondoes it set app_name?17:17
uvosagain 100s of potential notificaions17:17
uvosso in practice these appications expect a que17:17
uvosnot sure, will check when i get the chance17:18
freemangordonok17:18
freemangordonin the meanwhile I will think about how to properly group them17:18
freemangordonWizzup: do we have -devel repo for extras?20:51
freemangordonfigured it out, it is -testing21:02

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!