]> git.lyx.org Git - features.git/commitdiff
* InsetNote::addToToc(): Prefix toc entries with note type.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 14 Feb 2008 07:30:33 +0000 (07:30 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 14 Feb 2008 07:30:33 +0000 (07:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22997 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetNote.cpp

index bb22daf5bc7170e7b1bfc2e70121b0cd9f6058a2..e07d32e0357fbf748b9729d20ac783e116ba390a 100644 (file)
@@ -20,7 +20,6 @@
 #include "BufferParams.h"
 #include "Counters.h"
 #include "Cursor.h"
-#include "support/debug.h"
 #include "DispatchResult.h"
 #include "Exporter.h"
 #include "FuncRequest.h"
@@ -34,6 +33,7 @@
 #include "TextClass.h"
 #include "TocBackend.h"
 
+#include "support/debug.h"
 #include "support/docstream.h"
 #include "support/Translator.h"
 
@@ -138,7 +138,7 @@ docstring const InsetNote::editMessage() const
 
 docstring InsetNote::name() const 
 {
-       return from_ascii(string("Note") + string(":") + string(notetranslator().find(params_.type)));
+       return from_ascii("Note:" + notetranslator().find(params_.type));
 }
 
 
@@ -225,9 +225,8 @@ void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/, ParConstIter
        ParConstIterator pit = par_const_iterator_begin(*this);
 
        Toc & toc = toclist["note"];
-       // FIXME: we probably want the note type too.
-       docstring str;
-       str = getNewLabel(str);
+       docstring const str = notetranslator_loc().find(params_.type)
+               + from_ascii(": ") + getNewLabel(str);
        toc.push_back(TocItem(pit, 0, str));
 }