Fixes #2098133 [Setting custom icon for category doesn't work](https://bugs.launchpad.net/calibre/+bug/2098133)
This commit is contained in:
Kovid Goyal 2025-02-13 07:44:59 +05:30
commit e485c2a50d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,8 @@ class DefaultAuthorLink(QWidget):
u.setToolTip(_( u.setToolTip(_(
'Enter the URL to search. It should contain the string {0}' 'Enter the URL to search. It should contain the string {0}'
'\nwhich will be replaced by the author name. For example,' '\nwhich will be replaced by the author name. For example,'
'\n{1}').format('{author}', 'https://en.wikipedia.org/w/index.php?search={author}')) '\n{1}. Note: the author name is already URL-encoded.').format(
'{author}', 'https://en.wikipedia.org/w/index.php?search={author}'))
u.textChanged.connect(self.changed_signal) u.textChanged.connect(self.changed_signal)
u.setPlaceholderText(_('Enter the URL')) u.setPlaceholderText(_('Enter the URL'))
ul.addWidget(u) ul.addWidget(u)

View File

@ -713,7 +713,8 @@ class TagsView(QTreeView): # {{{
self.recount() self.recount()
return return
icon_file_name, for_children = extra if extra is not None else (None, None) icon_file_name, for_children = extra if extra is not None else (None, None)
item_val, desired_file_name = make_icon_name(key, index, self._model.get_node(index).tag.id) item_val, desired_file_name = make_icon_name(key, index,
None if index is None else self._model.get_node(index).tag.id)
if icon_file_name is None: if icon_file_name is None:
# User wants to specify a specific icon # User wants to specify a specific icon
try: try: