Recent progress has been spectacular, as documented elsewhere. It should now be straightforward to *create *all of pyzo's docks in the pyzo_in_leo plugin. Making all those docks *functional *is another matter entirely.
This post is a "thinking out loud" entry in my Engineering notebook. Feel free to ignore. *Configuration* The notion of a config shim was a false start. Using pyzo's actual config code in zon.py is a big step forward. But big challenges remain. *Leo's config model is not a great fit for pyzo's.* Many of Leo's config settings are read-only, accessible only via c.config.get* (getBool, getString, etc). Leo uses c.db to read/write settings that might change while Leo is running. In contrast, pyzo uses pyzo.config to both read *and* write settings. The models must somehow be reconciled. Handling every pyzo setting on a case by case basis is not a pleasant prospect. All changes would have to be back-ported when upgrading pyzo. Hmm. As I write this I see that a possible workaround would be to re-imagine zon.py so it does the necessary adjustments. You could call this an *in-place shim*. It's an idea worth exploring. It would be much better to make all necessary changes in one place, even if zon.py becomes more complicated. Otoh, it might end up simplifying zon.py in the end. We shall see. *The main window* I'll have to keep an eye on the differences between Leo's and pyzo's main window. Pyzo's MainWindow class contains methods that Leo's main window lacks. The existing pyzo.start function creates the main window using the MainWindow class, a subclass of QMainWindow. The new pyzo.start_pyzo_in_leo function implicitly uses Leo's main window, c.frame.top, an instance of DynamicWindow. At one point the lack of a setMainTitle method caused a crash. It doesn't seem to matter just at present. Iirc, pyzo_file_browser may have injected MainWindow.setMainTitle into Leo's actual QMainWindow, but that probably got lost in the great collapse of code. This issue isn't nearly as troublesome as config issues. Adding any needed methods to Leo's own main window class will be simple and good. *Menus* Adding pyzoic menus to Leo can be done in the pyzo_in_leo plugin. This plugin will likely just use yet another copy of the pyzo code. Yes, this code might have to change when updating pyzo, but it's unlikely that such changes will be needed. *Summary* Melding pyzo's config code with Leo's remains, by far, the most important and challenging part of the pyzo-in-leo project. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/2cdee4c7-5824-458e-b499-9f91bc6a2622%40googlegroups.com.
