[#3001|GTK] Fix sorting to default to Added column
The sort function used when no column is being sorted was a lambda function that had no effect and had a bug. Instead default to sort by the added date. Also fixed the name column sort to lowercase and uppercase properly.
This commit is contained in:
parent
7a3b164060
commit
bd78bd2643
|
@ -194,7 +194,8 @@ class ListView(object):
|
|||
# Using the default sort column
|
||||
elif self.default_sort_column_id:
|
||||
self.model_filter.set_sort_column_id(self.default_sort_column_id, gtk.SORT_ASCENDING)
|
||||
self.model_filter.set_default_sort_func(lambda x: None)
|
||||
self.model_filter.set_default_sort_func(
|
||||
self.generic_sort_func, self.get_column_index('Added')[0])
|
||||
|
||||
def get_sort_column_from_state(self):
|
||||
"""Find the first (should only be one) state with sort enabled"""
|
||||
|
|
|
@ -265,6 +265,7 @@ class TorrentView(ListView, component.Component):
|
|||
_('Name'),
|
||||
status_field=['state', 'name'],
|
||||
function=funcs.cell_data_statusicon,
|
||||
sort_func=str_nocase_sort,
|
||||
default_sort=True,
|
||||
)
|
||||
self.add_func_column(
|
||||
|
|
Loading…
Reference in New Issue