mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix drop down showing tags instead of authors in the author mapper
This commit is contained in:
parent
2819ff2c63
commit
4b05986bbd
@ -38,6 +38,7 @@ class RuleEdit(RuleEditBase):
|
||||
SUBJECT = _('the author, if the author name')
|
||||
VALUE_ERROR = _('You must provide a value for the author name to match')
|
||||
REPLACE_TEXT = _('with the name:')
|
||||
SINGLE_EDIT_FIELD_NAME = 'authors'
|
||||
|
||||
@property
|
||||
def can_use_tag_editor(self):
|
||||
|
@ -45,7 +45,7 @@ class SingleTagEdit(EditWithComplete):
|
||||
self.set_separator(None)
|
||||
gui = get_gui()
|
||||
if gui:
|
||||
self.update_items_cache(gui.current_db.new_api.all_field_names('tags'))
|
||||
self.update_items_cache(gui.current_db.new_api.all_field_names(getattr(parent, 'SINGLE_EDIT_FIELD_NAME', 'tags')))
|
||||
|
||||
|
||||
class RuleEdit(QWidget):
|
||||
@ -82,6 +82,7 @@ class RuleEdit(QWidget):
|
||||
' tags, you can replace with parts of the matched pattern. See '
|
||||
' the User Manual on how to use regular expressions for details.')
|
||||
REGEXP_HELP_TEXT = _('For help with regex pattern matching, see the <a href="%s">User Manual</a>')
|
||||
SINGLE_EDIT_FIELD_NAME = 'tags'
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QWidget.__init__(self, parent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user