[gnome-shell/wip/desktop-file-index: 10/20] app-system: Remove get_tree
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/desktop-file-index: 10/20] app-system: Remove get_tree
- Date: Wed, 2 Oct 2013 13:59:55 +0000 (UTC)
commit 8a1fa92a4be3af2768db7cd3ff128da3d69bc4ef
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Apr 20 16:57:10 2013 -0400
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
js/ui/appDisplay.js | 6 +++---
src/shell-app-system.c | 11 -----------
src/shell-app-system.h | 2 --
3 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index e50e40d..2cbd944 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -692,8 +692,7 @@ const AppDisplay = new Lang.Class({
Name: 'AppDisplay',
_init: function() {
- this._appSystem = Shell.AppSystem.get_default();
- this._appSystem.connect('installed-changed', Lang.bind(this, function() {
+ Shell.AppSystem.get_default().connect('installed-changed', Lang.bind(this, function() {
Main.queueDeferredWork(this._allAppsWorkId);
}));
Main.overview.connect('showing', Lang.bind(this, function() {
@@ -809,7 +808,8 @@ const AppDisplay = new Lang.Class({
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 iter = root.iter();
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 2c7d26b..2a1abce 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -389,17 +389,6 @@ on_apps_tree_changed_cb (GMenuTree *tree,
}
/**
- * 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:
*
* Return Value: (transfer none): The global #ShellAppSystem singleton
diff --git a/src/shell-app-system.h b/src/shell-app-system.h
index 4305878..2fc294c 100644
--- a/src/shell-app-system.h
+++ b/src/shell-app-system.h
@@ -39,8 +39,6 @@ struct _ShellAppSystemClass
GType shell_app_system_get_type (void) G_GNUC_CONST;
ShellAppSystem *shell_app_system_get_default (void);
-GMenuTree *shell_app_system_get_tree (ShellAppSystem *system);
-
ShellApp *shell_app_system_lookup_app (ShellAppSystem *system,
const char *id);
ShellApp *shell_app_system_lookup_app_for_path (ShellAppSystem *system,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]