From 4432936da2e4a3ee5f7adcb187235c121af4da20 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 6 Jun 2002 14:52:45 +0000 Subject: [PATCH] rework configuration stuff for xforms git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4345 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 4 + acconfig.h | 8 -- config/ChangeLog | 9 +++ config/xforms.m4 | 109 ++++++++++++---------------- configure.in | 1 - src/ChangeLog | 4 + src/buffer.C | 2 + src/frontends/xforms/ChangeLog | 12 +++ src/frontends/xforms/GUIRunTime.C | 4 +- src/frontends/xforms/xformsGImage.C | 4 +- src/frontends/xforms/xformsGImage.h | 4 +- status.12x | 2 + 12 files changed, 86 insertions(+), 77 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfe32d8ca0..c7745ae0c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-06-06 Jean-Marc Lasgouttes + + * acconfig.h: remove FORMS_IMAGE_H_LOCATION and FORMS_H_LOCATION + 2002-06-02 John Levon * acconfig.h: add FORMS_IMAGE_H_LOCATION diff --git a/acconfig.h b/acconfig.h index cae5f0de5c..9b68e6f614 100644 --- a/acconfig.h +++ b/acconfig.h @@ -18,14 +18,6 @@ @TOP@ -/* define this to the location of forms.h to be used with #include, - e.g. */ -#undef FORMS_H_LOCATION - -/* define this to the location of flimage.h to be used with #include, - e.g. */ -#undef FORMS_IMAGE_H_LOCATION - /* define this to the location of xpm.h to be used with #include, e.g. */ #undef XPM_H_LOCATION diff --git a/config/ChangeLog b/config/ChangeLog index a74234239b..0a7727d818 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,12 @@ +2002-06-06 Jean-Marc Lasgouttes + + * xforms.m4 (LYX_USE_XFORMS_IMAGE_LOADER): complete rewrite. Now + simpler and hopefully better. Please test. + (LYX_PATH_XFORMS): move test for flimage.h in + LYX_USE_XFORMS_IMAGE_LOADER. + (LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG): killed. Now just a couple + lines in LYX_USE_XFORMS_IMAGE_LOADER. + 2002-06-03 John Levon * xforms.m4: wallpaper coding ... only try to link diff --git a/config/xforms.m4 b/config/xforms.m4 index f80267c9e1..37667a72fd 100644 --- a/config/xforms.m4 +++ b/config/xforms.m4 @@ -1,6 +1,6 @@ dnl Usage LYX_PATH_XFORMS: Checks for xforms library and flags dnl If it is found, the variable XFORMS_LIB is set to the relevant -l flags, -dnl and FORMS_H_LOCATION / FORMS_IMAGE_H_LOCATION is also set +dnl and FORMS_H_LOCATION / FLIMAGE_H_LOCATION is also set AC_DEFUN(LYX_PATH_XFORMS,[ LIBS="$XPM_LIB $LIBS" @@ -17,15 +17,9 @@ AC_CHECK_HEADER(X11/forms.h,[ lyx_cv_forms_h_location=""],[ AC_CHECK_HEADER(forms.h,[],[ LYX_LIB_ERROR(forms.h,forms)])]) - -lyx_cv_flimage_h_location="" -AC_CHECK_HEADER(X11/flimage.h,[ - ac_cv_header_flimage_h=yes - lyx_cv_flimage_h_location=""],) -AC_DEFINE_UNQUOTED(FORMS_IMAGE_H_LOCATION,$lyx_cv_flimage_h_location) - -AC_DEFINE_UNQUOTED(FORMS_H_LOCATION,$lyx_cv_forms_h_location) - +AC_DEFINE_UNQUOTED(FORMS_H_LOCATION,$lyx_cv_forms_h_location, + [define this to the location of forms.h to be used with #include, e.g. ]) + if test $ac_cv_header_forms_h = yes; then AC_CACHE_CHECK([xforms header version],lyx_cv_xfversion, [ cat > conftest.$ac_ext < header file.]) + AC_DEFINE_UNQUOTED(FLIMAGE_H_LOCATION, $lyx_cv_flimage_h_location, + [define this to the location of flimage.h to be used with #include, e.g. + ]) + fi +fi + ### If the gui cannot load images itself, then we default to the ### very simple one in graphics/GraphicsImageXPM.[Ch] AM_CONDITIONAL(USE_BASIC_IMAGE_LOADER, test $lyx_use_xforms_image_loader = no) -]) +AC_LANG_RESTORE +LIBS=$save_LIBS]) - -dnl Check if the image loader needs libjpeg -AC_DEFUN(LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG, -[ - if test "$lyx_use_xforms_image_loader" = "yes" ; then - AC_MSG_CHECKING([whether libjpeg is needed]) - AC_LANG_SAVE - AC_LANG_C - AC_TRY_LINK([#include FORMS_H_LOCATION -#include FORMS_IMAGE_H_LOCATION], - [jpeg_abort(0);], - [lyx_need_jpeg=no],[lyx_need_jpeg=yes]) - AC_LANG_RESTORE - AC_MSG_RESULT($lyx_need_jpeg) - if test "$lyx_need_jpeg" = "yes" ; then - LIBS="-ljpeg $LIBS" - fi - fi -]) diff --git a/configure.in b/configure.in index 0edfdbc97b..9625106f8f 100644 --- a/configure.in +++ b/configure.in @@ -257,7 +257,6 @@ fi ### For now, run this test always so config.h is unchanged by a change in ### frontend LYX_USE_XFORMS_IMAGE_LOADER -LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG ### Setup GNU gettext dnl GNU gettext is written in C diff --git a/src/ChangeLog b/src/ChangeLog index 1cc680b818..840e391fd4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-06-06 Jean-Marc Lasgouttes + + * buffer.C (sgmlError): enclose #warning in WITH_WARNINGS + 2002-06-02 John Levon * lyx_gui.C: hope to generate some stats on xforms 1.0 diff --git a/src/buffer.C b/src/buffer.C index 936b20ac68..1034398024 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -3190,12 +3190,14 @@ void Buffer::simpleLinuxDocOnePar(ostream & os, void Buffer::sgmlError(Paragraph * /*par*/, int /*pos*/, string const & /*message*/) const { +#ifdef WITH_WARNINGS #warning This is wrong we cannot insert an inset like this!!! // I guess this was Jose' so I explain you more or less why this // is wrong. This way you insert something in the paragraph and // don't tell it to LyXText (row rebreaking and undo handling!!!) // I deactivate this code, have a look at BufferView::insertErrors // how you should do this correctly! (Jug 20020315) +#endif #if 0 // insert an error marker in text InsetError * new_inset = new InsetError(message); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 3bb6dce983..b694e91198 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,15 @@ +2002-06-06 Jean-Marc Lasgouttes + + * GUIRunTime.C (initialiseGraphics): condition on + USE_XFORMS_IMAGE_LOADER + + * xformsGImage.C (init_graphics): do not initialize jpeg support + if not available + +2002-06-05 Jean-Marc Lasgouttes + + * xformsGImage.h: use FLIMAGE_H_LOCATION instead + 2002-06-02 John Levon * xformsGImage.h: use FORMS_IMAGE_H_LOCATION diff --git a/src/frontends/xforms/GUIRunTime.C b/src/frontends/xforms/GUIRunTime.C index 2162e3203c..3d5e4b16a9 100644 --- a/src/frontends/xforms/GUIRunTime.C +++ b/src/frontends/xforms/GUIRunTime.C @@ -18,7 +18,7 @@ #include "XFormsView.h" #include "debug.h" -#if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP) +#ifdef USE_XFORMS_IMAGE_LOADER #include "xformsGImage.h" #else #include "graphics/GraphicsImageXPM.h" @@ -129,7 +129,7 @@ void GUIRunTime::initialiseGraphics() using namespace grfx; using SigC::slot; -#if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP) +#ifdef USE_XFORMS_IMAGE_LOADER // connect the image loader based on the xforms library GImage::newImage.connect(slot(&xformsGImage::newImage)); GImage::loadableFormats.connect(slot(&xformsGImage::loadableFormats)); diff --git a/src/frontends/xforms/xformsGImage.C b/src/frontends/xforms/xformsGImage.C index 9fca72733f..8901797719 100644 --- a/src/frontends/xforms/xformsGImage.C +++ b/src/frontends/xforms/xformsGImage.C @@ -402,8 +402,10 @@ void init_graphics() flimage_enable_bmp(); flimage_enable_fits(); flimage_enable_gif(); +#ifdef HAVE_FLIMAGE_ENABLE_JPEG flimage_enable_jpeg(); - +#endif + // xforms itself uses pngtopnm to convert to a loadable format. // We prefer to use our own conversion mechanism, therefore. // flimage_enable_png(); diff --git a/src/frontends/xforms/xformsGImage.h b/src/frontends/xforms/xformsGImage.h index dbcb883aee..d1b895f66f 100644 --- a/src/frontends/xforms/xformsGImage.h +++ b/src/frontends/xforms/xformsGImage.h @@ -20,8 +20,8 @@ #include "graphics/GraphicsImage.h" #include FORMS_H_LOCATION -#if FL_VERSION > 0 -#include FORMS_IMAGE_H_LOCATION +#if HAVE_FLIMAGE_H +#include FLIMAGE_H_LOCATION #endif namespace grfx { diff --git a/status.12x b/status.12x index 6f459e6596..2a5e34fc5c 100644 --- a/status.12x +++ b/status.12x @@ -46,6 +46,8 @@ What's new - make sure to use the graphicx package with the RasterBitmap and XFig external templates. +- fix rotation angle of images to be the same as in latex output + - do not ignore zero-length vertical spacing with 'keep' flag. - fix interaction between sixpack and LyX via lyxserver