mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
17c9801c62
@ -379,9 +379,10 @@ cover_trim_fuzz_value = 10
|
||||
|
||||
#: Control behavior of the book list
|
||||
# You can control the behavior of double clicks and pressing Enter on the books
|
||||
# list. Choices: open_viewer, do_nothing, show_book_details, edit_cell,
|
||||
# edit_metadata. Selecting anything other than open_viewer or show_book_details
|
||||
# has the side effect of disabling editing a field using a single click.
|
||||
# list. Choices: open_viewer, do_nothing, show_book_details,
|
||||
# show_locked_book_details, edit_cell, edit_metadata. Selecting anything other
|
||||
# than open_viewer, show_book_details, or show_locked_book_details has the side
|
||||
# effect of disabling editing a field using a single click.
|
||||
# Default: open_viewer.
|
||||
# Example: doubleclick_on_library_view = 'do_nothing'
|
||||
# You can also control whether the book list scrolls per item or
|
||||
|
@ -69,6 +69,10 @@ def handle_enter_press(self, ev, special_action=None, has_edit_cell=True):
|
||||
gui.iactions['Edit Metadata'].edit_metadata(False)
|
||||
elif tweak == 'do_nothing':
|
||||
pass
|
||||
elif tweak == 'show_locked_book_details':
|
||||
self.gui.iactions['Show Book Details'].show_book_info(locked=True)
|
||||
elif tweak == 'show_book_details':
|
||||
self.gui.iactions['Show Book Details'].show_book_info()
|
||||
else:
|
||||
if special_action is not None:
|
||||
special_action(self.currentIndex())
|
||||
|
@ -361,9 +361,10 @@ class BooksView(QTableView): # {{{
|
||||
elif tval == 'open_viewer':
|
||||
wv.setEditTriggers(QAbstractItemView.EditTrigger.SelectedClicked|wv.editTriggers())
|
||||
wv.doubleClicked.connect(parent.iactions['View'].view_triggered)
|
||||
elif tval == 'show_book_details':
|
||||
elif tval in ('show_book_details', 'show_locked_book_details'):
|
||||
wv.setEditTriggers(QAbstractItemView.EditTrigger.SelectedClicked|wv.editTriggers())
|
||||
wv.doubleClicked.connect(parent.iactions['Show Book Details'].show_book_info)
|
||||
wv.doubleClicked.connect(partial(parent.iactions['Show Book Details'].show_book_info,
|
||||
locked=tval == 'show_locked_book_details'))
|
||||
elif tval == 'edit_metadata':
|
||||
# Must not enable single-click to edit, or the field will remain
|
||||
# open in edit mode underneath the edit metadata dialog
|
||||
|
Loading…
x
Reference in New Issue
Block a user