I have been stepping on Thomas's toes regarding the VR3 plugin. It's time to sort things out.
I propose that Thomas be fully responsible for the VR3 plugin from here on. In other words, I promise not to touch the code. I have just delegated #1685 <https://github.com/leo-editor/leo-editor/issues/1685> to Thomas alone. The question is, have I already messed up Thomas's code? I think not, as I shall now explain in detail. *Recent changes* The following script diffs *all* files between the latest commit to devel and Thomas's latest commit: import leo.commands.editFileCommands as efc efc.GitDiffController(c).diff_two_revs( rev1='aaf1825c7bb', # Thomas's last commit. rev2='bf81d8e09da', # Latest devel commit directory=None, ) 21 files appear in the diffs, but only changes to the free_layout.py, nested_splitter.py and viewrendered3.py plugins are relevant here. Here is a careful summary of those diffs: *free_layout.py* Remove dock-related code from four free-layout commands. This should have no effect on VR3. *nested_splitter.py* Move the ns.get_title method to a separate node. Again, this should have no effect on VR3. *viewrendered3.py* The following are the changes I see after carefully studying the diffs: - [No effect on VR3] Remove qt docks code. - [No effect on VR3] Change: fn = g.os_path_expandExpression(fn, c=c) to: fn = c.expand_path_expression(fn) - ns_provide: This method is the all-important factor method. *It creates one Qt pane per commander. *That's the way it has always been. Note: The new code uses self.ns_provider_id() instead of '_leo_viewrendered3'. See below. - Added ns_provider_id(self): return f"vr3_id:{self.c.shortFileName()}". Thomas, you might want to change this back so it returns '_leo_viewrendered3'. However, ns_provide will probably not be affected. - ns_provides: return [('Viewrendered 3', self.ns_provider_id())] This shouldn't need to change. Just change ns_provider_id() as suggested above. *Requested change* At present, VR3 layouts conflict with layouts for the other VR plugins. The fix is easy: VR3 should use the 'viewrendered3_default_layouts' key instead of 'viewrendered_default_layouts' key. *Suggested changes* Thomas, it might be clearer if you change ns_provider_id so it returns '_leo_viewrendered3'. This should guarantee that the new code is equivalent to your code before I started messing with it :-) The present (new) version of ns_title is: def ns_title(self, id_): if id_ != self.ns_provider_id(): return None filename = self.c.shortFileName() or 'Unnamed file' return f"Viewrendered 3: {filename}" For #1683, the title should probably just be something like "Viewrendered 3". I'm not sure how often this is called. *Summary* This post has carefully considered all recent changes to the VR3 plugin. The new code is likely completely equivalent to rev bf81d8e09da. However, some suggested changes would make the equivalence more obvious. Thomas, I have delegated #1683 and *all* future work on VR3 to you. I am happy to answer any questions, or to contribute code. I have one request, namely that the layouts for the VR and VR3 plugins should be distinct. Using 'viewrendered3_default_layouts' as the c.db key should suffice. 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/8e696fbb-1864-4a85-98ea-388b730ec281o%40googlegroups.com.
