From 367dd0efacd3021077cbb8414a35328a5c9b740d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Fri, 22 Oct 1999 15:20:26 +0000 Subject: [PATCH] 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 --- ChangeLog | 12 ++++++++++++ forms/lyx.fd | 4 ++-- src/insets/figinset.C | 9 +++------ src/lyx.C | 2 +- src/lyx_cb.C | 3 +++ src/lyx_gui.C | 2 ++ 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f1555ebda..5491a597d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +1999-10-22 Juergen Vigna + + * 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 * configure.in: use LYX_CXX_STL_MODERN_STREAMS; check for headers diff --git a/forms/lyx.fd b/forms/lyx.fd index 54c7892468..8d4cca7e85 100644 --- a/forms/lyx.fd +++ b/forms/lyx.fd @@ -93,7 +93,7 @@ argument: -------------------- class: FL_BEGIN_GROUP type: 0 -box: 0 0 0 0 +box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER @@ -625,7 +625,7 @@ lcol: FL_BLACK label: Name|#N shortcut: resize: FL_RESIZE_X -gravity: FL_NorthWest FL_SouthEast +gravity: FL_SouthWest FL_SouthEast name: ref_name callback: argument: diff --git a/src/insets/figinset.C b/src/insets/figinset.C index 25c9f80ab3..4fb1b106e0 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -980,8 +980,7 @@ static void UnregisterFigure(InsetFig *fi) } #if FL_REVISION == 89 #warning Reactivate this free_form calls -#endif -#if FL_REVISION != 89 +#else fl_free_form(tmpfig->inset->form->Figure); free(tmpfig->inset->form); tmpfig->inset->form = 0; @@ -1931,8 +1930,7 @@ void InsetFig::CallbackFig(long arg) fl_hide_form(form->Figure); #if FL_REVISION == 89 #warning Reactivate this free_form calls -#endif -#if FL_REVISION != 89 +#else fl_free_form(form->Figure); free(form); form = 0; @@ -1949,8 +1947,7 @@ void InsetFig::CallbackFig(long arg) fl_hide_form(form->Figure); #if FL_REVISION == 89 #warning Reactivate this free_form calls -#endif -#if FL_REVISION != 89 +#else fl_free_form(form->Figure); free(form); form = 0; diff --git a/src/lyx.C b/src/lyx.C index 50e99810c2..f874f6648c 100644 --- a/src/lyx.C +++ b/src/lyx.C @@ -156,7 +156,7 @@ FD_form_ref *create_form_form_ref(void) fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); 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); - 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_end_form(); diff --git a/src/lyx_cb.C b/src/lyx_cb.C index 90d652c2b7..c84a087606 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -1183,6 +1183,9 @@ void MenuInsertRef() fl_show_form(fd_form_ref->form_ref, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Insert Reference")); + fl_set_form_minsize(fd_form_ref->form_ref, + fd_form_ref->form_ref->w, + fd_form_ref->form_ref->h); } } diff --git a/src/lyx_gui.C b/src/lyx_gui.C index 09ea9ad82d..50dd432177 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -575,6 +575,8 @@ void LyXGUI::create_forms() // the ref form fd_form_ref = create_form_form_ref(); 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 fd_latex_options = create_form_LaTeXOptions(); -- 2.39.5