On Mon, Apr 02, 2007 at 06:01:00PM +0200, Michael Gerz wrote: > Andre Poenitz schrieb: > >Yes, it is too fat by far. Maybe a specila LFUN handling greek only > >would alread help in this case. > > > I am a little short of time ATM. If someone likes to step forward, I > would be more than happy.
Something like that (untested)? Andre'
Index: src/LyXAction.C =================================================================== --- src/LyXAction.C (revision 17695) +++ src/LyXAction.C (working copy) @@ -180,6 +180,7 @@ { LFUN_FONT_STATE, "font-state", ReadOnly }, { LFUN_FONT_UNDERLINE, "font-underline", Noop }, { LFUN_FOOTNOTE_INSERT, "footnote-insert", Noop }, + { LFUN_GREEK_INSERT, "greek-insert", Noop }, { LFUN_HFILL_INSERT, "hfill-insert", Noop }, { LFUN_HELP_OPEN, "help-open", NoBuffer | Argument}, { LFUN_HTML_INSERT, "html-insert", Noop }, Index: src/mathed/InsetMathNest.C =================================================================== --- src/mathed/InsetMathNest.C (revision 17697) +++ src/mathed/InsetMathNest.C (working copy) @@ -965,6 +965,7 @@ // FIXME: We probably should swap parts of "math-insert" and "self-insert" // handling such that "self-insert" works on "arbitrary stuff" too, and // math-insert only handles special math things like "matrix". + case LFUN_GREEK_INSERT: case LFUN_MATH_INSERT: { recordUndo(cur, Undo::ATOMIC); if (cmd.argument() == "^" || cmd.argument() == "_") { @@ -1063,6 +1064,7 @@ flag.enabled(currentMode() != TEXT_MODE); break; + case LFUN_GREEK_INSERT: case LFUN_MATH_INSERT: { bool const textarg = arg == "\\textbf" || arg == "\\textsf" || Index: src/text3.C =================================================================== --- src/text3.C (revision 17695) +++ src/text3.C (working copy) @@ -1325,6 +1325,7 @@ mathDispatch(cur, FuncRequest(LFUN_SELF_INSERT, "^"), false); break; + case LFUN_GREEK_INSERT: case LFUN_MATH_INSERT: case LFUN_MATH_MATRIX: case LFUN_MATH_DELIM: @@ -1930,7 +1931,7 @@ case LFUN_CLEARDOUBLEPAGE_INSERT: case LFUN_MATH_DISPLAY: case LFUN_MATH_IMPORT_SELECTION: - case LFUN_MATH_INSERT: + case LFUN_GREEK_INSERT: case LFUN_MATH_MODE: case LFUN_MATH_MACRO: case LFUN_MATH_MATRIX: Index: src/lfuns.h =================================================================== --- src/lfuns.h (revision 17695) +++ src/lfuns.h (working copy) @@ -375,11 +375,12 @@ // 285 LFUN_BOOKMARK_CLEAR, // bpeng 20061031 LFUN_TOOLBAR_TOGGLE_STATE, // bpeng 20061101 - LFUN_NOMENCL_INSERT, // Ugras - LFUN_NOMENCL_PRINT, // Ugras + LFUN_NOMENCL_INSERT, // Ugras + LFUN_NOMENCL_PRINT, // Ugras LFUN_CLEARPAGE_INSERT, // Ugras 20061125 //290 - LFUN_CLEARDOUBLEPAGE_INSERT, // ugras 20061125 + LFUN_CLEARDOUBLEPAGE_INSERT, // Ugras 20061125 + LFUN_GREEK_INSERT, // André 20070402 LFUN_LASTACTION // end of the table }; Index: configure.ac =================================================================== --- configure.ac (revision 17695) +++ configure.ac (working copy) @@ -417,8 +417,6 @@ src/Makefile \ src/version.C-tmp:src/version.C.in \ src/tex2lyx/Makefile \ - src/mathed/Makefile \ - src/graphics/Makefile \ src/insets/Makefile \ src/support/Makefile \ src/support/tests/Makefile \ Index: lib/bind/sciword.bind =================================================================== --- lib/bind/sciword.bind (revision 17695) +++ lib/bind/sciword.bind (working copy) @@ -26,46 +26,46 @@ # Since the toggles don't work in 1.2.0, let's define all letters. # lowercase math Greek -\bind "C-g a" "math-insert \alpha" -\bind "C-g b" "math-insert \beta" -\bind "C-g g" "math-insert \gamma" -\bind "C-g d" "math-insert \delta" -\bind "C-g e" "math-insert \varepsilon" -\bind "C-g C-e" "math-insert \epsilon" -\bind "C-g z" "math-insert \zeta" -\bind "C-g h" "math-insert \eta" -\bind "C-g q" "math-insert \theta" -\bind "C-g C-q" "math-insert \vartheta" -\bind "C-g i" "math-insert \iota" -\bind "C-g k" "math-insert \kappa" -\bind "C-g l" "math-insert \lambda" -\bind "C-g m" "math-insert \mu" -\bind "C-g n" "math-insert \nu" -\bind "C-g x" "math-insert \xi" -\bind "C-g p" "math-insert \pi" -\bind "C-g C-p" "math-insert \varpi" -\bind "C-g r" "math-insert \rho" -\bind "C-g s" "math-insert \sigma" -\bind "C-g C-s" "math-insert \varsigma" -\bind "C-g t" "math-insert \tau" -\bind "C-g v" "math-insert \upsilon" -\bind "C-g f" "math-insert \phi" -\bind "C-g c" "math-insert \chi" -\bind "C-g y" "math-insert \psi" -\bind "C-g w" "math-insert \omega" +\bind "C-g a" "greek-insert \alpha" +\bind "C-g b" "greek-insert \beta" +\bind "C-g g" "greek-insert \gamma" +\bind "C-g d" "greek-insert \delta" +\bind "C-g e" "greek-insert \varepsilon" +\bind "C-g C-e" "greek-insert \epsilon" +\bind "C-g z" "greek-insert \zeta" +\bind "C-g h" "greek-insert \eta" +\bind "C-g q" "greek-insert \theta" +\bind "C-g C-q" "greek-insert \vartheta" +\bind "C-g i" "greek-insert \iota" +\bind "C-g k" "greek-insert \kappa" +\bind "C-g l" "greek-insert \lambda" +\bind "C-g m" "greek-insert \mu" +\bind "C-g n" "greek-insert \nu" +\bind "C-g x" "greek-insert \xi" +\bind "C-g p" "greek-insert \pi" +\bind "C-g C-p" "greek-insert \varpi" +\bind "C-g r" "greek-insert \rho" +\bind "C-g s" "greek-insert \sigma" +\bind "C-g C-s" "greek-insert \varsigma" +\bind "C-g t" "greek-insert \tau" +\bind "C-g v" "greek-insert \upsilon" +\bind "C-g f" "greek-insert \phi" +\bind "C-g c" "greek-insert \chi" +\bind "C-g y" "greek-insert \psi" +\bind "C-g w" "greek-insert \omega" # uppercase math Greek -\bind "C-g S-G" "math-insert \Gamma" -\bind "C-g S-D" "math-insert \Delta" -\bind "C-g S-Q" "math-insert \Theta" -\bind "C-g S-L" "math-insert \Lambda" -\bind "C-g S-X" "math-insert \Xi" -\bind "C-g S-P" "math-insert \Pi" -\bind "C-g S-S" "math-insert \Sigma" -\bind "C-g S-V" "math-insert \Upsilon" -\bind "C-g S-F" "math-insert \Phi" -\bind "C-g S-Y" "math-insert \Psi" -\bind "C-g S-W" "math-insert \Omega" +\bind "C-g S-G" "greek-insert \Gamma" +\bind "C-g S-D" "greek-insert \Delta" +\bind "C-g S-Q" "greek-insert \Theta" +\bind "C-g S-L" "greek-insert \Lambda" +\bind "C-g S-X" "greek-insert \Xi" +\bind "C-g S-P" "greek-insert \Pi" +\bind "C-g S-S" "greek-insert \Sigma" +\bind "C-g S-V" "greek-insert \Upsilon" +\bind "C-g S-F" "greek-insert \Phi" +\bind "C-g S-Y" "greek-insert \Psi" +\bind "C-g S-W" "greek-insert \Omega" # Do we need this? Index: lib/bind/math.bind =================================================================== --- lib/bind/math.bind (revision 17695) +++ lib/bind/math.bind (working copy) @@ -140,48 +140,48 @@ # This should be handled properly by some "get the next key" method -\bind "M-m g a" "math-insert \alpha" -\bind "M-m g b" "math-insert \beta" -\bind "M-m g c" "math-insert \chi" -\bind "M-m g d" "math-insert \delta" -\bind "M-m g e" "math-insert \epsilon" -\bind "M-m g f" "math-insert \phi" -\bind "M-m g g" "math-insert \gamma" -\bind "M-m g h" "math-insert \eta" -\bind "M-m g i" "math-insert \iota" -\bind "M-m g j" "math-insert \varphi" -\bind "M-m g k" "math-insert \kappa" -\bind "M-m g l" "math-insert \lambda" -\bind "M-m g m" "math-insert \mu" -\bind "M-m g n" "math-insert \nu" -\bind "M-m g o" "math-insert \omega" -\bind "M-m g p" "math-insert \pi" -\bind "M-m g q" "math-insert \vartheta" -\bind "M-m g r" "math-insert \rho" -\bind "M-m g s" "math-insert \sigma" -\bind "M-m g t" "math-insert \tau" -\bind "M-m g u" "math-insert \upsilon" -\bind "M-m g v" "math-insert \theta" -\bind "M-m g w" "math-insert \omega" -\bind "M-m g x" "math-insert \xi" -\bind "M-m g y" "math-insert \psi" -\bind "M-m g z" "math-insert \zeta" +\bind "M-m g a" "greek-insert \alpha" +\bind "M-m g b" "greek-insert \beta" +\bind "M-m g c" "greek-insert \chi" +\bind "M-m g d" "greek-insert \delta" +\bind "M-m g e" "greek-insert \epsilon" +\bind "M-m g f" "greek-insert \phi" +\bind "M-m g g" "greek-insert \gamma" +\bind "M-m g h" "greek-insert \eta" +\bind "M-m g i" "greek-insert \iota" +\bind "M-m g j" "greek-insert \varphi" +\bind "M-m g k" "greek-insert \kappa" +\bind "M-m g l" "greek-insert \lambda" +\bind "M-m g m" "greek-insert \mu" +\bind "M-m g n" "greek-insert \nu" +\bind "M-m g o" "greek-insert \omega" +\bind "M-m g p" "greek-insert \pi" +\bind "M-m g q" "greek-insert \vartheta" +\bind "M-m g r" "greek-insert \rho" +\bind "M-m g s" "greek-insert \sigma" +\bind "M-m g t" "greek-insert \tau" +\bind "M-m g u" "greek-insert \upsilon" +\bind "M-m g v" "greek-insert \theta" +\bind "M-m g w" "greek-insert \omega" +\bind "M-m g x" "greek-insert \xi" +\bind "M-m g y" "greek-insert \psi" +\bind "M-m g z" "greek-insert \zeta" -\bind "M-m g S-D" "math-insert \Delta" -\bind "M-m g S-E" "math-insert \varepsilon" -\bind "M-m g S-F" "math-insert \Phi" -\bind "M-m g S-G" "math-insert \Gamma" -\bind "M-m g S-I" "math-insert \iota" -\bind "M-m g S-J" "math-insert \epsilon" -\bind "M-m g S-L" "math-insert \Lambda" -\bind "M-m g S-O" "math-insert \Omega" -\bind "M-m g S-P" "math-insert \Pi" -\bind "M-m g S-Q" "math-insert \vartheta" -\bind "M-m g S-R" "math-insert \varrho" -\bind "M-m g S-S" "math-insert \Sigma" -\bind "M-m g S-T" "math-insert \varsigma" -\bind "M-m g S-U" "math-insert \Upsilon" -\bind "M-m g S-V" "math-insert \Theta" -\bind "M-m g S-W" "math-insert \Omega" -\bind "M-m g S-X" "math-insert \Xi" -\bind "M-m g S-Y" "math-insert \Psi" +\bind "M-m g S-D" "greek-insert \Delta" +\bind "M-m g S-E" "greek-insert \varepsilon" +\bind "M-m g S-F" "greek-insert \Phi" +\bind "M-m g S-G" "greek-insert \Gamma" +\bind "M-m g S-I" "greek-insert \iota" +\bind "M-m g S-J" "greek-insert \epsilon" +\bind "M-m g S-L" "greek-insert \Lambda" +\bind "M-m g S-O" "greek-insert \Omega" +\bind "M-m g S-P" "greek-insert \Pi" +\bind "M-m g S-Q" "greek-insert \vartheta" +\bind "M-m g S-R" "greek-insert \varrho" +\bind "M-m g S-S" "greek-insert \Sigma" +\bind "M-m g S-T" "greek-insert \varsigma" +\bind "M-m g S-U" "greek-insert \Upsilon" +\bind "M-m g S-V" "greek-insert \Theta" +\bind "M-m g S-W" "greek-insert \Omega" +\bind "M-m g S-X" "greek-insert \Xi" +\bind "M-m g S-Y" "greek-insert \Psi" Index: development/cmake/ConfigureChecks.cmake =================================================================== --- development/cmake/ConfigureChecks.cmake (revision 17695) +++ development/cmake/ConfigureChecks.cmake (working copy) @@ -122,14 +122,14 @@ " CXX_GLOBAL_CSTD) -check_cxx_source_compiles( - " - #include <iconv.h> - // this declaration will fail when there already exists a non const char** version which returns size_t - double iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); - int main() { return 0; } - " -HAVE_ICONV_CONST) +#check_cxx_source_compiles( +# " +# #include <iconv.h> +# // this declaration will fail when there already exists a non const char** version which returns size_t +# double iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); +# int main() { return 0; } +# " +#HAVE_ICONV_CONST) check_cxx_source_compiles( "