GNOME Bugzilla – Bug 639959
notification: be compatible with various names of the icon data hint
Last modified: 2011-01-19 16:32:53 UTC
Namely, these are: - "image-data" in 1.2 - "image_data" in 1.1 - "icon_data" in previous iterations
Created attachment 178737 [details] [review] notification: be compatible with various names of the icon data hint The hint changed its name during various iterations of the notification daemon spec; be compatible with all of them.
Review of attachment 178737 [details] [review]: * I think the code needs to be changed to canonicalize to the latest version, not to the older icon_data that is used currently * I'd like to see brief comments mentioning versions - so like if (hints['icon_data']) // < version 1.1 of spec or whatever
Created attachment 178745 [details] [review] notification: be compatible with various names of the icon data hint The hint changed its name during various iterations of the notification daemon spec; be compatible with all of them.
Here's an updated patch, thanks for the review.
Review of attachment 178745 [details] [review]: ::: js/ui/notificationDaemon.js @@ +243,3 @@ + if (hints['image_data']) + hints['image-data'] = hints['image_data']; // version 1.1 of the spec + else if (hints['icon_data']) So, the end result of this logic is that priority is image_data, then icon_data, then image-data if multiple set. Which is weird. I think it's probably good to wrap this all in a if (!hints(['image-data'])) { [...] } Setting multiple would be weird of course, but I think it's better to do something logical. OK to commit with that change.
Attachment 178745 [details] pushed as 68c482e - notification: be compatible with various names of the icon data hint Pushed with the suggested change, thanks for the review.