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:
Colin Walters
2009-10-15 19:28:29 -04:00
parent 77cf9ae077
commit e941e8088b
20 changed files with 2162 additions and 2165 deletions

View File

@ -59,8 +59,8 @@ AltTabPopup.prototype = {
},
show : function(backward) {
let appMonitor = Shell.AppMonitor.get_default();
let apps = appMonitor.get_running_apps ("");
let tracker = Shell.WindowTracker.get_default();
let apps = tracker.get_running_apps ("");
if (!apps.length)
return false;