From 3fac52583eb8e800885aa5796d9756f4c67d87c1 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 4 Jul 2002 09:58:16 +0000 Subject: [PATCH] fix 459; support epsi and fig formats; fix bug in hu.po git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4527 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 4 ++++ lib/configure.m4 | 16 +++++++++++++++ po/ChangeLog | 4 ++++ po/hu.po | 2 +- src/frontends/controllers/ChangeLog | 5 +++++ src/frontends/controllers/ControlInclude.C | 23 ++++++++++++++++------ src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/FormInclude.C | 4 ++++ src/frontends/xforms/forms/form_include.fd | 10 +++++----- src/support/ChangeLog | 4 ++++ src/support/filetools.C | 8 ++++---- 11 files changed, 70 insertions(+), 16 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 45d11e4789..7820c86d9f 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2002-06-19 Herbert Voss + + * configure.m4: add converters for epsi and (x)fig + 2002-07-03 Vitaly Lipatov * languages: add support for belarusian and kazakh diff --git a/lib/configure.m4 b/lib/configure.m4 index 35bd894fe5..909ed5bc8a 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -489,6 +489,14 @@ EOF ### the graphic converter part with the predefined ones #### Search for tne nonstandard converting progs # +SEARCH_PROG([for an FIG -> EPS/XPM converter], FIG2DEV, fig2dev) +if test "$FIG2DEV" = "fig2dev"; then +cat >>$outfile < PS converter], TIFF2PS, tiff2ps) if test "$TIFF2PS" = "tiff2ps"; then cat >>$outfile < PDF converter], EPSTOPDF, epstopdf) if test "$EPSTOPDF" = "epstopdf"; then cat >>$outfile < EPS/XPM converter], EPS2EPS, eps2eps) +if test "$EPS2EPS" = "eps2eps"; then +cat >>$outfile < + + * hu.po: remove space as binding of 'replace all' in search dialog + 2002-06-11 Jean-Marc Lasgouttes * ru.po: update from Vitaly Lipatov diff --git a/po/hu.po b/po/hu.po index bff0635b7d..1cc3a3f2f6 100644 --- a/po/hu.po +++ b/po/hu.po @@ -4927,7 +4927,7 @@ msgstr "Cser #: src/ext_l10n.h:1127 #, fuzzy msgid "Replace &All " -msgstr "Mindet|#M " +msgstr "Mindet|#M" #: src/ext_l10n.h:1128 msgid "Search &backwards" diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index b1121f1e53..7bd0b62f7c 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2002-06-27 Juergen Spitzmueller + + * ControlInclude.C: Add warning if absolute path name and + check_typeset is used together + 2002-06-28 Angus Leeming * ControlGraphics.C: changes associated with the name changes diff --git a/src/frontends/controllers/ControlInclude.C b/src/frontends/controllers/ControlInclude.C index bc2f698920..7fa2410cb2 100644 --- a/src/frontends/controllers/ControlInclude.C +++ b/src/frontends/controllers/ControlInclude.C @@ -78,10 +78,21 @@ void ControlInclude::load(string const & file) bool ControlInclude::fileExists(string const & file) { - string const fileWithAbsPath = MakeAbsPath(file, OnlyPath(params().masterFilename_)); - if (IsFileReadable(fileWithAbsPath)) - return true; - else - Alert::alert(_("Specified file doesn't exist !")); - return false; + string const fileWithAbsPath = MakeAbsPath(file, OnlyPath(params().masterFilename_)); + + if (params().noload){ + + if (prefixIs(file, "../") || prefixIs(file, "/")) + Alert::alert(_("Warning!"), + _("On some systems, with this options only relative path names"), + _("inside the master file dir are allowed. You might get a LaTeX error!")); + } + + if (IsFileReadable(fileWithAbsPath)) + return true; + + else + Alert::alert(_("Warning!"), + _("Specified file doesn't exist")); + return false; } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index a82a67cc35..c6152ed30b 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2002-06-27 Juergen Spitzmueller + + * FormInclude.C: Comment out unneeded and wrong update mechanism + (related to bug #459) + *forms/form_include.fd: define missing callbacks (bug #459) + 2002-07-03 Vitaly Lipatov * FormDocument.C (build): add pt154 encoding diff --git a/src/frontends/xforms/FormInclude.C b/src/frontends/xforms/FormInclude.C index 33f88d93f4..82ae3453a4 100644 --- a/src/frontends/xforms/FormInclude.C +++ b/src/frontends/xforms/FormInclude.C @@ -52,6 +52,9 @@ void FormInclude::build() void FormInclude::update() { + #if 0 + // I believe this is not needed. + // Anyway, it is plain wrong (JSpitzm 3/7/02) if (controller().params().noload) { fl_set_input(dialog_->input_filename, ""); fl_set_button(dialog_->check_typeset, 0); @@ -63,6 +66,7 @@ void FormInclude::update() fl_set_object_lcol(dialog_->check_visiblespace, FL_INACTIVE); return; } + #endif fl_set_input(dialog_->input_filename, controller().params().cparams.getContents().c_str()); diff --git a/src/frontends/xforms/forms/form_include.fd b/src/frontends/xforms/forms/form_include.fd index f3d3b2dffb..dc0bd01d3a 100644 --- a/src/frontends/xforms/forms/form_include.fd +++ b/src/frontends/xforms/forms/form_include.fd @@ -81,8 +81,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_typeset -callback: -argument: +callback: C_FormBaseInputCB +argument: 0 -------------------- class: FL_BUTTON @@ -171,8 +171,8 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_visiblespace -callback: -argument: +callback: C_FormBaseInputCB +argument: 0 -------------------- class: FL_BEGIN_GROUP @@ -188,7 +188,7 @@ label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: +name: callback: argument: diff --git a/src/support/ChangeLog b/src/support/ChangeLog index b19cb1d0b7..9bc60b05fc 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,4 +1,8 @@ +2002-06-20 Herbert Voss + * filetools.[C]: (readExtFromContents) add support for + (x)fig format images + 2002-06-26 André Pönitz * filetools.[Ch]: small whitespace, more compact 'return' statement diff --git a/src/support/filetools.C b/src/support/filetools.C index f3038973c6..0a398e98fe 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -993,6 +993,7 @@ string const GetExtension(string const & name) // EPS %!PS-Adobe-3.0 EPSF... // EPSI like EPS and with // %%BeginPreview... +// FIG #FIG... // FITS ...BITPIX... // GIF GIF... // JPG JFIF @@ -1054,10 +1055,6 @@ string const getExtFromContents(string const & filename) } getline(ifs, str); - - lyxerr[Debug::GRAPHICS] << "Scanstring: " << str.substr(0,60) - << endl; - string const stamp = str.substr(0,2); if (firstLine && str.size() >= 2) { // at first we check for a zipped file, because this @@ -1105,6 +1102,9 @@ string const getExtFromContents(string const & filename) } else if (prefixIs(str,"%TGIF")) { format = "tgif"; + } else if (prefixIs(str,"#FIG")) { + format = "fig"; + } else if (prefixIs(str,"GIF")) { format = "gif";