move full sync into preferences, and remove maintenance menu
This commit is contained in:
parent
e913c75fd7
commit
79d4451299
@ -164,7 +164,7 @@ class NoteImporter(Importer):
|
||||
# generate cards
|
||||
if self.col.genCards(self._ids):
|
||||
self.log.insert(0, _(
|
||||
"Empty cards found. Please run Tools>Maintenance>Empty Cards."))
|
||||
"Empty cards found. Please run Tools>Empty Cards."))
|
||||
# apply scheduling updates
|
||||
self.updateCards()
|
||||
# make sure to update sflds, etc
|
||||
|
@ -60,7 +60,7 @@ class ErrorHandler(QObject):
|
||||
An error occurred. It may have been caused by a harmless bug, <br>
|
||||
or your deck may have a problem.
|
||||
<p>To confirm it's not a problem with your deck, please run
|
||||
<b>Tools > Maintenance > Check Database</b>.
|
||||
<b>Tools > Check Database</b>.
|
||||
<p>If that doesn't fix the problem, please copy the following<br>
|
||||
into a bug report:""")
|
||||
pluginText = _("""\
|
||||
|
12
aqt/main.py
12
aqt/main.py
@ -550,17 +550,6 @@ title="%s">%s</button>''' % (
|
||||
if not self.col:
|
||||
self.loadCollection()
|
||||
|
||||
def onFullSync(self):
|
||||
if not askUser(_("""\
|
||||
If you proceed, you will need to choose between a full download or full \
|
||||
upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
|
||||
return
|
||||
self.hideSchemaMsg = True
|
||||
self.col.modSchema()
|
||||
self.col.setMod()
|
||||
self.hideSchemaMsg = False
|
||||
self.onSync()
|
||||
|
||||
# Tools
|
||||
##########################################################################
|
||||
|
||||
@ -772,7 +761,6 @@ and check the statistics for a home deck instead."""))
|
||||
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
|
||||
self.connect(m.actionDocumentation, s, self.onDocumentation)
|
||||
self.connect(m.actionDonate, s, self.onDonate)
|
||||
self.connect(m.actionFullSync, s, self.onFullSync)
|
||||
self.connect(m.actionStudyDeck, s, self.onStudyDeck)
|
||||
self.connect(m.actionCreateFiltered, s, self.onCram)
|
||||
self.connect(m.actionEmptyCards, s, self.onEmptyCards)
|
||||
|
@ -99,6 +99,11 @@ Not currently enabled; click the sync button in the main window to enable."""))
|
||||
def updateNetwork(self):
|
||||
self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked()
|
||||
self.prof['syncMedia'] = self.form.syncMedia.isChecked()
|
||||
if self.form.fullSync.isChecked():
|
||||
self.mw.hideSchemaMsg = True
|
||||
self.mw.col.modSchema()
|
||||
self.mw.col.setMod()
|
||||
self.mw.hideSchemaMsg = False
|
||||
|
||||
# Backup
|
||||
######################################################################
|
||||
|
@ -363,7 +363,7 @@ img { max-width: 95%; max-height: 95%; }
|
||||
if self.typeCorrect is None:
|
||||
if clozeIdx:
|
||||
warn = _("""\
|
||||
Please run Tools>Maintenance>Empty Cards""")
|
||||
Please run Tools>Empty Cards""")
|
||||
else:
|
||||
warn = _("Type answer: unknown field %s") % fld
|
||||
return re.sub(self.typeAnsPat, warn, buf)
|
||||
|
@ -88,7 +88,7 @@ automatically."""))
|
||||
self._didFullUp = False
|
||||
showWarning(_("""\
|
||||
The upload was aborted because errors were found in your collection. \
|
||||
Please check your collection with Tools>Maintenance>Check Database."""))
|
||||
Please check your collection with Tools>Check Database."""))
|
||||
elif evt == "sync":
|
||||
m = None; t = args[0]
|
||||
if t == "login":
|
||||
|
@ -91,22 +91,12 @@
|
||||
<addaction name="actionOpenPluginFolder"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuMaintenance">
|
||||
<property name="title">
|
||||
<string>Maintenance</string>
|
||||
</property>
|
||||
<addaction name="actionFullDatabaseCheck"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCheckMediaDatabase"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionEmptyCards"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionFullSync"/>
|
||||
</widget>
|
||||
<addaction name="actionStudyDeck"/>
|
||||
<addaction name="actionCreateFiltered"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menuMaintenance"/>
|
||||
<addaction name="actionFullDatabaseCheck"/>
|
||||
<addaction name="actionCheckMediaDatabase"/>
|
||||
<addaction name="actionEmptyCards"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menuPlugins"/>
|
||||
<addaction name="separator"/>
|
||||
@ -172,16 +162,6 @@
|
||||
<string>&Open Add-ons Folder...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEnableAllPlugins">
|
||||
<property name="text">
|
||||
<string>&Enable All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDisableAllPlugins">
|
||||
<property name="text">
|
||||
<string>&Disable All</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDonate">
|
||||
<property name="text">
|
||||
<string>&Support Anki...</string>
|
||||
@ -232,11 +212,6 @@
|
||||
<string>Ctrl+I</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFullSync">
|
||||
<property name="text">
|
||||
<string>Full Sync...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionStudyDeck">
|
||||
<property name="text">
|
||||
<string>Study Deck...</string>
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>441</width>
|
||||
<height>445</height>
|
||||
<width>405</width>
|
||||
<height>450</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -224,6 +224,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fullSync">
|
||||
<property name="text">
|
||||
<string>On next sync, force changes in one direction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user