]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetnote.C
move inset related stuff from src/graphics to src/inset/
[lyx.git] / src / insets / insetnote.C
index d4a1f7797e5731f367e8352cd642bf7d09dfc582..21c1e9770fb643ad8cba552fbe041a185c7a5f83 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
@@ -35,14 +35,14 @@ void InsetNote::init()
        font.decSize();
        font.setColor(LColor::note);
        setLabelFont(font);
-       setBackgroundColor(LColor::note);
+       setBackgroundColor(LColor::notebg);
        setLabel(_("note"));
        setInsetName("Note");
 }
 
 
-InsetNote::InsetNote()
-       : InsetCollapsable()
+InsetNote::InsetNote(BufferParams const & bp)
+       : InsetCollapsable(bp)
 {
        init();
 }
@@ -62,9 +62,9 @@ Inset * InsetNote::clone(Buffer const &, bool same_id) const
 
 
 // This constructor is used for reading old InsetInfo
-InsetNote::InsetNote(Buffer const * buf, string const & contents, 
+InsetNote::InsetNote(Buffer const * buf, string const & contents,
                     bool collapsed)
-       : InsetCollapsable(collapsed)
+       : InsetCollapsable(buf->params, collapsed)
 {
        init();
 
@@ -76,12 +76,12 @@ InsetNote::InsetNote(Buffer const * buf, string const & contents,
        if (font.language()->RightToLeft())
                font.setLanguage(default_language);
 
-       lyx::pos_type pos;
+       lyx::pos_type pos = 0;
        buf->insertStringAsLines(par, pos, font, strip(contents, '\n'));
 }
 
 
-string const InsetNote::editMessage() const 
+string const InsetNote::editMessage() const
 {
        return _("Opened Note Inset");
 }