This commit is contained in:
Kovid Goyal 2011-02-11 10:40:08 -07:00
commit 835faaa591

View File

@ -60,7 +60,8 @@ class Tweak(object): # {{{
return ans return ans
def __cmp__(self, other): def __cmp__(self, other):
return cmp(self.is_customized, getattr(other, 'is_customized', False)) return -1 * cmp(self.is_customized,
getattr(other, 'is_customized', False))
@property @property
def is_customized(self): def is_customized(self):
@ -139,6 +140,7 @@ class Tweaks(QAbstractListModel): # {{{
pos = self.read_tweak(lines, pos, dl, l) pos = self.read_tweak(lines, pos, dl, l)
pos += 1 pos += 1
self.tweaks.sort()
default_keys = set(dl.iterkeys()) default_keys = set(dl.iterkeys())
custom_keys = set(l.iterkeys()) custom_keys = set(l.iterkeys())