]> git.lyx.org Git - lyx.git/blobdiff - src/LyXAction.C
fix some C++ parsing bugs
[lyx.git] / src / LyXAction.C
index 348f935d1cf3fd2c0d09279a58b91e0b8063c5d7..25a5e76552c50c7607bc4d0241691cca80d9746c 100644 (file)
@@ -6,10 +6,6 @@
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "LyXAction.h"
 
 #include "debug.h"
@@ -99,17 +95,11 @@ void LyXAction::init()
                { LFUN_UMLAUT, "accent-umlaut", "", Noop },
                { LFUN_UNDERBAR, "accent-underbar", "", Noop },
                { LFUN_UNDERDOT, "accent-underdot", "", Noop },
-               { LFUN_VECTOR, "accent-vector", "", Noop },
                { LFUN_APPENDIX, "appendix", N_("Insert appendix"), Noop },
                { LFUN_APROPOS, "apropos", N_("Describe command"),
                  NoBuffer|ReadOnly },
                { LFUN_LEFTSEL, "backward-select",
                  N_("Select previous char"), ReadOnly },
-               { LFUN_BIBDB_ADD, "bibtex-database-add", "", Noop },
-               { LFUN_BIBDB_DEL, "bibtex-database-del", "", Noop },
-               { LFUN_INSERT_BIBTEX, "bibtex-insert", N_("Insert bibtex"),
-                 Noop },
-               { LFUN_BIBTEX_STYLE, "bibtex-style", "", Noop },
                { LFUN_BOOKMARK_GOTO, "bookmark-goto", "", ReadOnly },
                { LFUN_BOOKMARK_SAVE, "bookmark-save", "", ReadOnly },
                { LFUN_BREAKLINE, "break-line", "", Noop },
@@ -124,7 +114,6 @@ void LyXAction::init()
                  N_("Go to beginning of document"), ReadOnly },
                { LFUN_BEGINNINGBUFSEL, "buffer-begin-select",
                  N_("Select to beginning of document"), ReadOnly },
-               { LFUN_CHILD_INSERT, "buffer-child-insert", "", Noop },
                { LFUN_CHILDOPEN, "buffer-child-open", "", ReadOnly },
                { LFUN_RUNCHKTEX, "buffer-chktex", N_("Check TeX"), ReadOnly },
                { LFUN_CLOSEBUFFER, "buffer-close", N_("Close"), ReadOnly },
@@ -156,9 +145,6 @@ void LyXAction::init()
                  ReadOnly },
                { LFUN_RIGHT, "char-forward", N_("Go one char forward"),
                  ReadOnly },
-               { LFUN_CITATION_CREATE, "citation-insert",
-                 N_("Insert citation"), Noop },
-               { LFUN_CITATION_INSERT, "", "internal only", Noop },
                { LFUN_EXEC_COMMAND, "command-execute", "", NoBuffer },
                { LFUN_PREFIX, "command-prefix",
                  N_("Execute command"), NoBuffer },
@@ -182,33 +168,32 @@ void LyXAction::init()
                  N_("Choose Paragraph Environment"), ReadOnly },
                { LFUN_END_OF_SENTENCE, "end-of-sentence-period-insert",
                  N_("Insert end of sentence period"), Noop },
+               { LFUN_ENVIRONMENT_INSERT, "environment-insert", "", Noop },
                { LFUN_GOTOERROR, "error-next",
                  N_("Go to next error"), ReadOnly },
                { LFUN_REMOVEERRORS, "error-remove-all",
                  N_("Remove all error boxes"), ReadOnly },
                { LFUN_INSET_ERT, "ert-insert",
                  N_("Insert a new ERT Inset"), Noop },
-               { LFUN_INSET_EXTERNAL, "external-insert",
-                 N_("Insert a new external inset"), Noop },
-               { LFUN_INSET_GRAPHICS, "graphics-insert",
-                 N_("Insert Graphics"), Noop },
                { LFUN_FILE_INSERT, "file-insert", "", Noop },
                { LFUN_FILE_INSERT_ASCII, "file-insert-ascii", _("Insert ASCII files as lines"), Noop },
                { LFUN_FILE_INSERT_ASCII_PARA, "file-insert-ascii-para", _("Insert ASCII file as a paragraph"), Noop },
                { LFUN_FILE_NEW, "file-new", "", NoBuffer },
-               { LFUN_FILE_OPEN, "file-open", _("Open a file"), NoBuffer },
+               { LFUN_FILE_OPEN, "file-open", N_("Open a file"), NoBuffer },
                { LFUN_MENUSEARCH, "find-replace", N_("Find & Replace"),
                  ReadOnly },
-               { LFUN_INSET_FLOAT, "float-insert", "Insert a Float", Noop },
+               { LFUN_INSET_FLOAT, "float-insert", N_("Insert a Float"), Noop },
                { LFUN_INSET_WIDE_FLOAT, "float-wide-insert",
-                 "Insert a wide Float", Noop },
+                 N_("Insert a wide Float"), Noop },
+               { LFUN_INSET_WRAP, "wrap-insert", N_("Insert a Wrap"), Noop },
                { 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"),
                  Noop },
                { LFUN_EMPH, "font-emph", N_("Toggle emphasize"), Noop },
-               { LFUN_FREE, "font-free", N_("Toggle user defined style"),
-                 Noop },
+               { LFUN_FREEFONT_APPLY, "font-free-apply",
+                 N_("Toggle user defined style"), Noop },
+               { LFUN_FREEFONT_UPDATE, "font-free-update", "", Noop },
                { LFUN_NOUN, "font-noun", N_("Toggle noun style"), Noop },
                { LFUN_ROMAN, "font-roman", N_("Toggle roman font style"),
                  Noop },
@@ -247,11 +232,15 @@ void LyXAction::init()
                  ReadOnly },
                { LFUN_INSERT_LABEL, "label-insert", N_("Insert Label"),
                  Noop },
+               { LFUN_INSET_OPTARG, "optional-insert", N_("Insert Optional Argument"),
+                 Noop },
+               { LFUN_INSERT_BIBITEM, "bibitem-insert",
+                 N_("Insert Bibliography Key"), Noop },
                { LFUN_LANGUAGE, "language", N_("Change language"), Noop },
                { LFUN_LATEX_LOG, "latex-view-log", N_("View LaTeX log"),
                  ReadOnly },
                { LFUN_LAYOUT, "layout", "", Noop },
-               { LFUN_LAYOUT_CHARACTER, "layout-character", "", Noop },
+               { LFUN_LAYOUT_CHARACTER, "layout-character", "", ReadOnly },
                { LFUN_LAYOUT_COPY, "layout-copy",
                  N_("Copy paragraph environment type"), Noop },
                { LFUN_LAYOUT_DOCUMENT, "layout-document", "", ReadOnly },
@@ -274,7 +263,7 @@ void LyXAction::init()
 #endif
                { LFUN_QUIT, "lyx-quit", N_("Exit"), NoBuffer },
                { LFUN_INSET_MARGINAL, "marginalnote-insert",
-                 N_("Insert Marginalnote"), Noop },
+                 N_("Insert margin note"), Noop },
                { LFUN_MARK_OFF, "mark-off", "", ReadOnly },
                { LFUN_MARK_ON, "mark-on", "", ReadOnly },
                { LFUN_SETMARK, "mark-toggle", "", ReadOnly },
@@ -284,8 +273,8 @@ void LyXAction::init()
                { LFUN_GREEK_TOGGLE, "math-greek-toggle", "", Noop },
                { LFUN_INSERT_MATH, "math-insert",
                  N_("Insert math symbol"), Noop },
-               { LFUN_SUBSCRIPT, "math-subscript", "", Noop },
-               { LFUN_SUPERSCRIPT, "math-superscript", "", Noop },
+               { LFUN_SUBSCRIPT, "math-subscript", N_("Add subscript"), Noop },
+               { LFUN_SUPERSCRIPT, "math-superscript", N_("Add superscript"), Noop },
                { LFUN_MATH_LIMITS, "math-limits", "", Noop },
                { LFUN_MATH_MACRO, "math-macro", "", Noop },
                { LFUN_MATH_MUTATE, "math-mutate", "", Noop },
@@ -296,12 +285,6 @@ void LyXAction::init()
                { LFUN_MATH_NONUMBER, "math-nonumber", "", Noop },
                { LFUN_MATH_NUMBER, "math-number", "", Noop },
                { LFUN_MATH_EXTERN, "math-extern", "", Noop },
-               { LFUN_MATH_VALIGN, "math-valign", "", Noop },
-               { LFUN_MATH_HALIGN, "math-halign", "", Noop },
-               { LFUN_MATH_ROW_INSERT, "math-row-insert", "", Noop },
-               { LFUN_MATH_ROW_DELETE, "math-row-delete", "", Noop },
-               { LFUN_MATH_COLUMN_INSERT, "math-column-insert", "", Noop },
-               { LFUN_MATH_COLUMN_DELETE, "math-column-delete", "", Noop },
                { LFUN_MATH_PANEL, "math-panel", "", Noop },
                { LFUN_MATH_SIZE, "math-size", "", Noop },
                { LFUN_MENU_OPEN_BY_NAME, "menu-open", "", NoBuffer },
@@ -337,8 +320,6 @@ void LyXAction::init()
                  N_("Reconfigure"), NoBuffer },
                { LFUN_REDO, "redo", N_("Redo"), Noop },
                { LFUN_REF_GOTO, "reference-goto", "", ReadOnly },
-               { LFUN_REF_INSERT, "reference-insert",
-                 N_("Insert cross reference"), ReadOnly },
                { LFUN_REFERENCE_GOTO, "reference-next", "", ReadOnly },
                { LFUN_NEXT, "screen-down", "", ReadOnly },
                { LFUN_NEXTSEL, "screen-down-select", "", ReadOnly },
@@ -382,7 +363,6 @@ void LyXAction::init()
                { LFUN_UP, "up", "", ReadOnly },
                { LFUN_UPSEL, "up-select", "", ReadOnly },
                { LFUN_URL, "url-insert", "", Noop },
-               { LFUN_INSERT_URL, "", "internal only", Noop },
                { LFUN_VC_CHECKIN, "vc-check-in", "", ReadOnly },
                { LFUN_VC_CHECKOUT, "vc-check-out", "", ReadOnly },
                { LFUN_VC_HISTORY, "vc-history", "", ReadOnly },
@@ -401,6 +381,7 @@ void LyXAction::init()
                { LFUN_WORDRIGHT, "word-forward", "", ReadOnly },
                { LFUN_WORDRIGHTSEL, "word-forward-select", "", ReadOnly },
                { LFUN_LOWCASE_WORD, "word-lowcase", "", Noop },
+               { LFUN_WORDSEL, "word-select", "", ReadOnly },
                { LFUN_UPCASE_WORD, "word-upcase", "", Noop },
                { LFUN_MESSAGE, "message",
                  N_("Show message in minibuffer"), NoBuffer },
@@ -416,6 +397,30 @@ void LyXAction::init()
                { LFUN_FORKS_KILL, "kill-forks",
                  N_("Kill the forked process with this PID"), NoBuffer },
                { LFUN_TOOLTIPS_TOGGLE, "toggle-tooltips", "", NoBuffer },
+               { LFUN_TRACK_CHANGES, "track-changes", N_("Begin tracking changes"), Noop },
+               { LFUN_MERGE_CHANGES, "merge-changes", N_("Merge changes"), Noop },
+               { LFUN_ACCEPT_CHANGE, "accept-change", N_("Accept selected change"), Noop },
+               { LFUN_REJECT_CHANGE, "reject-change", N_("Reject selected change"), Noop },
+               { LFUN_ACCEPT_ALL_CHANGES, "accept-all-changes", N_("Accept all changes"), Noop },
+               { LFUN_REJECT_ALL_CHANGES, "reject-all-changes", N_("Reject all changes"), Noop },
+
+               { LFUN_DIALOG_SHOW_NEW_INSET, "dialog-show-new-inset",
+                 N_("Show the inset's dialog"), Noop },
+               { LFUN_DIALOG_SHOW_NEXT_INSET, "dialog-show-next-inset",
+                 N_("Show the inset's dialog"), Noop },
+               { LFUN_DIALOG_UPDATE, "dialog-update",
+                 N_("Update the dialog"), Noop },
+               { LFUN_DIALOG_HIDE, "dialog-hide",
+                 N_("Hide the dialog"), Noop },
+               { LFUN_DIALOG_DISCONNECT_INSET, "dialog-disconnect-inset",
+                 N_("Disconnect the dialog from the current inset"), Noop },
+               { LFUN_INSET_APPLY, "inset-apply", "", Noop },
+               { LFUN_INSET_INSERT, "inset-insert", "", Noop },
+               { LFUN_INSET_MODIFY, "", "internal only", Noop },
+               { LFUN_INSET_DIALOG_UPDATE, "", "internal only", Noop },
+               { LFUN_PARAGRAPH_APPLY, "paragraph-params-apply",
+                  N_("Apply these params to the paragraph"), Noop },
+               { LFUN_PARAGRAPH_UPDATE, "", "internal only", Noop },
                { LFUN_NOACTION, "", "", Noop }
        };
 
@@ -536,12 +541,12 @@ string const LyXAction::getActionName(int action) const
 {
        FuncRequest ev = retrieveActionArg(action);
        if (!ev.argument.empty())
-               ev.argument.insert(0, " ");
+               ev.argument.insert(string::size_type(0), 1, ' ');
 
-       info_map::const_iterator iit = lyx_info_map.find(ev.action);
+       info_map::const_iterator const it = lyx_info_map.find(ev.action);
 
-       if (iit != lyx_info_map.end())
-               return iit->second.name + ev.argument;
+       if (it != lyx_info_map.end())
+               return it->second.name + ev.argument;
        return string();
 }
 
@@ -551,7 +556,7 @@ string const LyXAction::helpText(int pseudoaction) const
        FuncRequest ev = retrieveActionArg(pseudoaction);
 
        string help;
+
        info_map::const_iterator ici = lyx_info_map.find(ev.action);
        if (ici != lyx_info_map.end()) {
                if (lyxerr.debugging(Debug::ACTION)) {