ShellAppSystem: Support loading a .desktop file directly
Previously, ShellAppSystem only loaded (and cached) the set of .desktop files from applications.menu and settings.menu, using the gnome-menus library. The ShellAppInfo structure was a "hidden typedef" for GMenuTreeEntry. But we need to support loading an arbitrary .desktop file. Thus, refactor the ShellAppInfo into a real struct, with a refcount, and allow it to point to either a GMenuTreeEntry or a GKeyFile. Also, in the case where we fail to lookup an icon for an application, ensure we return a 0 opacity texture.
This commit is contained in:
@ -318,7 +318,7 @@ AppsWidget.prototype = {
|
||||
let appSystem = Shell.AppSystem.get_default();
|
||||
let apps = appSystem.get_favorites();
|
||||
for (let i = 0; i < apps.length; i++) {
|
||||
let app = appSystem.lookup_app(apps[i]);
|
||||
let app = appSystem.lookup_cached_app(apps[i]);
|
||||
if (!app)
|
||||
continue;
|
||||
this.addItem(new AppsWidgetInfo(app));
|
||||
|
Reference in New Issue
Block a user