]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_hullinset.C
more IU
[lyx.git] / src / mathed / math_hullinset.C
index 0a81fcf1a516f2e1572dc3b421513f76c6f3b41d..caf7b2393620ebaef98dcde29ffd0f1252e53f69 100644 (file)
@@ -18,6 +18,7 @@
 #include "math_extern.h"
 #include "math_charinset.h"
 #include "textpainter.h"
+#include "dispatchresult.h"
 #include "debug.h"
 #include "funcrequest.h"
 #include "gettext.h"
@@ -771,7 +772,7 @@ void MathHullInset::doExtern
 }
 
 
-dispatch_result MathHullInset::priv_dispatch
+DispatchResult MathHullInset::priv_dispatch
        (FuncRequest const & cmd, idx_type & idx, pos_type & pos)
 {
        switch (cmd.action) {
@@ -781,7 +782,7 @@ dispatch_result MathHullInset::priv_dispatch
                                mutate("eqnarray");
                                idx = 1;
                                pos = 0;
-                               return DISPATCHED_POP;
+                               return DispatchResult(true, FINISHED);
                        }
                        return MathGridInset::priv_dispatch(cmd, idx, pos);
 
@@ -797,7 +798,7 @@ dispatch_result MathHullInset::priv_dispatch
                                                numbered(row, !old);
                                //bv->owner()->message(old ? _("No number") : _("Number"));
                        }
-                       return DISPATCHED;
+                       return DispatchResult(true, true);
 
                case LFUN_MATH_NONUMBER:
                        if (display()) {
@@ -807,7 +808,7 @@ dispatch_result MathHullInset::priv_dispatch
                                //bv->owner()->message(old ? _("No number") : _("Number"));
                                numbered(r, !old);
                        }
-                       return DISPATCHED;
+                       return DispatchResult(true, true);
 
                case LFUN_INSERT_LABEL: {
                        row_type r = (type_ == "multline") ? nrows() - 1 : row(idx);
@@ -821,7 +822,7 @@ dispatch_result MathHullInset::priv_dispatch
                                        ? Alert::askForText(_("Enter new label to insert:"), default_label)
                                        : Alert::askForText(_("Enter label:"), old_label);
                                if (!res.first)
-                                       return UNDISPATCHED;
+                                       return DispatchResult(false);
                                new_label = trim(res.second);
                        }
 
@@ -831,12 +832,12 @@ dispatch_result MathHullInset::priv_dispatch
                        if (!new_label.empty())
                                numbered(r, true);
                        label(r, new_label);
-                       return DISPATCHED;
+                       return DispatchResult(true, true);
                }
 
                case LFUN_MATH_EXTERN:
                        doExtern(cmd, idx, pos);
-                       return DISPATCHED_POP;
+                       return DispatchResult(true, FINISHED);
 
                case LFUN_MATH_MUTATE: {
                        lyxerr << "Hull: MUTATE: " << cmd.argument << endl;
@@ -848,14 +849,14 @@ dispatch_result MathHullInset::priv_dispatch
                                idx = nargs() - 1;
                        if (pos > cell(idx).size())
                                pos = cell(idx).size();
-                       return DISPATCHED_POP;
+                       return DispatchResult(true, FINISHED);
                }
 
                case LFUN_MATH_DISPLAY: {
                        mutate(type_ == "simple" ? "equation" : "simple");
                        idx = 0;
                        pos = cell(idx).size();
-                       return DISPATCHED_POP;
+                       return DispatchResult(true, FINISHED);
                }
 
                default: