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

View file

@ -2713,7 +2713,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>557</width> <width>557</width>
<height>23</height> <height>21</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuHelp"> <widget class="QMenu" name="menuHelp">
@ -2785,7 +2785,6 @@
<property name="title"> <property name="title">
<string>Ad&amp;vanced</string> <string>Ad&amp;vanced</string>
</property> </property>
<addaction name="actionCheckDatabaseIntegrity"/>
<addaction name="actionFullDatabaseCheck"/> <addaction name="actionFullDatabaseCheck"/>
<addaction name="actionOptimizeDatabase"/> <addaction name="actionOptimizeDatabase"/>
<addaction name="separator"/> <addaction name="separator"/>
@ -3228,18 +3227,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="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"> <action name="actionOptimizeDatabase">
<property name="icon"> <property name="icon">
<iconset resource="../icons.qrc"> <iconset resource="../icons.qrc">
@ -3440,8 +3427,12 @@
</property> </property>
</action> </action>
<action name="actionFullDatabaseCheck"> <action name="actionFullDatabaseCheck">
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/sqlitebrowser.png</normaloff>:/icons/sqlitebrowser.png</iconset>
</property>
<property name="text"> <property name="text">
<string>&amp;Full Database Check...</string> <string>Check Database...</string>
</property> </property>
</action> </action>
<action name="actionOpenRecent"> <action name="actionOpenRecent">