From 0563d2e80be3c028bcfe22bc71dffb762ecbd4af Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 25 Jul 2001 12:37:43 +0000 Subject: [PATCH] math-space; fixes to include inset dialog; autoconfiguration of gfx converters git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2338 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 9 ++ lib/bind/math.bind | 9 +- lib/configure.m4 | 25 ++++- po/POTFILES.in | 102 ++++++++++++++------- src/ChangeLog | 6 ++ src/LyXAction.C | 1 + src/commandtags.h | 1 + src/frontends/controllers/ChangeLog | 5 + src/frontends/controllers/ControlInclude.C | 7 ++ src/frontends/controllers/ControlInclude.h | 3 + src/frontends/xforms/ChangeLog | 4 + src/frontends/xforms/FormInclude.C | 1 + src/lyxfunc.C | 1 + 13 files changed, 134 insertions(+), 40 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 2b056c0267..9de9c5ae4b 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,12 @@ +2001-07-25 André Pönitz + + * bind/math.bind: new LFUN 'math-space' + +2001-07-23 Baruch Even + + * configure.m4: Added conversion of images support, used when + exporting images in formats (PDF)Latex cannot handle directly. + 2001-07-25 Lars Gullik Bjønnes * Makefile.am (dist-hook): only try to get lyxdoc if not already diff --git a/lib/bind/math.bind b/lib/bind/math.bind index c732b75f2c..3fe77e076c 100644 --- a/lib/bind/math.bind +++ b/lib/bind/math.bind @@ -90,9 +90,10 @@ # Note: it's easy to insert binary relations like \pm, \mp, \neq, \geq, # and \leq just by typing them. However it's easier to remember these: -\bind "M-m ~S-plus" "math-insert pm" -\bind "M-m ~S-equal" "math-insert neq" +\bind "M-m ~S-plus" "math-insert pm" +\bind "M-m ~S-equal" "math-insert neq" -\bind "Escape" "escape" -\bind "C-Tab" "tab-insert" +\bind "Escape" "escape" +\bind "C-Tab" "tab-insert" +\bind "M-m space" "math-space" diff --git a/lib/configure.m4 b/lib/configure.m4 index 6cfa32a414..35c13144ff 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -331,6 +331,19 @@ case $TOHTML in hevea) latex_to_html_command="hevea -s \$\$i";; esac +#### Search for image conversion #### +SEARCH_PROG([for an Image -> EPS converter], TOEPS, convert pnmtops) +case $TOEPS in + convert) gif_to_eps="convert GIF:\$\$i EPS:\$\$o" png_to_eps="convert PNG:\$\$i EPS:\$\$o" jpg_to_eps="convert JPG:\$\$i EPS:\$\$o";; + pnmtops) gif_to_eps="giftopnm \$\$i | pnmtops > \$\$o" png_to_eps="pngtopnm \$\$i | pnmtops >\$\$o" jpg_to_eps="jpegtopnm \$\$i | pnmtops >\$\$o";; +esac + +SEARCH_PROG([for a GIF -> PNG converter], TOPNG, convert pnmtopng) +case $TOPNG in + convert) gif_to_png="convert GIF:\$\$i PNG:\$\$o" eps_to_png="convert EPS:\$\$i PNG:\$\$o" jpg_to_png="convert JPG:\$\$i PNG:\$\$o";; + pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";; +esac + #### Explore the LaTeX configuration MSG_CHECKING(LaTeX configuration) # First, remove the files that we want to re-create @@ -423,7 +436,6 @@ cat >lyxrc.defaults <lyxrc.defaults < + + * commandtags.h: + * LyXAction.C: + * lyxfunc.C: new LFUN 'math-space' + 2001-07-25 Lars Gullik Bjønnes * text2.C (toggleInset): call open/close diff --git a/src/LyXAction.C b/src/LyXAction.C index c989a869f6..4aa64ccfa5 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -293,6 +293,7 @@ void LyXAction::init() { LFUN_MATH_LIMITS, "math-limits", "", Noop }, { LFUN_MATH_MACRO, "math-macro", "", Noop }, { LFUN_MATH_MUTATE, "math-mutate", "", Noop }, + { LFUN_MATH_SPACE, "math-space", "", Noop }, { LFUN_MATH_IMPORT_SELECTION, "math-import-selection", "", Noop }, { LFUN_MATH_MACROARG, "math-macro-arg", "", Noop }, { LFUN_INSERT_MATRIX, "math-matrix", "", Noop }, diff --git a/src/commandtags.h b/src/commandtags.h index 7c7b7015fc..44fd580daa 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -159,6 +159,7 @@ enum kb_action { LFUN_MATH_COLUMN_DELETE, // Andre' 20010522 LFUN_MATH_MUTATE, // Andre' 20010523 LFUN_MATH_IMPORT_SELECTION, // Andre' 20010704 + LFUN_MATH_SPACE, // Andre' 20010725 LFUN_FIGURE, LFUN_DELETE_WORD_FORWARD, LFUN_DELETE_WORD_BACKWARD, diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 5bac989afb..cba478db16 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2001-07-23 John Levon + + * ControlInclude.h: + * ControlInclude.C: implement ability to load file + 2001-07-18 Juergen Vigna * ControlSearch.C (replace): changes to lyxfind.h function calls. diff --git a/src/frontends/controllers/ControlInclude.C b/src/frontends/controllers/ControlInclude.C index 5c0ccf545f..b81f539ea5 100644 --- a/src/frontends/controllers/ControlInclude.C +++ b/src/frontends/controllers/ControlInclude.C @@ -22,6 +22,7 @@ #include "BufferView.h" #include "Dialogs.h" #include "LyXView.h" +#include "lyxfunc.h" #include "gettext.h" #include "helper_funcs.h" @@ -71,3 +72,9 @@ string const ControlInclude::Browse(string const & in_name, Type in_type) return browseFile(&lv_, in_name, title, pattern, dir1, make_pair(string(), string())); } + + +void ControlInclude::load(string const & file) +{ + lv_.getLyXFunc()->dispatch(LFUN_CHILDOPEN, file); +} diff --git a/src/frontends/controllers/ControlInclude.h b/src/frontends/controllers/ControlInclude.h index 317644b7a1..57a52a7d87 100644 --- a/src/frontends/controllers/ControlInclude.h +++ b/src/frontends/controllers/ControlInclude.h @@ -40,6 +40,9 @@ public: /// Browse for a file string const Browse(string const &, Type); + /// load a file + void load(string const & file); + private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset(); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index f16bf18ff5..8278b4a52b 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2001-07-23 John Levon + + * FormInclude.C: add load file facility back + 2001-07-23 John Levon * FormCharacter.C: disable resizing as it doesn't work diff --git a/src/frontends/xforms/FormInclude.C b/src/frontends/xforms/FormInclude.C index 42015d2d3e..4387b41262 100644 --- a/src/frontends/xforms/FormInclude.C +++ b/src/frontends/xforms/FormInclude.C @@ -129,6 +129,7 @@ ButtonPolicy::SMInput FormInclude::input(FL_OBJECT * ob, long) string const in_name = fl_get_input(dialog_->input_filename); if (!strip(in_name).empty()) { ApplyButton(); + controller().load(strip(in_name)); action = ButtonPolicy::SMI_NOOP; } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 9e9cb27303..bc964a50ca 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -580,6 +580,7 @@ func_status::value_type LyXFunc::getStatus(int ac, // we just need to be in math mode to enable that case LFUN_MATH_SIZE: + case LFUN_MATH_SPACE: case LFUN_MATH_LIMITS: case LFUN_MATH_NONUMBER: case LFUN_MATH_NUMBER: -- 2.39.2