mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47:12 -05:00
Let users extend their bottom buttons functions
Like this:
```
aqt.deckbrowser.DeckBrowser.drawLinks.extend([
["", "rebuildAll", _("Rebuild All")],
["", "emptyAll", _("Empty All")],
])
```
This commit is contained in:
parent
e8777e8630
commit
5bfd93842c
1 changed files with 6 additions and 5 deletions
|
|
@ -333,14 +333,15 @@ where id > ?""", (self.mw.col.sched.dayCutoff-86400)*1000)
|
||||||
# Top buttons
|
# Top buttons
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
def _drawButtons(self):
|
drawLinks = [
|
||||||
links = [
|
|
||||||
["", "shared", _("Get Shared")],
|
["", "shared", _("Get Shared")],
|
||||||
["", "create", _("Create Deck")],
|
["", "create", _("Create Deck")],
|
||||||
["Ctrl+I", "import", _("Import File")],
|
["Ctrl+I", "import", _("Import File")], # Ctrl+I works from menu
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def _drawButtons(self):
|
||||||
buf = ""
|
buf = ""
|
||||||
for b in links:
|
for b in drawLinks:
|
||||||
if b[0]:
|
if b[0]:
|
||||||
b[0] = _("Shortcut key: %s") % shortcut(b[0])
|
b[0] = _("Shortcut key: %s") % shortcut(b[0])
|
||||||
buf += """
|
buf += """
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue