naughty: remove score system, merge presets

Scoring is broken, it's more useful to merge all presets, and declares that
order matters.
This commit is contained in:
Julien Danjou 2011-12-27 11:23:51 +01:00
parent 0f5d2d56b9
commit 87ce51d2e9
1 changed files with 1 additions and 6 deletions

View File

@ -484,17 +484,12 @@ if capi.dbus then
return
end
end
local score = 0
for i, obj in pairs(config.mapping) do
local filter, preset, s = obj[1], obj[2], 0
if (not filter.urgency or filter.urgency == hints.urgency) and
(not filter.category or filter.category == hints.category) and
(not filter.appname or filter.appname == appname) then
for j, el in pairs(filter) do s = s + 1 end
if s > score then
score = s
args.preset = preset
end
args.preset = util.table.join(args.preset, preset)
end
end
if not args.preset.callback or (type(args.preset.callback) == "function" and