mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
make length of deck browser customizable
This commit is contained in:
parent
e74539a7da
commit
0519826b82
2 changed files with 4 additions and 2 deletions
|
@ -98,6 +98,7 @@ class Config(dict):
|
|||
'loadLastDeck': False,
|
||||
'deckBrowserRefreshPeriod': 3600,
|
||||
'deckBrowserOrder': 0,
|
||||
'deckBrowserNameLength': 15,
|
||||
'deleteMedia': False,
|
||||
}
|
||||
for (k,v) in fields.items():
|
||||
|
|
|
@ -1155,8 +1155,9 @@ your deck."""))
|
|||
for c, deck in enumerate(self.browserDecks):
|
||||
# name
|
||||
n = deck['name']
|
||||
if len(n) > 15:
|
||||
n = n[:15] + "..."
|
||||
lim = self.config['deckBrowserNameLength']
|
||||
if len(n) > lim:
|
||||
n = n[:lim] + "..."
|
||||
mod = _("%s ago") % anki.utils.fmtTimeSpan(
|
||||
time.time() - deck['mod'])
|
||||
mod = "<font size=-1>%s</font>" % mod
|
||||
|
|
Loading…
Reference in a new issue