mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
add option to disable updating; tweak import dialog
This commit is contained in:
parent
58a2391962
commit
a06858c9bb
2 changed files with 26 additions and 19 deletions
|
@ -127,10 +127,7 @@ you can enter it here. Use \\t to represent tab."""),
|
||||||
d = _("Colon")
|
d = _("Colon")
|
||||||
else:
|
else:
|
||||||
d = `d`
|
d = `d`
|
||||||
if self.importer.delimiter:
|
txt = _("Fields separated by: %s") % d
|
||||||
txt = _("Manual &delimiter: %s") % d
|
|
||||||
else:
|
|
||||||
txt = _("Auto-detected &delimiter: %s") % d
|
|
||||||
self.frm.autoDetect.setText(txt)
|
self.frm.autoDetect.setText(txt)
|
||||||
|
|
||||||
def doImport(self, update=False):
|
def doImport(self, update=False):
|
||||||
|
@ -139,6 +136,7 @@ you can enter it here. Use \\t to represent tab."""),
|
||||||
showWarning(
|
showWarning(
|
||||||
_("The first field of the note type must be mapped."))
|
_("The first field of the note type must be mapped."))
|
||||||
return
|
return
|
||||||
|
self.importer.update = self.frm.updateNotes.isChecked()
|
||||||
did = self.deck.selectedId()
|
did = self.deck.selectedId()
|
||||||
if did != self.importer.model['did']:
|
if did != self.importer.model['did']:
|
||||||
self.importer.model['did'] = did
|
self.importer.model['did'] = did
|
||||||
|
|
|
@ -20,37 +20,47 @@
|
||||||
<string>Import options</string>
|
<string>Import options</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="toplayout">
|
<layout class="QVBoxLayout" name="toplayout">
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="autoDetect">
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto-detect file format</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QWidget" name="deckArea" native="true"/>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QWidget" name="modelArea" native="true"/>
|
<widget class="QWidget" name="modelArea" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Note type:</string>
|
<string>Type</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Deck:</string>
|
<string>Deck</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QWidget" name="deckArea" native="true"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="autoDetect">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="updateNotes">
|
||||||
|
<property name="text">
|
||||||
|
<string>Update existing notes when first field matches</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -108,7 +118,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>402</width>
|
<width>402</width>
|
||||||
<height>237</height>
|
<height>236</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -132,7 +142,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>autoDetect</tabstop>
|
|
||||||
<tabstop>importButton</tabstop>
|
<tabstop>importButton</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
|
Loading…
Reference in a new issue