[PATCH] Adding LFUN for removing LyX modules

Scott Kostyshak skostysh at lyx.org
Thu Oct 21 17:24:33 UTC 2021


On Thu, Oct 21, 2021 at 08:14:27PM +0300, Yuriy Skalko wrote:
> 
> Now LyX has functions for adding one module (LFUN_LAYOUT_MODULE_ADD) and for
> removing all modules (LFUN_LAYOUT_MODULES_CLEAR), but removing only one
> module is impossible. I propose to add such function:
> LFUN_LAYOUT_MODULE_REMOVE.
> 
> My current use case: adding and removing module "Minimalistic Insets" to
> unclutter document with many branch insets by hiding their labels during
> work on content.
> 
> Without such LFUN this should be done manually. With it we will be able to
> do:
> 
> layout-module-add minimalistic
> layout-module-remove minimalistic

I like this idea! What if layout-module-remove is used on a module that
a different module depends on? e.g., AMS Theorems (Extended) depends on
AMS Theorems. If I have both added and I try to remove AMS Theorems,
what happens? Do we need a layoutModuleCanBeRemoved helper function?
Actually there must already be some code because "delete" is greyed out
if I do this in the GUI.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211021/64add61d/attachment-0001.asc>


More information about the lyx-devel mailing list