app-usage: Remove crufty old "context"s idea

Back in the day, there was a proposed system of tracking apps in a
specific context.

The inspiration was that you may have used apps in multiple modes:
Firefox may have been used in both "Programmer Reference" and
"Kitten Videos" contexts. Early user response to the feedback wasn't
too positive - context switching is something that humans have trouble
doing implicitly, let alone explicitly. The old codebase still has a
few remnants of this around; let's finally put them to rest.

Note that we still write out a dummy context tag to the XML file - old
versions of the shell will flat out crash if you don't have one of those
in there, so just leave it in for compatibility sake.

https://bugzilla.gnome.org/show_bug.cgi?id=673767
This commit is contained in:
Jasper St. Pierre
2012-04-09 03:27:47 -03:00
committed by Jonas Ådahl
parent 52c59ac0dd
commit 04d7069d83
6 changed files with 55 additions and 273 deletions

View File

@ -809,11 +809,11 @@ var FrequentView = new Lang.Class({
},
hasUsefulData() {
return this._usage.get_most_used("").length >= MIN_FREQUENT_APPS_COUNT;
return this._usage.get_most_used().length >= MIN_FREQUENT_APPS_COUNT;
},
_loadApps() {
let mostUsed = this._usage.get_most_used ("");
let mostUsed = this._usage.get_most_used();
let hasUsefulData = this.hasUsefulData();
this._noFrequentAppsLabel.visible = !hasUsefulData;
if(!hasUsefulData)
@ -1112,7 +1112,7 @@ var AppSearchProvider = new Lang.Class({
return app && app.should_show();
});
results = results.concat(group.sort(
(a, b) => usage.compare('', a, b)
(a, b) => usage.compare(a, b)
));
});