]> git.lyx.org Git - features.git/commitdiff
Small things.
authorAngus Leeming <leeming@lyx.org>
Fri, 20 Jul 2001 12:40:38 +0000 (12:40 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 20 Jul 2001 12:40:38 +0000 (12:40 +0000)
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

src/ChangeLog
src/FontLoader.C
src/buffer.C
src/insets/ChangeLog
src/insets/insetnote.C
src/insets/insetnote.h

index 32046dd37ef9e17027b5449cf0f6269055a830f2..22204548f96b022fbcdfde3274fe28f77fac8fe4 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-20  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * 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  <a.leeming@ic.ac.uk>
 
        * sp_form.[Ch]: remove.
index f137d806f25c6eb35b738cfe0e79e9773b917539..5113988334a4b7a9db88832afc9e8f65732f990b 100644 (file)
@@ -15,7 +15,6 @@
 #pragma implementation "FontLoader.h"
 #endif
 
-#include FORMS_H_LOCATION
 #include "FontLoader.h"
 #include "FontInfo.h"
 #include "gettext.h"
index 846ed1e4d61139777abbe10bf0584be306a19ebd..cc41db67b76ff59d9fb66c7c1d8af32d4fd3870d 100644 (file)
@@ -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" );
index 85fbc29fb52c4992ec74df47f34af622d64aeb10..a7045c1a5dbb4a0614dfed1476e20e28ba7bc6de 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-20  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * 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  <a.leeming@ic.ac.uk>
 
        * insetinfo.[Ch]: removed.
index f5d7fc8ca5fa5a1e5ababfdefec7c160e624902a..4463747b7d2814dcdd9768a2203311f5f2dbce0f 100644 (file)
@@ -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);
 }
-
index 7bf3954c8ef98d60e59cb66c30679690b9592d03..5ac501f8452edec4f91821c1c08526e5f599f528 100644 (file)
@@ -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