It uses GThreadPool
, so calculations are made in parallel and the extension is non-blocking.
This is the first time I use the new NautilusPropertiesModel
and NautilusPropertiesItem
objects. I have two thoughts:
- If a file is particularly big I wanted to show the “Calculating…” content until the calculator thread terminates the computing and finally replace it with the checksum, but
NautilusPropertiesItem:value
is construct-only, and so the only thing I can do with big files is showing an empty window until the checksums are ready. Do you think it could be possible to removeG_PARAM_CONSTRUCT_ONLY
fromNautilusPropertiesItem:value
and update the API accordingly?
(With very big files the window gets populated after a few seconds)
- In my opinion this is linked to what I was saying in this post, i.e. that it is not needed to move the extension API to a separate process: when something works better asynchronously – like this case of checksums – developers already know how to start new threads/processes, and will do that on their own.
My two cents
―madmurphy