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
|
# generate cards
|
||||||
if self.col.genCards(self._ids):
|
if self.col.genCards(self._ids):
|
||||||
self.log.insert(0, _(
|
self.log.insert(0, _(
|
||||||
"Empty cards found. Please run Tools>Maintenance>Empty Cards."))
|
"Empty cards found. Please run Tools>Empty Cards."))
|
||||||
# apply scheduling updates
|
# apply scheduling updates
|
||||||
self.updateCards()
|
self.updateCards()
|
||||||
# make sure to update sflds, etc
|
# 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>
|
An error occurred. It may have been caused by a harmless bug, <br>
|
||||||
or your deck may have a problem.
|
or your deck may have a problem.
|
||||||
<p>To confirm it's not a problem with your deck, please run
|
<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>
|
<p>If that doesn't fix the problem, please copy the following<br>
|
||||||
into a bug report:""")
|
into a bug report:""")
|
||||||
pluginText = _("""\
|
pluginText = _("""\
|
||||||
|
12
aqt/main.py
12
aqt/main.py
@ -550,17 +550,6 @@ title="%s">%s</button>''' % (
|
|||||||
if not self.col:
|
if not self.col:
|
||||||
self.loadCollection()
|
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
|
# Tools
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
@ -772,7 +761,6 @@ and check the statistics for a home deck instead."""))
|
|||||||
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
|
self.connect(m.actionCheckMediaDatabase, s, self.onCheckMediaDB)
|
||||||
self.connect(m.actionDocumentation, s, self.onDocumentation)
|
self.connect(m.actionDocumentation, s, self.onDocumentation)
|
||||||
self.connect(m.actionDonate, s, self.onDonate)
|
self.connect(m.actionDonate, s, self.onDonate)
|
||||||
self.connect(m.actionFullSync, s, self.onFullSync)
|
|
||||||
self.connect(m.actionStudyDeck, s, self.onStudyDeck)
|
self.connect(m.actionStudyDeck, s, self.onStudyDeck)
|
||||||
self.connect(m.actionCreateFiltered, s, self.onCram)
|
self.connect(m.actionCreateFiltered, s, self.onCram)
|
||||||
self.connect(m.actionEmptyCards, s, self.onEmptyCards)
|
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):
|
def updateNetwork(self):
|
||||||
self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked()
|
self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked()
|
||||||
self.prof['syncMedia'] = self.form.syncMedia.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
|
# Backup
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -363,7 +363,7 @@ img { max-width: 95%; max-height: 95%; }
|
|||||||
if self.typeCorrect is None:
|
if self.typeCorrect is None:
|
||||||
if clozeIdx:
|
if clozeIdx:
|
||||||
warn = _("""\
|
warn = _("""\
|
||||||
Please run Tools>Maintenance>Empty Cards""")
|
Please run Tools>Empty Cards""")
|
||||||
else:
|
else:
|
||||||
warn = _("Type answer: unknown field %s") % fld
|
warn = _("Type answer: unknown field %s") % fld
|
||||||
return re.sub(self.typeAnsPat, warn, buf)
|
return re.sub(self.typeAnsPat, warn, buf)
|
||||||
|
@ -88,7 +88,7 @@ automatically."""))
|
|||||||
self._didFullUp = False
|
self._didFullUp = False
|
||||||
showWarning(_("""\
|
showWarning(_("""\
|
||||||
The upload was aborted because errors were found in your collection. \
|
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":
|
elif evt == "sync":
|
||||||
m = None; t = args[0]
|
m = None; t = args[0]
|
||||||
if t == "login":
|
if t == "login":
|
||||||
|
@ -91,22 +91,12 @@
|
|||||||
<addaction name="actionOpenPluginFolder"/>
|
<addaction name="actionOpenPluginFolder"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
</widget>
|
</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="actionStudyDeck"/>
|
||||||
<addaction name="actionCreateFiltered"/>
|
<addaction name="actionCreateFiltered"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="menuMaintenance"/>
|
<addaction name="actionFullDatabaseCheck"/>
|
||||||
|
<addaction name="actionCheckMediaDatabase"/>
|
||||||
|
<addaction name="actionEmptyCards"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="menuPlugins"/>
|
<addaction name="menuPlugins"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@ -172,16 +162,6 @@
|
|||||||
<string>&Open Add-ons Folder...</string>
|
<string>&Open Add-ons Folder...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</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">
|
<action name="actionDonate">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Support Anki...</string>
|
<string>&Support Anki...</string>
|
||||||
@ -232,11 +212,6 @@
|
|||||||
<string>Ctrl+I</string>
|
<string>Ctrl+I</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionFullSync">
|
|
||||||
<property name="text">
|
|
||||||
<string>Full Sync...</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionStudyDeck">
|
<action name="actionStudyDeck">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Study Deck...</string>
|
<string>Study Deck...</string>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>441</width>
|
<width>405</width>
|
||||||
<height>445</height>
|
<height>450</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -224,6 +224,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="fullSync">
|
||||||
|
<property name="text">
|
||||||
|
<string>On next sync, force changes in one direction</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
Reference in New Issue
Block a user