From a77033585c912bd5c29c9b0a61a18bddeb109284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Vigna?= Date: Mon, 25 Oct 1999 14:50:26 +0000 Subject: [PATCH] This patch should now fix all resize problems we have with forms-windows. If a save and correct resize is not possible I forbid resizing. I hope I got all of them :) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@243 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 34 +++ forms/form1.fd | 24 +- forms/form_url.fd | 106 +++++++ forms/latexoptions.fd | 10 +- forms/layout_forms.fd | 618 ++++++++++++++++++++-------------------- forms/lyx.fd | 32 +-- src/LaTeXLog.C | 6 + src/LyXSendto.C | 7 + src/PaperLayout.C | 3 +- src/ParagraphExtra.C | 2 +- src/TableLayout.C | 10 +- src/form1.C | 24 +- src/insets/Makefile.am | 2 + src/insets/form_url.C | 41 +++ src/insets/form_url.h | 24 ++ src/insets/inseterror.C | 7 +- src/insets/insetinfo.C | 11 +- src/insets/inseturl.C | 69 +++-- src/insets/inseturl.h | 11 +- src/latexoptions.C | 3 + src/layout_forms.C | 107 ++++++- src/lyx.C | 13 + src/lyx_cb.C | 46 ++- src/lyx_gui.C | 6 + src/lyxfr0.C | 7 + src/lyxfunc.C | 6 + src/lyxvc.C | 7 + src/mathed/math_panel.C | 2 +- src/menus.C | 7 + 29 files changed, 820 insertions(+), 425 deletions(-) create mode 100644 forms/form_url.fd create mode 100644 src/insets/form_url.C create mode 100644 src/insets/form_url.h diff --git a/ChangeLog b/ChangeLog index 9e366e9c20..2dac56340f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +1999-10-25 Juergen Vigna + + * forms/form1.fd + + * forms/layout_forms.fd + + * forms/latexoptions.fd + + * lyx.fd: changed for various form resize issues + + * src/mathed/math_panel.C + + * src/insets/inseterror.C + + * src/insets/insetinfo.C + + * src/insets/inseturl.C + + * src/insets/inseturl.h + + * src/LaTeXLog.C + + * src/LyXSendto.C + + * src/PaperLayout.C + + * src/ParagraphExtra.C + + * src/TableLayout.C + + * src/form1.C + + * src/layout_forms.C + + * src/lyx.C + + * src/lyx_cb.C + + * src/lyx_gui.C + + * src/lyxfr0.C + + * src/lyxfunc.C + + * src/lyxvc.C + + * src/menus.C: fixed various resize issues. So now forms can be + resized savely or not be resized at all. + + * forms/form_url.fd + + * src/insets/form_url.[Ch]: added because it's cleaner and easier + to modify IMO. + + * src/insets/Makefile.am: added files form_url.[Ch] + 1999-10-25 Jean-Marc Lasgouttes * INSTALL: it is now possible to compile LyX with digital C++ 6.1 diff --git a/forms/form1.fd b/forms/form1.fd index 4f2b0e4e8f..d4aa11ef36 100644 --- a/forms/form1.fd +++ b/forms/form1.fd @@ -249,7 +249,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 @@ -687,7 +687,7 @@ argument: 2 -------------------- 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 @@ -867,7 +867,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 @@ -975,7 +975,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 @@ -1542,8 +1542,8 @@ size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthEast FL_NorthEast name: callback: argument: @@ -1579,7 +1579,7 @@ lcol: FL_BLACK label: Replace with|#W shortcut: resize: FL_RESIZE_X -gravity: FL_West FL_East +gravity: FL_NorthWest FL_NorthEast name: input_replace callback: argument: @@ -1594,7 +1594,7 @@ alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK -label: @>|#F +label: >|#F shortcut: resize: FL_RESIZE_NONE gravity: FL_SouthEast FL_SouthEast @@ -1612,7 +1612,7 @@ alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK -label: @<|#B +label: <|#B shortcut: resize: FL_RESIZE_NONE gravity: FL_SouthEast FL_SouthEast @@ -1651,7 +1651,7 @@ lcol: FL_BLACK label: Close|^[ shortcut: resize: FL_RESIZE_NONE -gravity: FL_SouthWest FL_SouthWest +gravity: FL_SouthEast FL_SouthEast name: callback: SearchCancelCB argument: 0 @@ -1669,7 +1669,7 @@ lcol: FL_BLACK label: Case sensitive|#s#S shortcut: resize: FL_RESIZE_NONE -gravity: FL_SouthEast FL_SouthEast +gravity: FL_NorthEast FL_NorthEast name: btnCaseSensitive callback: argument: 0 @@ -1687,7 +1687,7 @@ lcol: FL_BLACK label: Match word|#M#m shortcut: resize: FL_RESIZE_NONE -gravity: FL_SouthEast FL_SouthEast +gravity: FL_NorthEast FL_NorthEast name: btnMatchWord callback: argument: 0 diff --git a/forms/form_url.fd b/forms/form_url.fd new file mode 100644 index 0000000000..cd4834d1d5 --- /dev/null +++ b/forms/form_url.fd @@ -0,0 +1,106 @@ +Magic: 13000 + +Internal Form Definition File + (do not change) + +Number of forms: 1 +Unit of measure: FL_COORD_PIXEL + +=============== FORM =============== +Name: form_url +Width: 530 +Height: 150 +Number of Objects: 5 + +-------------------- +class: FL_BOX +type: UP_BOX +box: 0 0 530 150 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_INPUT +type: NORMAL_INPUT +box: 50 20 460 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: Url +shortcut: Url|#U +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: url_name +callback: +argument: + +-------------------- +class: FL_INPUT +type: NORMAL_INPUT +box: 50 60 460 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: Name +shortcut: Name|#N +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: name_name +callback: +argument: + +-------------------- +class: FL_CHECKBUTTON +type: PUSH_BUTTON +box: 50 110 250 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: HTML type +shortcut: HTML type|#H +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: radio_html +callback: +argument: + +-------------------- +class: FL_BUTTON +type: RETURN_BUTTON +box: 410 110 100 30 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: Close +shortcut: ^M +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast +name: button_close +callback: C_InsetUrl_CloseUrlCB +argument: 0 + +============================== +create_the_forms diff --git a/forms/latexoptions.fd b/forms/latexoptions.fd index 15e7c067f7..0eeae1d017 100644 --- a/forms/latexoptions.fd +++ b/forms/latexoptions.fd @@ -139,7 +139,7 @@ lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +gravity: FL_NorthWest FL_SouthEast name: browser_latexlog callback: argument: @@ -156,8 +156,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Close shortcut: ^M -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: callback: LatexLogClose argument: 0 @@ -174,8 +174,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Update|#Uu shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: callback: LatexLogUpdate argument: 0 diff --git a/forms/layout_forms.fd b/forms/layout_forms.fd index 4fa00cef34..e7f46bea13 100644 --- a/forms/layout_forms.fd +++ b/forms/layout_forms.fd @@ -26,7 +26,7 @@ lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +gravity: FL_NorthWest FL_SouthEast name: callback: argument: @@ -43,8 +43,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -61,8 +61,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Separation shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -70,7 +70,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 @@ -97,8 +97,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Indent|#I shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: radio_indent callback: argument: @@ -115,8 +115,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Skip|#K shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: radio_skip callback: argument: @@ -151,8 +151,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Class:|#C shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_class callback: ChoiceClassCB argument: 0 @@ -169,8 +169,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Pagestyle:|#P shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_pagestyle callback: argument: @@ -187,8 +187,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Fonts:|#F shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_fonts callback: argument: @@ -205,8 +205,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Font Size:|#O shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_fontsize callback: argument: @@ -223,8 +223,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Cancel|^[ shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: button_cancel callback: DocumentCancelCB argument: 0 @@ -241,8 +241,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Apply|#A shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: button_apply callback: DocumentApplyCB argument: 0 @@ -259,8 +259,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: OK shortcut: ^M -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: button_ok callback: DocumentOKCB argument: 0 @@ -277,8 +277,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Float Placement:|#L shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: input_float_placement callback: argument: @@ -295,8 +295,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: PS Driver:|#S shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_postscript_driver callback: argument: @@ -313,8 +313,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Encoding:|#D shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_inputenc callback: argument: @@ -331,8 +331,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -349,8 +349,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -358,7 +358,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 @@ -385,8 +385,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: One|#n shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: radio_sides_one callback: argument: @@ -403,8 +403,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Two|#T shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: radio_sides_two callback: argument: @@ -439,8 +439,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Sides shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -457,8 +457,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Columns shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -466,7 +466,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 @@ -493,8 +493,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: One|#e shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: radio_columns_one callback: argument: @@ -511,8 +511,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Two|#w shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: radio_columns_two callback: argument: @@ -547,8 +547,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Extra Options:|#X shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: input_extra callback: argument: @@ -565,8 +565,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Language: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_language callback: argument: @@ -583,8 +583,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: input_default_skip callback: DocumentDefskipCB argument: 0 @@ -601,8 +601,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Default Skip:|#u shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_default_skip callback: DocumentDefskipCB argument: 0 @@ -619,8 +619,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Section number depth shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: slider_secnumdepth callback: argument: @@ -637,8 +637,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Table of contents depth shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: slider_tocdepth callback: argument: @@ -655,8 +655,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Spacing|#g shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: choice_spacing callback: DocumentSpacingCB argument: 0 @@ -673,8 +673,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Bullet Shapes|#B shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: button_bullets callback: DocumentBulletsCB argument: 0 @@ -691,8 +691,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Use AMS Math|#M shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: check_use_amsmath callback: argument: @@ -709,8 +709,8 @@ size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_NorthWest FL_NoGravity name: input_spacing callback: DocumentSpacingCB argument: 0 @@ -734,223 +734,7 @@ lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 10 10 280 195 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 94 15 191 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Family:|#F -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: choice_family -callback: -argument: - --------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 94 55 191 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Series:|#S -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: choice_series -callback: -argument: - --------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 94 95 191 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Shape:|#H -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: choice_shape -callback: -argument: - --------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 95 230 191 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Size:|#Z -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: choice_size -callback: -argument: - --------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 95 290 190 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Misc:|#M -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: choice_bar -callback: -argument: - --------------------- -class: FL_BUTTON -type: NORMAL_BUTTON -box: 60 330 80 30 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Apply|#A -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: button_apply -callback: CharacterApplyCB -argument: 0 - --------------------- -class: FL_BUTTON -type: RETURN_BUTTON -box: 175 330 80 30 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Close -shortcut: ^M -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: button_close -callback: CharacterCloseCB -argument: 0 - --------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 95 135 191 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Color:|#C -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: choice_color -callback: -argument: - --------------------- -class: FL_CHECKBUTTON -type: PUSH_BUTTON -box: 30 175 260 25 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: Toggle on all these|#T -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: check_toggle_all -callback: -argument: - --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 10 220 280 45 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_TEXT -type: NORMAL_TEXT -box: 20 210 210 20 -boxtype: FL_FLAT_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE -style: FL_BOLD_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: These are never toggled -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +gravity: FL_NorthWest FL_SouthEast name: callback: argument: @@ -967,8 +751,224 @@ size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: +callback: +argument: + +-------------------- +class: FL_FRAME +type: ENGRAVED_FRAME +box: 10 220 280 45 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: +callback: +argument: + +-------------------- +class: FL_FRAME +type: ENGRAVED_FRAME +box: 10 10 280 195 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: +callback: +argument: + +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 94 15 191 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Family:|#F +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: choice_family +callback: +argument: + +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 94 55 191 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Series:|#S +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: choice_series +callback: +argument: + +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 94 95 191 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Shape:|#H +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: choice_shape +callback: +argument: + +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 95 230 191 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Size:|#Z +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: choice_size +callback: +argument: + +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 95 290 190 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Misc:|#M +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: choice_bar +callback: +argument: + +-------------------- +class: FL_BUTTON +type: NORMAL_BUTTON +box: 60 330 80 30 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Apply|#A +shortcut: +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast +name: button_apply +callback: CharacterApplyCB +argument: 0 + +-------------------- +class: FL_BUTTON +type: RETURN_BUTTON +box: 175 330 80 30 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Close +shortcut: ^M +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast +name: button_close +callback: CharacterCloseCB +argument: 0 + +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 95 135 191 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Color:|#C +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: choice_color +callback: +argument: + +-------------------- +class: FL_CHECKBUTTON +type: PUSH_BUTTON +box: 30 175 260 25 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: Toggle on all these|#T +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast +name: check_toggle_all +callback: +argument: + +-------------------- +class: FL_TEXT +type: NORMAL_TEXT +box: 20 210 210 20 +boxtype: FL_FLAT_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_BOLD_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: These are never toggled +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast name: callback: argument: @@ -985,8 +985,8 @@ size: FL_DEFAULT_SIZE lcol: FL_BLACK label: These are always toggled shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NorthEast name: callback: argument: @@ -1288,7 +1288,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 @@ -1682,7 +1682,7 @@ lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +gravity: FL_NorthWest FL_SouthEast name: input_preamble callback: argument: @@ -1786,7 +1786,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 @@ -2134,7 +2134,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 @@ -3406,7 +3406,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 @@ -3550,7 +3550,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 @@ -3673,8 +3673,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -3691,8 +3691,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Special Multicolumn Alignment shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -3709,8 +3709,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -3727,8 +3727,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: input_special_alignment callback: TableOptionsCB argument: 0 @@ -3745,8 +3745,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Close shortcut: ^M -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: callback: TableSpeCloseCB argument: 0 @@ -3763,8 +3763,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Special Column Alignment shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: callback: argument: @@ -3781,8 +3781,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: input_special_multialign callback: TableOptionsCB argument: 0 diff --git a/forms/lyx.fd b/forms/lyx.fd index 8d4cca7e85..5ea55ba0ae 100644 --- a/forms/lyx.fd +++ b/forms/lyx.fd @@ -270,8 +270,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Roman Font|#R shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: input_roman callback: argument: @@ -288,8 +288,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Sans Serif Font|#S shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: input_sans callback: argument: @@ -306,8 +306,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Typewriter Font|#T shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: input_typewriter callback: argument: @@ -324,8 +324,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Font Norm|#N shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: input_font_norm callback: argument: @@ -342,8 +342,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Font Zoom|#Z shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_NoGravity name: intinput_size callback: argument: @@ -360,8 +360,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: OK shortcut: ^M -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: callback: ScreenOKCB argument: 0 @@ -378,8 +378,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Apply|#A shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: callback: ScreenApplyCB argument: 0 @@ -396,8 +396,8 @@ size: FL_NORMAL_SIZE lcol: FL_BLACK label: Cancel|^[ shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +resize: FL_RESIZE_NONE +gravity: FL_SouthEast FL_SouthEast name: callback: ScreenCancelCB argument: 0 diff --git a/src/LaTeXLog.C b/src/LaTeXLog.C index ac215a71f6..bd7f7e58d1 100644 --- a/src/LaTeXLog.C +++ b/src/LaTeXLog.C @@ -20,6 +20,7 @@ void ShowLatexLog() { string filename, fname, bname, path; bool use_build = false; + static int ow = -1, oh; filename = current_view->currentBuffer()->getFileName(); if (!filename.empty()) { @@ -50,6 +51,11 @@ void ShowLatexLog() fl_show_form(fd_latex_log->LaTeXLog, FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, use_build ? _("Build Program Log") : _("LaTeX Log")); + if (ow < 0) { + ow = fd_latex_log->LaTeXLog->w; + oh = fd_latex_log->LaTeXLog->h; + } + fl_set_form_minsize(fd_latex_log->LaTeXLog, ow, oh); } } diff --git a/src/LyXSendto.C b/src/LyXSendto.C index 271c6a33be..2c95a3089b 100644 --- a/src/LyXSendto.C +++ b/src/LyXSendto.C @@ -23,6 +23,8 @@ extern bool MenuRunDvips(Buffer *buffer, bool wait); void MenuSendto() { + static int ow = -1, oh; + // do this only if the command is empty if (!fl_get_input(fd_form_sendto->input_cmd) && !lyxrc->custom_export_command.empty()) @@ -34,6 +36,11 @@ void MenuSendto() fl_show_form(fd_form_sendto->form_sendto, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Send Document to Command")); + if (ow < 0) { + ow = fd_form_sendto->form_sendto->w; + oh = fd_form_sendto->form_sendto->h; + } + fl_set_form_minsize(fd_form_sendto->form_sendto, ow, oh); } } diff --git a/src/PaperLayout.C b/src/PaperLayout.C index ff98d2bae6..a023143bdb 100644 --- a/src/PaperLayout.C +++ b/src/PaperLayout.C @@ -176,8 +176,7 @@ void MenuLayoutPaper() fl_raise_form(fd_form_paper->form_paper); } else { fl_show_form(fd_form_paper->form_paper, - FL_PLACE_MOUSE - | FL_FREE_SIZE,FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Paper Layout")); } } diff --git a/src/ParagraphExtra.C b/src/ParagraphExtra.C index fceecd35c0..41773763e1 100644 --- a/src/ParagraphExtra.C +++ b/src/ParagraphExtra.C @@ -156,7 +156,7 @@ void ParagraphExtraOpen(FL_OBJECT *, long) fl_raise_form(fd_form_paragraph_extra->form_paragraph_extra); } else { fl_show_form(fd_form_paragraph_extra->form_paragraph_extra, - FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("ParagraphExtra Layout")); } } diff --git a/src/TableLayout.C b/src/TableLayout.C index b944fe6c3a..9bb11361ff 100644 --- a/src/TableLayout.C +++ b/src/TableLayout.C @@ -227,12 +227,20 @@ bool UpdateLayoutTable(int flag) void OpenLayoutTableExtra() { + static int ow = -1, oh; + if (fd_form_table_extra->form_table_extra->visible) { fl_raise_form(fd_form_table_extra->form_table_extra); } else { fl_show_form(fd_form_table_extra->form_table_extra, FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, _("Table Extra Form")); + if (ow < 0) { + ow = fd_form_table_extra->form_table_extra->w; + oh = fd_form_table_extra->form_table_extra->h; + } + fl_set_form_minsize(fd_form_table_extra->form_table_extra, + ow,oh); } } @@ -244,7 +252,7 @@ void MenuLayoutTable(int flag) } else { fl_show_form(fd_form_table_options->form_table_options, - FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Table Layout")); } } diff --git a/src/form1.C b/src/form1.C index abe396bc99..4d326a47c5 100644 --- a/src/form1.C +++ b/src/form1.C @@ -135,10 +135,7 @@ FD_Figure *create_form_Figure(void) fl_set_object_callback(obj,GraphicsCB,2); fdui->HeightGrp = fl_bgn_group(); - // xgettext:no-c-format - fdui->page2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,110,130,110,30,idex(_("% of Page|#g"))); - // xgettext:no-c-format - fl_set_button_shortcut(obj,scex(_("% of Page|#g")),1); + fdui->page2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,110,130,110,30,idex(_("% of Page|#g")));fl_set_button_shortcut(obj,scex(_("% of Page|#g")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,GraphicsCB,23); fdui->Default2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,110,70,80,30,idex(_("Default|#t")));fl_set_button_shortcut(obj,scex(_("Default|#t")),1); @@ -195,16 +192,10 @@ FD_Figure *create_form_Figure(void) fdui->in1 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,110,80,30,idex(_("inches|#n")));fl_set_button_shortcut(obj,scex(_("inches|#n")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,GraphicsCB,12); - // xgettext:no-c-format - fdui->page1 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,130,110,30,idex(_("% of Page|#P"))); - // xgettext:no-c-format - fl_set_button_shortcut(obj,scex(_("% of Page|#P")),1); + fdui->page1 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,130,110,30,idex(_("% of Page|#P")));fl_set_button_shortcut(obj,scex(_("% of Page|#P")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,GraphicsCB,13); - // xgettext:no-c-format - fdui->column1 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,150,110,30,idex(_("% of Column|#o"))); - // xgettext:no-c-format - fl_set_button_shortcut(obj,scex(_("% of Column|#o")),1); + fdui->column1 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,150,110,30,idex(_("% of Column|#o")));fl_set_button_shortcut(obj,scex(_("% of Column|#o")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_callback(obj,GraphicsCB,14); fl_end_group(); @@ -320,13 +311,14 @@ FD_form_search *create_form_form_search(void) fdui->form_search = fl_bgn_form(FL_NO_BOX, 440, 160); obj = fl_add_box(FL_UP_BOX,0,0,440,160,""); obj = fl_add_frame(FL_ENGRAVED_FRAME,300,10,130,80,""); + fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast); fdui->input_search = obj = fl_add_input(FL_NORMAL_INPUT,110,10,180,30,idex(_("Find|#n")));fl_set_button_shortcut(obj,scex(_("Find|#n")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); fl_set_object_resize(obj, FL_RESIZE_X); fdui->input_replace = obj = fl_add_input(FL_NORMAL_INPUT,110,40,180,30,idex(_("Replace with|#W")));fl_set_button_shortcut(obj,scex(_("Replace with|#W")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_set_object_gravity(obj, FL_West, FL_East); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_button(FL_NORMAL_BUTTON,200,80,90,30,idex(_("@>|#F")));fl_set_button_shortcut(obj,scex(_("@>|#F")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); @@ -342,12 +334,12 @@ FD_form_search *create_form_form_search(void) fl_set_object_callback(obj,SearchReplaceCB,0); obj = fl_add_button(FL_NORMAL_BUTTON,350,120,80,30,idex(_("Close|^[")));fl_set_button_shortcut(obj,scex(_("Close|^[")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,SearchCancelCB,0); fdui->btnCaseSensitive = obj = fl_add_checkbutton(FL_PUSH_BUTTON,300,20,150,30,idex(_("Case sensitive|#s#S")));fl_set_button_shortcut(obj,scex(_("Case sensitive|#s#S")),1); - fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); + fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast); fdui->btnMatchWord = obj = fl_add_checkbutton(FL_PUSH_BUTTON,300,50,150,30,idex(_("Match word|#M#m")));fl_set_button_shortcut(obj,scex(_("Match word|#M#m")),1); - fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); + fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast); fdui->replaceall_button = obj = fl_add_button(FL_NORMAL_BUTTON,200,120,90,30,idex(_("Replace All|#A#a")));fl_set_button_shortcut(obj,scex(_("Replace All|#A#a")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); diff --git a/src/insets/Makefile.am b/src/insets/Makefile.am index fe37689d1d..7426f05bf7 100644 --- a/src/insets/Makefile.am +++ b/src/insets/Makefile.am @@ -10,6 +10,8 @@ CXXLINK = $(LD) -r -o $(noinst_PROGRAMS) insets_o_SOURCES = \ figinset.C \ figinset.h \ + form_url.C \ + form_url.h \ inset.C \ insetbib.C \ insetbib.h \ diff --git a/src/insets/form_url.C b/src/insets/form_url.C new file mode 100644 index 0000000000..8dd71897ed --- /dev/null +++ b/src/insets/form_url.C @@ -0,0 +1,41 @@ +// File modified by fdfix.sh for use by lyx (with xforms 0.81) and gettext +#include +#include "lyx_gui_misc.h" +#include "gettext.h" + +/* Form definition file generated with fdesign. */ + +#include FORMS_H_LOCATION +#include +#include "form_url.h" + +FD_form_url *create_form_form_url(void) +{ + FL_OBJECT *obj; + FD_form_url *fdui = (FD_form_url *) fl_calloc(1, sizeof(FD_form_url)); + + fdui->form_url = fl_bgn_form(FL_NO_BOX, 530, 150); + obj = fl_add_box(FL_UP_BOX,0,0,530,150,""); + fdui->url_name = obj = fl_add_input(FL_NORMAL_INPUT,50,20,460,30,_("Url")); + fl_set_input_shortcut(obj,scex(_("Url|#U")),1); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); + fdui->name_name = obj = fl_add_input(FL_NORMAL_INPUT,50,60,460,30,_("Name")); + fl_set_input_shortcut(obj,scex(_("Name|#N")),1); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); + fdui->radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON,50,110,250,30,_("HTML type")); + fl_set_button_shortcut(obj,scex(_("HTML type|#H")),1); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); + fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON,410,110,100,30,_("Close")); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); + fl_set_object_callback(obj,C_InsetUrl_CloseUrlCB,0); + fl_end_form(); + + //fdui->form_url->fdui = fdui; + + return fdui; +} +/*---------------------------------------*/ + diff --git a/src/insets/form_url.h b/src/insets/form_url.h new file mode 100644 index 0000000000..b212c08c7c --- /dev/null +++ b/src/insets/form_url.h @@ -0,0 +1,24 @@ +/** Header file generated with fdesign on Mon Oct 25 15:21:02 1999.**/ + +#ifndef FD_form_url_h_ +#define FD_form_url_h_ + +/** Callbacks, globals and object handlers **/ +extern "C" void C_InsetUrl_CloseUrlCB(FL_OBJECT *, long); + + +/**** Forms and Objects ****/ +typedef struct { + FL_FORM *form_url; + void *vdata; + char *cdata; + long ldata; + FL_OBJECT *url_name; + FL_OBJECT *name_name; + FL_OBJECT *radio_html; + FL_OBJECT *button_close; +} FD_form_url; + +extern FD_form_url * create_form_form_url(void); + +#endif /* FD_form_url_h_ */ diff --git a/src/insets/inseterror.C b/src/insets/inseterror.C index 09c1cd4dd1..42f3a1e63d 100644 --- a/src/insets/inseterror.C +++ b/src/insets/inseterror.C @@ -159,15 +159,17 @@ extern "C" void C_InsetError_CloseErrorCB(FL_OBJECT *, long data) void InsetError::Edit(int, int) { + static int ow = 400, oh = 240; + if (!form) { FL_OBJECT *obj; - form = fl_bgn_form(FL_UP_BOX,400,240); + form = fl_bgn_form(FL_UP_BOX,ow,oh); strobj = fl_add_box(FL_FRAME_BOX,10,10,380,180,""); fl_set_object_color(strobj,FL_MCOL,FL_MCOL); fl_set_object_gravity(strobj, FL_NorthWest, FL_SouthEast); obj = fl_add_button(FL_RETURN_BUTTON,140,200,120,30,_("Close")); fl_set_object_callback(obj, C_InsetError_CloseErrorCB, (long)this); - fl_set_object_gravity(obj, FL_South, FL_South); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_resize(obj, FL_RESIZE_NONE); fl_end_form(); fl_set_form_atclose(form, CancelCloseBoxCB, 0); @@ -178,6 +180,7 @@ void InsetError::Edit(int, int) } else { fl_show_form(form,FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("LaTeX Error")); + fl_set_form_minsize(form, ow, oh); } } diff --git a/src/insets/insetinfo.C b/src/insets/insetinfo.C index 00665337ae..52e8935c17 100644 --- a/src/insets/insetinfo.C +++ b/src/insets/insetinfo.C @@ -178,6 +178,8 @@ extern "C" void C_InsetInfo_CloseInfoCB(FL_OBJECT *, long data) void InsetInfo::Edit(int, int) { + static int ow = -1, oh; + if(current_view->currentBuffer()->isReadonly()) WarnReadonly(); @@ -190,7 +192,7 @@ void InsetInfo::Edit(int, int) fl_set_object_gravity(obj, NorthWestGravity, SouthEastGravity); obj = fl_add_button(FL_NORMAL_BUTTON,130,140,120,30,idex(_("Close|#C^["))); fl_set_object_resize(obj, FL_RESIZE_NONE); - fl_set_object_gravity(obj, SouthWestGravity, SouthEastGravity); + fl_set_object_gravity(obj, SouthEastGravity, SouthEastGravity); fl_set_object_callback(obj, C_InsetInfo_CloseInfoCB, (long)this); fl_set_object_shortcut(obj, scex(_("Close|#C^[")), (long)this); fl_end_form(); @@ -200,8 +202,13 @@ void InsetInfo::Edit(int, int) if (form->visible) { fl_raise_form(form); } else { - fl_show_form(form,FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, + fl_show_form(form,FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, _("Note")); + if (ow < 0) { + ow = form->w; + oh = form->h; + } + fl_set_form_minsize(form, ow, oh); } } diff --git a/src/insets/inseturl.C b/src/insets/inseturl.C index f25a945c20..3c174139d3 100644 --- a/src/insets/inseturl.C +++ b/src/insets/inseturl.C @@ -18,7 +18,7 @@ extern BufferView *current_view; extern void UpdateInset(Inset* inset, bool mark_dirty = true); InsetUrl::InsetUrl(string const & cmd) - : form(0) + : fd_form_url(0) { scanCommand(cmd); if (getCmdName() == "url") @@ -29,7 +29,7 @@ InsetUrl::InsetUrl(string const & cmd) InsetUrl::InsetUrl(InsetCommand const &inscmd) - : form(0) + : fd_form_url(0) { setCmdName(inscmd.getCmdName()); setContents(inscmd.getContents()); @@ -43,7 +43,7 @@ InsetUrl::InsetUrl(InsetCommand const &inscmd) InsetUrl::InsetUrl(string const &ins_name,string const &ins_cont, string const &ins_opt) - : form(0) + : fd_form_url(0) { setCmdName(ins_name); setContents(ins_cont); @@ -57,10 +57,10 @@ InsetUrl::InsetUrl(string const &ins_name,string const &ins_cont, InsetUrl::~InsetUrl() { - if (form) { - fl_hide_form(form); - fl_free_form(form); - form = 0; + if (fd_form_url) { + fl_hide_form(fd_form_url->form_url); + fl_free_form(fd_form_url->form_url); + fd_form_url = 0; } } @@ -68,10 +68,10 @@ InsetUrl::~InsetUrl() void InsetUrl::CloseUrlCB(FL_OBJECT *ob, long) { InsetUrl *inset = (InsetUrl*) ob->u_vdata; - string url = fl_get_input(inset->url_name); - string name = fl_get_input(inset->name_name); + string url = fl_get_input(inset->fd_form_url->url_name); + string name = fl_get_input(inset->fd_form_url->name_name); string cmdname; - if (fl_get_button(inset->radio_html)) + if (fl_get_button(inset->fd_form_url->radio_html)) cmdname = "htmlurl"; else cmdname = "url"; @@ -93,9 +93,9 @@ void InsetUrl::CloseUrlCB(FL_OBJECT *ob, long) UpdateInset(inset); } - if (inset->form) { - fl_hide_form(inset->form); - inset->form = 0; + if (inset->fd_form_url) { + fl_hide_form(inset->fd_form_url->form_url); + inset->fd_form_url = 0; } } @@ -106,43 +106,38 @@ extern "C" void C_InsetUrl_CloseUrlCB(FL_OBJECT *ob, long) void InsetUrl::Edit(int, int) { + static int ow = -1, oh; + if(current_view->currentBuffer()->isReadonly()) WarnReadonly(); - if (!form) { - FL_OBJECT *obj; - form = fl_bgn_form(FL_NO_BOX, 530, 170); - obj = fl_add_box(FL_UP_BOX,0,0,530,170,""); - url_name = obj = fl_add_input(FL_NORMAL_INPUT,50,30,460,30,idex(_("Url|#U"))); - fl_set_button_shortcut(obj,scex(_("Url|#U")),1); - name_name = obj = fl_add_input(FL_NORMAL_INPUT,50,80,460,30,idex(_("Name|#N"))); - fl_set_button_shortcut(obj,scex(_("Name|#N")),1); - obj = fl_add_button(FL_RETURN_BUTTON,360,130,100,30,idex(_("Close|#C^[^M"))); - fl_set_button_shortcut(obj,scex(_("Close|#C^[^M")),1); - obj->u_vdata = this; - fl_set_object_callback(obj,C_InsetUrl_CloseUrlCB,0); - radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON,50,130,240,30,idex(_("HTML type|#H"))); - fl_set_button_shortcut(obj,scex(_("HTML type|#H")),1); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_end_form(); - fl_set_form_atclose(form, CancelCloseBoxCB, 0); + if (!fd_form_url) { + fd_form_url = create_form_form_url(); + fd_form_url->button_close->u_vdata = this; + fl_set_form_atclose(fd_form_url->form_url,CancelCloseBoxCB, 0); } - fl_set_input(url_name, getContents().c_str()); - fl_set_input(name_name, getOptions().c_str()); + fl_set_input(fd_form_url->url_name, getContents().c_str()); + fl_set_input(fd_form_url->name_name, getOptions().c_str()); switch(flag) { case InsetUrl::URL: - fl_set_button(radio_html, 0); + fl_set_button(fd_form_url->radio_html, 0); break; case InsetUrl::HTML_URL: - fl_set_button(radio_html, 1); + fl_set_button(fd_form_url->radio_html, 1); break; } - if (form->visible) { - fl_raise_form(form); + if (fd_form_url->form_url->visible) { + fl_raise_form(fd_form_url->form_url); } else { - fl_show_form(form, FL_PLACE_MOUSE, + fl_show_form(fd_form_url->form_url, + FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Insert Url")); + if (ow < 0) { + ow = fd_form_url->form_url->w; + oh = fd_form_url->form_url->h; + } + fl_set_form_minsize(fd_form_url->form_url, ow, oh); } } diff --git a/src/insets/inseturl.h b/src/insets/inseturl.h index d54768be87..eaf1c2159e 100644 --- a/src/insets/inseturl.h +++ b/src/insets/inseturl.h @@ -17,6 +17,7 @@ #include "insetcommand.h" #include "buffer.h" +#include "form_url.h" struct LaTeXFeatures; @@ -33,7 +34,7 @@ public: }; /// - InsetUrl(): InsetCommand("url"), form(0) { flag = InsetUrl::URL; } + InsetUrl(): InsetCommand("url"), fd_form_url(0) { flag = InsetUrl::URL; } /// InsetUrl(string const &); /// @@ -80,13 +81,7 @@ private: /// Url_Flags flag; /// - FL_FORM *form; - /// - FL_OBJECT *url_name; - /// - FL_OBJECT *name_name; - /// - FL_OBJECT *radio_html; + FD_form_url *fd_form_url; }; #endif diff --git a/src/latexoptions.C b/src/latexoptions.C index dd215f522d..e13e552591 100644 --- a/src/latexoptions.C +++ b/src/latexoptions.C @@ -43,11 +43,14 @@ FD_LaTeXLog *create_form_LaTeXLog(void) fdui->LaTeXLog = fl_bgn_form(FL_NO_BOX, 470, 380); obj = fl_add_box(FL_UP_BOX,0,0,470,380,""); fdui->browser_latexlog = obj = fl_add_browser(FL_NORMAL_BROWSER,10,10,450,320,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); obj = fl_add_button(FL_RETURN_BUTTON,270,340,90,30,_("Close")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,LatexLogClose,0); obj = fl_add_button(FL_NORMAL_BUTTON,370,340,90,30,idex(_("Update|#Uu")));fl_set_button_shortcut(obj,scex(_("Update|#Uu")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,LatexLogUpdate,0); fl_end_form(); diff --git a/src/layout_forms.C b/src/layout_forms.C index 224d7f6a11..871b2f5488 100644 --- a/src/layout_forms.C +++ b/src/layout_forms.C @@ -16,110 +16,172 @@ FD_form_document *create_form_form_document(void) fdui->form_document = fl_bgn_form(FL_NO_BOX, 580, 430); obj = fl_add_box(FL_UP_BOX,0,0,580,430,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); obj = fl_add_frame(FL_ENGRAVED_FRAME,290,110,120,70,""); fl_set_object_color(obj,FL_COL1,FL_COL1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); obj = fl_add_text(FL_NORMAL_TEXT,300,100,100,20,_("Separation")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->group_radio_separation = fl_bgn_group(); fdui->radio_indent = obj = fl_add_checkbutton(FL_RADIO_BUTTON,290,120,110,30,idex(_("Indent|#I")));fl_set_button_shortcut(obj,scex(_("Indent|#I")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->radio_skip = obj = fl_add_checkbutton(FL_RADIO_BUTTON,290,150,110,30,idex(_("Skip|#K")));fl_set_button_shortcut(obj,scex(_("Skip|#K")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_end_group(); fdui->choice_class = obj = fl_add_choice(FL_NORMAL_CHOICE,120,20,160,30,idex(_("Class:|#C")));fl_set_button_shortcut(obj,scex(_("Class:|#C")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_set_object_callback(obj,ChoiceClassCB,0); fdui->choice_pagestyle = obj = fl_add_choice(FL_NORMAL_CHOICE,120,60,160,30,idex(_("Pagestyle:|#P")));fl_set_button_shortcut(obj,scex(_("Pagestyle:|#P")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->choice_fonts = obj = fl_add_choice(FL_NORMAL_CHOICE,120,110,160,30,idex(_("Fonts:|#F")));fl_set_button_shortcut(obj,scex(_("Fonts:|#F")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->choice_fontsize = obj = fl_add_choice(FL_NORMAL_CHOICE,120,150,160,30,idex(_("Font Size:|#O")));fl_set_button_shortcut(obj,scex(_("Font Size:|#O")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON,470,390,100,30,idex(_("Cancel|^[")));fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,DocumentCancelCB,0); fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON,360,390,100,30,idex(_("Apply|#A")));fl_set_button_shortcut(obj,scex(_("Apply|#A")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,DocumentApplyCB,0); fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON,250,390,100,30,_("OK")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,DocumentOKCB,0); fdui->input_float_placement = obj = fl_add_input(FL_NORMAL_INPUT,450,195,120,30,idex(_("Float Placement:|#L")));fl_set_button_shortcut(obj,scex(_("Float Placement:|#L")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->choice_postscript_driver = obj = fl_add_choice(FL_NORMAL_CHOICE,120,230,190,30,idex(_("PS Driver:|#S")));fl_set_button_shortcut(obj,scex(_("PS Driver:|#S")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->choice_inputenc = obj = fl_add_choice(FL_NORMAL_CHOICE,120,270,190,30,idex(_("Encoding:|#D")));fl_set_button_shortcut(obj,scex(_("Encoding:|#D")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); obj = fl_add_frame(FL_ENGRAVED_FRAME,290,20,122,70,""); fl_set_object_color(obj,FL_COL1,FL_COL1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_TOP_LEFT); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); obj = fl_add_frame(FL_ENGRAVED_FRAME,432,20,136,70,""); fl_set_object_color(obj,FL_COL1,FL_COL1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->group_radio_sides = fl_bgn_group(); fdui->radio_sides_one = obj = fl_add_checkbutton(FL_RADIO_BUTTON,290,30,120,30,idex(_("One|#n")));fl_set_button_shortcut(obj,scex(_("One|#n")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->radio_sides_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON,290,60,120,30,idex(_("Two|#T")));fl_set_button_shortcut(obj,scex(_("Two|#T")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_end_group(); obj = fl_add_text(FL_NORMAL_TEXT,300,10,60,20,_("Sides")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); obj = fl_add_text(FL_NORMAL_TEXT,440,10,80,20,_("Columns")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->group_radio_columns = fl_bgn_group(); fdui->radio_columns_one = obj = fl_add_checkbutton(FL_RADIO_BUTTON,432,30,110,30,idex(_("One|#e")));fl_set_button_shortcut(obj,scex(_("One|#e")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->radio_columns_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON,432,60,110,30,idex(_("Two|#w")));fl_set_button_shortcut(obj,scex(_("Two|#w")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_end_group(); fdui->input_extra = obj = fl_add_input(FL_NORMAL_INPUT,450,235,120,30,idex(_("Extra Options:|#X")));fl_set_button_shortcut(obj,scex(_("Extra Options:|#X")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->choice_language = obj = fl_add_box(FL_FRAME_BOX,120,190,190,30,_("Language:")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->input_default_skip = obj = fl_add_input(FL_NORMAL_INPUT,220,310,90,30,""); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_set_object_callback(obj,DocumentDefskipCB,0); fdui->choice_default_skip = obj = fl_add_choice(FL_NORMAL_CHOICE,120,310,90,30,idex(_("Default Skip:|#u")));fl_set_button_shortcut(obj,scex(_("Default Skip:|#u")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_set_object_callback(obj,DocumentDefskipCB,0); fdui->slider_secnumdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER,490,275,80,30,_("Section number depth")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->slider_tocdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER,490,315,80,30,_("Table of contents depth")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->choice_spacing = obj = fl_add_choice(FL_NORMAL_CHOICE,120,350,120,30,idex(_("Spacing|#g")));fl_set_button_shortcut(obj,scex(_("Spacing|#g")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_set_object_callback(obj,DocumentSpacingCB,0); fdui->button_bullets = obj = fl_add_button(FL_NORMAL_BUTTON,430,110,130,30,idex(_("Bullet Shapes|#B")));fl_set_button_shortcut(obj,scex(_("Bullet Shapes|#B")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_set_object_callback(obj,DocumentBulletsCB,0); fdui->check_use_amsmath = obj = fl_add_checkbutton(FL_PUSH_BUTTON,430,145,120,30,idex(_("Use AMS Math|#M")));fl_set_button_shortcut(obj,scex(_("Use AMS Math|#M")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fdui->input_spacing = obj = fl_add_input(FL_FLOAT_INPUT,250,350,95,30,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_NONE); fl_set_object_callback(obj,DocumentSpacingCB,0); fl_end_form(); @@ -136,40 +198,67 @@ FD_form_character *create_form_form_character(void) fdui->form_character = fl_bgn_form(FL_NO_BOX, 300, 375); obj = fl_add_box(FL_UP_BOX,0,0,300,375,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); + obj = fl_add_frame(FL_ENGRAVED_FRAME,10,280,280,45,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); + obj = fl_add_frame(FL_ENGRAVED_FRAME,10,220,280,45,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_frame(FL_ENGRAVED_FRAME,10,10,280,195,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->choice_family = obj = fl_add_choice(FL_NORMAL_CHOICE,94,15,191,30,idex(_("Family:|#F")));fl_set_button_shortcut(obj,scex(_("Family:|#F")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->choice_series = obj = fl_add_choice(FL_NORMAL_CHOICE,94,55,191,30,idex(_("Series:|#S")));fl_set_button_shortcut(obj,scex(_("Series:|#S")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->choice_shape = obj = fl_add_choice(FL_NORMAL_CHOICE,94,95,191,30,idex(_("Shape:|#H")));fl_set_button_shortcut(obj,scex(_("Shape:|#H")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->choice_size = obj = fl_add_choice(FL_NORMAL_CHOICE,95,230,191,30,idex(_("Size:|#Z")));fl_set_button_shortcut(obj,scex(_("Size:|#Z")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->choice_bar = obj = fl_add_choice(FL_NORMAL_CHOICE,95,290,190,30,idex(_("Misc:|#M")));fl_set_button_shortcut(obj,scex(_("Misc:|#M")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON,60,330,80,30,idex(_("Apply|#A")));fl_set_button_shortcut(obj,scex(_("Apply|#A")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,CharacterApplyCB,0); fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON,175,330,80,30,_("Close")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,CharacterCloseCB,0); fdui->choice_color = obj = fl_add_choice(FL_NORMAL_CHOICE,95,135,191,30,idex(_("Color:|#C")));fl_set_button_shortcut(obj,scex(_("Color:|#C")),1); fl_set_object_boxtype(obj,FL_FRAME_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->check_toggle_all = obj = fl_add_checkbutton(FL_PUSH_BUTTON,30,175,260,25,idex(_("Toggle on all these|#T")));fl_set_button_shortcut(obj,scex(_("Toggle on all these|#T")),1); - obj = fl_add_frame(FL_ENGRAVED_FRAME,10,220,280,45,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_text(FL_NORMAL_TEXT,20,210,210,20,_("These are never toggled")); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); - obj = fl_add_frame(FL_ENGRAVED_FRAME,10,280,280,45,""); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_text(FL_NORMAL_TEXT,20,270,215,20,_("These are always toggled")); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); + fl_set_object_resize(obj, FL_RESIZE_X); fl_end_form(); //fdui->form_character->fdui = fdui; @@ -305,6 +394,7 @@ FD_form_preamble *create_form_form_preamble(void) fl_set_object_callback(obj,PreambleCancelCB,0); fdui->input_preamble = obj = fl_add_input(FL_MULTILINE_INPUT,10,10,360,360,""); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); fl_end_form(); //fdui->form_preamble->fdui = fdui; @@ -679,25 +769,38 @@ FD_form_table_extra *create_form_form_table_extra(void) obj = fl_add_frame(FL_ENGRAVED_FRAME,15,95,305,60,""); fl_set_object_color(obj,FL_COL1,FL_COL1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_text(FL_NORMAL_TEXT,20,85,205,20,_("Special Multicolumn Alignment")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_frame(FL_ENGRAVED_FRAME,15,20,305,60,""); fl_set_object_color(obj,FL_COL1,FL_COL1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->input_special_alignment = obj = fl_add_input(FL_NORMAL_INPUT,25,35,280,30,""); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fl_set_object_callback(obj,TableOptionsCB,0); obj = fl_add_button(FL_RETURN_BUTTON,220,160,100,30,_("Close")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,TableSpeCloseCB,0); obj = fl_add_text(FL_NORMAL_TEXT,20,10,170,20,_("Special Column Alignment")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lalign(obj,FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->input_special_multialign = obj = fl_add_input(FL_NORMAL_INPUT,25,110,280,30,""); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fl_set_object_callback(obj,TableOptionsCB,0); fl_end_form(); diff --git a/src/lyx.C b/src/lyx.C index f874f6648c..4af193b4fe 100644 --- a/src/lyx.C +++ b/src/lyx.C @@ -74,22 +74,35 @@ FD_form_screen *create_form_form_screen(void) obj = fl_add_box(FL_UP_BOX,0,0,390,220,""); fdui->input_roman = obj = fl_add_input(FL_NORMAL_INPUT,140,10,240,30,idex(_("Roman Font|#R")));fl_set_button_shortcut(obj,scex(_("Roman Font|#R")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->input_sans = obj = fl_add_input(FL_NORMAL_INPUT,140,40,240,30,idex(_("Sans Serif Font|#S")));fl_set_button_shortcut(obj,scex(_("Sans Serif Font|#S")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT,140,70,240,30,idex(_("Typewriter Font|#T")));fl_set_button_shortcut(obj,scex(_("Typewriter Font|#T")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->input_font_norm = obj = fl_add_input(FL_NORMAL_INPUT,140,100,240,30,idex(_("Font Norm|#N")));fl_set_button_shortcut(obj,scex(_("Font Norm|#N")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); fdui->intinput_size = obj = fl_add_input(FL_INT_INPUT,140,140,50,30,idex(_("Font Zoom|#Z")));fl_set_button_shortcut(obj,scex(_("Font Zoom|#Z")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity); + fl_set_object_resize(obj, FL_RESIZE_X); obj = fl_add_button(FL_RETURN_BUTTON,60,180,100,30,_("OK")); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,ScreenOKCB,0); obj = fl_add_button(FL_NORMAL_BUTTON,170,180,100,30,idex(_("Apply|#A")));fl_set_button_shortcut(obj,scex(_("Apply|#A")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,ScreenApplyCB,0); obj = fl_add_button(FL_NORMAL_BUTTON,280,180,100,30,idex(_("Cancel|^[")));fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1); fl_set_object_lsize(obj,FL_NORMAL_SIZE); + fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj,ScreenCancelCB,0); fl_end_form(); diff --git a/src/lyx_cb.C b/src/lyx_cb.C index a839191320..5a6679495e 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -966,7 +966,7 @@ void MenuPrint(Buffer *buffer) } else { fl_show_form(fd_form_print->form_print, - FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Print")); } } @@ -1147,6 +1147,8 @@ void InsertAsciiFile(string const & f, bool asParagraph) void MenuShowTableOfContents() { + static int ow = -1, oh; + TocUpdateCB(0, 0); if (fd_form_toc->form_toc->visible) { fl_raise_form(fd_form_toc->form_toc); @@ -1154,6 +1156,11 @@ void MenuShowTableOfContents() fl_show_form(fd_form_toc->form_toc, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Table Of Contents")); + if (ow < 0) { + ow = fd_form_toc->form_toc->w; + oh = fd_form_toc->form_toc->h; + } + fl_set_form_minsize(fd_form_toc->form_toc,ow,oh); } } @@ -1176,6 +1183,8 @@ void MenuInsertLabel(const char *arg) void MenuInsertRef() { + static int ow = -1, oh; + RefUpdateCB(0, 0); if (fd_form_ref->form_ref->visible) { fl_raise_form(fd_form_ref->form_ref); @@ -1183,9 +1192,11 @@ 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); + if (ow < 0) { + ow = fd_form_ref->form_ref->w; + oh = fd_form_ref->form_ref->h; + } + fl_set_form_minsize(fd_form_ref->form_ref,ow,oh); } } @@ -1460,12 +1471,19 @@ void AllFloats(char flag, char figmar) void MenuLayoutCharacter() { + static int ow = -1, oh; + if (fd_form_character->form_character->visible) { fl_raise_form(fd_form_character->form_character); } else { fl_show_form(fd_form_character->form_character, FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, _("Character Style")); + if (ow < 0) { + ow = fd_form_character->form_character->w; + oh = fd_form_character->form_character->h; + } + fl_set_form_minsize(fd_form_character->form_character,ow,oh); } } @@ -1667,7 +1685,7 @@ void MenuLayoutParagraph() fl_raise_form(fd_form_paragraph->form_paragraph); } else { fl_show_form(fd_form_paragraph->form_paragraph, - FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Paragraph Environment")); } } @@ -1918,8 +1936,7 @@ void MenuLayoutDocument() fl_raise_form(fd_form_document->form_document); } else { fl_show_form(fd_form_document->form_document, - FL_PLACE_MOUSE | FL_FREE_SIZE, - FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Document Layout")); } } @@ -1957,8 +1974,7 @@ void MenuLayoutQuotes() fl_raise_form(fd_form_quotes->form_quotes); } else { fl_show_form(fd_form_quotes->form_quotes, - FL_PLACE_MOUSE | FL_FREE_SIZE, - FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Quotes")); } } @@ -1997,6 +2013,8 @@ bool UpdateLayoutPreamble() void MenuLayoutPreamble() { + static int ow = -1, oh; + if (UpdateLayoutPreamble()) { if (fd_form_preamble->form_preamble->visible) { fl_raise_form(fd_form_preamble->form_preamble); @@ -2005,6 +2023,12 @@ void MenuLayoutPreamble() FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("LaTeX Preamble")); + if (ow < 0) { + ow = fd_form_preamble->form_preamble->w; + oh = fd_form_preamble->form_preamble->h; + } + fl_set_form_minsize(fd_form_preamble->form_preamble, + ow,oh); } } } @@ -2338,7 +2362,7 @@ extern "C" void TableCB(FL_OBJECT *, long) fl_raise_form(fd_form_table->form_table); } else { fl_show_form(fd_form_table->form_table, - FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("Insert Table")); } } @@ -3542,7 +3566,7 @@ void LaTeXOptions() fl_raise_form(fd_latex_options->LaTeXOptions); } else { fl_show_form(fd_latex_options->LaTeXOptions, - FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, + FL_PLACE_MOUSE, FL_FULLBORDER, _("LaTeX Options")); } } diff --git a/src/lyx_gui.C b/src/lyx_gui.C index 50dd432177..4b836c5c4a 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -422,6 +422,9 @@ void LyXGUI::create_forms() fl_addto_choice(fd_form_character->choice_color, _(" No change %l| No color | Black | White | Red | Green " "| Blue | Cyan | Magenta | Yellow %l| Reset ")); + fl_set_form_minsize(fd_form_character->form_character, + fd_form_character->form_character->w, + fd_form_character->form_character->h); // the document form fd_form_document = create_form_form_document(); @@ -470,6 +473,9 @@ void LyXGUI::create_forms() _(" Smallskip | Medskip | Bigskip | Length ")); fl_set_input_return(fd_form_document->input_default_skip, FL_RETURN_ALWAYS); + fl_set_form_minsize(fd_form_document->form_document, + fd_form_document->form_document->w, + fd_form_document->form_document->h); // the paper form fd_form_paper = create_form_form_paper(); diff --git a/src/lyxfr0.C b/src/lyxfr0.C index 9dc5c15b46..27e85b893b 100644 --- a/src/lyxfr0.C +++ b/src/lyxfr0.C @@ -85,6 +85,8 @@ LyXFindReplace0::LyXFindReplace0() void LyXFindReplace0::StartSearch() { + static int ow = -1, oh; + FD_form_search *fd_fs = fd_form_search; if (fd_fs->form_search->visible) { @@ -93,6 +95,11 @@ void LyXFindReplace0::StartSearch() fl_show_form(fd_fs->form_search, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Find & Replace")); // RVDK_PATCH_5 + if (ow < 0) { + ow = fd_form_search->form_search->w; + oh = fd_form_search->form_search->h; + } + fl_set_form_minsize(fd_form_search->form_search, ow, oh); } ReInitFromForm(); } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 571df1d930..24a0a3406f 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -766,10 +766,16 @@ string LyXFunc::Dispatch(int ac, if (fd_form_toc->form_toc->visible) { fl_raise_form(fd_form_toc->form_toc); } else { + static int ow = -1, oh; fl_show_form(fd_form_toc->form_toc, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Table of Contents")); + if (ow < 0) { + ow = fd_form_toc->form_toc->w; + oh = fd_form_toc->form_toc->h; + } + fl_set_form_minsize(fd_form_toc->form_toc, ow, oh); } break; diff --git a/src/lyxvc.C b/src/lyxvc.C index ae51ae8138..31aca999ea 100644 --- a/src/lyxvc.C +++ b/src/lyxvc.C @@ -329,6 +329,8 @@ extern "C" void C_LyXVC_logUpdate(FL_OBJECT *ob, long data) void LyXVC::viewLog(string const & fil) { + static int ow = -1, oh; + if (!browser) { FL_OBJECT *obj; browser = (FD_LaTeXLog *) fl_calloc(1, sizeof(*browser)); @@ -358,6 +360,11 @@ void LyXVC::viewLog(string const & fil) fl_show_form(browser->LaTeXLog, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("RCS History")); + if (ow < 0) { + ow = browser->LaTeXLog->w; + oh = browser->LaTeXLog->h; + } + fl_set_form_minsize(browser->LaTeXLog, ow, oh); } } diff --git a/src/mathed/math_panel.C b/src/mathed/math_panel.C index 7b9f4161d6..80f20daec3 100644 --- a/src/mathed/math_panel.C +++ b/src/mathed/math_panel.C @@ -339,7 +339,7 @@ void show_symbols_form(LyXFunc *lf) if (fd_panel->panel->visible) { fl_raise_form(fd_panel->panel); } else { - fl_show_form(fd_panel->panel, FL_PLACE_MOUSE | FL_FREE_SIZE, + fl_show_form(fd_panel->panel, FL_PLACE_MOUSE, FL_FULLBORDER, _("Math Panel")); } } diff --git a/src/menus.C b/src/menus.C index 3e5c4c5101..fa9a78cde9 100644 --- a/src/menus.C +++ b/src/menus.C @@ -396,6 +396,8 @@ void Menus::create_menus(int air) void Menus::ScreenOptions() { + static int ow = -1, oh; + // this is not very nice.... fl_set_input(fd_form_screen->input_roman, lyxrc->roman_font_name.c_str()); @@ -414,6 +416,11 @@ void Menus::ScreenOptions() fl_show_form(fd_form_screen->form_screen, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, _("Screen Options")); + if (ow < 0) { + ow = fd_form_screen->form_screen->w; + oh = fd_form_screen->form_screen->h; + } + fl_set_form_minsize(fd_form_screen->form_screen, ow, oh); } }