fix xforms image frontend configuration; fix bug 354

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4347 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-06-07 15:46:26 +00:00
parent 202b5e3f55
commit 1245f034e8
9 changed files with 102 additions and 24 deletions

View File

@ -1,3 +1,8 @@
2002-06-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* configure.in: do the checking for xforms outside of the
'frontends' switch
2002-06-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* acconfig.h: remove FORMS_IMAGE_H_LOCATION and FORMS_H_LOCATION

View File

@ -1,3 +1,8 @@
2002-06-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* 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 <lasgouttes@freesurf.fr>
* xforms.m4 (LYX_USE_XFORMS_IMAGE_LOADER): complete rewrite. Now

View File

@ -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="<flimage.h>"],
@ -95,7 +95,7 @@ if test $lyx_use_xforms_image_loader = yes ; then
ac_cv_header_flimage_h=yes
lyx_cv_flimage_h_location="<X11/flimage.h>"],
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 <flimage.h> 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. <flimage.h>

View File

@ -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"

42
images/delim1.xpm Normal file
View File

@ -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",
" "
};

View File

@ -1,3 +1,12 @@
2002-06-07 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* xformsGImage.h: fix typo
2002-05-24 Martin Vermeer <martin.vermeer@hut.fi>
* FormMathsDelim.C: fix delimiter pre-display rendering
mess-up bug (354)
2002-06-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* GUIRunTime.C (initialiseGraphics): condition on

View File

@ -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<char**>(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<char**>(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;

View File

@ -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

View File

@ -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