Bug 784588 - Use AppStreamGlib for mapping of renamed .desktop IDs
Use AppStreamGlib for mapping of renamed .desktop IDs
Status: NEW
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2017-07-05 23:39 UTC by Florian Müllner
Modified: 2017-07-07 15:08 UTC (History)
0 users

See Also:
GNOME target: ---
GNOME version: ---


Attachments
appFavorites: Use AppStream for renamed apps if possible (2.82 KB, patch)
2017-07-05 23:39 UTC, Florian Müllner
accepted-commit_now Details | Diff | Review
appFavorites: Remove mappings provided by AppStream (2.62 KB, patch)
2017-07-05 23:39 UTC, Florian Müllner
accepted-commit_now Details | Diff | Review

Comment 1 Florian Müllner 2017-07-05 23:39:21 UTC
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.
Comment 2 Florian Müllner 2017-07-05 23:39:27 UTC
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 ...
Comment 3 Rui Matos 2017-07-06 13:52:20 UTC
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
Comment 4 Rui Matos 2017-07-06 13:52:35 UTC
Review of attachment 354982 [details] [review]:

ok
Comment 5 Florian Müllner 2017-07-07 15:08:45 UTC
(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

Note You need to log in before you can comment on or make changes to this bug.