From 2c0d6fdf891a4baeb6bb1d3892d515403b5b3e8f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 3 Jun 2009 11:49:42 -0400 Subject: [PATCH] favorites --- js/ui/appDisplay.js | 2 +- src/shell-app-system.c | 16 ++++++++++++++++ src/shell-app-system.h | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 2c7d94c86..266e8bce3 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -267,7 +267,7 @@ AppDisplay.prototype = { _redisplay : function() { // Ask or more app than we need, since the list of recently used apps // might contain an app we don't have a desktop file for - var running = this._appMonitor.get_running_apps(); + var running = this._appMonitor.get_running_app_guesses(); for (let i = 0; i < running.length; i++) { let appId = apps[i] + ".desktop"; let appInfo = this._allItems[appId]; diff --git a/src/shell-app-system.c b/src/shell-app-system.c index 6ba92fb8e..8edb955ad 100644 --- a/src/shell-app-system.c +++ b/src/shell-app-system.c @@ -26,6 +26,8 @@ struct _ShellAppSystemPrivate { GSList *cached_app_menus; /* ShellAppMenuEntry */ GSList *cached_setting_ids; /* utf8 */ + + GSList *cached_favorites; /* utf8 */ }; static void shell_app_system_finalize (GObject *object); @@ -310,3 +312,17 @@ shell_app_system_get_all_settings (ShellAppSystem *monitor) { return monitor->priv->cached_setting_ids; } + +/** + * shell_app_system_get_favorites: + * + * Return the list of applications which have been explicitly added to the + * favorites. + * + * Return value: (transfer none) (element-type utf8): List of favorite application ids + */ +GSList * +shell_app_system_get_favorites (ShellAppSystem *system) +{ + return monitor->priv->cached_favorites; +} diff --git a/src/shell-app-system.h b/src/shell-app-system.h index 2bdd5971d..c74cb78e6 100644 --- a/src/shell-app-system.h +++ b/src/shell-app-system.h @@ -47,4 +47,6 @@ GSList *shell_app_system_get_menus (ShellAppSystem *system); GSList *shell_app_system_get_all_settings (ShellAppSystem *system); +GSList *shell_app_system_get_favorites (ShellAppSystem *system); + #endif /* __SHELL_APP_SYSTEM_H__ */