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")
|
||||
else:
|
||||
d = `d`
|
||||
if self.importer.delimiter:
|
||||
txt = _("Manual &delimiter: %s") % d
|
||||
else:
|
||||
txt = _("Auto-detected &delimiter: %s") % d
|
||||
txt = _("Fields separated by: %s") % d
|
||||
self.frm.autoDetect.setText(txt)
|
||||
|
||||
def doImport(self, update=False):
|
||||
|
@ -139,6 +136,7 @@ you can enter it here. Use \\t to represent tab."""),
|
|||
showWarning(
|
||||
_("The first field of the note type must be mapped."))
|
||||
return
|
||||
self.importer.update = self.frm.updateNotes.isChecked()
|
||||
did = self.deck.selectedId()
|
||||
if did != self.importer.model['did']:
|
||||
self.importer.model['did'] = did
|
||||
|
|
|
@ -20,37 +20,47 @@
|
|||
<string>Import options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="toplayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="autoDetect">
|
||||
<property name="text">
|
||||
<string>Auto-detect file format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="3">
|
||||
<widget class="QWidget" name="deckArea" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QWidget" name="modelArea" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Note type:</string>
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Deck:</string>
|
||||
<string>Deck</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="deckArea" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -108,7 +118,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>402</width>
|
||||
<height>237</height>
|
||||
<height>236</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -132,7 +142,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>autoDetect</tabstop>
|
||||
<tabstop>importButton</tabstop>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
</tabstops>
|
||||
|
|
Loading…
Reference in a new issue