简体   繁体   English

如何在 Flatpak GTK4 应用程序中获取外部应用程序的图标

[英]How to get the icon of an external app in a Flatpak GTK4 application

I am developing an app which would require to get the icon of an installed app on the system.我正在开发一个应用程序,它需要获取系统上已安装应用程序的图标。

My app is distributed as a Flatpak.我的应用程序作为 Flatpak 分发。

I tried Gtk.Icon.new_from_icon_name() but with no luck.我试过Gtk.Icon.new_from_icon_name()但没有运气。

Can anybody help?有人可以帮忙吗? Thanks谢谢

Sometimes I don't understand how Flatpak works: my manifest included "--filesystem=host" but that was not enough有时我不明白 Flatpak 是如何工作的:我的清单包括"--filesystem=host" ,但这还不够

I added "--filesystem=xdg-data/icons:ro" and now it is working..我添加了"--filesystem=xdg-data/icons:ro" ,现在它正在工作..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM