From 9d37c60314d1f2aed72c040498fe574c37277865 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 30 Apr 2007 12:27:12 +0000 Subject: [PATCH] Get rid of GridInsetMailer: this is completely useless and unused and consumes a lot of CPU when editing a file with a lot of macro (which is a heavy user of InsetMathGrid). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18117 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathGrid.cpp | 39 ------------------------------------ 1 file changed, 39 deletions(-) diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 0d6918d1bb..928e452d80 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -28,8 +28,6 @@ #include "frontends/Clipboard.h" #include "frontends/Painter.h" -#include "insets/MailInset.h" - #include "support/lstrings.h" #include @@ -50,31 +48,6 @@ using std::istream; using std::istringstream; using std::vector; -class GridInsetMailer : public MailInset { -public: - GridInsetMailer(InsetMathGrid & inset) : inset_(inset) {} - /// - virtual string const & name() const - { - static string const theName = "tabular"; - return theName; - } - /// - virtual string const inset2string(Buffer const &) const - { - odocstringstream data; - //data << name() << " active_cell " << inset.getActCell() << '\n'; - data << from_utf8(name()) << " active_cell " << 0 << '\n'; - WriteStream ws(data); - inset_.write(ws); - return to_utf8(data.str()); - } - -protected: - Inset & inset() const { return inset_; } - InsetMathGrid & inset_; -}; - namespace { @@ -1030,18 +1003,6 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd) //lyxerr << "*** InsetMathGrid: request: " << cmd << endl; switch (cmd.action) { - case LFUN_MOUSE_RELEASE: - //if (cmd.button() == mouse_button::button3) { - // GridInsetMailer(*this).showDialog(); - // return DispatchResult(true, true); - //} - InsetMathNest::doDispatch(cur, cmd); - break; - - case LFUN_INSET_DIALOG_UPDATE: - GridInsetMailer(*this).updateDialog(&cur.bv()); - break; - // insert file functions case LFUN_LINE_DELETE: // FIXME: We use recordUndoInset when a change reflects more