Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the same attempt to fix #1493, in which we separate
Gio.ThemedIcon
fromGio.LoadableIcon
but now with theconst
keyword and using list unpacking, as is done in similar pieces around the file.I apologise for closing the previous merge request, GitHub asked to remove my previous commit when I clicked to sync my branch.
I read the documentation on how to cache and async it, but I couldn't make sense of the documentation, sorry.
When
iconTexture
is aGio.ThemedIcon
, it seems we can use choose_icon or lookup_icon, and the former is better suited as it's able to check for all possible names (which is useful as Papirus theme doesn't use the first name available fordrive-harddisk
).There's also a fourth case that I have trouble replicating, in which the icon is an emblem (I don't know the icon type), such as when an external HD is mounted. This doesn't apply to other emblem-like icons, such as mounted network devices and the trash can. This emblem raises aiconTexture.load is not a function
error.