apps-menu: Fix for gnome-shell master

Some convenience functions were dropped from ShellAppSystem.
This commit is contained in:
Florian Müllner
2013-11-08 16:26:17 +00:00
parent a7f7db59c7
commit 7dac0859f5
+5 -3
View File
@@ -388,8 +388,9 @@ const ApplicationsButton = new Lang.Class({
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.ENTRY) {
let entry = iter.get_entry();
if (!entry.get_app_info().get_nodisplay()) {
let app = appSys.lookup_app_by_tree_entry(entry);
let appInfo = entry.get_app_info();
let app = appSys.lookup_app(entry.get_desktop_file_id());
if (appInfo.should_show()) {
let menu_id = dir.get_menu_id();
this.applicationsByCategory[categoryId].push(app);
}
@@ -485,7 +486,8 @@ const ApplicationsButton = new Lang.Class({
//Load categories
this.applicationsByCategory = {};
let tree = appSys.get_tree();
let tree = new GMenu.Tree({ menu_basename: 'applications.menu' });
tree.load_sync();
let root = tree.get_root_directory();
let categoryMenuItem = new CategoryMenuItem(this, null);
this.categoriesBox.add_actor(categoryMenuItem.actor);