Hi rubeus,
FYI: The plugin interface has absolutely no capability to call anything inside Sigil. The plugin interface simply saves all tabs to files to get the current state of the epub, launches python, running its launcher code, that parses the current content.opf and tries to make those files available to the plugin in a safe way. Anytime a plugin changes a file, a copy is made and the modified version is stored in a temp directory. When the plugin run() routine returns, the builtin python code tells Sigil what files were added, deleted, or modified (via the result.xml you saw briefly flash on the screen) as it exits. Sigil then processes ths list to make the changes the plugin requested using the modified copies stored in temp if needed.
So the plugin code never actually calls back into Sigil, it instead let's Sigil be in charge.
Hope this helps,
KevinH
|