]> git.lyx.org Git - features.git/commitdiff
Add list of Marginal Notes.
authorAbdelrazak Younes <younes@lyx.org>
Wed, 13 Feb 2008 13:33:56 +0000 (13:33 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 13 Feb 2008 13:33:56 +0000 (13:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22976 a592a061-630c-0410-9148-cb99ea01b6c8

src/MenuBackend.cpp
src/frontends/qt4/GuiToc.cpp
src/insets/InsetMarginal.cpp
src/insets/InsetMarginal.h

index 5a1349418bdf4d78566e1d91bf3860c0426ec040..6dfdafb18759e0087b32cd4983756f7947dcca7f 100644 (file)
@@ -772,6 +772,8 @@ void expandToc(Menu & tomenu, Buffer const * buf)
                        label = _("List of Indexes");
                else if (cit->first == "listing")
                        label = _("List of Listings");
+               else if (cit->first == "marginalnote")
+                       label = _("List of Marginal notes");
                else if (cit->first == "note")
                        label = _("List of Notes");
                else if (cit->first == "footnote")
index d8dc337f387c21cadda9daee65afbf4ff7b302a1..91d64f8ad1c18e5c39e23756a8a387c08428ee03 100644 (file)
@@ -227,13 +227,14 @@ docstring GuiToc::guiName(string const & type) const
 {
        if (type == "tableofcontents")
                return _("Table of Contents");
-
        if (type == "footnote")
                return _("List of Foot notes");
-
+       if (type == "listing")
+               return _("List of Listings");
        if (type == "index")
                return _("List of Indexes");
-
+       if (type == "marginalnote")
+               return _("List of Marginal notes");
        if (type == "note")
                return _("List of Notes");
 
index 418ddad4f250baf82d636a4ec099e1db9a831cd5..03e48e5fba01679a99aecbc310ec5bd50a11b2d3 100644 (file)
 #include "InsetMarginal.h"
 
 #include "Buffer.h"
-#include "support/gettext.h"
 #include "OutputParams.h"
+#include "TocBackend.h"
+
+#include "support/gettext.h"
 
 #include <ostream>
 
@@ -77,4 +79,14 @@ int InsetMarginal::docbook(Buffer const & buf, odocstream & os,
 }
 
 
+void InsetMarginal::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
+{
+       ParConstIterator pit = par_const_iterator_begin(*this);
+
+       Toc & toc = toclist["marginalnote"];
+       docstring str;
+       str = getNewLabel(str);
+       toc.push_back(TocItem(pit, 0, str));
+}
+
 } // namespace lyx
index 94f58a9f83f71059bef3f65d31ae71288e324514..c081dd9b7bc3255f18dc9606b2cfe36f869e0714 100644 (file)
@@ -41,6 +41,8 @@ public:
                    OutputParams const & runparams) const;
        ///
        virtual docstring const editMessage() const;
+       ///
+       void addToToc(TocList &, Buffer const &, ParConstIterator const &) const;
 protected:
        InsetMarginal(InsetMarginal const &);
 private: