(Rob Lahaye): small clean-up of the clean-ups already applied.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5488 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-10-24 09:48:56 +00:00
parent 282a5f0410
commit 7fa7dd11e6
6 changed files with 55 additions and 43 deletions

View 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

View 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>

View File

@ -11,43 +11,38 @@
#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 "buffer.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 "lyx_main.h" // for user_lyxdir
#include "insets/insetquotes.h"
#include "bmtable.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 "debug.h"
#include "language.h"
#include "lyx_main.h" // for user_lyxdir
#include "lyxrc.h"
#include "lyxtextclasslist.h"
#include "tex-strings.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>

View 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

View 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));
}

View 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