you...@lyx.org wrote:
> Author: younes
> Date: Mon Sep 21 14:36:22 2009
> New Revision: 31433
> URL: http://www.lyx.org/trac/changeset/31433
> 
> Log:
> Introduce a new LyXAction property 'NoInternal' to take care of LFUNs that 
> should not be applied to internal Buffers and use that in BufferView.
> 
> Modified: lyx-devel/trunk/src/BufferView.cpp
> ==============================================================================
> --- lyx-devel/trunk/src/BufferView.cpp        Mon Sep 21 14:29:40 2009        
> (r31432)
> +++ lyx-devel/trunk/src/BufferView.cpp        Mon Sep 21 14:36:22 2009        
> (r31433)
> @@ -1092,11 +1093,13 @@
>       string const argument = to_utf8(cmd.argument());
>       Cursor & cur = d->cursor_;
>  
> +     // Don't dispatch function that does not apply to internal buffers.
> +     if (buffer_.isInternal() && lyxaction.funcHasFlag(cmd.action, 
> LyXAction::NoInternal))
> +             return false;
> +
>       switch (cmd.action) {

Abdel, why is this not done also in guiview?

 
> Modified: lyx-devel/trunk/src/LyXAction.h
> ==============================================================================
> --- lyx-devel/trunk/src/LyXAction.h   Mon Sep 21 14:29:40 2009        (r31432)
> +++ lyx-devel/trunk/src/LyXAction.h   Mon Sep 21 14:36:22 2009        (r31433)
> @@ -70,6 +70,7 @@
>               NoUpdate = 8, //< Does not (usually) require update
>               SingleParUpdate = 16, //< Usually only requires this par updated
>               AtPoint = 32, //< dispatch first to inset at cursor if there is 
> one
> +             NoInternal = 64, //< Cannot be used for internal, non-document 
> Buffers
>       };
>  
>       LyXAction();

Reply via email to