]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_gridinset.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_gridinset.C
index 5b05e54b98f10a59cb39a3f399f7a4c43e6b00ff..7b773ed54d5856e72f3a0fec6539d104fdc0de3f 100644 (file)
@@ -5,6 +5,7 @@
 #include "funcrequest.h"
 #include "frontends/Painter.h"
 #include "debug.h"
+#include "Lsstream.h"
 
 
 #include "insets/mailinset.h"
@@ -27,8 +28,12 @@ public:
        ///
        virtual string const inset2string() const
        {
-               lyxerr << "inset2string called" << std::endl;
-               return "whatever"; //(inset_);
+               ostringstream data;
+               //data << name() << " active_cell " << inset.getActCell() << '\n';
+               data << name() << " active_cell " << 0 << '\n';
+               WriteStream ws(data);
+               inset_.write(ws);
+               return data.str();
        }
 
 protected:
@@ -1003,17 +1008,13 @@ dispatch_result MathGridInset::dispatch
 {
        switch (cmd.action) {
 
-               case LFUN_MOUSE_RELEASE: {
-                       if (cmd.button() == mouse_button::button3) {
-                               WriteStream ws(lyxerr);
-                               write(ws);
-                               GridInsetMailer mailer(*this);
-                               lyxerr << "mailer " << mailer.name() << " active\n";
-                               mailer.showDialog(cmd.view());
-                               return DISPATCHED;
-                       }
+               case LFUN_MOUSE_RELEASE:
+                       //if (cmd.button() == mouse_button::button3) {
+                       //      GridInsetMailer mailer(*this);
+                       //      mailer.showDialog();
+                       //      return DISPATCHED;
+                       //}
                        break;
-               }
 
                case LFUN_INSET_DIALOG_UPDATE: {
                        GridInsetMailer mailer(*this);
@@ -1040,7 +1041,6 @@ dispatch_result MathGridInset::dispatch
                case LFUN_TABINSERT:
                        //bv->lockedInsetStoreUndo(Undo::EDIT);
                        splitCell(idx, pos);
-                       //updateLocal(bv, true);
                        return DISPATCHED_POP;
 
                case LFUN_BREAKLINE: {
@@ -1060,7 +1060,6 @@ dispatch_result MathGridInset::dispatch
                        pos = cell(idx).size();
 
                        //mathcursor->normalize();
-                       //updateLocal(bv, true);
                        return DISPATCHED_POP;
                }