mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Changed location of import button (#1018).
Also updated help link in same window to point to a valid anchor.
This commit is contained in:
parent
980c9d7305
commit
068a63270d
2 changed files with 8 additions and 22 deletions
|
@ -79,6 +79,9 @@ class ImportDialog(QDialog):
|
||||||
self.updateDelimiterButtonText()
|
self.updateDelimiterButtonText()
|
||||||
self.frm.allowHTML.setChecked(self.mw.pm.profile.get('allowHTML', True))
|
self.frm.allowHTML.setChecked(self.mw.pm.profile.get('allowHTML', True))
|
||||||
self.frm.importMode.setCurrentIndex(self.mw.pm.profile.get('importMode', 1))
|
self.frm.importMode.setCurrentIndex(self.mw.pm.profile.get('importMode', 1))
|
||||||
|
# import button
|
||||||
|
b = QPushButton(_("Import"))
|
||||||
|
self.frm.buttonBox.addButton(b, QDialogButtonBox.AcceptRole)
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
def setupOptions(self):
|
def setupOptions(self):
|
||||||
|
@ -87,8 +90,6 @@ class ImportDialog(QDialog):
|
||||||
self.mw, self.frm.modelArea, label=False)
|
self.mw, self.frm.modelArea, label=False)
|
||||||
self.deck = aqt.deckchooser.DeckChooser(
|
self.deck = aqt.deckchooser.DeckChooser(
|
||||||
self.mw, self.frm.deckArea, label=False)
|
self.mw, self.frm.deckArea, label=False)
|
||||||
self.connect(self.frm.importButton, SIGNAL("clicked()"),
|
|
||||||
self.doImport)
|
|
||||||
|
|
||||||
def modelChanged(self):
|
def modelChanged(self):
|
||||||
self.importer.model = self.mw.col.models.current()
|
self.importer.model = self.mw.col.models.current()
|
||||||
|
@ -139,7 +140,7 @@ you can enter it here. Use \\t to represent tab."""),
|
||||||
txt = _("Fields separated by: %s") % d
|
txt = _("Fields separated by: %s") % d
|
||||||
self.frm.autoDetect.setText(txt)
|
self.frm.autoDetect.setText(txt)
|
||||||
|
|
||||||
def doImport(self, update=False):
|
def accept(self):
|
||||||
self.importer.mapping = self.mapping
|
self.importer.mapping = self.mapping
|
||||||
if not self.importer.mappingOk():
|
if not self.importer.mappingOk():
|
||||||
showWarning(
|
showWarning(
|
||||||
|
@ -249,7 +250,7 @@ you can enter it here. Use \\t to represent tab."""),
|
||||||
QDialog.reject(self)
|
QDialog.reject(self)
|
||||||
|
|
||||||
def helpRequested(self):
|
def helpRequested(self):
|
||||||
openHelp("FileImport")
|
openHelp("importing")
|
||||||
|
|
||||||
|
|
||||||
def showUnicodeWarning():
|
def showUnicodeWarning():
|
||||||
|
|
|
@ -94,20 +94,6 @@
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="importButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Import</string>
|
|
||||||
</property>
|
|
||||||
<property name="default">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QScrollArea" name="mappingArea">
|
<widget class="QScrollArea" name="mappingArea">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -133,8 +119,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>402</width>
|
<width>529</width>
|
||||||
<height>206</height>
|
<height>251</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -158,7 +144,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>importButton</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
Loading…
Reference in a new issue