]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfloatlist.C
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetfloatlist.C
index 526d85c7079c79877352089c916e060949c18b02..eea56091cc6e0819b53fb7c11546f263f9f68886 100644 (file)
@@ -9,9 +9,6 @@
  */
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "insetfloatlist.h"
 #include "FloatList.h"
@@ -44,6 +41,13 @@ InsetFloatList::InsetFloatList(string const & type)
 }
 
 
+InsetFloatList::~InsetFloatList()
+{
+       InsetCommandMailer mailer("toc", *this);
+       mailer.hideDialog();
+}
+
+
 string const InsetFloatList::getScreenLabel(Buffer const * buf) const
 {
        FloatList const & floats = buf->params.getLyXTextClass().floats();
@@ -94,7 +98,8 @@ void InsetFloatList::read(Buffer const * buf, LyXLex & lex)
 
 void InsetFloatList::edit(BufferView * bv, int, int, mouse_button::state)
 {
-       bv->owner()->getDialogs().showTOC(this);
+       InsetCommandMailer mailer("toc", *this);
+       mailer.showDialog(bv);
 }
 
 
@@ -125,11 +130,19 @@ int InsetFloatList::latex(Buffer const * buf, ostream & os, bool, bool) const
                           << cit->second.listName() << "}\n";
                }
        } else {
+#if USE_BOOST_FORMAT
                os << "%%\\listof{"
                   << getCmdName()
                   << "}{"
                   << boost::format(_("List of %1$s")) % cit->second.name()
                   << "}\n";
+#else
+               os << "%%\\listof{"
+                  << getCmdName()
+                  << "}{"
+                  << _("List of ") << cit->second.name()
+                  << "}\n";
+#endif
        }
        return 1;
 }