]> git.lyx.org Git - features.git/commitdiff
(Rob Lahaye): small clean-up of the clean-ups already applied.
authorAngus Leeming <leeming@lyx.org>
Thu, 24 Oct 2002 09:48:56 +0000 (09:48 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 24 Oct 2002 09:48:56 +0000 (09:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5488 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs_impl.h
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormFloat.C
src/frontends/xforms/RadioButtonGroup.C
src/frontends/xforms/forms/form_float.fd

index 70965568e2d0607258daaa27760b3c59de785e5f..3ce42102022d7360eb5b5b65bb9fb377a80b95b9 100644 (file)
@@ -1,3 +1,20 @@
+2002-10-24  Rob Lahaye  <lahaye@snu.ac.kr>
+
+       * FormFloat.C (input): fix the radio buttongroup behaviour.
+
+       * RadioButtonGroup.C (init): Assert on ROUND3DBUTTON and RADIO_BUTTON
+       when adding object to the group.
+
+       * forms/form_float.fd: use RADIO_BUTTON for the buttons in the radio
+       group.
+
+       * FormDocument.C: remove redundant header files.
+
+2002-10-24  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs_impl.h: set the policy of the BibtexDialog to
+       NoRepeatedApplyReadOnlyPolicy.
+
 2002-10-23  Rob Lahaye  <lahaye@snu.ac.kr>
 
        * forms/form_float.fd: prettify and implement gravity/resize policy
index 1d476449ed4f08fd09ccf3829b10f8c997c01338..8436e33ac013ceeb34252574c7ace9319e65bd28 100644 (file)
@@ -180,7 +180,7 @@ AboutlyxDialog;
 typedef GUI<ControlBibitem, FormBibitem, OkCancelReadOnlyPolicy, xformsBC>
 BibitemDialog;
 
-typedef GUI<ControlBibtex, FormBibtex, OkApplyCancelReadOnlyPolicy, xformsBC>
+typedef GUI<ControlBibtex, FormBibtex, NoRepeatedApplyReadOnlyPolicy, xformsBC>
 BibtexDialog;
 
 typedef GUI<ControlCharacter, FormCharacter, OkApplyCancelReadOnlyPolicy, xformsBC>
index ecba22a4408ad7b6a1631d56ab12a6429d8b035d..9ebd2c5adc057e1b99b12d7360b4d796c00b6987 100644 (file)
 
 #include <config.h>
 
-#include FORMS_H_LOCATION
-#include XPM_H_LOCATION
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
 #include "FormDocument.h"
 #include "forms/form_document.h"
-#include "Alert.h"
-#include "lyxtextclasslist.h"
-#include "combox.h"
-#include "tex-strings.h"
-#include "bufferparams.h"
-#include "vspace.h"
+
 #include "bmtable.h"
-#include "language.h"
-#include "frnt_lang.h"
-#include "frontends/LyXView.h"
-#include "lyxfunc.h"
-#include "lyxrc.h"
-#include "BufferView.h"
+#include "checkedwidgets.h"
+#include "combox.h"
+#include "input_validators.h" // fl_unsigned_float_filter
+#include "xforms_helpers.h"
+
 #include "buffer.h"
+#include "BufferView.h"
 #include "CutAndPaste.h"
-#include "bufferview_funcs.h"
-#include "xforms_helpers.h"
-#include "checkedwidgets.h"
 #include "debug.h"
-#include "input_validators.h" // fl_unsigned_float_filter
-#include "helper_funcs.h"
+#include "language.h"
 #include "lyx_main.h" // for user_lyxdir
+#include "lyxrc.h"
+#include "lyxtextclasslist.h"
+#include "tex-strings.h"
 
-#include "insets/insetquotes.h"
+#include "controllers/frnt_lang.h"
+#include "controllers/helper_funcs.h"
+
+#include "frontends/LyXView.h"
+#include "frontends/Alert.h"
 
 #include "support/filetools.h"
-#include "support/lstrings.h"
 
+#include XPM_H_LOCATION
 #include FORMS_H_LOCATION
 
 #include <boost/bind.hpp>
index 8d60284976516489286e90524fb51d43790bc0b5..4a86e9c64705037ae4c2f00fa8cbc25bac5077e9 100644 (file)
@@ -188,18 +188,13 @@ void FormFloat::update()
 
 ButtonPolicy::SMInput FormFloat::input(FL_OBJECT * ob, long)
 {
-       bool alternatives = placement_.get() == ALTERNATIVES;
+       bool const alternatives = placement_.get() == ALTERNATIVES;
        bool const wide = fl_get_button(dialog_->check_wide);
 
        if (ob == dialog_->radio_default ||
            ob == dialog_->radio_here_definitely ||
            ob == dialog_->radio_alternatives) {
-
-               // set radio button
-               placement_.set(ob);
-               alternatives = placement_.get() == ALTERNATIVES;
-
-               // enable check buttons for Alternatives
+               // enable check buttons only for Alternatives
                setEnabled(dialog_->check_top, alternatives);
                setEnabled(dialog_->check_bottom, alternatives);
                setEnabled(dialog_->check_page, alternatives);
@@ -207,14 +202,13 @@ ButtonPolicy::SMInput FormFloat::input(FL_OBJECT * ob, long)
                setEnabled(dialog_->check_here, alternatives && !wide);
 
        } else if (ob == dialog_->check_wide) {
-               // wide float doesn't allow 'Here, definitely!' and 'here'
-               setEnabled(dialog_->radio_here_definitely, !wide);
-               setEnabled(dialog_->check_here, alternatives && !wide);
-               
-               // flip to default, if 'Here, definitely!' was selected
                if (wide && placement_.get() == HERE_DEFINITELY) {
+                       // wide float doesn't allow 'Here, definitely!'
+                       // placement
                        placement_.set(dialog_->radio_default);
                }
+               setEnabled(dialog_->check_here, alternatives && !wide);
+               setEnabled(dialog_->radio_here_definitely, !wide);
        }
 
        // enable force button, if Alternatives is selected and at least
index 0d9531e2fd70ee3d71c62b394af2716634420946..e98b01f4adaa709615a3d536410b32d0d3ffeebe 100644 (file)
@@ -20,6 +20,7 @@
 #include "RadioButtonGroup.h"
 #include FORMS_H_LOCATION
 
+#include "support/LAssert.h"
 #include "debug.h" // for lyxerr
 #include "support/lyxfunctional.h"
 
@@ -32,6 +33,11 @@ using std::endl;
 
 void RadioButtonGroup::init(FL_OBJECT * ob, size_type value)
 {
+       // Object must be a ROUND3DBUTTON (let all radio buttons look the same)
+       // and of type RADIO_BUTTON (otherwise it ain't work).
+       lyx::Assert(ob && ob->objclass == FL_ROUND3DBUTTON
+                       && ob->type == FL_RADIO_BUTTON);
+
        map.push_back(ButtonValuePair(ob, value));
 }
 
index 8feabdf8f4c8fa13b021fdfb2811225ad05a6cd1..7ce6f0692eb60d5550baa24c1bf062e91c915ba9 100644 (file)
@@ -249,7 +249,7 @@ argument:
 
 --------------------
 class: FL_ROUND3DBUTTON
-type: PUSH_BUTTON
+type: RADIO_BUTTON
 box: 10 85 200 25
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
@@ -267,7 +267,7 @@ argument: 0
 
 --------------------
 class: FL_ROUND3DBUTTON
-type: PUSH_BUTTON
+type: RADIO_BUTTON
 box: 10 55 200 25
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
@@ -285,7 +285,7 @@ argument: 0
 
 --------------------
 class: FL_ROUND3DBUTTON
-type: PUSH_BUTTON
+type: RADIO_BUTTON
 box: 10 25 200 25
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW