don't bother reporting used media; fix ctrl+l latex conflict with card layout

This commit is contained in:
Damien Elmes 2010-12-11 02:13:27 +09:00
parent 451b77cd46
commit 73bd124b6c
2 changed files with 10 additions and 6 deletions

View file

@ -3048,20 +3048,24 @@ doubt."""))
delete = True delete = True
else: else:
return return
(have, nohave, unused) = rebuildMediaDir(self.deck, delete=delete) (nohave, unused) = rebuildMediaDir(self.deck, delete=delete)
# generate report # generate report
report = ngettext("%d media in use.", "%d media in use.", have) % have report = ""
if nohave: if nohave:
report += "\n\n" + _( report += _(
"Used on cards but missing from media folder:") "Used on cards but missing from media folder:")
report += "\n" + "\n".join(nohave) report += "\n" + "\n".join(nohave)
if unused: if unused:
if report:
report += "\n\n"
if delete: if delete:
report += "\n\n" + _("Deleted unused:") report += _("Deleted unused:")
else: else:
report += "\n\n" + _( report += _(
"In media folder but not used by any cards:") "In media folder but not used by any cards:")
report += "\n" + "\n".join(unused) report += "\n" + "\n".join(unused)
if not report:
report = _("No unused or missing files found.")
ui.utils.showText(report, parent=self, type="text") ui.utils.showText(report, parent=self, type="text")
def onDownloadMissingMedia(self): def onDownloadMissingMedia(self):

View file

@ -3722,7 +3722,7 @@
<string>Card Layout...</string> <string>Card Layout...</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+L</string> <string>Ctrl+Shift+L</string>
</property> </property>
</action> </action>
</widget> </widget>