Rework internals of ShellAppMonitor to use Metacity library

The code here is significantly cleaner if we use the data Metacity
already has cached and validated, rather than talking to X directly.

Also some preparatory work for extending the monitor API by
clarifying the name of the (current) main entry point.
This commit is contained in:
Colin Walters
2009-05-26 17:22:51 -04:00
parent 0ea01b31af
commit 278a44caf1
4 changed files with 30 additions and 153 deletions

View File

@ -395,7 +395,7 @@ AppDisplay.prototype = {
_setDefaultList : 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 apps = this._appMonitor.get_apps (0, Math.round(MAX_ITEMS * 1.5));
var apps = this._appMonitor.get_most_used_apps (0, Math.round(MAX_ITEMS * 1.5));
this._matchedItems = [];
for (let i = 0; i < apps.length; i++) {
if (this._matchedItems.length > MAX_ITEMS)