For the slow fingered among us

This commit is contained in:
Kovid Goyal 2011-04-17 08:19:48 -06:00
parent 799f818e7d
commit ba5285ea5b
2 changed files with 6 additions and 3 deletions

View File

@ -223,7 +223,7 @@ class AuthorSortEdit(EnLineEdit):
LABEL = _('Author s&ort:')
def __init__(self, parent, authors_edit, autogen_button, db,
copy_as_to_a_action):
copy_a_to_as_action, copy_as_to_a_action):
EnLineEdit.__init__(self, parent)
self.authors_edit = authors_edit
self.db = db
@ -242,6 +242,7 @@ class AuthorSortEdit(EnLineEdit):
self.textChanged.connect(self.update_state)
autogen_button.clicked.connect(self.auto_generate)
copy_a_to_as_action.triggered.connect(self.auto_generate)
copy_as_to_a_action.triggered.connect(self.copy_to_authors)
self.update_state()

View File

@ -109,10 +109,12 @@ class MetadataSingleDialogBase(ResizableDialog):
'Using this button to create author sort will change author sort from'
' red to green.'))
b.m = m = QMenu()
ac = m.addAction(QIcon(I('back.png')), _('Set author from author sort'))
ac = m.addAction(QIcon(I('forward.png')), _('Set author sort from author'))
ac2 = m.addAction(QIcon(I('back.png')), _('Set author from author sort'))
b.setMenu(m)
self.authors = AuthorsEdit(self)
self.author_sort = AuthorSortEdit(self, self.authors, b, self.db, ac)
self.author_sort = AuthorSortEdit(self, self.authors, b, self.db, ac,
ac2)
self.basic_metadata_widgets.extend([self.authors, self.author_sort])
self.swap_title_author_button = QToolButton(self)