Split ShellAppMonitor into ShellWindowTracker, ShellAppUsage
The two parts were mapping windows to applications, and recording application usage statistics. The latter part (now called ShellAppUsage) is much more naturally built on top of the former (now called ShellWindowTracker). ShellWindowTracker retains the startup-notification handling. ShellWindowTracker also gains a focus-app property, which is what most things in the shell UI are interested in (instead of window focus). ShellAppSystem moves to exporting ShellApp from more of its public API, rather than ShellAppInfo. ShellAppSystem also ensures that ShellApp instances are unique by holding a hash on the ids. ShellApp's private API is split off into a shell-app-private.h, so shell-app.h can be included in shell-app-system.h. Favorites handling is removed from ShellAppSystem, now inside appFavorites.js. Port all of the JavaScript for these changes. https://bugzilla.gnome.org/show_bug.cgi?id=598646
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <gio/gio.h>
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
#include "shell-app.h"
|
||||
#include "window.h"
|
||||
|
||||
#define SHELL_TYPE_APP_SYSTEM (shell_app_system_get_type ())
|
||||
@@ -75,9 +76,11 @@ gboolean shell_app_info_launch (ShellAppInfo *info,
|
||||
|
||||
ShellAppInfo *shell_app_system_load_from_desktop_file (ShellAppSystem *system, const char *filename, GError **error);
|
||||
|
||||
ShellAppInfo *shell_app_system_lookup_cached_app (ShellAppSystem *system, const char *id);
|
||||
ShellApp *shell_app_system_get_app (ShellAppSystem *system, const char *id);
|
||||
|
||||
ShellAppInfo *shell_app_system_lookup_heuristic_basename (ShellAppSystem *system, const char *id);
|
||||
void _shell_app_system_register_app (ShellAppSystem *self, ShellApp *app);
|
||||
|
||||
ShellApp *shell_app_system_lookup_heuristic_basename (ShellAppSystem *system, const char *id);
|
||||
|
||||
ShellAppInfo *shell_app_system_create_from_window (ShellAppSystem *system, MetaWindow *window);
|
||||
|
||||
@@ -85,10 +88,4 @@ GSList *shell_app_system_get_menus (ShellAppSystem *system);
|
||||
|
||||
GSList *shell_app_system_get_all_settings (ShellAppSystem *system);
|
||||
|
||||
GList *shell_app_system_get_favorites (ShellAppSystem *system);
|
||||
|
||||
void shell_app_system_add_favorite (ShellAppSystem *system, const char *id);
|
||||
|
||||
void shell_app_system_remove_favorite (ShellAppSystem *system, const char *id);
|
||||
|
||||
#endif /* __SHELL_APP_SYSTEM_H__ */
|
||||
|
Reference in New Issue
Block a user