remove quick db check

This commit is contained in:
Damien Elmes 2009-12-02 21:27:53 +09:00
parent 87d976a547
commit fa0ca3089c
2 changed files with 9 additions and 22 deletions

View file

@ -2233,7 +2233,6 @@ it to your friends.
self.connect(m.actionRepeatAudio, s, self.onRepeatAudio)
self.connect(m.actionUndo, s, self.onUndo)
self.connect(m.actionRedo, s, self.onRedo)
self.connect(m.actionCheckDatabaseIntegrity, s, self.onQuickCheckDB)
self.connect(m.actionFullDatabaseCheck, s, self.onCheckDB)
self.connect(m.actionOptimizeDatabase, s, self.onOptimizeDB)
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
@ -2620,16 +2619,13 @@ it to your friends.
# Advanced features
##########################################################################
def onQuickCheckDB(self):
self.onCheckDB(full=False)
def onCheckDB(self, full=True):
def onCheckDB(self):
"True if no problems"
if self.errorOccurred:
ui.utils.showWarning(_(
"Please restart Anki before checking the DB."))
return
if full and not ui.utils.askUser(_("""\
if not ui.utils.askUser(_("""\
This operation will find and fix some common problems.<br>
<br>
On the next sync, all cards will be sent to the server.<br>
@ -2638,7 +2634,7 @@ Any changes on the server since your last sync will be lost.<br>
<b>This operation is not undoable.</b><br>
Proceed?""")):
return
ret = self.deck.fixIntegrity(quick=not full)
ret = self.deck.fixIntegrity()
if ret == "ok":
ret = True
else:

View file

@ -2713,7 +2713,7 @@
<x>0</x>
<y>0</y>
<width>557</width>
<height>23</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">
@ -2785,7 +2785,6 @@
<property name="title">
<string>Ad&amp;vanced</string>
</property>
<addaction name="actionCheckDatabaseIntegrity"/>
<addaction name="actionFullDatabaseCheck"/>
<addaction name="actionOptimizeDatabase"/>
<addaction name="separator"/>
@ -3228,18 +3227,6 @@
<string>Save this deck, giving it a new name</string>
</property>
</action>
<action name="actionCheckDatabaseIntegrity">
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/sqlitebrowser.png</normaloff>:/icons/sqlitebrowser.png</iconset>
</property>
<property name="text">
<string>&amp;Quick Database Check</string>
</property>
<property name="statusTip">
<string>Check the database for errors</string>
</property>
</action>
<action name="actionOptimizeDatabase">
<property name="icon">
<iconset resource="../icons.qrc">
@ -3440,8 +3427,12 @@
</property>
</action>
<action name="actionFullDatabaseCheck">
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/sqlitebrowser.png</normaloff>:/icons/sqlitebrowser.png</iconset>
</property>
<property name="text">
<string>&amp;Full Database Check...</string>
<string>Check Database...</string>
</property>
</action>
<action name="actionOpenRecent">