Commit 4075db7f authored by Bram Schoenmakers's avatar Bram Schoenmakers

Default to the configured sort string when not given by the user

parent 84382659
......@@ -16,7 +16,7 @@
import configparser
from topydo.lib.Config import home_config_path
from topydo.lib.Config import home_config_path, config
def columns():
"""
......@@ -35,7 +35,7 @@ def columns():
defaults = {
'title': 'Yet another column',
'filterexpr': '',
'sortexpr': 'desc:prio',
'sortexpr': config().sort_string(),
'show_all': '0',
}
......
......@@ -16,6 +16,8 @@
import urwid
from topydo.lib.Config import config
class ViewWidget(urwid.LineBox):
def __init__(self, p_todolist):
self._todolist = p_todolist
......@@ -48,7 +50,7 @@ class ViewWidget(urwid.LineBox):
def data(self):
return {
'title': self.titleedit.edit_text,
'sortexpr': self.sortedit.edit_text,
'sortexpr': self.sortedit.edit_text or config().sort_string(),
'filterexpr': self.filteredit.edit_text,
'show_all': self.allradio.state,
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment