From 39e945a785af27ac500dfdcf29c50c62e8d318e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Fri, 22 Oct 1999 02:37:56 +0000 Subject: [PATCH] add some ifdef guards around the code that jug commented out. still commented out if FL_REVISION == 89 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@225 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 4 ++++ src/insets/figinset.C | 30 +++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25c0b69247..2dc73c29a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-10-22 Lars Gullik Bjønnes + * src/insets/figinset.C: added ifdef guards around the fl_free + code that asger commented out. Now it is commented out when + compiling with XForms == 0.89. + * src/support/lyxstring.C: moved the definition of lyxstring::Srep to lyxstring.C, and only keep a forward declaration in lyxstring.h. Simplifies the header file a bit and should help a diff --git a/src/insets/figinset.C b/src/insets/figinset.C index 9283b61db7..25c9f80ab3 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -978,10 +978,14 @@ static void UnregisterFigure(InsetFig *fi) tmpfig->inset->form->OkBtn); fl_hide_form(tmpfig->inset->form->Figure); } +#if FL_REVISION == 89 #warning Reactivate this free_form calls -// fl_free_form(tmpfig->inset->form->Figure); -// free(tmpfig->inset->form); -// tmpfig->inset->form = 0; +#endif +#if FL_REVISION != 89 + fl_free_form(tmpfig->inset->form->Figure); + free(tmpfig->inset->form); + tmpfig->inset->form = 0; +#endif } i = FindFigIndex(tmpfig); --figinsref; @@ -1925,10 +1929,14 @@ void InsetFig::CallbackFig(long arg) if (arg == 8) { fl_set_focus_object(form->Figure, form->OkBtn); fl_hide_form(form->Figure); +#if FL_REVISION == 89 #warning Reactivate this free_form calls -// fl_free_form(form->Figure); -// free(form); -// form = 0; +#endif +#if FL_REVISION != 89 + fl_free_form(form->Figure); + free(form); + form = 0; +#endif } break; } //if not readonly @@ -1939,10 +1947,14 @@ void InsetFig::CallbackFig(long arg) case 9: /* cancel = restore and close */ fl_set_focus_object(form->Figure, form->OkBtn); fl_hide_form(form->Figure); +#if FL_REVISION == 89 #warning Reactivate this free_form calls -// fl_free_form(form->Figure); -// free(form); -// form = 0; +#endif +#if FL_REVISION != 89 + fl_free_form(form->Figure); + free(form); + form = 0; +#endif break; }