Merge pull request #421 from ErezVolk/tag-changed-grooming

Tag modified grooming
This commit is contained in:
Damien Elmes 2020-01-15 20:25:51 +10:00 committed by GitHub
commit 967b8a038d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 11 deletions

View file

@ -2,5 +2,13 @@
set -e
echo "All contributors:"
git log --pretty=format:' - %ae' CONTRIBUTORS |sort |uniq |sort -f
headAuthor=$(git log -1 --pretty=format:'%ae')
git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"
if git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor"; then
echo "Author $headAuthor found in CONTRIBUTORS"
else
echo "Author $headAuthor NOT found in list"
exit 1
fi

View file

@ -18,9 +18,9 @@ support site, it would be great if you could add your name below as well.
********************
Erez Volk <erez.volk@gmail.com>
Aristotelis P. <https://glutanimate.com/contact>
AMBOSS MD Inc. <https://www.amboss.com/>
Aristotelis P. <https://glutanimate.com/contact>
Erez Volk <erez.volk@gmail.com>
zjosua <zjosua@hotmail.com>
********************

View file

@ -150,6 +150,7 @@ system. It's free and open source."
"Arthur Milchior",
"Rai (Michael Pokorny)",
"AMBOSS MD Inc.",
"Erez Volk",
)
)

View file

@ -92,6 +92,8 @@ class ImportDialog(QDialog):
self.frm.allowHTML.setChecked(self.mw.pm.profile.get("allowHTML", True))
self.frm.importMode.currentIndexChanged.connect(self.importModeChanged)
self.frm.importMode.setCurrentIndex(self.mw.pm.profile.get("importMode", 1))
self.frm.tagModified.setText(self.mw.pm.profile.get("tagModified", ""))
self.frm.tagModified.setCol(self.mw.col)
# import button
b = QPushButton(_("Import"))
self.frm.buttonBox.addButton(b, QDialogButtonBox.AcceptRole)
@ -179,8 +181,7 @@ you can enter it here. Use \\t to represent tab."""
self.mw.pm.profile["importMode"] = self.importer.importMode
self.importer.allowHTML = self.frm.allowHTML.isChecked()
self.mw.pm.profile["allowHTML"] = self.importer.allowHTML
if self.frm.tagModifiedCheck.isChecked():
self.importer.tagModified = self.frm.tagModifiedTag.text()
self.importer.tagModified = self.frm.tagModified.text()
self.mw.pm.profile["tagModified"] = self.importer.tagModified
did = self.deck.selectedId()
if did != self.importer.model["did"]:
@ -288,11 +289,9 @@ you can enter it here. Use \\t to represent tab."""
def importModeChanged(self, newImportMode):
if newImportMode == 0:
allowTagModified = True
self.frm.tagModified.setEnabled(True)
else:
allowTagModified = False
self.frm.tagModifiedCheck.setEnabled(allowTagModified)
self.frm.tagModifiedTag.setEnabled(allowTagModified)
self.frm.tagModified.setEnabled(False)
def showUnicodeWarning():

View file

@ -80,14 +80,14 @@
<item>
<layout class="QHBoxLayout" name="tagModifiedLayout">
<item>
<widget class="QCheckBox" name="tagModifiedCheck">
<widget class="QLabel" name="tagModifiedLabel">
<property name="text">
<string>Tag modified notes:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tagModifiedTag"/>
<widget class="TagEdit" name="tagModified"/>
</item>
</layout>
</item>
@ -157,6 +157,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>TagEdit</class>
<extends>QLineEdit</extends>
<header>aqt/tagedit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>buttonBox</tabstop>
</tabstops>