app-system: Remove get_tree
Make clients construct their own gmenu tree if they need it. https://bugzilla.gnome.org/show_bug.cgi?id=698486
This commit is contained in:
parent
6050ca6e0c
commit
200a9ef1af
@ -692,8 +692,7 @@ const AppDisplay = new Lang.Class({
|
|||||||
Name: 'AppDisplay',
|
Name: 'AppDisplay',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._appSystem = Shell.AppSystem.get_default();
|
Shell.AppSystem.get_default().connect('installed-changed', Lang.bind(this, function() {
|
||||||
this._appSystem.connect('installed-changed', Lang.bind(this, function() {
|
|
||||||
Main.queueDeferredWork(this._allAppsWorkId);
|
Main.queueDeferredWork(this._allAppsWorkId);
|
||||||
}));
|
}));
|
||||||
Main.overview.connect('showing', Lang.bind(this, function() {
|
Main.overview.connect('showing', Lang.bind(this, function() {
|
||||||
@ -809,7 +808,8 @@ const AppDisplay = new Lang.Class({
|
|||||||
|
|
||||||
view.removeAll();
|
view.removeAll();
|
||||||
|
|
||||||
let tree = this._appSystem.get_tree();
|
let tree = new GMenu.Tree({ menu_basename: "applications.menu" });
|
||||||
|
tree.load_sync();
|
||||||
let root = tree.get_root_directory();
|
let root = tree.get_root_directory();
|
||||||
|
|
||||||
let iter = root.iter();
|
let iter = root.iter();
|
||||||
|
@ -390,17 +390,6 @@ on_apps_tree_changed_cb (GMenuTree *tree,
|
|||||||
g_signal_emit (self, signals[INSTALLED_CHANGED], 0);
|
g_signal_emit (self, signals[INSTALLED_CHANGED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* shell_app_system_get_tree:
|
|
||||||
*
|
|
||||||
* Return Value: (transfer none): The #GMenuTree for apps
|
|
||||||
*/
|
|
||||||
GMenuTree *
|
|
||||||
shell_app_system_get_tree (ShellAppSystem *self)
|
|
||||||
{
|
|
||||||
return self->priv->apps_tree;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shell_app_system_get_default:
|
* shell_app_system_get_default:
|
||||||
*
|
*
|
||||||
|
@ -39,8 +39,6 @@ struct _ShellAppSystemClass
|
|||||||
GType shell_app_system_get_type (void) G_GNUC_CONST;
|
GType shell_app_system_get_type (void) G_GNUC_CONST;
|
||||||
ShellAppSystem *shell_app_system_get_default (void);
|
ShellAppSystem *shell_app_system_get_default (void);
|
||||||
|
|
||||||
GMenuTree *shell_app_system_get_tree (ShellAppSystem *system);
|
|
||||||
|
|
||||||
ShellApp *shell_app_system_lookup_app (ShellAppSystem *system,
|
ShellApp *shell_app_system_lookup_app (ShellAppSystem *system,
|
||||||
const char *id);
|
const char *id);
|
||||||
ShellApp *shell_app_system_lookup_app_for_path (ShellAppSystem *system,
|
ShellApp *shell_app_system_lookup_app_for_path (ShellAppSystem *system,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user