>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: |
Lars> >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | |
Lars> Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
Lars> writes: | | Lars> BTW, while looking at how open-stuff is
Lars> implemented, I noticed | Lars> that it | is still defined, but
Lars> implemented nowhere. Lars, I | Lars> guess this is | supposed to
Lars> resurface? | | Lars> yes, we need some speedy way of opening
Lars> insets by shortcut. | | Lars> Feel free to have a go. | | Hmm,
Lars> can you tell me _why_ this has been removed with NEW_INSETS? |
Lars> Before replicating old code, I'd like to know what pitfalls I am
Lars> supposed | to avoid.

Lars> The openstuff did not work on insets, it worked on old
Lars> footnotes, floats and tabulars. So basically it just need
Lars> reimplementation.

Huh? Have you taken a look at LyXText::OpenStuff in 1.1.6? Here it is:

#ifndef NEW_INSETS
void LyXText::OpenStuff(BufferView * bview)
{
        if (cursor.pos() == 0 && cursor.par()->bibkey){
                cursor.par()->bibkey->Edit(bview, 0, 0, 0);
        } else if (cursor.pos() < cursor.par()->Last() 
                 && cursor.par()->GetChar(cursor.pos()) == LyXParagraph::META_INSET
                 && cursor.par()->GetInset(cursor.pos())->Editable()) {
                bview->owner()->getMiniBuffer()
                        ->Set(cursor.par()->GetInset(cursor.pos())->EditMessage());
                if (cursor.par()->GetInset(cursor.pos())->Editable() != 
Inset::HIGHLY_EDITABLE)
                        SetCursorParUndo(bview->buffer());
                cursor.par()->GetInset(cursor.pos())->Edit(bview, 0, 0, 0);
        }
#ifndef NEW_INSETS
        else {
                ToggleFootnote(bview);
        }
#endif
}
#endif


Looks like you have been a bit fast on this one. Is it OK if I
basically restore this code (with the appropriate changes, of course)?

JMarc

Reply via email to