diff --git a/ChangeLog b/ChangeLog index c7745ae0c1..1cce619778 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-07 Jean-Marc Lasgouttes + + * configure.in: do the checking for xforms outside of the + 'frontends' switch + 2002-06-06 Jean-Marc Lasgouttes * acconfig.h: remove FORMS_IMAGE_H_LOCATION and FORMS_H_LOCATION diff --git a/config/ChangeLog b/config/ChangeLog index 0a7727d818..77792d7fb3 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2002-06-07 Jean-Marc Lasgouttes + + * xforms.m4 (LYX_USE_XFORMS_IMAGE_LOADER): test for jpeg library + first. Fix stupid typo so that the script is actually useful. + 2002-06-06 Jean-Marc Lasgouttes * xforms.m4 (LYX_USE_XFORMS_IMAGE_LOADER): complete rewrite. Now diff --git a/config/xforms.m4 b/config/xforms.m4 index 37667a72fd..382c2b743a 100644 --- a/config/xforms.m4 +++ b/config/xforms.m4 @@ -1,3 +1,5 @@ +dnl some macros to test for xforms-related functionality -*- sh -*- + 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 / FLIMAGE_H_LOCATION is also set @@ -69,10 +71,15 @@ LIBS="$XFORMS_LIB $LIBS" lyx_use_xforms_image_loader=no AC_LANG_SAVE AC_LANG_C + +AC_CHECK_LIB(jpeg, jpeg_read_header, + [XFORMS_IMAGE_LIB=-ljpeg + LIBS="$LIBS -ljpeg"]) AC_SEARCH_LIBS(flimage_dup, flimage, [lyx_use_xforms_image_loader=yes if test "$ac_cv_search_flimage_dup" != "none required" ; then - XFORMS_IMAGE_LIB="-flimage" + XFORMS_IMAGE_LIB="-lflimage $XFORMS_IMAGE_LIB" + LIBS="$XFORMS_IMAGE_LIB $XFORMS_LIB $LIBS" fi]) AC_SUBST(XFORMS_IMAGE_LIB) @@ -80,14 +87,7 @@ if test $lyx_use_xforms_image_loader = yes ; then lyx_flags="$lyx_flags xforms-image-loader" AC_DEFINE(USE_XFORMS_IMAGE_LOADER, 1, [Define if you want to use xforms built-in image loader]) - AC_CHECK_FUNCS(flimage_enable_ps) - AC_SEARCH_LIBS(flimage_enable_jpeg, jpeg, - [if test "$ac_cv_search_flimage_enable_jpeg" != "none required" ; then - save_LIBS="-ljpeg $save_LIBS" - XFORMS_IMAGE_LIB="-ljpeg $XFORMS_IMAGE_LIB" - fi - AC_DEFINE(HAVE_FLIMAGE_ENABLE_JPEG, 1, - [Define if you have the flimage_enable_jpeg function and the jpeg library available.])]) + AC_CHECK_FUNCS(flimage_enable_ps flimage_enable_jpeg) AC_CHECK_HEADER(flimage.h,[ ac_cv_header_flimage_h=yes lyx_cv_flimage_h_location=""], @@ -95,7 +95,7 @@ if test $lyx_use_xforms_image_loader = yes ; then ac_cv_header_flimage_h=yes lyx_cv_flimage_h_location=""], ac_cv_header_flimage_h=no)]) - if test ac_cv_header_flimage_h = yes ; then + if test $ac_cv_header_flimage_h = yes ; then AC_DEFINE(HAVE_FLIMAGE_H, 1, [Define if you have the 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. diff --git a/configure.in b/configure.in index 9625106f8f..f53a683f22 100644 --- a/configure.in +++ b/configure.in @@ -180,14 +180,16 @@ CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_FUNCS(XOpenIM) ### check which frontend we want to use +# Checking for xforms is always needed anyway +LYX_PATH_XPM +LYX_PATH_XFORMS + #LYX_USE_FRONTEND dnl The code below is not in a macro, because this would cause big dnl problems with the AC_REQUIRE contained in KDE_DO_IT_ALL. case "$lyx_use_frontend" in xforms) # for now don't set it for xforms as this is always entered - LYX_PATH_XPM - LYX_PATH_XFORMS FRONTEND="xforms" FRONTEND_GUILIB="xforms/*.lo" FRONTEND_INCLUDES="-I\$(srcdir)/xforms" @@ -198,8 +200,6 @@ case "$lyx_use_frontend" in ` ;; gnome) - LYX_PATH_XPM - LYX_PATH_XFORMS AM_PATH_GTKMM(1.2.1,, AC_MSG_ERROR(Cannot find GTK--: Please install Version 1.2.1+)) AM_PATH_GNOMEMM @@ -222,8 +222,6 @@ dnl Ensure gnome-config is available... FRONTEND_INCLUDES="-I\${srcdir}/gnome -I\${srcdir}/xforms \$(GNOMEMM_INCLUDEDIR) \$(GTKMM_CFLAGS) `gnome-config --cflags libglade gnomeui`" FRONTEND_LIBS="@XPM_LIB@ @XFORMS_LIB@ \$(GNOMEMM_LIBS) \$(GTKMM_LIBS) `gnome-config --libs libglade gnomeui`";; qt2) - LYX_PATH_XPM - LYX_PATH_XFORMS QT2_DO_IT_ALL FRONTEND="qt2" FRONTEND_GUILIB="qt2/*.lo qt2/ui/*.lo qt2/moc/*.lo qt2/ui/moc/*.lo qt2/xforms/*.lo" diff --git a/images/delim1.xpm b/images/delim1.xpm new file mode 100644 index 0000000000..19242c64f2 --- /dev/null +++ b/images/delim1.xpm @@ -0,0 +1,42 @@ +/* XPM */ +static char const * delim1[] = { +/* width height num_colors chars_per_pixel */ +" 31 31 2 1", +/* colors */ +" c None", +"X c Blue", +/* pixels */ +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", +" " +}; + + diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index b694e91198..99089f10fa 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,12 @@ +2002-06-07 Jean-Marc Lasgouttes + + * xformsGImage.h: fix typo + +2002-05-24 Martin Vermeer + + * FormMathsDelim.C: fix delimiter pre-display rendering + mess-up bug (354) + 2002-06-06 Jean-Marc Lasgouttes * GUIRunTime.C (initialiseGraphics): condition on diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C index a744c3524f..2ae3275777 100644 --- a/src/frontends/xforms/FormMathsDelim.C +++ b/src/frontends/xforms/FormMathsDelim.C @@ -26,6 +26,7 @@ #include "delim.xbm" #include "delim0.xpm" +#include "delim1.xpm" static int const delim_rversion[] = { 1,1,3,3,4,5,7,7,9,9,10,11, @@ -59,10 +60,11 @@ void FormMathsDelim::build() dialog_.reset(build_maths_delim()); fl_set_button(dialog_->radio_left, 1); + // Initialize button_pix to "()" as found in images/delim0.xpm: fl_set_pixmap_data(dialog_->button_pix, const_cast(delim0)); dialog_->radio_left->u_ldata = 0; dialog_->radio_right->u_ldata = 1; - dialog_->radio_both->u_ldata = 2; + //dialog_->radio_both->u_ldata = 2; fl_set_bmtable_data(dialog_->bmtable, 6, 4, delim_width, delim_height, delim_bits); @@ -107,16 +109,28 @@ bool FormMathsDelim::input(FL_OBJECT *, long) right = i; else { left = i; - if (both) + if (both) { right = delim_rversion[i]; + // Add left delimiter in "both" case if right one was pressed: + for (int j = 0; j <= 23; ++j) { + if (delim_rversion[j] == left) { + right = left; + left = j; + } + } + } } } - Pixmap p1, p2; - - p1 = fl_get_pixmap_pixmap(dialog_->button_pix, &p1, &p2); - fl_draw_bmtable_item(dialog_->bmtable, left, p1, 0, 0); - fl_draw_bmtable_item(dialog_->bmtable, right, p1, 16, 0); + // Re-initialize button_pix to solid blue + // (not elegant but works, MV 24.5.2002) + fl_free_pixmap_pixmap(dialog_->button_pix); + fl_set_pixmap_data(dialog_->button_pix, const_cast(delim1)); + Pixmap p1; + fl_get_pixmap_pixmap(dialog_->button_pix, &p1, 0); + + fl_draw_bmtable_item(dialog_->bmtable, left, p1, -2, 0); + fl_draw_bmtable_item(dialog_->bmtable, right, p1, 14, 0); fl_redraw_object(dialog_->button_pix); dialog_->radio_left->u_ldata = left; diff --git a/src/frontends/xforms/xformsGImage.h b/src/frontends/xforms/xformsGImage.h index d1b895f66f..0fbcce8738 100644 --- a/src/frontends/xforms/xformsGImage.h +++ b/src/frontends/xforms/xformsGImage.h @@ -20,7 +20,7 @@ #include "graphics/GraphicsImage.h" #include FORMS_H_LOCATION -#if HAVE_FLIMAGE_H +#ifdef HAVE_FLIMAGE_H #include FLIMAGE_H_LOCATION #endif diff --git a/status.12x b/status.12x index 389dd0bcfe..b84ff2516a 100644 --- a/status.12x +++ b/status.12x @@ -47,6 +47,11 @@ What's new - fix translation of "reset" and "no change" in language combobox +- fix drawing of math delimiters in the math panel + +- when a document is registered though version control, make sure it + has been saved + - only use the amsmath package when it is needed - make sure to use the graphicx package with the RasterBitmap and XFig