Install addons by spaced list; showInfo -> tooltip

Allow users to install multiple addons simultaneously listed by white spaces
without asking user to hit the key after installation.
This commit is contained in:
Dmitry Mikheev 2017-02-14 09:48:46 +05:00 committed by GitHub
parent 6df5ce71a0
commit 94894d3750

View file

@ -165,10 +165,12 @@ class GetAddons(QDialog):
def accept(self):
QDialog.accept(self)
# create downloader thread
ret = download(self.mw, self.form.code.text())
txt = self.form.code.text().split()
for x in txt:
ret = download(self.mw, x)
if not ret:
return
data, fname = ret
self.mw.addonManager.install(data, fname)
self.mw.progress.finish()
showInfo(_("Download successful. Please restart Anki."))
tooltip(_("Download successful. Please restart Anki."), period=3000)