favorites

This commit is contained in:
Colin Walters 2009-06-03 11:49:42 -04:00
parent 12f896eb94
commit 2c0d6fdf89
3 changed files with 19 additions and 1 deletions

View File

@ -267,7 +267,7 @@ AppDisplay.prototype = {
_redisplay : function() { _redisplay : function() {
// Ask or more app than we need, since the list of recently used apps // 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 // 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++) { for (let i = 0; i < running.length; i++) {
let appId = apps[i] + ".desktop"; let appId = apps[i] + ".desktop";
let appInfo = this._allItems[appId]; let appInfo = this._allItems[appId];

View File

@ -26,6 +26,8 @@ struct _ShellAppSystemPrivate {
GSList *cached_app_menus; /* ShellAppMenuEntry */ GSList *cached_app_menus; /* ShellAppMenuEntry */
GSList *cached_setting_ids; /* utf8 */ GSList *cached_setting_ids; /* utf8 */
GSList *cached_favorites; /* utf8 */
}; };
static void shell_app_system_finalize (GObject *object); 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; 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;
}

View File

@ -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_all_settings (ShellAppSystem *system);
GSList *shell_app_system_get_favorites (ShellAppSystem *system);
#endif /* __SHELL_APP_SYSTEM_H__ */ #endif /* __SHELL_APP_SYSTEM_H__ */