]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.C
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / LyXAction.C
index 5c0dc92f4b3b236145f79783ef51bb7ba2998752..31e60716b4e6b89d34d877f152d545fa6a62a662 100644 (file)
@@ -155,6 +155,7 @@ void LyXAction::init()
                { LFUN_MENUWRITEAS, "buffer-write-as", N_("Save As"),
                  ReadOnly },
                { LFUN_CANCEL, "cancel", N_("Cancel"), NoBuffer },
+               { LFUN_INSET_CAPTION, "caption-insert", "", Noop },
                { LFUN_LEFT, "char-backward", N_("Go one char back"),
                  ReadOnly },
                { LFUN_RIGHT, "char-forward", N_("Go one char forward"),
@@ -167,6 +168,7 @@ void LyXAction::init()
                { LFUN_SEQUENCE, "command-sequence", "", Noop },
                { LFUN_COPY, "copy", N_("Copy"), ReadOnly },
                { LFUN_CUT, "cut", N_("Cut"), Noop },
+               { LFUN_DATE_INSERT, "date-insert", "", Noop },
                { LFUN_BACKSPACE, "delete-backward", "", Noop },
                { LFUN_BACKSPACE_SKIP, "delete-backward-skip", "", Noop },
                { LFUN_DELETE, "delete-forward", "", Noop },
@@ -201,6 +203,8 @@ void LyXAction::init()
                { LFUN_FILE_OPEN, "file-open", "", NoBuffer },
                { LFUN_MENUSEARCH, "find-replace", N_("Find & Replace"),
                  ReadOnly },
+               { LFUN_INSET_FLOAT, "float-insert", "", Noop },
+               { LFUN_FLOATSOPERATE, "floats-operate", "", ReadOnly },
                { LFUN_BOLD, "font-bold", N_("Toggle bold"), Noop },
                { LFUN_CODE, "font-code", N_("Toggle code style"), Noop },
                { LFUN_DEFAULT, "font-default", N_("Default font style"),
@@ -224,9 +228,6 @@ void LyXAction::init()
                { LFUN_INSET_FOOTNOTE, "footnote-insert",
                  N_("Insert Footnote"), Noop },
 #endif
-               { LFUN_INSET_MARGINAL, "marginalnote-insert",
-                 N_("Insert Marginalnote"), Noop },
-               { LFUN_FLOATSOPERATE, "floats-operate", "", ReadOnly },
                { LFUN_RIGHTSEL, "forward-select", N_("Select next char"),
                  ReadOnly },
                { LFUN_HFILL, "hfill-insert",
@@ -284,6 +285,7 @@ void LyXAction::init()
                { LFUN_END, "line-end", N_("Go to end of line"), ReadOnly },
                { LFUN_ENDSEL, "line-end-select",
                  N_("Select to end of line"), ReadOnly },
+               { LFUN_INSET_LIST, "list-insert", "", Noop },
                { LFUN_LOA_INSERT, "loa-insert",
                  N_("Insert list of algorithms"), Noop },
                { LFUN_LOAVIEW, "loa-view",
@@ -297,6 +299,8 @@ void LyXAction::init()
                { LFUN_LOTVIEW, "lot-view",
                  N_("View list of tables"), ReadOnly },
                { LFUN_QUIT, "lyx-quit", N_("Exit"), NoBuffer },
+               { LFUN_INSET_MARGINAL, "marginalnote-insert",
+                 N_("Insert Marginalnote"), Noop },
 #ifndef NEW_INSETS
                { LFUN_MARGINMELT, "marginpar-insert",
                  N_("Insert Margin note"), Noop },
@@ -323,6 +327,7 @@ void LyXAction::init()
                { LFUN_MENU_OPEN_BY_NAME, "menu-open", "", NoBuffer },
                { LFUN_MENU_SEPARATOR, "menu-separator-insert", "", Noop },
                { LFUN_META_FAKE, "meta-prefix", "", NoBuffer },
+               { LFUN_INSET_MINIPAGE, "minipage-insert", "", Noop },
                { LFUN_INSERT_NOTE, "note-insert", "", Noop },
                { LFUN_GOTONOTE, "note-next", "", ReadOnly },
                { LFUN_OPENSTUFF, "open-stuff", "", ReadOnly },
@@ -332,6 +337,7 @@ void LyXAction::init()
                  N_("Select next paragraph"), ReadOnly },
                { LFUN_GOTO_PARAGRAPH, "paragraph-goto", 
                  N_("Go to paragraph"), ReadOnly },
+               { LFUN_PARAGRAPH_SPACING, "paragraph-spacing", "", Noop },
                { LFUN_UP_PARAGRAPH, "paragraph-up",
                  N_("Go one paragraph up"), ReadOnly },
                { LFUN_UP_PARAGRAPHSEL, "paragraph-up-select",
@@ -355,6 +361,8 @@ void LyXAction::init()
                  N_("Insert cross reference"), ReadOnly },
                { LFUN_NEXT, "screen-down", "", ReadOnly },
                { LFUN_NEXTSEL, "screen-down-select", "", ReadOnly },
+               { LFUN_SCREEN_FONT_UPDATE, "screen-font-update",
+                 "", NoBuffer },
                { LFUN_CENTER, "screen-recenter", "", ReadOnly },
                { LFUN_PRIOR, "screen-up", "", ReadOnly },
                { LFUN_PRIORSEL, "screen-up-select", "", ReadOnly },
@@ -371,13 +379,13 @@ void LyXAction::init()
                { LFUN_GOTOFILEROW, "server-goto-file-row", "", Noop },
                { LFUN_NOTIFY, "server-notify", "", ReadOnly },
                { LFUN_SETXY, "server-set-xy", "", ReadOnly },
+               { LFUN_SET_COLOR, "set-color", "", ReadOnly|NoBuffer },
                { LFUN_SPELLCHECK, "spellchecker", "", Noop },
-               { LFUN_INSERT_MATH, "symbol-insert", "", Noop },
                { LFUN_SHIFT_TAB, "tab-backward", "", Noop },
                { LFUN_TAB, "tab-forward", "", Noop },
                { LFUN_TABINSERT, "tab-insert", "", Noop },
                { LFUN_DIALOG_TABULAR_INSERT, "dialog-tabular-insert",
-                 N_("Open Insert Tabular Dialog"), Noop },
+                 N_("Insert Table"), Noop },
                { LFUN_TABULAR_FEATURE, "tabular-feature",
                  N_("Tabular Features"), Noop },
                { LFUN_INSET_TABULAR, "tabular-insert",
@@ -385,6 +393,7 @@ void LyXAction::init()
                { LFUN_TEX, "tex-mode", N_("Toggle TeX style"), Noop },
                { LFUN_INSET_TEXT, "text-insert",
                  N_("Insert a new Text Inset"), Noop },
+               { LFUN_INSET_THEOREM, "theorem-insert", "", Noop },
                { LFUN_TOC_INSERT, "toc-insert",
                  N_("Insert table of contents"), Noop },
                { LFUN_TOCVIEW, "toc-view",
@@ -418,15 +427,6 @@ void LyXAction::init()
                { LFUN_WORDRIGHTSEL, "word-forward-select", "", ReadOnly },
                { LFUN_LOWCASE_WORD, "word-lowcase", "", Noop },
                { LFUN_UPCASE_WORD, "word-upcase", "", Noop },
-               { LFUN_DATE_INSERT, "date-insert", "", Noop },
-               { LFUN_PARAGRAPH_SPACING, "paragraph-spacing", "", Noop },
-               { LFUN_SET_COLOR, "set-color", "", Noop },
-               { LFUN_INSET_MINIPAGE, "minipage-insert", "", Noop },
-               { LFUN_INSET_FLOAT, "float-insert", "", Noop },
-               { LFUN_INSET_LIST, "list-insert", "", Noop },
-               { LFUN_INSET_THEOREM, "theorem-insert", "", Noop },
-               { LFUN_INSET_CAPTION, "caption-insert", "", Noop },
-               { LFUN_SCREEN_FONT_UPDATE, "screen-font-update", "", NoBuffer },
                { LFUN_NOACTION, "", "", Noop }
        };
 
@@ -462,7 +462,7 @@ int LyXAction::searchActionArg(kb_action action, string const & arg) const
                                      << endl;
                return LFUN_UNKNOWN_ACTION;
        }
-       
+
        arg_item::const_iterator aci = (*pit).second.find(arg);
 
        if (aci == (*pit).second.end()) {
@@ -486,7 +486,7 @@ int LyXAction::searchActionArg(kb_action action, string const & arg) const
 // Returns a pseudo-action given an action and its argument.
 int LyXAction::getPseudoAction(kb_action action, string const & arg) const
 {
-       int psdaction = searchActionArg(action, arg);
+       int const psdaction = searchActionArg(action, arg);
 
        if (isPseudoAction(psdaction)) return psdaction;
 
@@ -518,7 +518,7 @@ int LyXAction::getPseudoAction(kb_action action, string const & arg) const
 kb_action LyXAction::retrieveActionArg(int pseudo, string & arg) const
 {
        arg.erase(); // clear it to be sure.
-       
+
        pseudo_map::const_iterator pit = lyx_pseudo_map.find(pseudo);
 
        if (pit != lyx_pseudo_map.end()) {
@@ -541,7 +541,7 @@ int LyXAction::LookupFunc(string const & func) const
 
        // split action and arg
        string actstr;
-       string argstr = split(func, actstr, ' ');
+       string const argstr = split(func, actstr, ' ');
        lyxerr[Debug::ACTION] << "Action: " << actstr << '\n';
        lyxerr[Debug::ACTION] << "Arg   : " << argstr << '\n';
 
@@ -594,7 +594,7 @@ int LyXAction::getApproxFunc(string const & func) const
 
 string const LyXAction::getApproxFuncName(string const & func) const
 {
-       int f = getApproxFunc(func);
+       int const f = getApproxFunc(func);
        // This will return empty string if f isn't an action.
        return getActionName(f);
 }