mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Change interface demo plugin to pass plugin name to get_icons()
This commit is contained in:
parent
6e79aa456e
commit
45fe6a409d
@ -16,6 +16,7 @@ if False:
|
|||||||
from calibre.gui2.actions import InterfaceAction
|
from calibre.gui2.actions import InterfaceAction
|
||||||
from calibre_plugins.interface_demo.main import DemoDialog
|
from calibre_plugins.interface_demo.main import DemoDialog
|
||||||
|
|
||||||
|
|
||||||
class InterfacePlugin(InterfaceAction):
|
class InterfacePlugin(InterfaceAction):
|
||||||
|
|
||||||
name = 'Interface Plugin Demo'
|
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
|
# should pass a list of names to get_icons. In this case, get_icons
|
||||||
# will return a dictionary mapping names to QIcons. Names that
|
# will return a dictionary mapping names to QIcons. Names that
|
||||||
# are not found in the zip file will result in null QIcons.
|
# 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
|
# The qaction is automatically created from the action_spec defined
|
||||||
# above
|
# above
|
||||||
@ -67,4 +68,3 @@ class InterfacePlugin(InterfaceAction):
|
|||||||
# In an actual non trivial plugin, you would probably need to
|
# In an actual non trivial plugin, you would probably need to
|
||||||
# do something based on the settings in prefs
|
# do something based on the settings in prefs
|
||||||
prefs
|
prefs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user