From: Angus Leeming Date: Fri, 20 Jul 2001 12:40:38 +0000 (+0000) Subject: Small things. X-Git-Tag: 1.6.10~21045 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ce00d696293bfdcd7c1491286619ded1bc010531;p=features.git Small things. Make Jean-Marc happy by allowing the InsetNote to contain anything. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2293 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 32046dd37e..22204548f9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2001-07-20 Angus Leeming + + * buffer.C (readInset): enable reading of new InsetNotes as well as old + InsetInfos. + + * FontLoader.C: remove FORMS_H_LOCATION cruft. + 2001-07-20 Angus Leeming * sp_form.[Ch]: remove. diff --git a/src/FontLoader.C b/src/FontLoader.C index f137d806f2..5113988334 100644 --- a/src/FontLoader.C +++ b/src/FontLoader.C @@ -15,7 +15,6 @@ #pragma implementation "FontLoader.h" #endif -#include FORMS_H_LOCATION #include "FontLoader.h" #include "FontInfo.h" #include "gettext.h" diff --git a/src/buffer.C b/src/buffer.C index 846ed1e4d6..cc41db67b7 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1388,7 +1388,8 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par, inset = new InsetFormula; } else if (tmptok == "Figure") { inset = new InsetFig(100, 100, *this); - } else if (tmptok == "Info") { + } else if (tmptok == "Info" // backwards compatibility + || tmptok == "Note") { inset = new InsetNote; } else if (tmptok == "Include") { InsetCommandParams p( "Include" ); diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 85fbc29fb5..a7045c1a5d 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,10 @@ +2001-07-20 Angus Leeming + + * insetnote.[Ch]: (insertInset, insetAllowed): removed. Note now uses + the default InsetCollapsable methods. I.e., it can insert anything. + (write) output the name of the inset, not some silly hack for + compatability with the old InsetInfo. + 2001-07-20 Angus Leeming * insetinfo.[Ch]: removed. diff --git a/src/insets/insetnote.C b/src/insets/insetnote.C index f5d7fc8ca5..4463747b7d 100644 --- a/src/insets/insetnote.C +++ b/src/insets/insetnote.C @@ -30,7 +30,6 @@ InsetNote::InsetNote() { LyXFont font(LyXFont::ALL_SANE); font.decSize(); - font.decSize(); font.setColor(LColor::note); setLabelFont(font); setAutoCollapse(true); @@ -60,8 +59,6 @@ string const InsetNote::editMessage() const void InsetNote::write(Buffer const *buf, ostream & os) const { - //os << getInsetName() << "\n"; - os << "Info\n"; + os << getInsetName() << "\n"; InsetCollapsable::write(buf, os); } - diff --git a/src/insets/insetnote.h b/src/insets/insetnote.h index 7bf3954c8e..5ac501f845 100644 --- a/src/insets/insetnote.h +++ b/src/insets/insetnote.h @@ -32,10 +32,6 @@ public: /// virtual Inset::Code lyxCode() const { return Inset::IGNORE_CODE; } /// - virtual bool insertInset(BufferView *, Inset *) { return false; } - /// - virtual bool insetAllowed(Inset::Code) const { return false; } - /// virtual void write(Buffer const *, std::ostream &) const; /// virtual int latex(Buffer const *, std::ostream &, bool, bool) const