More context menu icons

This commit is contained in:
Kovid Goyal 2022-01-25 19:55:33 +05:30
parent 51287dae54
commit 6dc13b86dc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 5 deletions

View File

@ -58,21 +58,21 @@ class AddAction(InterfaceAction):
self._add_filesystem_book = self.Dispatcher(self.__add_filesystem_book)
self.add_menu = self.qaction.menu()
ma = partial(self.create_menu_action, self.add_menu)
ma('recursive-add', _('Add from folders and sub-folders')).triggered.connect(self.add_recursive_question)
ma('archive-add-book', _('Add multiple books from archive (ZIP/RAR)')).triggered.connect(self.add_from_archive)
ma('recursive-add', _('Add from folders and sub-folders'), icon='mimetypes/dir.png').triggered.connect(self.add_recursive_question)
ma('archive-add-book', _('Add multiple books from archive (ZIP/RAR)'), icon='mimetypes/zip.png').triggered.connect(self.add_from_archive)
self.add_menu.addSeparator()
ma('add-empty', _('Add empty book (Book entry with no formats)'),
shortcut='Shift+Ctrl+E').triggered.connect(self.add_empty)
ma('add-isbn', _('Add from ISBN')).triggered.connect(self.add_from_isbn)
ma('add-isbn', _('Add from ISBN'), icon='identifiers.png').triggered.connect(self.add_from_isbn)
self.add_menu.addSeparator()
ma('add-formats', _('Add files to selected book records'),
triggered=self.add_formats, shortcut='Shift+A')
ma('add-formats-clipboard', _('Add files to selected book records from clipboard'),
triggered=self.add_formats_from_clipboard, shortcut='Shift+Alt+A')
triggered=self.add_formats_from_clipboard, shortcut='Shift+Alt+A', icon='edit-paste.png')
ma('add-empty-format-to-books', _(
'Add an empty file to selected book records')).triggered.connect(self.add_empty_format_choose)
self.add_menu.addSeparator()
ma('add-config', _('Control the adding of books'),
ma('add-config', _('Control the adding of books'), icon='config.png',
triggered=self.add_config)
self.qaction.triggered.connect(self.add_books)

View File

@ -749,6 +749,7 @@ class TagBrowserWidget(QFrame): # {{{
ac.setIcon(QIcon.ic('minus.png') if gprefs['tag_browser_show_counts'] else QIcon.ic('plus.png'))
ac = self.alter_tb.m.show_avg_rating_action
ac.setText(_('Hide average rating') if config['show_avg_rating'] else _('Show average rating'))
ac.setIcon(QIcon.ic('minus.png' if config['show_avg_rating'] else 'rating.png'))
def toggle_counts(self):
gprefs['tag_browser_show_counts'] ^= True