mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
remove separate optimize db option, report new size on db check
This commit is contained in:
parent
d18d73b21b
commit
986d605a44
2 changed files with 13 additions and 36 deletions
|
@ -2505,7 +2505,6 @@ This deck already exists on your computer. Overwrite the local copy?"""),
|
||||||
self.connect(m.actionUndo, s, self.onUndo)
|
self.connect(m.actionUndo, s, self.onUndo)
|
||||||
self.connect(m.actionRedo, s, self.onRedo)
|
self.connect(m.actionRedo, s, self.onRedo)
|
||||||
self.connect(m.actionFullDatabaseCheck, s, self.onCheckDB)
|
self.connect(m.actionFullDatabaseCheck, s, self.onCheckDB)
|
||||||
self.connect(m.actionOptimizeDatabase, s, self.onOptimizeDB)
|
|
||||||
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
|
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
|
||||||
self.connect(m.actionDownloadMissingMedia, s, self.onDownloadMissingMedia)
|
self.connect(m.actionDownloadMissingMedia, s, self.onDownloadMissingMedia)
|
||||||
self.connect(m.actionLocalizeMedia, s, self.onLocalizeMedia)
|
self.connect(m.actionLocalizeMedia, s, self.onLocalizeMedia)
|
||||||
|
@ -3069,11 +3068,6 @@ Any changes on the server since your last sync will be lost.<br>
|
||||||
Proceed?""")):
|
Proceed?""")):
|
||||||
return
|
return
|
||||||
ret = self.deck.fixIntegrity()
|
ret = self.deck.fixIntegrity()
|
||||||
if ret == "ok":
|
|
||||||
ret = True
|
|
||||||
ui.utils.showInfo(_("No problems found."))
|
|
||||||
else:
|
|
||||||
ret = _("Problems found:\n%s") % ret
|
|
||||||
diag = QDialog(self)
|
diag = QDialog(self)
|
||||||
diag.setWindowTitle("Anki")
|
diag.setWindowTitle("Anki")
|
||||||
layout = QVBoxLayout(diag)
|
layout = QVBoxLayout(diag)
|
||||||
|
@ -3090,10 +3084,6 @@ Proceed?""")):
|
||||||
self.reset()
|
self.reset()
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def onOptimizeDB(self):
|
|
||||||
size = self.deck.optimize()
|
|
||||||
ui.utils.showInfo(_("Database optimized.\nShrunk by %dKB") % (size/1024.0))
|
|
||||||
|
|
||||||
def onCheckMediaDB(self):
|
def onCheckMediaDB(self):
|
||||||
mb = QMessageBox(self)
|
mb = QMessageBox(self)
|
||||||
mb.setWindowTitle(_("Anki"))
|
mb.setWindowTitle(_("Anki"))
|
||||||
|
|
|
@ -3081,7 +3081,6 @@
|
||||||
<string>Ad&vanced</string>
|
<string>Ad&vanced</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionFullDatabaseCheck"/>
|
<addaction name="actionFullDatabaseCheck"/>
|
||||||
<addaction name="actionOptimizeDatabase"/>
|
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionCheckMediaDatabase"/>
|
<addaction name="actionCheckMediaDatabase"/>
|
||||||
<addaction name="actionRecordNoiseProfile"/>
|
<addaction name="actionRecordNoiseProfile"/>
|
||||||
|
@ -3504,18 +3503,6 @@
|
||||||
<string>Save this deck, giving it a new name</string>
|
<string>Save this deck, giving it a new name</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionOptimizeDatabase">
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../icons.qrc">
|
|
||||||
<normaloff>:/icons/games-solve.png</normaloff>:/icons/games-solve.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>&Optimize Database</string>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Remove unused space, making the database file smaller</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionCheckMediaDatabase">
|
<action name="actionCheckMediaDatabase">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../icons.qrc">
|
<iconset resource="../icons.qrc">
|
||||||
|
|
Loading…
Reference in a new issue