From 45fe6a409d7036f91e13bf9c5919e8c8162e3bd8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 3 Jul 2022 22:44:14 +0530 Subject: [PATCH] Change interface demo plugin to pass plugin name to get_icons() --- manual/plugin_examples/interface_demo/ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/plugin_examples/interface_demo/ui.py b/manual/plugin_examples/interface_demo/ui.py index 53b2c63820..68da594af9 100644 --- a/manual/plugin_examples/interface_demo/ui.py +++ b/manual/plugin_examples/interface_demo/ui.py @@ -16,6 +16,7 @@ if False: from calibre.gui2.actions import InterfaceAction from calibre_plugins.interface_demo.main import DemoDialog + class InterfacePlugin(InterfaceAction): name = 'Interface Plugin Demo' @@ -40,7 +41,7 @@ class InterfacePlugin(InterfaceAction): # should pass a list of names to get_icons. In this case, get_icons # will return a dictionary mapping names to QIcons. Names that # are not found in the zip file will result in null QIcons. - icon = get_icons('images/icon.png') + icon = get_icons('images/icon.png', 'Interface Demo Plugin') # The qaction is automatically created from the action_spec defined # above @@ -67,4 +68,3 @@ class InterfacePlugin(InterfaceAction): # In an actual non trivial plugin, you would probably need to # do something based on the settings in prefs prefs -