mirror of
https://github.com/ankitects/anki.git
synced 2025-12-11 05:46:55 -05:00
fix browser updateTitle()
This commit is contained in:
parent
1c5f94d46f
commit
c1e6149a1b
2 changed files with 6 additions and 7 deletions
|
|
@ -14,6 +14,7 @@ from typing import Callable, List, Optional, Sequence, Tuple, Union, cast
|
|||
import anki
|
||||
import aqt
|
||||
import aqt.forms
|
||||
from anki.lang import without_unicode_isolation
|
||||
from anki.cards import Card
|
||||
from anki.collection import Collection
|
||||
from anki.consts import *
|
||||
|
|
@ -820,10 +821,10 @@ class Browser(QMainWindow):
|
|||
def updateTitle(self):
|
||||
selected = len(self.form.tableView.selectionModel().selectedRows())
|
||||
cur = len(self.model.cards)
|
||||
print("fixme: browser updateTitle()")
|
||||
self.setWindowTitle(
|
||||
"Browse (%(cur)d cards shown; %(sel)s)"
|
||||
% {"cur": cur, "sel": self.col.tr(TR.BROWSING_SELECTED, count=selected)}
|
||||
without_unicode_isolation(
|
||||
tr(TR.BROWSING_WINDOW_TITLE, total=cur, selected=selected)
|
||||
)
|
||||
)
|
||||
return selected
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,5 @@ browsing-note-deleted = { $count ->
|
|||
[one] { $count } note deleted.
|
||||
*[other] { $count } notes deleted.
|
||||
}
|
||||
browsing-selected = { $count ->
|
||||
[one] { $count } selected
|
||||
*[other] { $count } selected
|
||||
}
|
||||
browsing-window-title = Browse ({ $selected } of { $total } cards selected)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue