GNOME Bugzilla – Bug 784588
Use AppStreamGlib for mapping of renamed .desktop IDs
Last modified: 2021-07-05 14:31:11 UTC
Inspired by https://blogs.gnome.org/hughsie/2017/07/05/using-a-reverse-style-application-ids-in-your-application/, see patches.
Created attachment 354981 [details] [review] appFavorites: Use AppStream for renamed apps if possible The map for renamed .desktop IDs introduced in commit cceac0d8fbce has been growing ever bigger. In the meantime, a similar mapping was added to AppStream, as well as the ability for apps to provide that data themselves. It seems silly to duplicate those mappings, and AppStreams provide-mechanism is clearly more flexible, so start using it with the goal of dropping our own hard-coded mapping at one point.
Created attachment 354982 [details] [review] appFavorites: Remove mappings provided by AppStream Drop any mapping that have been in AppStream long enough that we can assume their presence. In the long term, we should be able to remove our own mappings entirely ...
Review of attachment 354981 [details] [review]: not familiar with the api but seems to do what it's supposed to ::: js/ui/appFavorites.js @@ +56,3 @@ + AppStream.StoreLoadFlags.DESKTOP; + this._appDataStore = new AppStream.Store(); + this._appDataStore.load(loadFlags, null); Unfortunate that there's no async version
Review of attachment 354982 [details] [review]: ok
(In reply to Rui Matos from comment #3) > + this._appDataStore.load(loadFlags, null); > > Unfortunate that there's no async version Yeah, I agree: https://github.com/hughsie/appstream-glib/pull/176
Uploaded the patches to gitlab: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/41
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.