mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-03 09:24:55 +01:00
Start work on plugin framework for editor
This commit is contained in:
parent
4b88420482
commit
feec1eb77d
2 changed files with 13 additions and 1 deletions
|
|
@ -741,3 +741,8 @@ def customize_context_menu(self, menu, event, hit_test_result):
|
|||
pass
|
||||
|
||||
# }}}
|
||||
|
||||
class EditBookToolPlugin(Plugin): # {{{
|
||||
pass
|
||||
# }}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
MetadataReaderPlugin, MetadataWriterPlugin,
|
||||
InterfaceActionBase as InterfaceAction,
|
||||
PreferencesPlugin, platform, InvalidPlugin,
|
||||
StoreBase as Store, ViewerPlugin)
|
||||
StoreBase as Store, ViewerPlugin, EditBookToolPlugin)
|
||||
from calibre.customize.conversion import InputFormatPlugin, OutputFormatPlugin
|
||||
from calibre.customize.zipplugin import loader
|
||||
from calibre.customize.profiles import InputProfile, OutputProfile
|
||||
|
|
@ -527,6 +527,13 @@ def all_viewer_plugins():
|
|||
yield plugin
|
||||
# }}}
|
||||
|
||||
# Editor plugins {{{
|
||||
def all_edit_book_tool_plugins():
|
||||
for plugin in _initialized_plugins:
|
||||
if isinstance(plugin, EditBookToolPlugin):
|
||||
yield plugin
|
||||
# }}}
|
||||
|
||||
# Initialize plugins {{{
|
||||
|
||||
_initialized_plugins = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue