]> git.lyx.org Git - lyx.git/blobdiff - src/insets/mailinset.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / mailinset.C
index 725ca45bafa91f8f605bcf402368c15c407595c2..22db2e8171c1520ce17cd5e161cf6e92b9e011de 100644 (file)
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /**
  * \file mailinset.C
  * This file is part of LyX, the document processor.
@@ -6,44 +5,52 @@
  *
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 #include "mailinset.h"
-#include "inset.h"
+
 #include "BufferView.h"
-#include "frontends/LyXView.h"
+#include "debug.h"
+
 #include "frontends/Dialogs.h"
-#include "Lsstream.h"
 
 
-void MailInset::showDialog() const
-{
-       BufferView * bv = inset().view();
-       if (!bv)
-               return;
+namespace lyx {
 
-       bv->owner()->getDialogs().show(name(), inset2string(), &inset());
-}
+using std::string;
 
 
-void MailInset::updateDialog() const
+void MailInset::showDialog(BufferView * bv) const
 {
-       BufferView * bv = inset().view();
-       if (!bv)
-               return;
+       BOOST_ASSERT(bv);
+       bv->showInsetDialog(name(), inset2string(*bv->buffer()),
+                                      &inset());
+}
+
 
-       bv->owner()->getDialogs().update(name(), inset2string());
+void MailInset::updateDialog(BufferView * bv) const
+{
+       BOOST_ASSERT(bv);
+       bv->updateDialog(name(), inset2string(*bv->buffer()));
 }
 
 
 void MailInset::hideDialog() const
 {
-       BufferView * bv = inset().view();
-       if (!bv)
-               return;
+       Dialogs::hide(name(), &inset());
+}
+
 
-       bv->owner()->getDialogs().hide(name());
+void print_mailer_error(string const & class_name,
+                       string const & data, int arg_id, string const & arg)
+{
+       lyxerr << '\n' << class_name << "::string2params(" << data << ")\n"
+              << "Expected arg " << arg_id << " to be \"" << arg << "\"\n"
+              << std::endl;
 }
+
+
+} // namespace lyx