1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#138] Added PE-specific prioritizations and adjusted PE cocoa proj to the pri dialog.

This commit is contained in:
Virgil Dupras
2011-09-16 12:44:20 -04:00
parent 664803c2ca
commit 26e81a8cbf
4 changed files with 82 additions and 8 deletions

View File

@@ -97,10 +97,13 @@ class NumericalCategory(CriterionCategory):
def format_criterion_value(self, value):
return tr("Highest") if value == self.HIGHEST else tr("Lowest")
def invert_numerical_value(self, value): # Virtual
return value * -1
def sort_key(self, dupe, crit_value):
value = self.extract_value(dupe)
if crit_value == self.HIGHEST: # we want highest values on top
value *= -1
value = self.invert_numerical_value(value)
return value
def criteria_list(self):