unbelievableflavour / snaptastic

A snap installer for Elementary OS
GNU General Public License v3.0
39 stars 4 forks source link

Application icons #52

Closed junocomp closed 5 years ago

junocomp commented 6 years ago

Would it be possible to show the application icons for all the snaps that are installed?

unbelievableflavour commented 5 years ago

I'm sorry, i tried to show the application icons. But the get_icon function gives me null. I also tried the get_screenshots() function but that gives me an empty array. @robert-ancell do you maybe have an idea what can be wrong?

robert-ancell commented 5 years ago

Are you using get_icon () from the result of a get_snap () or a find () call? The former gets the locally installed snap information which may contain an icon file (something like /snap/name/current/snap/gui/name.png). The latter gets the icon information from the store, which is more consistently available (it will be a URL). In the case of gnome-software we always query the store for the icons.

unbelievableflavour commented 5 years ago

I use this function to get the list. https://valadoc.org/snapd-glib/Snapd.Client.list_sync.html And i use https://valadoc.org/snapd-glib/Snapd.Client.find_sync.html to get specific packages. So list_sync and find_sync. I just tried them both again and the both give me null.

robert-ancell commented 5 years ago

To confirm, when you call get_icon() on the object you get back from Snapd.Client.find_sync() you get nothing? Which snap is this?

unbelievableflavour commented 5 years ago

I don't know why i didn't work the times before. Must have overlooked something... But huraayyyy! i got it working! It will be available in the next release.

unbelievableflavour commented 5 years ago

Its live, please test and close if it's ok.

peteruithoven commented 5 years ago

Works great, but I noticed that the icons's are a bit blurry. Could be caused by my HiDPI screen? screenshot from 2019-01-23 14 51 16 screenshot from 2019-01-23 14 51 38

unbelievableflavour commented 5 years ago

I have no idea. It looks fine on my screen.. Any ideas on what i can do about it?

unbelievableflavour commented 5 years ago

Ok, I made sure icon biggest icon that is found is used. Please check If it's fixed in master. If it's still an issue, please create a separate issue.