Fixed a few xforms issues, with this method we could fix others too!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@230 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 1999-10-22 15:20:26 +00:00
parent 28aa3975e6
commit 367dd0efac
6 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,15 @@
1999-10-22 Juergen Vigna <jug@sad.it>
* src/insets/figinset.C (CallbackFig): Just changed the defines a bit.
* src/lyx_cb.C (MenuInsertRef) +
* src/lyx_gui.C (create_forms): Inserted fl_set_form_minsize so that
the form cannot be resized under it limits (fixes a segfault)
* src/lyx.C (create_form_form_ref) +
* forms/lyx.fd: Changed Gravity on name input field so that it is
resized correctly.
1999-10-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr> 1999-10-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* configure.in: use LYX_CXX_STL_MODERN_STREAMS; check for headers * configure.in: use LYX_CXX_STL_MODERN_STREAMS; check for headers

View File

@ -93,7 +93,7 @@ argument:
-------------------- --------------------
class: FL_BEGIN_GROUP class: FL_BEGIN_GROUP
type: 0 type: 0
box: 0 0 0 0 box: 0 10 10 0
boxtype: FL_NO_BOX boxtype: FL_NO_BOX
colors: FL_COL1 FL_MCOL colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_CENTER alignment: FL_ALIGN_CENTER
@ -625,7 +625,7 @@ lcol: FL_BLACK
label: Name|#N label: Name|#N
shortcut: shortcut:
resize: FL_RESIZE_X resize: FL_RESIZE_X
gravity: FL_NorthWest FL_SouthEast gravity: FL_SouthWest FL_SouthEast
name: ref_name name: ref_name
callback: callback:
argument: argument:

View File

@ -980,8 +980,7 @@ static void UnregisterFigure(InsetFig *fi)
} }
#if FL_REVISION == 89 #if FL_REVISION == 89
#warning Reactivate this free_form calls #warning Reactivate this free_form calls
#endif #else
#if FL_REVISION != 89
fl_free_form(tmpfig->inset->form->Figure); fl_free_form(tmpfig->inset->form->Figure);
free(tmpfig->inset->form); free(tmpfig->inset->form);
tmpfig->inset->form = 0; tmpfig->inset->form = 0;
@ -1931,8 +1930,7 @@ void InsetFig::CallbackFig(long arg)
fl_hide_form(form->Figure); fl_hide_form(form->Figure);
#if FL_REVISION == 89 #if FL_REVISION == 89
#warning Reactivate this free_form calls #warning Reactivate this free_form calls
#endif #else
#if FL_REVISION != 89
fl_free_form(form->Figure); fl_free_form(form->Figure);
free(form); free(form);
form = 0; form = 0;
@ -1949,8 +1947,7 @@ void InsetFig::CallbackFig(long arg)
fl_hide_form(form->Figure); fl_hide_form(form->Figure);
#if FL_REVISION == 89 #if FL_REVISION == 89
#warning Reactivate this free_form calls #warning Reactivate this free_form calls
#endif #else
#if FL_REVISION != 89
fl_free_form(form->Figure); fl_free_form(form->Figure);
free(form); free(form);
form = 0; form = 0;

View File

@ -156,7 +156,7 @@ FD_form_ref *create_form_form_ref(void)
fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
fl_set_object_callback(obj,RefSelectCB,2); fl_set_object_callback(obj,RefSelectCB,2);
fdui->ref_name = obj = fl_add_input(FL_NORMAL_INPUT,80,160,200,30,idex(_("Name|#N")));fl_set_button_shortcut(obj,scex(_("Name|#N")),1); fdui->ref_name = obj = fl_add_input(FL_NORMAL_INPUT,80,160,200,30,idex(_("Name|#N")));fl_set_button_shortcut(obj,scex(_("Name|#N")),1);
fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast);
fl_set_object_resize(obj, FL_RESIZE_X); fl_set_object_resize(obj, FL_RESIZE_X);
fl_end_form(); fl_end_form();

View File

@ -1183,6 +1183,9 @@ void MenuInsertRef()
fl_show_form(fd_form_ref->form_ref, fl_show_form(fd_form_ref->form_ref,
FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER,
_("Insert Reference")); _("Insert Reference"));
fl_set_form_minsize(fd_form_ref->form_ref,
fd_form_ref->form_ref->w,
fd_form_ref->form_ref->h);
} }
} }

View File

@ -575,6 +575,8 @@ void LyXGUI::create_forms()
// the ref form // the ref form
fd_form_ref = create_form_form_ref(); fd_form_ref = create_form_form_ref();
fl_set_form_atclose(fd_form_ref->form_ref, CancelCloseBoxCB, 0); fl_set_form_atclose(fd_form_ref->form_ref, CancelCloseBoxCB, 0);
fl_set_form_minsize(fd_form_ref->form_ref, fd_form_ref->form_ref->w,
fd_form_ref->form_ref->h);
// the latex options form // the latex options form
fd_latex_options = create_form_LaTeXOptions(); fd_latex_options = create_form_LaTeXOptions();