Skip to content

Commit

Permalink
Fix #2086142 [[Enhancement] Add icon to Edit EPUB format in the right…
Browse files Browse the repository at this point in the history
… click menu of the Book details panel and window](https://bugs.launchpad.net/calibre/+bug/2086142)
  • Loading branch information
kovidgoyal committed Oct 31, 2024
1 parent 17406e0 commit 7640525
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/calibre/gui2/book_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,17 @@ def connect_action(ac, entry):

populate_menu(m, connect_action, fmt)
if len(m.actions()) == 0:
menu.addAction(_('Open %s with...') % fmt.upper(), partial(book_info.choose_open_with, book_id, fmt))
menu.addAction(QIcon.ic('exec.png'), _('Open %s with...') % fmt.upper(), partial(book_info.choose_open_with, book_id, fmt))
else:
m.setIcon(QIcon.ic('exec.png'))
m.addSeparator()
m.addAction(_('Add other application for %s files...') % fmt.upper(), partial(book_info.choose_open_with, book_id, fmt))
m.addAction(QIcon.ic('plus.png'), _('Add other application for %s files...') % fmt.upper(), partial(book_info.choose_open_with, book_id, fmt))
m.addAction(_('Edit Open with applications...'), partial(edit_programs, fmt, book_info))
menu.addMenu(m)
menu.ow = m
if fmt.upper() in SUPPORTED:
menu.addSeparator()
menu.addAction(_('Edit %s format') % fmt.upper(), partial(book_info.edit_fmt, book_id, fmt))
menu.addAction(QIcon.ic('edit_book.png'), _('Edit %s format') % fmt.upper(), partial(book_info.edit_fmt, book_id, fmt))
path = data['path']
if path:
if data.get('fname'):
Expand Down

0 comments on commit 7640525

Please sign in to comment.