]> git.lyx.org Git - features.git/commitdiff
Remove 14 LFUNs; use "dialog-show <name> <data>" instead.
authorAngus Leeming <leeming@lyx.org>
Thu, 19 Jun 2003 16:49:45 +0000 (16:49 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 19 Jun 2003 16:49:45 +0000 (16:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7191 a592a061-630c-0410-9148-cb99ea01b6c8

15 files changed:
lib/ChangeLog
lib/bind/cua.bind
lib/bind/emacs.bind
lib/bind/xemacs.bind
lib/ui/classic.ui
lib/ui/stdmenus.ui
lib/ui/stdtoolbars.ui
src/ChangeLog
src/LyXAction.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/lyx_gui.C
src/lfuns.h
src/lyxfunc.C
src/mathed/ChangeLog
src/mathed/formulabase.C

index c9fd28827f9e98722095f40baf0c02891f1f49ef..c737f720cfc9bc6314921b3fec1f2174d2f63495 100644 (file)
@@ -1,3 +1,12 @@
+2003-06-19  Angus Leeming  <leeming@lyx.org>
+
+       * lib/bind/cua.bind:
+       * lib/bind/emacs.bind:
+       * lib/bind/xemacs.bind:
+       * lib/ui/classic.ui:
+       * lib/ui/stdmenus.ui:
+       * lib/ui/stdtoolbars.ui: replace lots of lfuns with dialog-show <name>.
+
 2003-06-17  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
        * ui/stdmenus.ui: add submenu "Paste Recent" to edit. Also add
        * Makefile.am: do not set M4 explicitely
 
 2002-04-24  Rob Lahaye  <lahaye@users.sourceforge.net>
+
        * configure.m4: add 'convert XPM to EPS', add more Grace conversions
        and change tab to double space indentation in conversion section
 
index 9ad9c9e79ee54f725638c2ac333cd2e9253fd1c0..6d8277d06ddad6d9b36f0a0209b906acb1fe5240 100644 (file)
@@ -36,7 +36,7 @@
 \bind "C-w"                    "buffer-close"
 \bind "C-s"                    "buffer-write"
 \bind "C-S-S"                  "buffer-write-as"
-\bind "C-p"                    "buffer-print" 
+\bind "C-p"                    "dialog-show print" 
 \bind "C-d"                    "buffer-view dvi"       # 'd' for dvi
 \bind "C-t"                    "buffer-view ps"
 \bind "C-S-D"                  "buffer-update dvi"     # 'd' for dvi
@@ -53,7 +53,7 @@
 \bind "C-m"                    "math-mode"
 \bind "C-S-M"                  "math-display"
 
-\bind "C-f"                    "find-replace"
+\bind "C-f"                    "dialog-show findreplace"
 \bind "C-g"                    "error-next"
 \bind "C-i"                    "inset-toggle"          # 'i' for Inset
 
@@ -79,7 +79,7 @@
 \bind "C-F4"                   "buffer-close"
 \bind "F5"                     "screen-recenter"
 \bind "M-F4"                   "lyx-quit"
-\bind "F7"                     "spellchecker"
+\bind "F7"                     "dialog-show spellchecker"
 \bind "S-F7"                   "thesaurus-entry"
 
 \bind "M-x"                    "command-execute"
index 7468f00af9565ace4e40139d9bd97a597f407370..223d26822c4f34e0c3a6b40357c06170e4735101 100644 (file)
@@ -44,8 +44,8 @@
 # this is "quoted-insert" a total different meaning from "quote-insert"
 \bind "C-q"                    "self-insert \""
 #bind "C-r"                    "------"
-\bind "C-s"                    "find-replace"
-\bind "M-~S-percent"           "find-replace"
+\bind "C-s"                    "dialog-show findreplace"
+\bind "M-~S-percent"           "dialog-show findreplace"
 
 \bind "C-t"                    "chars-transpose"
 
@@ -78,7 +78,7 @@
 # \bind "C-x s"                  "buffer-write"
 \bind "C-x t"                  "buffer-update dvi"
 \bind "C-x u"                  "undo"
-\bind "C-x v h"                "vc-history"
+\bind "C-x v h"                "dialog-show vclog"
 \bind "C-x v v"                "vc-check-in"
 \bind "C-x v u"                "vc-revert"
 \bind "C-x v c"                "vc-undo-last"
index ffc41f01153a616d392784e93119a5b413888a10..5a5ceb968edc9c07750064ebe847b5c6ec7a1d90 100644 (file)
@@ -45,8 +45,8 @@
 # this is "quoted-insert" a total different meaning from "quote-insert"
 \bind "C-q"                    "self-insert \""
 #bind "C-r"                    "------"
-\bind "C-s"                    "find-replace"
-\bind "M-~S-percent"           "find-replace"
+\bind "C-s"                    "dialog-show findreplace"
+\bind "M-~S-percent"           "dialog-show findreplace"
 
 # should be "chars-transpose" (swaps two chars)
 #bind "C-t"                    "------"
@@ -82,7 +82,7 @@
 # \bind "C-x s"                  "buffer-write"
 \bind "C-x t"                  "buffer-update dvi"
 \bind "C-x u"                  "undo"
-\bind "C-x v h"                "vc-history"
+\bind "C-x v h"                "dialog-show vclog"
 \bind "C-x v v"                "vc-check-in"
 \bind "C-x v u"                "vc-revert"
 \bind "C-x v c"                "vc-undo-last"
 #  similar here especially for LinuxDoc (although LinuxDoc isn't only for
 #  making HTML).
 ##
-\bind "C-c C-l"                 "latex-view-log"        # show warning log
+\bind "C-c C-l"                 "dialog-show latexlog"        # show warning log
 \bind "C-c C-o"                 "error-next"
 \bind "C-c C-v"                 "buffer-chktex"         # validate
 
 ## Start TeX mode, some overlap with AucTeX mode
 #
 \bind "C-c C-b"                        "buffer-update dvi"
-\bind "C-c C-p"                        "buffer-print"
+\bind "C-c C-p"                        "dialog-show print"
 \bind "C-c C-r"                        "buffer-update dvi"     # tex region
 #
 ## End TeX mode
index 4aa34e146c8d8ccae3185d3d0c125f426b16ea22..9e3441d12cbb000bc79d3625c18959c1c22d36e3 100644 (file)
@@ -31,7 +31,7 @@ Menuset
                Separator
                Submenu "Import|I" "file_import"
                Submenu "Export|E" "file_export"
-               Item "Print...|P" "buffer-print"
+               Item "Print...|P" "dialog-show print"
                OptItem "Fax...|F" "buffer-export fax"
                Separator
                Item "Exit|x" "lyx-quit"
@@ -45,7 +45,7 @@ Menuset
                OptItem "Check Out for Edit|O" "vc-check-out"
                OptItem "Revert to Last Version|L" "vc-revert"
                OptItem "Undo Last Check In|U" "vc-undo-last"
-               OptItem "Show History|H" "vc-history"
+               OptItem "Show History|H" "dialog-show vclog"
        End
 
        Menu "file_import"
@@ -70,18 +70,18 @@ Menuset
                Item "Paste|a" "paste"
                Submenu "Paste External Selection|x" "edit_paste"
                Separator
-               Item "Find & Replace...|F" "find-replace"
+               Item "Find & Replace...|F" "dialog-show findreplace"
                Submenu "Tabular|T" "edit_tabular"
                Submenu "Math|M" "edit_math"
                Separator
                #Item "Read Only" "buffer-toggle-read-only"
-               Item "Spellchecker...|S" "spellchecker"
+               Item "Spellchecker...|S" "dialog-show spellchecker"
                Item "Thesaurus..." "thesaurus-entry"
                Item "Check TeX|h" "buffer-chktex"
                Item "Open/Close float|l" "inset-toggle"
                Submenu "Change tracking|g" "edit_change"
                Separator
-               Item "Preferences...|P" "dialog-preferences"
+               Item "Preferences...|P" "dialog-show preferences"
                Item "Reconfigure|R" "reconfigure"
        End
 
@@ -248,7 +248,7 @@ Menuset
                Item "Split Environment|S" "math-insert \split"
        Separator
                Submenu "Font Change|f" "insert_math_font"
-               Item "Math Panel|l" "math-panel"
+               Item "Math Panel|l" "dialog-show mathpanel"
        End
 
        Menu "insert_math_font"
@@ -304,9 +304,9 @@ Menuset
 # LAYOUT MENU
 #
        Menu "layout"
-               Item "Character...|C" "layout-character"
+               Item "Character...|C" "dialog-show character"
                Item "Paragraph...|P" "layout-paragraph"
-               Item "Document...|D" "layout-document"
+               Item "Document...|D" "dialog-show document"
                OptItem "Tabular...|T" "layout-tabular"
                Separator
                Item "Emphasize Style|E" "font-emph"
@@ -316,7 +316,7 @@ Menuset
                Separator
                Item "Decrease Environment Depth|v" "depth-decrement"
                Item "Increase Environment Depth|i" "depth-increment"
-               Item "Preamble...|r" "layout-preamble"
+               Item "Preamble...|r" "dialog-show preamble"
                Item "Start Appendix Here|S" "appendix"
        End
 
@@ -329,10 +329,10 @@ Menuset
                OptItem "Build Program|B" "build-program"
                Submenu "Update|U" "update"
                Separator
-               Item "LaTeX Logfile|L" "latex-view-log"
+               Item "LaTeX Logfile|L" "dialog-show latexlog"
                Item "Table of Contents|T" "toc-view"
-               Item "Child Processes|C" "show-forks"
-               Item "TeX Information|X" "help-Texinfo"
+               Item "Child Processes|C" "dialog-show forks"
+               Item "TeX Information|X" "dialog-show texinfo"
        End
 
        Menu "update"
@@ -384,7 +384,7 @@ Menuset
                Item "Table of Contents|a" "help-open TOC"
                Item "LaTeX Configuration|L" "help-open LaTeXConfig"
                Separator
-               Item "About LyX|X" "help-aboutlyx"
+               Item "About LyX|X" "dialog-show aboutlyx"
        End
 
 End
@@ -429,7 +429,7 @@ Toolbar "Standard" "on,top"
        Layouts
        Item "Open document" "file-open"
        Item "Save document" "buffer-write"
-       Item "Print document" "buffer-print"
+       Item "Print document" "dialog-show print"
        Separator
        Item "Cut selection" "cut"
        Item "Copy selection" "copy"
@@ -441,7 +441,7 @@ Toolbar "Standard" "on,top"
        Separator
        Item "Insert TeX" "ert-insert"
        Item "Insert math" "math-mode"
-       #Item "math-panel"
+       #Item "dialog-show mathpanel"
        Separator
        Item "Insert footnote" "footnote-insert"
        Item "Insert margin note" "marginalnote-insert"
index 12a7e561d93ca1a89df4fb0f927fed29f1562157..36230beb476a2b3856c3e5e355214e4adcb88351 100644 (file)
@@ -31,7 +31,7 @@ Menuset
                Separator
                Submenu "Import|I" "file_import"
                Submenu "Export|E" "file_export"
-               Item "Print...|P" "buffer-print"
+               Item "Print...|P" "dialog-show print"
                OptItem "Fax...|F" "buffer-export fax"
                Separator
                Item "Exit|x" "lyx-quit"
@@ -47,7 +47,7 @@ Menuset
                OptItem "Check Out for Edit|O" "vc-check-out"
                OptItem "Revert to Last Version|L" "vc-revert"
                OptItem "Undo Last Check In|U" "vc-undo-last"
-               OptItem "Show History|H" "vc-history"
+               OptItem "Show History|H" "dialog-show vclog"
        End
 
        Menu "file_import"
@@ -71,9 +71,9 @@ Menuset
                Item "Copy" "copy"
                Item "Paste" "paste"
                Submenu "Paste Recent" "pasterecent"
-               Item "Find & Replace...|F" "find-replace"
+               Item "Find & Replace...|F" "dialog-show findreplace"
                Separator
-               Item "Text Style...|S" "layout-character"
+               Item "Text Style...|S" "dialog-show character"
                Item "Paragraph Settings...|P" "layout-paragraph"
                Separator
 # Mathed b0rkage means these don't work properly
@@ -270,7 +270,7 @@ Menuset
                Item "Cases Environment|C" "math-insert \cases"
                Separator
                Submenu "Font Change|f" "insert_math_font"
-               Item "Math Panel|l" "math-panel"
+               Item "Math Panel|l" "dialog-show mathpanel"
        End
 
        Menu "insert_math_font"
@@ -324,12 +324,12 @@ Menuset
        Menu "document"
                Submenu "Change tracking|C" "edit_change"
                OptItem "Build Program|B" "build-program"
-               Item "LaTeX Log File...|L" "latex-view-log"
+               Item "LaTeX Log File...|L" "dialog-show latexlog"
                Item "Table of Contents...|T" "toc-view"
-               Item "LaTeX Preamble...|P" "layout-preamble"
+               Item "LaTeX Preamble...|P" "dialog-show preamble"
                Item "Start Appendix Here|A" "appendix"
                Separator
-               Item "Settings...|S" "layout-document"
+               Item "Settings...|S" "dialog-show document"
        End
  
        Menu "edit_change"
@@ -365,17 +365,17 @@ Menuset
 #
  
        Menu "tools"
-               Item "Spellchecker...|S" "spellchecker"
+               Item "Spellchecker...|S" "dialog-show spellchecker"
                OptItem "Thesaurus...|T" "thesaurus-entry"
                OptItem "Check TeX|h" "buffer-chktex"
-               Item "View Child Processes...|C" "show-forks"
-               Item "TeX Information...|I" "help-Texinfo"
+               Item "View Child Processes...|C" "dialog-show forks"
+               Item "TeX Information...|I" "dialog-show texinfo"
                Separator
 # A LOT of applications have Tools->Prefs. Remember this
 # should be rarely used - Edit menu is not a good place to
 # have it.
                Item "Reconfigure|R" "reconfigure"
-               Item "Preferences...|P" "dialog-preferences"
+               Item "Preferences...|P" "dialog-show preferences"
        End
  
 #
@@ -391,7 +391,7 @@ Menuset
                Item "Table of Contents|a" "help-open TOC"
                Item "LaTeX Configuration|L" "help-open LaTeXConfig"
                Separator
-               Item "About LyX...|X" "help-aboutlyx"
+               Item "About LyX...|X" "dialog-show aboutlyx"
        End
 
 End
index 31f8fe677b1d82959693b072f80a0d10941bdcb8..7fa922ef46dc923ac10620040acd64bf9c3e87e0 100644 (file)
@@ -30,14 +30,14 @@ Toolbar "Standard"
        Item "New document" "buffer-new"
        Item "Open document" "file-open"
        Item "Save document" "buffer-write"
-       Item "Print document" "buffer-print"
+       Item "Print document" "dialog-show print"
        Separator
        Item "Undo" "undo"
        Item "Redo" "redo"
        Item "Cut" "cut"
        Item "Copy" "copy"
        Item "Paste" "paste"
-       Item "Find and replace" "find-replace"
+       Item "Find and replace" "dialog-show findreplace"
        Separator
        Item "Toggle emphasis style" "font-emph"
        Item "Toggle noun style" "font-noun"
@@ -70,10 +70,10 @@ Toolbar "Extra"
        Item "Insert TeX" "ert-insert"
        Item "Include file" "dialog-show-new-inset include"
        Separator
-       Item "Text Style" "layout-character"
+       Item "Text Style" "dialog-show character"
        Item "Paragraph Settings" "layout-paragraph"
        Item "Table of contents" "toc-view"
-       Item "Check spelling" "spellchecker"
+       Item "Check spelling" "dialog-show spellchecker"
        Item "Thesaurus" "thesaurus-entry"
 End
 
@@ -103,7 +103,7 @@ Toolbar "Table"
 End
 
 Toolbar "Math"
-       Item "Show math panel" "math-panel"
+       Item "Show math panel" "dialog-show mathpanel"
        Item "Set display mode" "math-display"
        Item "Subscript" "math-subscript"
        Item "Superscript" "math-superscript"
index e1986b7691b6e32c1ca87fb014af044f418a4993..f1215d608ec1e7ea08acb9a405b783220b70123e 100644 (file)
@@ -1,3 +1,10 @@
+2003-06-19  Angus Leeming  <leeming@lyx.org>
+
+       * lfuns.h:
+       * LyXAction.C (init):
+       * lyxfunc.C (getStatus, dispatch): remove 14 LFUNs, replacing them
+       with LFUN_DIALOG_SHOW <name> <data>.
+
 2003-06-19  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * CutAndPaste.C (availableSelections): small compilation fix for
index 1522ffea0fb01602612a57864051bd3e67075178..09e7c7c85b82bd4099ea062d3be2e938d47a4da6 100644 (file)
@@ -114,7 +114,6 @@ void LyXAction::init()
                { LFUN_IMPORT, "buffer-import", NoBuffer },
                { LFUN_MENUNEW, "buffer-new", NoBuffer },
                { LFUN_MENUNEWTMPLT,"buffer-new-template", NoBuffer },
-               { LFUN_MENUPRINT, "buffer-print", ReadOnly },
                { LFUN_MENURELOAD, "buffer-reload", ReadOnly },
                { LFUN_SWITCHBUFFER, "buffer-switch", ReadOnly },
                { LFUN_READ_ONLY_TOGGLE, "buffer-toggle-read-only", ReadOnly },
@@ -151,7 +150,6 @@ void LyXAction::init()
                { LFUN_FILE_INSERT_ASCII_PARA, "file-insert-ascii-para", Noop },
                { LFUN_FILE_NEW, "file-new", NoBuffer },
                { LFUN_FILE_OPEN, "file-open", NoBuffer },
-               { LFUN_MENUSEARCH, "find-replace", ReadOnly },
                { LFUN_INSET_FLOAT, "float-insert", Noop },
                { LFUN_INSET_WIDE_FLOAT, "float-wide-insert", Noop },
                { LFUN_INSET_WRAP, "wrap-insert", Noop },
@@ -186,12 +184,8 @@ void LyXAction::init()
                { LFUN_INSET_OPTARG, "optional-insert", Noop },
                { LFUN_INSERT_BIBITEM, "bibitem-insert", Noop },
                { LFUN_LANGUAGE, "language", Noop },
-               { LFUN_LATEX_LOG, "latex-view-log", ReadOnly },
                { LFUN_LAYOUT, "layout", Noop },
-               { LFUN_LAYOUT_CHARACTER, "layout-character", ReadOnly },
-               { LFUN_LAYOUT_DOCUMENT, "layout-document", ReadOnly },
                { LFUN_LAYOUT_PARAGRAPH, "layout-paragraph", ReadOnly },
-               { LFUN_LAYOUT_PREAMBLE, "layout-preamble", ReadOnly },
                { LFUN_LAYOUT_TABULAR, "layout-tabular", Noop },
                { LFUN_HOME, "line-begin", ReadOnly },
                { LFUN_HOMESEL, "line-begin-select", ReadOnly },
@@ -221,7 +215,6 @@ void LyXAction::init()
                { LFUN_MATH_NONUMBER, "math-nonumber", Noop },
                { LFUN_MATH_NUMBER, "math-number", Noop },
                { LFUN_MATH_EXTERN, "math-extern", Noop },
-               { LFUN_MATH_PANEL, "math-panel", Noop },
                { LFUN_MATH_SIZE, "math-size", Noop },
                { LFUN_MENU_OPEN_BY_NAME, "menu-open", NoBuffer },
                { LFUN_MENU_SEPARATOR, "menu-separator-insert", Noop },
@@ -237,7 +230,6 @@ void LyXAction::init()
                { LFUN_UP_PARAGRAPH, "paragraph-up", ReadOnly },
                { LFUN_UP_PARAGRAPHSEL, "paragraph-up-select", ReadOnly },
                { LFUN_PASTE, "paste", Noop },
-               { LFUN_DIALOG_PREFERENCES, "dialog-preferences", NoBuffer },
                { LFUN_SAVEPREFERENCES, "preferences-save", NoBuffer },
                { LFUN_PASTESELECTION, "primary-selection-paste", Noop },
                { LFUN_QUOTE, "quote-insert", Noop },
@@ -263,7 +255,6 @@ void LyXAction::init()
                { LFUN_NOTIFY, "server-notify", ReadOnly },
                { LFUN_SETXY, "server-set-xy", ReadOnly },
                { LFUN_SET_COLOR, "set-color", ReadOnly | NoBuffer },
-               { LFUN_SPELLCHECK, "spellchecker", Noop },
                { LFUN_CELL_BACKWARD, "cell-backward", Noop },
                { LFUN_CELL_FORWARD, "cell-forward", Noop },
                { LFUN_CELL_SPLIT, "cell-split", Noop },
@@ -282,7 +273,6 @@ void LyXAction::init()
                { LFUN_URL, "url-insert", Noop },
                { LFUN_VC_CHECKIN, "vc-check-in", ReadOnly },
                { LFUN_VC_CHECKOUT, "vc-check-out", ReadOnly },
-               { LFUN_VC_HISTORY, "vc-history", ReadOnly },
                { LFUN_VC_REGISTER, "vc-register", ReadOnly },
                { LFUN_VC_REVERT, "vc-revert", ReadOnly },
                { LFUN_VC_UNDO, "vc-undo-last", ReadOnly },
@@ -302,9 +292,6 @@ void LyXAction::init()
                { LFUN_TRANSPOSE_CHARS, "chars-transpose", Noop },
                { LFUN_FLOAT_LIST, "float-list", Noop },
                { LFUN_ESCAPE, "escape", ReadOnly },
-               { LFUN_HELP_ABOUTLYX, "help-aboutlyx", NoBuffer },
-               { LFUN_HELP_TEXINFO, "help-Texinfo", NoBuffer },
-               { LFUN_FORKS_SHOW, "show-forks", NoBuffer },
                { LFUN_FORKS_KILL, "kill-forks", NoBuffer },
                { LFUN_TOOLTIPS_TOGGLE, "toggle-tooltips", NoBuffer },
                { LFUN_TRACK_CHANGES, "track-changes", Noop },
@@ -313,7 +300,7 @@ void LyXAction::init()
                { LFUN_REJECT_CHANGE, "reject-change", Noop },
                { LFUN_ACCEPT_ALL_CHANGES, "accept-all-changes", Noop },
                { LFUN_REJECT_ALL_CHANGES, "reject-all-changes", Noop },
-               { LFUN_DIALOG_SHOW, "dialog-show", Noop },
+               { LFUN_DIALOG_SHOW, "dialog-show", NoBuffer },
                { LFUN_DIALOG_SHOW_NEW_INSET, "dialog-show-new-inset", Noop },
                { LFUN_DIALOG_SHOW_NEXT_INSET, "dialog-show-next-inset", Noop },
                { LFUN_DIALOG_UPDATE, "dialog-update", Noop },
index 02efbce62d41a51531ee5ac5f2a203b2ffac9f61..b88a07fc82eacb6b36e136ef3105e113437f80d7 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-19  Angus Leeming  <leeming@lyx.org>
+
+       * lyx_gui.C (getStatus): changes due to replacement of lots of lfuns
+       with LFUN_DIALOG_SHOW <name>.
+
 2003-06-17  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.C: rename math panel identifier as "mathpanel".
index b397acf0bdddb96dfeec3b226c3e862f30f2eac1..38657a00b2d1026d77622e0dbc4ec32585dff5a8 100644 (file)
@@ -201,9 +201,11 @@ FuncStatus getStatus(FuncRequest const & ev)
 {
        FuncStatus flag;
        switch (ev.action) {
-       case LFUN_LAYOUT_PREAMBLE:
+       case LFUN_DIALOG_SHOW:
+               if (ev.argument == "preamble" || ev.argument == "forks")
+                       flag.unknown(true);
+               break;
        case LFUN_TOOLTIPS_TOGGLE:
-       case LFUN_FORKS_SHOW:
                flag.unknown(true);
                break;
        default:
index a0f1cc124102b000a4268726dcc56581f8b85264..f9a979e64a605dab566d77e6485b5222a9fa3941 100644 (file)
@@ -34,309 +34,293 @@ enum kb_action {
        LFUN_MENUWRITE,
        // 5
        LFUN_WRITEAS,
-       LFUN_MENUPRINT,
-       LFUN_MENUSENDTO,
        LFUN_BUILDPROG,
        LFUN_TOCVIEW,
-       // 10
        LFUN_PREVIEW,
        LFUN_CLOSEBUFFER,
+       // 10
        LFUN_QUIT,
        LFUN_AUTOSAVE,
        LFUN_UNDO,
-       // 15
        LFUN_REDO,
-       LFUN_MENUSEARCH,
        LFUN_PASTE,
+       // 15
        LFUN_PASTESELECTION,
        LFUN_CUT,
-       // 20
        LFUN_COPY,
        LFUN_GOTOERROR,
        LFUN_GOTONOTE,
+       // 20
        LFUN_INSET_TOGGLE,
        LFUN_HYPHENATION,
-       // 25
        LFUN_LIGATURE_BREAK,
        LFUN_HFILL,
        LFUN_FREEFONT_APPLY,
+       // 25
        LFUN_FREEFONT_UPDATE,
        LFUN_EMPH,
-       // 30
        LFUN_BOLD,
        LFUN_ROMAN,
        LFUN_NOUN,
+       // 30
        LFUN_ITAL,
        LFUN_FRAK,
-       // 35
        LFUN_RIGHT,
        LFUN_LEFT,
        LFUN_UP,
+       // 35
        LFUN_DOWN,
        LFUN_PRIOR,
-       // 40
        LFUN_NEXT,
        LFUN_HOME,
        LFUN_END,
+       // 40
        LFUN_CELL_FORWARD,
        LFUN_CELL_BACKWARD,
-       // 45
        LFUN_WORDRIGHT,
        LFUN_WORDLEFT,
        LFUN_BEGINNINGBUF,
+       // 45
        LFUN_ENDBUF,
        LFUN_RIGHTSEL,
-       // 50
        LFUN_LEFTSEL,
        LFUN_UPSEL,
        LFUN_DOWNSEL,
+       // 50
        LFUN_PRIORSEL,
        LFUN_NEXTSEL,
-       // 55
        LFUN_HOMESEL,
        LFUN_ENDSEL,
        LFUN_WORDRIGHTSEL,
+       // 55
        LFUN_WORDLEFTSEL,
        LFUN_WORDSEL,
-       // 60
        LFUN_BEGINNINGBUFSEL,
        LFUN_ENDBUFSEL,
        LFUN_SPACE_INSERT,  // JSpitzm 20030520
+       // 60
        LFUN_SETMARK,
        LFUN_DELETE,
-       // 65
        LFUN_BACKSPACE,
        LFUN_BREAKLINE,
        LFUN_BREAKPARAGRAPH,
+       // 65
        LFUN_BREAKPARAGRAPHKEEPLAYOUT,
        LFUN_QUOTE,
-       // 70
        LFUN_CIRCUMFLEX,
        LFUN_SUBSCRIPT,
        LFUN_SUPERSCRIPT,
+       // 70
        LFUN_GRAVE,
        LFUN_ACUTE,
-       // 75
        LFUN_TILDE,
        LFUN_CEDILLA,
        LFUN_MACRON,
+       // 75
        LFUN_UNDERBAR,
        LFUN_UNDERDOT,
-       // 80
        LFUN_CIRCLE,
        LFUN_TIE,
        LFUN_BREVE,
+       // 80
        LFUN_CARON,
        LFUN_SPECIAL_CARON,
-       // 85
        LFUN_HUNG_UMLAUT,
        LFUN_UMLAUT,
        LFUN_DOT,
+       // 85
        LFUN_OGONEK,
        LFUN_SELFINSERT,
-       // 90
        LFUN_GETBUFNAME,
        LFUN_GETXY,
        LFUN_SETXY,
+       // 90
        LFUN_CHARATCURSOR,
        LFUN_LINEATCURSOR,
-       // 95
        LFUN_GETLAYOUT,
        LFUN_GETFONT,
        LFUN_GETNAME,
+       // 95
        LFUN_NOTIFY,
        LFUN_GOTOFILEROW,
-       // 100
        LFUN_INSERT_NOTE,
        LFUN_ENVIRONMENT_INSERT,
        LFUN_KMAP_OFF,
+       // 100
        LFUN_KMAP_PRIM,
        LFUN_KMAP_SEC,
-       // 105
        LFUN_KMAP_TOGGLE,
        LFUN_INSERT_MATH,
        LFUN_INSERT_MATRIX,
+       // 105
        LFUN_MATH_LIMITS,
        LFUN_MATH_DELIM,                // Alejandro 180696
-       // 110
        LFUN_MATH_DISPLAY,              // Alejandro 180696
        LFUN_MATH_MODE,                 // Alejandro 040696
        LFUN_MATH_NUMBER,               // Alejandro 040696
+       // 110
        LFUN_MATH_NONUMBER,             // Alejandro 180696
        LFUN_MATH_SIZE,                 // Alejandro 150896
-       // 115
        LFUN_MATH_MACRO,                // ale970510
        LFUN_MATH_EXTERN,               // Andre' 20010424
-       LFUN_MATH_PANEL,                // Andre' 20010522
        LFUN_MATH_MUTATE,               // Andre' 20010523
+       // 115
        LFUN_MATH_IMPORT_SELECTION,     // Andre' 20010704
-       // 120
        LFUN_MATH_SPACE,                // Andre' 20010725
        LFUN_DELETE_WORD_FORWARD,
        LFUN_DELETE_WORD_BACKWARD,
        LFUN_DELETE_LINE_FORWARD,
+       // 120
        LFUN_MARK_OFF,
-       // 125
        LFUN_MARK_ON,
        LFUN_LAYOUT,
-       LFUN_LAYOUT_CHARACTER,
        LFUN_LAYOUT_PARAGRAPH,
-       LFUN_LAYOUT_DOCUMENT,
-       // 130
-       LFUN_LAYOUT_PREAMBLE,
        LFUN_DROP_LAYOUTS_CHOICE,
+       // 125
        LFUN_CODE,
        LFUN_SANS,
        LFUN_DEFAULT,
-       // 135
        LFUN_UNDERLINE,
        LFUN_FONT_SIZE,
+       // 130
        LFUN_FONT_STATE,
        LFUN_UPCASE_WORD,
        LFUN_LOWCASE_WORD,
-       // 140
        LFUN_CAPITALIZE_WORD,
        LFUN_INSERT_LABEL,
+       // 135
        LFUN_DEPTH_MIN,
        LFUN_DEPTH_PLUS,
        LFUN_MENU_OPEN_BY_NAME,
-       // 145
-       LFUN_SPELLCHECK,
        LFUN_CANCEL,
        LFUN_META_FAKE,
+       // 140
        LFUN_EXEC_COMMAND,
        LFUN_FILE_INSERT,
-       // 150
        LFUN_FILE_INSERT_ASCII,         // CFO-G 1997-11-19
        LFUN_FILE_INSERT_ASCII_PARA,    // Levon 2001-02-14
        LFUN_FILE_NEW,
+       // 145
        LFUN_FILE_OPEN,
        LFUN_UP_PARAGRAPH,              // Asger 1996-10-01
-       // 155
        LFUN_UP_PARAGRAPHSEL,           // Asger 1996-10-01
        LFUN_DOWN_PARAGRAPH,            // Asger 1996-10-01
        LFUN_DOWN_PARAGRAPHSEL,         // Asger 1996-10-01
+       // 150
        LFUN_BREAKPARAGRAPH_SKIP,
        LFUN_BACKSPACE_SKIP,
-       // 160
        LFUN_DELETE_SKIP,
        LFUN_MENUNEWTMPLT,              // Asger 1997-02-02
        LFUN_MENURELOAD,                // Asger 1997-02-02
+       // 155
        LFUN_RECONFIGURE,               // Asger 1997-02-14
        LFUN_INDEX_PRINT,               // Lgb 97-02-27
-       // 165
-       LFUN_LATEX_LOG,                 // Lgb 97-04-05
        LFUN_CELL_SPLIT,
        LFUN_CHILDOPEN,                 // Ale 970528
        LFUN_TOC_INSERT,                // Lgb 97-05-27
+       // 160
        LFUN_FLOAT_LIST,                // Lgb 20010503
-       // 170
        LFUN_READ_ONLY_TOGGLE,          // Lgb 97-05-27
        LFUN_VC_REGISTER,               // Lgb 97-07-01
        LFUN_VC_CHECKIN,                // Lgb 97-07-01
        LFUN_VC_CHECKOUT,               // Lgb 97-07-01
+       // 165
        LFUN_VC_REVERT,                 // Lgb 97-07-01
-       // 175
        LFUN_VC_UNDO,                   // Lgb 97-07-01
-       LFUN_VC_HISTORY,                // Lgb 97-07-01
        LFUN_EXPORT,                    // Lgb 97-07-29
        LFUN_REF_GOTO,                  // Ale 970806
        LFUN_LDOTS,                     // Asger 970929
-       // 180
+       // 170
        LFUN_END_OF_SENTENCE,           // Asger 970929
        LFUN_TOGGLECURSORFOLLOW,        // ARRae 971202
        LFUN_RUNCHKTEX,                 // Asger 971030
        LFUN_HTMLURL,                   // CFO-G 971121
        LFUN_URL,                       // CFO-G 971121
-       // 185
+       // 175
        LFUN_WORDFINDFORWARD,           // Etienne 980216
        LFUN_WORDFINDBACKWARD,          // Etienne 980220
        LFUN_APPENDIX,                  // ettrich 980505
        LFUN_IMPORT,                    // Asger 980724
        LFUN_MENU_SEPARATOR,            // Asger 990220
-       // 190
+       // 180
        LFUN_SEQUENCE,                  // Andre' 991111
-       LFUN_DIALOG_PREFERENCES,        // ARRae 20000726
        LFUN_SAVEPREFERENCES,           // Lgb 991127
        LFUN_HELP_OPEN,                 // Jug 990627
        LFUN_DATE_INSERT,               // jdblair 20000131
-       // 195
        LFUN_LANGUAGE,                  // Dekel 20000203
+       // 185
        LFUN_INSET_ERT,                 // Jug 20000218
        LFUN_INSET_FOOTNOTE,            // Jug 20000307
        LFUN_PARAGRAPH_SPACING,         // Lgb 20000411
        LFUN_TABULAR_INSERT,            // Jug 20000412
-       // 200
        LFUN_LOFVIEW,                   // Dekel 20000519
+       // 190
        LFUN_LOTVIEW,                   // Dekel 20000519
        LFUN_LOAVIEW,                   // Dekel 20000519
        LFUN_SET_COLOR,                 // SLior 20000611
        LFUN_INSET_MARGINAL,            // Lgb 20000626
-       // 205
        LFUN_INSET_MINIPAGE,            // Lgb 20000627
+       // 195
        LFUN_INSET_FLOAT,               // Lgb 20000627
        LFUN_INSET_WIDE_FLOAT,          // Lgb 20010531
        LFUN_INSET_CAPTION,             // Lgb 20000718
        LFUN_SWITCHBUFFER,
-       // 210
        LFUN_TABULAR_FEATURE,           // Jug 20000728
+       // 200
        LFUN_LAYOUT_TABULAR,            // Jug 20000731
        LFUN_SCROLL_INSET,              // Jug 20000801
        LFUN_UPDATE,                    // Dekel 20000805
        LFUN_INDEX_INSERT,              // Angus 20000803
-       // 215
        LFUN_SCREEN_FONT_UPDATE,        // ARRae 20000813
+       // 205
        LFUN_GOTO_PARAGRAPH,            // Dekel 20000826
        LFUN_REFERENCE_GOTO,            // Dekel 20010114
        LFUN_BOOKMARK_SAVE,             // Dekel 20010127
        LFUN_BOOKMARK_GOTO,             // Dekel 20010127
-       // 220
        LFUN_SELECT_FILE_SYNC,          // Levon 20010214
+       // 210
        LFUN_MESSAGE,                   // Lgb 20010408
        LFUN_TRANSPOSE_CHARS,           // Lgb 20010425
        LFUN_ESCAPE,                    // Lgb 20010517
-       LFUN_HELP_ABOUTLYX,             // Edwin 20010712
-       // 225
        LFUN_THESAURUS_ENTRY,           // Levon 20010720
-       LFUN_HELP_TEXINFO,              // Herbert 20011001
-       LFUN_FORKS_SHOW,                // Angus 16 Feb 2002
        LFUN_FORKS_KILL,                // Angus 16 Feb 2002
+       // 215
        LFUN_TOOLTIPS_TOGGLE,           // Angus 8 Mar 2002
-       // 230
        LFUN_INSET_OPTARG,              // Martin 12 Aug 2002
        LFUN_MOUSE_PRESS,               // André 9 Aug 2002
        LFUN_MOUSE_MOTION,              // André 9 Aug 2002
        LFUN_MOUSE_RELEASE,             // André 9 Aug 2002
+       // 220
        LFUN_MOUSE_DOUBLE,              // André 9 Aug 2002
-       // 235
        LFUN_MOUSE_TRIPLE,              // André 9 Aug 2002
        LFUN_INSET_EDIT,                      // André 16 Aug 2002
        LFUN_INSET_WRAP,                // Dekel 7 Apr 2002
        LFUN_TRACK_CHANGES,             // Levon 20021001 (cool date !)
+       // 225
        LFUN_MERGE_CHANGES,             // Levon 20021016
-       // 240
        LFUN_ACCEPT_CHANGE,             // Levon 20021016
        LFUN_REJECT_CHANGE,             // Levon 20021016
        LFUN_ACCEPT_ALL_CHANGES,        // Levon 20021016
        LFUN_REJECT_ALL_CHANGES,        // Levon 20021016
+       // 230
        LFUN_INSERT_BIBITEM,            // André 14 Feb 2003
-       // 245
        LFUN_DIALOG_SHOW,
        LFUN_DIALOG_SHOW_NEW_INSET,
        LFUN_DIALOG_SHOW_NEXT_INSET,
        LFUN_DIALOG_UPDATE,
+       // 235
        LFUN_DIALOG_HIDE,
-       // 250
        LFUN_DIALOG_DISCONNECT_INSET,
        LFUN_INSET_APPLY,
        LFUN_INSET_INSERT,
        LFUN_INSET_MODIFY,
+       // 240
        LFUN_INSET_DIALOG_UPDATE,
-       // 255
        LFUN_INSET_SETTINGS,
        LFUN_PARAGRAPH_APPLY,
        LFUN_PARAGRAPH_UPDATE,
        LFUN_EXTERNAL_EDIT,
+       // 245
 
        LFUN_LASTACTION                  // end of the table
 };
index 75577bce9e1bdbcbbfcbc0f27cb770c52f778da9..f155dd9ad96c9cf0d4c2777707fae20492a56ab4 100644 (file)
@@ -318,10 +318,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
        // encode this in the function itself.
        bool disable = false;
        switch (ev.action) {
-       case LFUN_MENUPRINT:
-               disable = !Exporter::IsExportable(buf, "dvi")
-                       || lyxrc.print_command == "none";
-               break;
        case LFUN_EXPORT:
                disable = ev.argument != "custom"
                        && !Exporter::IsExportable(buf, ev.argument);
@@ -353,10 +349,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                disable = !Exporter::IsExportable(buf, "program");
                break;
 
-       case LFUN_LAYOUT_CHARACTER:
-               disable = tli && tli->lyxCode() == Inset::ERT_CODE;
-               break;
-
        case LFUN_LAYOUT_TABULAR:
                disable = !tli
                        || (tli->lyxCode() != Inset::TABULAR_CODE
@@ -463,7 +455,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                break;
        case LFUN_VC_REVERT:
        case LFUN_VC_UNDO:
-       case LFUN_VC_HISTORY:
                disable = !buf->lyxvc.inUse();
                break;
        case LFUN_MENURELOAD:
@@ -527,10 +518,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                break;
        }
 
-       case LFUN_LATEX_LOG:
-               disable = !IsFileReadable(buf->getLogName().second);
-               break;
-
        case LFUN_MATH_MUTATE:
                if (mathcursor)
                        //flag.setOnOff(mathcursor->formula()->hullType() == ev.argument);
@@ -549,6 +536,31 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & ev) const
                disable = !mathcursor;
                break;
 
+       case LFUN_DIALOG_SHOW: {
+               string const name = ev.getArg(0);
+               if (!buf) {
+                       disable = !(name == "aboutlyx" ||
+                                   name == "file" ||
+                                   name == "forks" ||
+                                   name == "preferences" ||
+                                   name == "texinfo");
+                       break;
+               }
+
+               if (name == "print") {
+                       disable = !Exporter::IsExportable(buf, "dvi") ||
+                               lyxrc.print_command == "none";
+               } else if (name == "character") {
+                       UpdatableInset * tli = view()->theLockingInset();
+                       disable = tli && tli->lyxCode() == Inset::ERT_CODE;
+               } else if (name == "vclog") {
+                       disable = !buf->lyxvc.inUse();
+               } else if (name == "latexlog") {
+                       disable = !IsFileReadable(buf->getLogName().second);
+               }
+               break;
+       }
+
        default:
                break;
        }
@@ -1095,10 +1107,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                owner->buffer()->runChktex();
                break;
 
-       case LFUN_MENUPRINT:
-               owner->getDialogs().showPrint();
-               break;
-
        case LFUN_EXPORT:
                if (argument == "custom")
                        owner->getDialogs().showSendto();
@@ -1134,10 +1142,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                view()->redo();
                break;
 
-       case LFUN_MENUSEARCH:
-               owner->getDialogs().showSearch();
-               break;
-
        case LFUN_DEPTH_MIN:
                changeDepth(view(), TEXT(false), DEC_DEPTH, false);
                owner->view_state_changed();
@@ -1176,14 +1180,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
 //#warning Find another implementation here (or another lyxfunc)!
 #endif
 #endif
-       case LFUN_HELP_ABOUTLYX:
-               owner->getDialogs().show("about");
-               break;
-
-       case LFUN_HELP_TEXINFO:
-               owner->getDialogs().showTexinfo();
-               break;
-
        case LFUN_HELP_OPEN:
        {
                string const arg = argument;
@@ -1239,12 +1235,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
        }
        break;
 
-       case LFUN_VC_HISTORY:
-       {
-               owner->getDialogs().show("vclog");
-               break;
-       }
-
        // --- buffers ----------------------------------------
 
        case LFUN_SWITCHBUFFER:
@@ -1264,21 +1254,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                open(argument);
                break;
 
-       case LFUN_LATEX_LOG:
-               owner->getDialogs().show("log");
-               break;
-
-       case LFUN_LAYOUT_DOCUMENT:
-               owner->getDialogs().showDocument();
-               break;
-
-       case LFUN_LAYOUT_CHARACTER: {
-               string data = freefont2string();
-               if (!data.empty())
-                       owner->getDialogs().show("character", data);
-               break;
-       }
-
        case LFUN_LAYOUT_TABULAR:
            if (view()->theLockingInset()) {
                if (view()->theLockingInset()->lyxCode()==Inset::TABULAR_CODE) {
@@ -1294,10 +1269,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
            }
            break;
 
-       case LFUN_LAYOUT_PREAMBLE:
-               owner->getDialogs().showPreamble();
-               break;
-
        case LFUN_DROP_LAYOUTS_CHOICE:
                owner->getToolbar().openLayoutList();
                break;
@@ -1306,10 +1277,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                owner->getMenubar().openByName(argument);
                break; // RVDK_PATCH_5
 
-       case LFUN_SPELLCHECK:
-               owner->getDialogs().showSpellchecker();
-               break;
-
        // --- lyxserver commands ----------------------------
 
 
@@ -1404,13 +1371,32 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                dispatch(FuncRequest(view(), LFUN_SELFINSERT, "^"));
                break;
 
-       case LFUN_MATH_PANEL:
-               owner->getDialogs().show("mathpanel");
-               break;
-
-       case LFUN_DIALOG_SHOW:
-               owner->getDialogs().show(argument);
+       case LFUN_DIALOG_SHOW: {
+               string const name = ev.getArg(0);
+               string data = trim(ev.argument.substr(name.size()));
+
+               if (name == "character") {
+                       data = freefont2string();
+                       if (!data.empty())
+                               owner->getDialogs().show("character", data);
+               } else if (name == "document")
+                       owner->getDialogs().showDocument();
+               else if (name == "findreplace")
+                       owner->getDialogs().showSearch();
+               else if (name == "forks")
+                       owner->getDialogs().showForks();
+               else if (name == "preamble")
+                       owner->getDialogs().showPreamble();
+               else if (name == "preferences")
+                       owner->getDialogs().showPreferences();
+               else if (name == "print")
+                       owner->getDialogs().showPrint();
+               else if (name == "spellchecker")
+                       owner->getDialogs().showSpellchecker();
+               else
+                       owner->getDialogs().show(name, data);
                break;
+       }
 
        case LFUN_DIALOG_SHOW_NEW_INSET: {
                string const & name = argument;
@@ -1504,10 +1490,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
        }
        break;
 
-       case LFUN_DIALOG_PREFERENCES:
-               owner->getDialogs().showPreferences();
-               break;
-
        case LFUN_SAVEPREFERENCES:
        {
                Path p(user_lyxdir);
@@ -1574,10 +1556,6 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                owner->message(argument);
                break;
 
-       case LFUN_FORKS_SHOW:
-               owner->getDialogs().showForks();
-               break;
-
        case LFUN_FORKS_KILL:
        {
                if (!isStrInt(argument))
index 8708e5b181acd7454d59c9ffbe476298b4656404..00e2f78c76bd97b07f3d9716a261b58c21b876f6 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-19  Angus Leeming  <leeming@lyx.org>
+
+       * formulabase.C (localDiapatch): replace LFUN_MATH_PANEL with
+       LFUN_DIALOG_SHOW "mathpanel".
+
 2003-06-17  Angus Leeming  <leeming@lyx.org>
 
        * formulabase.C (lfunMouseRelease): s/showMathPanel/show("mathpanel")/
index 5884d0679b16776b861e30027c23c6f782206d48..9078c9ffce2552c55ea57801841d9cffd3098d44 100644 (file)
@@ -669,10 +669,6 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
                }
                break;
 
-       case LFUN_MATH_PANEL:
-               result = UNDISPATCHED;
-               break;
-
        case LFUN_ESCAPE:
                if (mathcursor->selection())
                        mathcursor->selClear();
@@ -684,6 +680,11 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
                mathcursor->insetToggle();
                break;
 
+       case LFUN_DIALOG_SHOW:
+               if (argument == "mathpanel")
+                       result = UNDISPATCHED;
+               break;
+
        case LFUN_DIALOG_SHOW_NEW_INSET: {
                string const & name = argument;
                string data;