GNOME Bugzilla – Bug 784588
Use AppStreamGlib for mapping of renamed .desktop IDs
Last modified: 2017-07-07 15:08:45 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