From b8eeb95c16214c2c6ad05ed40639d6fadca240b1 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Thu, 12 Sep 2002 09:07:58 +0000 Subject: [PATCH] Yet more dialog tweaking from Rob. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5283 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 6 + src/frontends/xforms/FormTexinfo.C | 50 ++-- src/frontends/xforms/forms/form_filedialog.fd | 39 ++-- src/frontends/xforms/forms/form_texinfo.fd | 221 +++++------------- 4 files changed, 106 insertions(+), 210 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index da3d6e632c..6f16b5bf33 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -4,6 +4,12 @@ * forms/form_graphics.fd: cosmetic change in file tab +2002-09-12 Rob Lahaye + + * FormTexinfo.C: + * forms/form_filedialog.fd: + * forms/form_texinfo.fd: less bulky xforms dialogs. + 2002-09-12 Rob Lahaye * FormPrint.[Ch]: diff --git a/src/frontends/xforms/FormTexinfo.C b/src/frontends/xforms/FormTexinfo.C index 11ec061d38..6c01058afb 100644 --- a/src/frontends/xforms/FormTexinfo.C +++ b/src/frontends/xforms/FormTexinfo.C @@ -36,46 +36,44 @@ FormTexinfo::FormTexinfo() void FormTexinfo::build() { dialog_.reset(build_texinfo(this)); - // courier medium - fl_set_browser_fontstyle(dialog_->browser,FL_FIXED_STYLE); - // with Path is default - fl_set_button(dialog_->check_fullpath, 1); + updateStyles(ControlTexinfo::cls); + string const classes_List = _("LaTeX classes|LaTeX styles|BibTeX styles"); + fl_addto_choice(dialog_->choice_classes, classes_List.c_str()); + // set up the tooltips - string str = _("Runs the script \"TexFiles.sh\" to build new file lists."); + string str = _("Shows the installed classses and styles for LaTeX/BibTeX. These classes are only available in LyX if a corresponding LyX layout file exists."); + tooltips().init(dialog_->choice_classes, str); + + str = _("View full path or only file name."); + tooltips().init(dialog_->check_fullpath, str); + + str = _("Runs the script \"TexFiles.sh\" to build new file lists."); tooltips().init(dialog_->button_rescan, str); str = _("Shows the contents of the marked file. Only possible in full path mode."); tooltips().init(dialog_->button_view, str); - str = _("Runs the script \"texhash\" which builds the a new LaTeX tree. Needed if you install a new TeX class or style. To execute it, you need the write permissions for the tex-dirs, often /var/lib/texmf and other."); + str = _("Runs the script \"texhash\" which builds a new LaTeX tree. Needed if you install a new TeX class or style. You need write permissions for the TeX-dirs, often /var/lib/texmf and others."); tooltips().init(dialog_->button_texhash, str); - - str = _("View full path or only file name. Full path is needed to view the contents of a file."); - tooltips().init(dialog_->check_fullpath, str); - - str = _("Shows the installed LaTeX Document classes. Remember, that these classes are only available in LyX if a corresponding LyX layout file exists!"); - tooltips().init(dialog_->radio_cls, str); - - str = _("Shows the installed LaTeX style files, which are available in LyX by default, like \"babel\" or through \\usepackage{} in LaTeX preamble."); - tooltips().init(dialog_->radio_sty, str); - - str = _("Shows the installed style files for BibTeX. They can be loaded through insert->Lists&Toc->BibTeX Reference->Style."); - tooltips().init(dialog_->radio_bst, str); } ButtonPolicy::SMInput FormTexinfo::input(FL_OBJECT * ob, long) { - if (ob == dialog_->radio_cls) { - updateStyles(ControlTexinfo::cls); - - } else if (ob == dialog_->radio_sty) { - updateStyles(ControlTexinfo::sty); - - } else if (ob == dialog_->radio_bst) { - updateStyles(ControlTexinfo::bst); + if (ob == dialog_->choice_classes) { + switch (fl_get_choice(dialog_->choice_classes)) { + case 1: + updateStyles(ControlTexinfo::cls); + break; + case 2: + updateStyles(ControlTexinfo::sty); + break; + case 3: + default: + updateStyles(ControlTexinfo::bst); + } } else if (ob == dialog_->button_rescan) { // build new *Files.lst diff --git a/src/frontends/xforms/forms/form_filedialog.fd b/src/frontends/xforms/forms/form_filedialog.fd index 541b521a9d..b9d7e07410 100644 --- a/src/frontends/xforms/forms/form_filedialog.fd +++ b/src/frontends/xforms/forms/form_filedialog.fd @@ -5,22 +5,23 @@ Internal Form Definition File Number of forms: 1 Unit of measure: FL_COORD_PIXEL +SnapGrid: 5 =============== FORM =============== Name: form_filedialog -Width: 440 -Height: 380 +Width: 370 +Height: 310 Number of Objects: 13 -------------------- class: FL_BOX -type: UP_BOX -box: 0 0 440 380 -boxtype: FL_UP_BOX +type: FLAT_BOX +box: 0 0 370 310 +boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE +size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: @@ -33,7 +34,7 @@ argument: -------------------- class: FL_TEXT type: NORMAL_TEXT -box: 10 260 420 30 +box: 5 205 360 25 boxtype: FL_SHADOW_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE @@ -51,7 +52,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 100 10 330 30 +box: 100 10 265 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -69,7 +70,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 100 40 330 30 +box: 100 35 265 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -87,7 +88,7 @@ argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER -box: 10 80 320 170 +box: 5 75 265 125 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_TOP @@ -105,7 +106,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 100 300 330 30 +box: 90 245 275 25 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -123,14 +124,14 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 340 80 90 30 +box: 275 80 90 25 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: Rescan|#R#r +label: Rescan|#R shortcut: resize: FL_RESIZE_NONE gravity: FL_NorthEast FL_NorthEast @@ -141,14 +142,14 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 340 120 90 30 +box: 275 110 90 25 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: Home|#H#h +label: Home|#H shortcut: resize: FL_RESIZE_NONE gravity: FL_NorthEast FL_NorthEast @@ -159,7 +160,7 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 340 160 90 30 +box: 275 140 90 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -177,7 +178,7 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 340 200 90 30 +box: 275 170 90 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -195,7 +196,7 @@ argument: -------------------- class: FL_BUTTON type: RETURN_BUTTON -box: 220 340 100 30 +box: 180 280 90 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -213,7 +214,7 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 330 340 100 30 +box: 275 280 90 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER diff --git a/src/frontends/xforms/forms/form_texinfo.fd b/src/frontends/xforms/forms/form_texinfo.fd index dbd788f0aa..5bf1e9489c 100644 --- a/src/frontends/xforms/forms/form_texinfo.fd +++ b/src/frontends/xforms/forms/form_texinfo.fd @@ -5,23 +5,23 @@ Internal Form Definition File Number of forms: 1 Unit of measure: FL_COORD_PIXEL -SnapGrid: 1 +SnapGrid: 5 =============== FORM =============== Name: form_texinfo -Width: 513 -Height: 312 -Number of Objects: 14 +Width: 250 +Height: 215 +Number of Objects: 8 -------------------- class: FL_BOX -type: UP_BOX -box: 0 0 513 312 -boxtype: FL_UP_BOX +type: FLAT_BOX +box: 0 0 250 215 +boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_FIXED_STYLE -size: FL_DEFAULT_SIZE +size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: @@ -34,162 +34,35 @@ argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER -box: 15 12 324 241 +box: 5 35 240 110 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_TOP style: FL_FIXED_STYLE -size: FL_DEFAULT_SIZE +size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: -resize: FL_RESIZE_NONE +resize: FL_RESIZE_ALL gravity: FL_NorthWest FL_SouthEast name: browser callback: C_FormBaseInputCB argument: 0 --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 345 15 155 100 -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_NONE -gravity: FL_NorthEast FL_NorthEast -name: -callback: -argument: - --------------------- -class: FL_BEGIN_GROUP -type: 0 -box: 0 0 0 0 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_MCOL -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_ROUND3DBUTTON -type: RADIO_BUTTON -box: 350 20 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: LaTeX Classes|#C -shortcut: -resize: FL_RESIZE_NONE -gravity: FL_NorthEast FL_NorthEast -name: radio_cls -callback: C_FormBaseInputCB -argument: 0 - value: 1 - --------------------- -class: FL_ROUND3DBUTTON -type: RADIO_BUTTON -box: 350 50 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: LaTeX Styles|#S -shortcut: -resize: FL_RESIZE_NONE -gravity: FL_NorthEast FL_NorthEast -name: radio_sty -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_ROUND3DBUTTON -type: RADIO_BUTTON -box: 350 80 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: BibTeX Styles|#B -shortcut: -resize: FL_RESIZE_NONE -gravity: FL_NorthEast FL_NorthEast -name: radio_bst -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_END_GROUP -type: 0 -box: 0 0 0 0 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_MCOL -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_FRAME -type: ENGRAVED_FRAME -box: 345 122 155 128 -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_NorthEast FL_NorthEast -name: -callback: -argument: - -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 355 138 135 30 +box: 5 150 110 25 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: Update List|#U +label: Rescan|#R shortcut: resize: FL_RESIZE_NONE -gravity: FL_NorthEast FL_NorthEast +gravity: FL_SouthWest FL_South name: button_rescan callback: C_FormBaseInputCB argument: 2 @@ -197,7 +70,7 @@ argument: 2 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 355 173 135 30 +box: 135 150 110 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -207,7 +80,7 @@ lcol: FL_BLACK label: View|#V shortcut: resize: FL_RESIZE_NONE -gravity: FL_NorthEast FL_NorthEast +gravity: FL_SouthEast FL_SouthEast name: button_view callback: C_FormBaseInputCB argument: 2 @@ -215,17 +88,17 @@ argument: 2 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 350 209 30 30 +box: 140 5 105 25 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT +alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Show Path|#P shortcut: resize: FL_RESIZE_NONE -gravity: FL_NorthEast FL_NorthEast +gravity: FL_North FL_North name: check_fullpath callback: C_FormBaseInputCB argument: 2 @@ -233,25 +106,7 @@ argument: 2 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 14 270 131 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: Run Texhash|#T -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_SouthWest FL_SouthEast -name: button_texhash -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_BUTTON -type: NORMAL_BUTTON -box: 409 270 90 30 +box: 160 185 85 25 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -266,5 +121,41 @@ name: button_close callback: C_FormBaseCancelCB argument: 0 +-------------------- +class: FL_CHOICE +type: NORMAL_CHOICE +box: 5 5 130 25 +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: +shortcut: +resize: FL_RESIZE_X +gravity: FL_NorthWest FL_North +name: choice_classes +callback: C_FormBaseInputCB +argument: 0 + +-------------------- +class: FL_BUTTON +type: NORMAL_BUTTON +box: 5 185 110 25 +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: Run TeXhash|#T +shortcut: +resize: FL_RESIZE_NONE +gravity: FL_SouthWest FL_South +name: button_texhash +callback: C_FormBaseInputCB +argument: 2 + ============================== create_the_form