Opening activated branch insets
Pavel Sanda
sanda at lyx.org
Wed Apr 13 12:39:24 UTC 2022
On Wed, Apr 13, 2022 at 12:04:00PM +0200, Jean-Marc Lasgouttes wrote:
> Le 13/04/2022 ?? 11:48, Pavel Sanda a écrit :
> >On Mon, Apr 11, 2022 at 02:17:44PM +0200, Jean-Marc Lasgouttes wrote:
> >>Le 11/04/2022 ?? 13:44, Pavel Sanda a écrit :
> >>>So what is your reading of the results?
> >>>Seems to me no interest. As a result I would favor committing my patch
> >>>minus context menu UI plus any changes you might have for the wording.
> >>>And I'll add some note into manuals.
> >>
> >>I did read your patch, but I do not know what the use case is.
> >
> >My use case is opening/closing all branch insets of a given name.
>
> No, you toggle them?*. What happens depends on their current state.
Oops, looking at my patch again I understand why both of you have problems with my approach :)
I have bilingual documents where all insets of one language are all open or closed,
hence the toggling worked. But of course you are right, it should be just open or close,
toggling only worked by chance. Sorry for the confusion.
> >We would need to pass the "correct" branch name into lfun call.
> >You want inset-forall to sniff around for proper name? Does not look right.
> >Or is there way how to pass that string via specific parameter in context menu definition?
>
> The branch inset knows whether it should be open or closed wrt its
> activeness status. I think we can use this with a "inset-toggle auto" or
> something.
So changing the core of the patch to something like
+ case LFUN_BRANCH_SYNC_ALL:
+ lyx::dispatch(FuncRequest(LFUN_INSET_FORALL, "Branch:" + params_.branch + " inset-toggle auto"));
+ break;
would be acceptable for you?
Pavel
More information about the lyx-devel
mailing list