Get xforms version checking right

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@4315 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-06-02 16:48:21 +00:00
parent ba5a184c97
commit 25f70a826e
11 changed files with 36 additions and 25 deletions

View File

@ -1,3 +1,9 @@
2002-06-02 John Levon <moz@compsoc.man.ac.uk>
* WorkArea.C:
* XFormsView.C:
* lyx_gui.C: check for xforms version properly
2002-04-30 Herbert Voss <voss@lyx.org>
* buffer.C (parseSingleLyXformat2Token): fix bug with ignored

View File

@ -20,7 +20,7 @@
#include "lyxrc.h" // lyxrc.show_banner
#include "version.h" // lyx_version
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
#include "lyxlookup.h"
#endif
@ -368,7 +368,7 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
ev->xbutton.y - ob->y,
ev->xbutton.button);
break;
#if FL_REVISION < 89
#if FL_VERSION < 1 && FL_REVISION < 89
case FL_MOUSE:
#else
case FL_DRAG:
@ -384,7 +384,7 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
ev->xbutton.state);
}
break;
#if FL_REVISION < 89
#if FL_VERSION < 1 && FL_REVISION < 89
case FL_KEYBOARD:
#else
case FL_KEYPRESS:
@ -395,7 +395,7 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
KeySym keysym = 0;
char dummy[1];
XKeyEvent * xke = reinterpret_cast<XKeyEvent *>(ev);
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
// XForms < 0.89.5 does not have compose support
// so we are using our own compose support
LyXLookupString(ev, dummy, 1, &keysym);
@ -417,7 +417,7 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
<< keysym << "]" << endl;
}
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
if (keysym == NoSymbol) {
lyxerr[Debug::KEY]
<< "Empty kdb action (probably composing)"
@ -494,7 +494,7 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
}
break;
#if FL_REVISION >= 89
#if FL_VERSION > 0 || FL_REVISION >= 89
case FL_KEYRELEASE:
lyxerr[Debug::WORKAREA] << "Workarea event: KEYRELEASE" << endl;
break;

View File

@ -15,7 +15,7 @@
#endif
#include "XFormsView.h"
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
#include "lyxlookup.h"
#endif
#include "minibuffer.h"
@ -103,7 +103,7 @@ void XFormsView::show(int place, int border, string const & title)
fl_set_form_minsize(form_, form_->w, form_->h);
fl_show_form(form_, place, border, title.c_str());
getLyXFunc()->initMiniBuffer();
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
InitLyXLookup(fl_get_display(), form_->window);
#endif
}

View File

@ -1,3 +1,13 @@
2002-06-02 John Levon <moz@compsoc.man.ac.uk>
* GUIRunTime.C:
* Menubar_pimpl.C:
* Tooltips.h:
* Tooltips.C:
* xforms_resize.C: check xforms version properly
* xformsGImage.h: include flimage.h too
2002-05-10 Herbert Voss <voss@perce.de>
* FormInclude.C (input, update): disable load-button when

View File

@ -24,15 +24,6 @@
#include "graphics/GraphicsImageXPM.h"
#endif
// I keep these here so that it will be processed as early in
// the compilation process as possible.
#if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
#error LyX will not compile with this version of XForms.\
Please get version 0.89.\
If you want to try to compile anyway, delete this test in src/frontends/xforms/GUIRunTime.C.
#endif
using std::endl;
using std::hex;

View File

@ -233,7 +233,7 @@ size_type const max_number_of_items = 25;
inline
string const fixlabel(string const & str)
{
#if FL_REVISION < 89
#if FL_VERSION < 1 && FL_REVISION < 89
return subst(str, '%', '?');
#else
return subst(str, "%", "%%");

View File

@ -33,7 +33,7 @@ bool Tooltips::enabled_ = true;
SigC::Signal0<void> Tooltips::toggled;
#if FL_REVISION >= 89
#if FL_VERSION > 0 || FL_REVISION >= 89
Tooltips::Tooltips()
{

View File

@ -39,7 +39,7 @@ public:
/// This method is connected to the tooltipsToggled signal.
void set();
#if FL_REVISION < 89
#if FL_VERSION < 1 && FL_REVISION < 89
/** Return the tooltip associated with this object.
* Required by an xforms callback routine.
@ -68,7 +68,7 @@ private:
TooltipsMap tooltipsMap;
#if FL_REVISION < 89
#if FL_VERSION < 1 && FL_REVISION < 89
/** A timer is started once the mouse enters an object, so that the
* tip appears a short delay afterwards.

View File

@ -20,6 +20,10 @@
#include "graphics/GraphicsImage.h"
#include FORMS_H_LOCATION
#if FL_VERSION > 0
// FIXME: need FORMS_IMAGE_H_LOCATION I suppose
#include <flimage.h>
#endif
namespace grfx {

View File

@ -183,7 +183,7 @@ double scale_to_fit_tabs(FL_OBJECT * folder)
// A nasty hack for older xforms versions
int get_tabfolder_numfolders(FL_OBJECT * folder)
{
#if FL_REVISION > 88
#if FL_VERSION > 0 || FL_REVISION > 88
return fl_get_tabfolder_numfolders(folder);
#else
if (folder->objclass != FL_TABFOLDER)

View File

@ -26,7 +26,7 @@
#include "lyxserver.h"
#include "lyxrc.h"
#include "gettext.h"
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
#include "lyxlookup.h"
#endif
#include "bufferlist.h"
@ -173,7 +173,7 @@ LyXGUI::~LyXGUI()
delete lyxserver;
lyxserver = 0;
delete lyxViews;
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5))
CloseLyXLookup();
#endif
}
@ -240,7 +240,7 @@ void LyXGUI::init()
fl_setpup_fontsize(FL_NORMAL_SIZE);
fl_setpup_color(FL_MCOL, FL_BLACK);
fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
#if FL_REVISION < 89
#if FL_VERSION < 1 && FL_REVISION < 89
fl_set_oneliner_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
#else
fl_set_tooltip_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);