mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
c78cfdd926
@ -708,7 +708,7 @@ class TagsView(QTreeView): # {{{
|
||||
# global_vars=None, all_functions=None, builtin_functions=None,
|
||||
# python_context_object=None, dialog_number=None,
|
||||
formatter=EvalFormatter, icon_dir='tb_icons/template_icons')
|
||||
if d.exec():
|
||||
if d.exec() == QDialog.DialogCode.Accepted:
|
||||
self._model.set_value_icon(key, TEMPLATE_ICON_INDICATOR, d.rule[2], False)
|
||||
self.recount()
|
||||
return
|
||||
@ -722,7 +722,8 @@ class TagsView(QTreeView): # {{{
|
||||
_('Change icon for: %s')%key, filters=[
|
||||
('Images', ['png', 'gif', 'jpg', 'jpeg'])],
|
||||
all_files=False, select_only_single_file=True)
|
||||
if path:
|
||||
if not path:
|
||||
return
|
||||
path = path[0]
|
||||
p = QIcon(path).pixmap(QSize(128, 128))
|
||||
d = os.path.join(config_dir, 'tb_icons')
|
||||
@ -732,6 +733,7 @@ class TagsView(QTreeView): # {{{
|
||||
f.write(pixmap_to_data(p, format='PNG'))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return
|
||||
else:
|
||||
# Already have an icon. User wants to change whether it applies to children
|
||||
icon_file_name = desired_file_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user