From 8999098e942c66a013b052190617ef48de916dbe Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 3 Apr 2001 14:30:58 +0000 Subject: [PATCH] Remove some xforms cruft from BufferView.h BufferView_pimpl.h. John's name-changing patch. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1878 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.h | 1 - src/BufferView_pimpl.h | 2 - src/ChangeLog | 6 ++ src/frontends/ChangeLog | 4 + src/frontends/Dialogs.h | 4 +- src/frontends/controllers/ButtonController.h | 12 +-- .../controllers/ButtonControllerBase.C | 4 +- .../controllers/ButtonControllerBase.h | 2 +- src/frontends/controllers/ButtonPolicies.C | 80 +++++++++---------- src/frontends/controllers/ButtonPolicies.h | 30 +++---- src/frontends/controllers/ChangeLog | 21 +++++ .../{ControlButton.C => ControlButtons.C} | 14 ++-- .../{ControlButton.h => ControlButtons.h} | 20 ++--- src/frontends/controllers/ControlCitation.C | 3 +- src/frontends/controllers/ControlCitation.h | 3 +- .../controllers/ControlConnections.h | 16 ++-- src/frontends/controllers/ControlDialogs.h | 8 +- src/frontends/controllers/ControlExternal.C | 2 +- src/frontends/controllers/ControlInset.h | 6 +- src/frontends/controllers/ControlToc.C | 2 +- src/frontends/controllers/ControlVCLog.C | 5 ++ src/frontends/controllers/Makefile.am | 4 +- src/frontends/controllers/README | 10 +-- src/frontends/controllers/ViewBase.h | 8 +- src/frontends/gnome/ChangeLog | 9 +++ src/frontends/gnome/Dialogs.C | 2 +- src/frontends/gnome/FormUrl.C | 2 +- src/frontends/gnome/GnomeBase.C | 2 +- src/frontends/gnome/GnomeBase.h | 2 +- src/frontends/qt2/ChangeLog | 16 ++++ src/frontends/qt2/Dialogs.C | 2 +- src/frontends/qt2/FormCharacter.C | 2 +- src/frontends/qt2/FormCitation.C | 2 +- src/frontends/qt2/FormDocument.C | 2 +- src/frontends/qt2/FormDocument.h | 9 +-- src/frontends/qt2/FormSearch.C | 2 +- src/frontends/qt2/Qt2Base.C | 2 +- src/frontends/qt2/Qt2Base.h | 12 +-- src/frontends/qt2/qt2BC.C | 12 +-- src/frontends/qt2/qt2BC.h | 6 +- src/frontends/xforms/ChangeLog | 13 +++ src/frontends/xforms/Dialogs.C | 2 +- src/frontends/xforms/FormBase.C | 4 +- src/frontends/xforms/FormBase.h | 10 +-- src/frontends/xforms/FormBaseDeprecated.C | 2 +- src/frontends/xforms/FormBibitem.C | 1 - src/frontends/xforms/FormBibtex.C | 1 - src/frontends/xforms/FormBrowser.C | 3 +- src/frontends/xforms/FormBrowser.h | 2 +- src/frontends/xforms/FormCharacter.C | 1 - src/frontends/xforms/FormCharacter.h | 4 +- src/frontends/xforms/FormCitation.C | 3 +- src/frontends/xforms/FormCopyright.C | 1 - src/frontends/xforms/FormCredits.C | 1 - src/frontends/xforms/FormDocument.C | 7 +- src/frontends/xforms/FormDocument.h | 9 +-- src/frontends/xforms/FormError.C | 1 - src/frontends/xforms/FormExternal.C | 1 - src/frontends/xforms/FormGraphics.C | 3 +- src/frontends/xforms/FormInclude.C | 1 - src/frontends/xforms/FormIndex.C | 3 +- src/frontends/xforms/FormMathsBitmap.C | 1 - src/frontends/xforms/FormMathsBitmap.h | 2 +- src/frontends/xforms/FormMathsDeco.C | 1 - src/frontends/xforms/FormMathsDeco.h | 4 +- src/frontends/xforms/FormMathsDelim.C | 2 - src/frontends/xforms/FormMathsDelim.h | 4 +- src/frontends/xforms/FormMathsMatrix.C | 2 - src/frontends/xforms/FormMathsMatrix.h | 4 +- src/frontends/xforms/FormMathsPanel.C | 1 - src/frontends/xforms/FormMathsPanel.h | 2 +- src/frontends/xforms/FormMathsSpace.C | 2 - src/frontends/xforms/FormMathsSpace.h | 4 +- src/frontends/xforms/FormMinipage.C | 4 +- src/frontends/xforms/FormParagraph.C | 5 +- src/frontends/xforms/FormParagraph.h | 8 +- src/frontends/xforms/FormPreamble.C | 1 - src/frontends/xforms/FormPreamble.h | 6 +- src/frontends/xforms/FormPreferences.C | 3 +- src/frontends/xforms/FormPrint.C | 1 - src/frontends/xforms/FormRef.C | 3 +- src/frontends/xforms/FormSearch.C | 1 - src/frontends/xforms/FormTabularCreate.C | 1 - src/frontends/xforms/FormToc.C | 1 - src/frontends/xforms/FormUrl.C | 3 +- src/frontends/xforms/input_validators.C | 2 +- src/frontends/xforms/input_validators.h | 2 +- 87 files changed, 265 insertions(+), 229 deletions(-) rename src/frontends/controllers/{ControlButton.C => ControlButtons.C} (69%) rename src/frontends/controllers/{ControlButton.h => ControlButtons.h} (82%) diff --git a/src/BufferView.h b/src/BufferView.h index 56cafa50c6..871ecd0518 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -16,7 +16,6 @@ #pragma interface #endif -#include FORMS_H_LOCATION #include "LString.h" #include "undo.h" #include "commandtags.h" diff --git a/src/BufferView_pimpl.h b/src/BufferView_pimpl.h index e7a9c8ba75..4ae5f7f6ca 100644 --- a/src/BufferView_pimpl.h +++ b/src/BufferView_pimpl.h @@ -134,8 +134,6 @@ private: /// long current_scrollbar_value; /// - FL_OBJECT * figinset_canvas; - /// Timeout cursor_timeout; /// int last_click_x; diff --git a/src/ChangeLog b/src/ChangeLog index 39c1f51212..e481e95fa5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-04-03 Angus Leeming + + * BufferView.h: + * BufferView_pimpl.h: remove xforms cruft. Both classes are + independent of xforms. + 2001-04-02 Juergen Vigna * spellchecker.C: fixed namespace placing! diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 942fd02a2c..eb811a10c0 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,7 @@ +2001-04-03 John Levon + + * Dialogs.h: s/popup/dialog/ + 2001-03-22 Jean-Marc Lasgouttes * Liason.C (printBuffer): do not forget file name diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 28db300368..a183a20657 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -61,13 +61,13 @@ public: Dialogs(LyXView *); //@} - /** Redraw all visible popups because, for example, the GUI colours + /** Redraw all visible dialogs because, for example, the GUI colours have been re-mapped. */ static SigC::Signal0 redrawGUI; /**@name Global Hide and Update Signals */ //@{ - /// Hide all visible popups + /// Hide all visible dialogs SigC::Signal0 hideAll; /// Hide any dialogs that require a buffer for them to operate diff --git a/src/frontends/controllers/ButtonController.h b/src/frontends/controllers/ButtonController.h index ed18f63cbf..d79733183c 100644 --- a/src/frontends/controllers/ButtonController.h +++ b/src/frontends/controllers/ButtonController.h @@ -32,7 +32,7 @@ public: /// void setCancel(Button * obj) { cancel_ = obj; } /// - void setUndoAll(Button * obj) { undo_all_ = obj; } + void setRestore(Button * obj) { restore_ = obj; } /// void addReadOnly(Widget * obj) { read_only_.push_back(obj); } /// @@ -51,8 +51,8 @@ private: Button * okay_; Button * apply_; - Button * undo_all_; Button * cancel_; + Button * restore_; typedef std::list Widgets; Widgets read_only_; @@ -62,7 +62,7 @@ private: template GuiBC::GuiBC(string const & cancel, string const & close) : ButtonControllerBase(cancel, close) - , okay_(0), apply_(0), cancel_(0), undo_all_(0) + , okay_(0), apply_(0), restore_(0), cancel_(0) {} @@ -77,9 +77,9 @@ void GuiBC::refresh() bool const enabled = bp().buttonStatus(ButtonPolicy::APPLY); setButtonEnabled(apply_, enabled); } - if (undo_all_) { - bool const enabled = bp().buttonStatus(ButtonPolicy::UNDO_ALL); - setButtonEnabled(undo_all_, enabled); + if (restore_) { + bool const enabled = bp().buttonStatus(ButtonPolicy::RESTORE); + setButtonEnabled(restore_, enabled); } if (cancel_) { bool const enabled = bp().buttonStatus(ButtonPolicy::CANCEL); diff --git a/src/frontends/controllers/ButtonControllerBase.C b/src/frontends/controllers/ButtonControllerBase.C index f446d785c5..ecd9f2dd7d 100644 --- a/src/frontends/controllers/ButtonControllerBase.C +++ b/src/frontends/controllers/ButtonControllerBase.C @@ -53,9 +53,9 @@ void ButtonControllerBase::cancel() } -void ButtonControllerBase::undoAll() +void ButtonControllerBase::restore() { - input(ButtonPolicy::SMI_UNDO_ALL); + input(ButtonPolicy::SMI_RESTORE); } diff --git a/src/frontends/controllers/ButtonControllerBase.h b/src/frontends/controllers/ButtonControllerBase.h index e395047bd2..d82098ab2d 100644 --- a/src/frontends/controllers/ButtonControllerBase.h +++ b/src/frontends/controllers/ButtonControllerBase.h @@ -56,7 +56,7 @@ public: /// void cancel(); /// - void undoAll(); + void restore(); /// void hide(); /// diff --git a/src/frontends/controllers/ButtonPolicies.C b/src/frontends/controllers/ButtonPolicies.C index fc18daa2a3..bb1ffe631c 100644 --- a/src/frontends/controllers/ButtonPolicies.C +++ b/src/frontends/controllers/ButtonPolicies.C @@ -61,8 +61,8 @@ PreferencesPolicy::PreferencesPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; outputs_[APPLIED] = OKAY | CLOSE; // Build the state machine one state at a time @@ -87,13 +87,13 @@ PreferencesPolicy::PreferencesPolicy() state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_APPLY] = APPLIED; state_machine_[VALID][SMI_OKAY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; // State::INVALID state_machine_[INVALID][SMI_VALID] = VALID; state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_ONLY] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; // State::APPLIED state_machine_[APPLIED][SMI_VALID] = VALID; state_machine_[APPLIED][SMI_INVALID] = INVALID; @@ -135,8 +135,8 @@ OkCancelPolicy::OkCancelPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; // Build the state machine one state at a time // NOTE: Since CANCEL and HIDE always go to INITIAL they are @@ -154,13 +154,13 @@ OkCancelPolicy::OkCancelPolicy() state_machine_[VALID][SMI_READ_WRITE] = VALID; state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_OKAY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; // State::INVALID state_machine_[INVALID][SMI_VALID] = VALID; state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_ONLY] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; } @@ -190,11 +190,11 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; outputs_[RO_INITIAL] = CLOSE; - outputs_[RO_VALID] = UNDO_ALL | CANCEL; - outputs_[RO_INVALID] = UNDO_ALL | CANCEL; + outputs_[RO_VALID] = RESTORE | CANCEL; + outputs_[RO_INVALID] = RESTORE | CANCEL; // Build the state machine one state at a time // NOTE: Since CANCEL and HIDE always go to INITIAL they are @@ -211,13 +211,13 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy() state_machine_[VALID][SMI_READ_WRITE] = VALID; state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_OKAY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; state_machine_[VALID][SMI_READ_ONLY] = RO_VALID; // State::INVALID state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; state_machine_[INVALID][SMI_VALID] = VALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID; // State::RO_INITIAL state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL; @@ -229,13 +229,13 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy() state_machine_[RO_VALID][SMI_READ_ONLY] = RO_VALID; state_machine_[RO_VALID][SMI_INVALID] = RO_INVALID; state_machine_[RO_VALID][SMI_READ_WRITE] = VALID; - state_machine_[RO_VALID][SMI_UNDO_ALL] = RO_INITIAL; + state_machine_[RO_VALID][SMI_RESTORE] = RO_INITIAL; // State::RO_INVALID state_machine_[RO_INVALID][SMI_READ_ONLY] = RO_INVALID; state_machine_[RO_INVALID][SMI_INVALID] = RO_INVALID; state_machine_[RO_INVALID][SMI_VALID] = RO_VALID; state_machine_[RO_INVALID][SMI_READ_WRITE] = INVALID; - state_machine_[RO_INVALID][SMI_UNDO_ALL] = RO_INITIAL; + state_machine_[RO_INVALID][SMI_RESTORE] = RO_INITIAL; } @@ -267,11 +267,11 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; outputs_[RO_INITIAL] = CLOSE; - outputs_[RO_VALID] = UNDO_ALL | CANCEL; - outputs_[RO_INVALID] = UNDO_ALL | CANCEL; + outputs_[RO_VALID] = RESTORE | CANCEL; + outputs_[RO_INVALID] = RESTORE | CANCEL; // Build the state machine one state at a time // NOTE: Since CANCEL and HIDE always go to INITIAL they are @@ -289,13 +289,13 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy() state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_OKAY] = INITIAL; state_machine_[VALID][SMI_APPLY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; state_machine_[VALID][SMI_READ_ONLY] = RO_VALID; // State::INVALID state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; state_machine_[INVALID][SMI_VALID] = VALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID; // State::RO_INITIAL state_machine_[RO_INITIAL][SMI_READ_ONLY] = RO_INITIAL; @@ -307,13 +307,13 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy() state_machine_[RO_VALID][SMI_READ_ONLY] = RO_VALID; state_machine_[RO_VALID][SMI_INVALID] = RO_INVALID; state_machine_[RO_VALID][SMI_READ_WRITE] = VALID; - state_machine_[RO_VALID][SMI_UNDO_ALL] = RO_INITIAL; + state_machine_[RO_VALID][SMI_RESTORE] = RO_INITIAL; // State::RO_INVALID state_machine_[RO_INVALID][SMI_INVALID] = RO_INVALID; state_machine_[RO_INVALID][SMI_READ_ONLY] = RO_INVALID; state_machine_[RO_INVALID][SMI_VALID] = RO_VALID; state_machine_[RO_INVALID][SMI_READ_WRITE] = INVALID; - state_machine_[RO_INVALID][SMI_UNDO_ALL] = RO_INITIAL; + state_machine_[RO_INVALID][SMI_RESTORE] = RO_INITIAL; } @@ -345,12 +345,12 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; outputs_[APPLIED] = OKAY | APPLY | CLOSE; outputs_[RO_INITIAL] = CLOSE; - outputs_[RO_VALID] = UNDO_ALL | CANCEL; - outputs_[RO_INVALID] = UNDO_ALL | CANCEL; + outputs_[RO_VALID] = RESTORE | CANCEL; + outputs_[RO_INVALID] = RESTORE | CANCEL; outputs_[RO_APPLIED] = CLOSE; // Build the state machine one state at a time @@ -368,14 +368,14 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy() state_machine_[VALID][SMI_READ_WRITE] = VALID; state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_OKAY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; state_machine_[VALID][SMI_APPLY] = APPLIED; state_machine_[VALID][SMI_READ_ONLY] = RO_VALID; // State::INVALID state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; state_machine_[INVALID][SMI_VALID] = VALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; state_machine_[INVALID][SMI_READ_ONLY] = RO_INVALID; // State::APPLIED state_machine_[APPLIED][SMI_APPLY] = APPLIED; @@ -394,13 +394,13 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy() state_machine_[RO_VALID][SMI_READ_ONLY] = RO_VALID; state_machine_[RO_VALID][SMI_INVALID] = RO_INVALID; state_machine_[RO_VALID][SMI_READ_WRITE] = VALID; - state_machine_[RO_VALID][SMI_UNDO_ALL] = RO_INITIAL; + state_machine_[RO_VALID][SMI_RESTORE] = RO_INITIAL; // State::RO_INVALID state_machine_[RO_INVALID][SMI_INVALID] = RO_INVALID; state_machine_[RO_INVALID][SMI_READ_ONLY] = RO_INVALID; state_machine_[RO_INVALID][SMI_VALID] = RO_VALID; state_machine_[RO_INVALID][SMI_READ_WRITE] = INVALID; - state_machine_[RO_INVALID][SMI_UNDO_ALL] = RO_INITIAL; + state_machine_[RO_INVALID][SMI_RESTORE] = RO_INITIAL; // State::RO_APPLIED state_machine_[RO_APPLIED][SMI_READ_ONLY] = RO_APPLIED; state_machine_[RO_APPLIED][SMI_INVALID] = RO_INVALID; @@ -437,8 +437,8 @@ OkApplyCancelPolicy::OkApplyCancelPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; outputs_[APPLIED] = OKAY | APPLY | CLOSE; // Build the state machine one state at a time @@ -457,14 +457,14 @@ OkApplyCancelPolicy::OkApplyCancelPolicy() state_machine_[VALID][SMI_READ_WRITE] = VALID; state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_OKAY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; state_machine_[VALID][SMI_APPLY] = APPLIED; // State::INVALID state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_ONLY] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; state_machine_[INVALID][SMI_VALID] = VALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; // State::APPLIED state_machine_[APPLIED][SMI_APPLY] = APPLIED; state_machine_[APPLIED][SMI_READ_ONLY] = APPLIED; @@ -503,8 +503,8 @@ NoRepeatedApplyPolicy::NoRepeatedApplyPolicy() { // Build the state output map outputs_[INITIAL] = CLOSE; - outputs_[VALID] = UNDO_ALL | OKAY | APPLY | CANCEL; - outputs_[INVALID] = UNDO_ALL | CANCEL; + outputs_[VALID] = RESTORE | OKAY | APPLY | CANCEL; + outputs_[INVALID] = RESTORE | CANCEL; // Build the state machine one state at a time // NOTE: Since CANCEL and HIDE always go to INITIAL they are @@ -523,13 +523,13 @@ NoRepeatedApplyPolicy::NoRepeatedApplyPolicy() state_machine_[VALID][SMI_INVALID] = INVALID; state_machine_[VALID][SMI_OKAY] = INITIAL; state_machine_[VALID][SMI_APPLY] = INITIAL; - state_machine_[VALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[VALID][SMI_RESTORE] = INITIAL; // State::INVALID state_machine_[INVALID][SMI_INVALID] = INVALID; state_machine_[INVALID][SMI_READ_ONLY] = INVALID; state_machine_[INVALID][SMI_READ_WRITE] = INVALID; state_machine_[INVALID][SMI_VALID] = VALID; - state_machine_[INVALID][SMI_UNDO_ALL] = INITIAL; + state_machine_[INVALID][SMI_RESTORE] = INITIAL; } diff --git a/src/frontends/controllers/ButtonPolicies.h b/src/frontends/controllers/ButtonPolicies.h index bf8a758374..09c739640d 100644 --- a/src/frontends/controllers/ButtonPolicies.h +++ b/src/frontends/controllers/ButtonPolicies.h @@ -109,11 +109,11 @@ public: /// CANCEL = 4, /// - UNDO_ALL = 8 + RESTORE = 8 }; /// static const Button ALL_BUTTONS = - Button(OKAY | APPLY | CANCEL | UNDO_ALL); + Button(OKAY | APPLY | CANCEL | RESTORE); /** State machine inputs. All the policies so far have both CANCEL and HIDE always going to @@ -124,28 +124,28 @@ public: HIDE are treated differently. */ enum SMInput { - /// + /// the dialog contents are now valid SMI_VALID = 0, - /// + /// the dialog contents are now invalid SMI_INVALID, - /// + /// an apply-and-hide action has happened SMI_OKAY, - /// + /// an apply action has happened SMI_APPLY, - /// + /// a cancel action has happened SMI_CANCEL, - /// - SMI_UNDO_ALL, - /// + /// a restore action has happened + SMI_RESTORE, + /// the dialog has been hidden SMI_HIDE, - /// + /// the dialog contents are read-only SMI_READ_ONLY, - /// + /// the dialog contents can be modified SMI_READ_WRITE, - /// + /// the state of the dialog contents has not changed SMI_NOOP, - /// - SMI_TOTAL // not a real input + /// for internal use + SMI_TOTAL }; /// Trigger a transition with this input. diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 9d2c68d849..294490a6d7 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,24 @@ +2001-04-03 John Levon + + * ButtonController.h: + * ButtonControllerBase.h: + * ButtonControllerBase.C: + * ButtonPolicies.h: + * ButtonPolicies.C: + * ControlButton.h: + * ControlButton.C: + * ControlButtons.h: + * ControlButtons.C: + * ControlConnections.h: + * ControlDialogs.h: + * ControlInset.h: + * ControlExternal.C: + * Makefile.am: + * README: + * ViewBase.h: s/ControlButton/ControlButtons/ + s/popup/dialog/ + s/UndoAll/Restore/ + associated + 2001-03-30 Angus Leeming * ControlToc.[Ch]: new files; a controller for the TOC popup. diff --git a/src/frontends/controllers/ControlButton.C b/src/frontends/controllers/ControlButtons.C similarity index 69% rename from src/frontends/controllers/ControlButton.C rename to src/frontends/controllers/ControlButtons.C index 731c452799..1f27c14a3c 100644 --- a/src/frontends/controllers/ControlButton.C +++ b/src/frontends/controllers/ControlButtons.C @@ -8,7 +8,7 @@ * * ====================================================== * - * \file ControlButton.C + * \file ControlButtons.C * \author Angus Leeming */ @@ -18,16 +18,16 @@ #pragma implementation #endif -#include "ControlButton.h" +#include "ControlButtons.h" -void ControlButton::ApplyButton() +void ControlButtons::ApplyButton() { apply(); bc().apply(); } -void ControlButton::OKButton() +void ControlButtons::OKButton() { apply(); hide(); @@ -35,15 +35,15 @@ void ControlButton::OKButton() } -void ControlButton::CancelButton() +void ControlButtons::CancelButton() { hide(); bc().cancel(); } -void ControlButton::RestoreButton() +void ControlButtons::RestoreButton() { update(); - bc().undoAll(); + bc().restore(); } diff --git a/src/frontends/controllers/ControlButton.h b/src/frontends/controllers/ControlButtons.h similarity index 82% rename from src/frontends/controllers/ControlButton.h rename to src/frontends/controllers/ControlButtons.h index 6c29e602b3..02c4f22a81 100644 --- a/src/frontends/controllers/ControlButton.h +++ b/src/frontends/controllers/ControlButtons.h @@ -7,14 +7,14 @@ * * ====================================================== * - * \file ControlButton.h + * \file ControlButtonss.h * \author Angus Leeming * - * ControlButton serves only to control the activation of the Ok, Apply, Cancel - * and Restore buttons on the View popup. + * ControlButtons serves only to control the activation of the Ok, Apply, Cancel + * and Restore buttons on the View dialog. * * More generally, the class is part of a hierarchy of controller classes - * that together connect the GUI-dependent popup to any appropriate + * that together connect the GUI-dependent dialog to any appropriate * signals and dispatches any changes to the kernel. * * These controllers have no knowledge of the actual instantiation of the @@ -25,8 +25,8 @@ * management and, ultimately, destruction. */ -#ifndef CONTROLBUTTON_H -#define CONTROLBUTTON_H +#ifndef CONTROLBUTTONS_H +#define CONTROLBUTTONS_H #ifdef __GNUG__ #pragma interface @@ -39,13 +39,13 @@ class ViewBase; /** Abstract base class for Controllers with a ButtonController. */ -class ControlButton : public DialogBase +class ControlButtons : public DialogBase { public: // methods /// - ControlButton() {} + ControlButtons() {} /// - virtual ~ControlButton() {}; + virtual ~ControlButtons() {}; /// These functions are called when the controlling buttons are pressed. /// @@ -78,4 +78,4 @@ protected: #include "ViewBase.h" -#endif // CONTROLBUTTON_H +#endif // CONTROLBUTTONS_H diff --git a/src/frontends/controllers/ControlCitation.C b/src/frontends/controllers/ControlCitation.C index 6b0dd13966..56abf2b48f 100644 --- a/src/frontends/controllers/ControlCitation.C +++ b/src/frontends/controllers/ControlCitation.C @@ -11,14 +11,13 @@ * \author Angus Leeming */ +#include #include #ifdef __GNUG__ #pragma implementation #endif -#include - #include "ControlCitation.h" #include "buffer.h" #include "Dialogs.h" diff --git a/src/frontends/controllers/ControlCitation.h b/src/frontends/controllers/ControlCitation.h index 18b0951ced..a42cb6b057 100644 --- a/src/frontends/controllers/ControlCitation.h +++ b/src/frontends/controllers/ControlCitation.h @@ -21,8 +21,7 @@ #include "ControlCommand.h" #include "biblio.h" // biblio::InfoMap -/** A controller for Citation dialogs. All citation-specific functionality - should go in here. +/** A controller for Citation dialogs. */ class ControlCitation : public ControlCommand { diff --git a/src/frontends/controllers/ControlConnections.h b/src/frontends/controllers/ControlConnections.h index fc1061200d..ad0ebb08c7 100644 --- a/src/frontends/controllers/ControlConnections.h +++ b/src/frontends/controllers/ControlConnections.h @@ -14,16 +14,16 @@ * ControlConnectBase, ControlConnectBI and ControlConnectBD. * * Together they control the connection/disconnection of signals with the LyX - * kernel. Controllers of individual popups interacting with the kernel through + * kernel. Controllers of individual dialogs interacting with the kernel through * signals/slots will all be derived from ControlConnectBI or ControlConnectBD. * - * A popup is classed as "Buffer Dependent" if its contents change with the - * buffer (document). An example would be the Citation popup. Such a popup + * A dialog is classed as "Buffer Dependent" if its contents change with the + * buffer (document). An example would be the Citation dialog. Such a dialog * would be derived, therefore, from ControlConnectBD. * - * Conversely, a popup is "Buffer Independent" if its contents do not change - * when the buffer changes. An example would be the Copyright popup. Such a - * popup, is therefore derived from ControlConnectBI. + * Conversely, a dialog is "Buffer Independent" if its contents do not change + * when the buffer changes. An example would be the Copyright dialog. Such a + * dialog is therefore derived from ControlConnectBI. * */ @@ -34,7 +34,7 @@ #pragma interface #endif -#include "ControlButton.h" +#include "ControlButtons.h" class Dialogs; class LyXView; @@ -43,7 +43,7 @@ class LyXView; kernel. It is meant to be used solely as the parent class to ControlConnectBI and ControlConnectBD. */ -class ControlConnectBase : public ControlButton +class ControlConnectBase : public ControlButtons { public: /// diff --git a/src/frontends/controllers/ControlDialogs.h b/src/frontends/controllers/ControlDialogs.h index 0bfea6048b..3898cffac4 100644 --- a/src/frontends/controllers/ControlDialogs.h +++ b/src/frontends/controllers/ControlDialogs.h @@ -10,10 +10,10 @@ * \file ControlDialogs.h * \author Angus Leeming * - * ControlDialog is to be used as a parent class for popups that are not - * Inset-popups. (An ugly description I know, but I hope the meaning is clear! - * Can anyone do any better?) Examples would be the Document and Paragraph - * popups. + * ControlDialog is to be used as a parent class for dialogs that are not + * views onto parameters of insets. (An ugly description I know, but I hope + * the meaning is clear! * Can anyone do any better?) Examples would be the + * Document and Paragraph dialogs. */ #ifndef CONTROLDIALOGS_H diff --git a/src/frontends/controllers/ControlExternal.C b/src/frontends/controllers/ControlExternal.C index 09bffe7da3..d0c4ed75c9 100644 --- a/src/frontends/controllers/ControlExternal.C +++ b/src/frontends/controllers/ControlExternal.C @@ -62,7 +62,7 @@ void ControlExternal::applyParamsToInset() void ControlExternal::editExternal() { // fill the local, controller's copy of the Params struct with - // the contents of the popup's fields. + // the contents of the dialog's fields. view().apply(); // Create a local copy of the inset and initialise it with this diff --git a/src/frontends/controllers/ControlInset.h b/src/frontends/controllers/ControlInset.h index d91b7d2c68..447a245d1c 100644 --- a/src/frontends/controllers/ControlInset.h +++ b/src/frontends/controllers/ControlInset.h @@ -10,9 +10,9 @@ * \file ControlInsets.h * \author Angus Leeming * - * ControlInset is to be used as a parent class for popups that display and + * ControlInset is to be used as a parent class for dialogs that display and * can perhaps modify the contents of an individual inset. An example being the - * ubiquitous Citation popup. + * ubiquitous Citation dialog. */ #ifndef CONTROLINSET_H @@ -65,7 +65,7 @@ private: - /// Instantiation of ControlButton virtual methods. + /// Instantiation of ControlButtons virtual methods. /// Get changed parameters and Dispatch them to the kernel. virtual void apply(); diff --git a/src/frontends/controllers/ControlToc.C b/src/frontends/controllers/ControlToc.C index 0f46bded1f..6bf0fbb83f 100644 --- a/src/frontends/controllers/ControlToc.C +++ b/src/frontends/controllers/ControlToc.C @@ -52,7 +52,7 @@ vector const ControlToc::getTypes() const Buffer::Lists::const_iterator end = tmp.end(); for (; cit != end; ++cit) { - types.push_back(cit->first.c_str()); + types.push_back(cit->first); } return types; diff --git a/src/frontends/controllers/ControlVCLog.C b/src/frontends/controllers/ControlVCLog.C index 791f83b1f0..83c71f7bfa 100644 --- a/src/frontends/controllers/ControlVCLog.C +++ b/src/frontends/controllers/ControlVCLog.C @@ -31,6 +31,11 @@ ControlVCLog::ControlVCLog(LyXView & lv, Dialogs & d) d_.showVCLogFile.connect(slot(this, &ControlVCLog::show)); } +// FIXME: this is all wrong, getLogFile() actually creates a file +// which we must unlink. + +// FIXME: I need to get the Buffer Filename for my window title, need +// to add to params. void ControlVCLog::setParams() { diff --git a/src/frontends/controllers/Makefile.am b/src/frontends/controllers/Makefile.am index ec940ff01f..b4f862e048 100644 --- a/src/frontends/controllers/Makefile.am +++ b/src/frontends/controllers/Makefile.am @@ -23,8 +23,8 @@ libcontrollers_la_SOURCES=\ ControlBibitem.h \ ControlBibtex.C \ ControlBibtex.h \ - ControlButton.C \ - ControlButton.h \ + ControlButtons.C \ + ControlButtons.h \ ControlCharacter.C \ ControlCharacter.h \ ControlCitation.C \ diff --git a/src/frontends/controllers/README b/src/frontends/controllers/README index fd6472dbf7..aa0ebd0fc4 100644 --- a/src/frontends/controllers/README +++ b/src/frontends/controllers/README @@ -1,16 +1,16 @@ This directory provides the controllers that act as an interface between the -LyX kernel and the GUI-specific implementations of each popup. It also +LyX kernel and the GUI-specific implementations of each dialog. It also provides abstract base classes from which GUI-specific implemetations of the -ButtonController and each separate popup should be derived (see +ButtonController and each separate dialog should be derived (see ButtonControlBase.[Ch] and ViewBase.h respectively). -The Controller connects the GUI-specific popup to any appropriate signals and +The Controller connects the GUI-specific dialog to any appropriate signals and dispatches any changes in the data to the kernel. It has no knowledge of the actual instantiation of the GUI-dependent View and ButtonController, which should therefore be created elsewhere. Once created, the Controller will take care of their initialisation, management and, ultimately, destruction. -This leaves the GUI-specific popup (and its author!) to worry only about the +This leaves the GUI-specific dialog (and its author!) to worry only about the data that it has been created to input/modify. This concept has been instatiated for the Citation dialog only at the moment. @@ -39,7 +39,7 @@ build) so: bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); + bc().setRestore(dialog_->button_restore); The button controller alters the state of the buttons (active/inactive). xforms works by callbacks, so clicking on say the button_ok button causes a callback event to (see FormBase.C) diff --git a/src/frontends/controllers/ViewBase.h b/src/frontends/controllers/ViewBase.h index 78a4f0e82c..70ff2aa308 100644 --- a/src/frontends/controllers/ViewBase.h +++ b/src/frontends/controllers/ViewBase.h @@ -15,13 +15,13 @@ #define VIEWBASE_H #include -#include "ControlButton.h" +#include "ControlButtons.h" #include "ControlSplash.h" class ViewBase { public: /// - ViewBase(ControlButton & c) : controller_(c) {} + ViewBase(ControlButtons & c) : controller_(c) {} /// virtual ~ViewBase() {} @@ -50,7 +50,7 @@ public: protected: /// The view is, after all, controlled! - ControlButton & controller_; + ControlButtons & controller_; }; @@ -84,7 +84,7 @@ template class ViewBC : public ViewBase { public: /// - ViewBC(ControlButton & c) : ViewBase(c) {} + ViewBC(ControlButtons & c) : ViewBase(c) {} protected: /// diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index 65f61aa88c..1f3056f584 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,3 +1,12 @@ +2001-04-03 John Levon + + * Dialogs.C: s/popup/dialog/ + + * FormUrl.C: + * GnomeBase.C: + * GnomeBase.h: s/ControlButton/ControlButtons/ + s/UndoAll/Restore/ + 2001-04-02 Michael Koziarski * FormCopyright.[Ch]: Reimplemented as an MVC dialog. diff --git a/src/frontends/gnome/Dialogs.C b/src/frontends/gnome/Dialogs.C index 721ab5351b..a64315eed5 100644 --- a/src/frontends/gnome/Dialogs.C +++ b/src/frontends/gnome/Dialogs.C @@ -64,7 +64,7 @@ #include "FormMinipage.h" */ -// Signal enabling all visible popups to be redrawn if so desired. +// Signal enabling all visible dialogs to be redrawn if so desired. // E.g., when the GUI colours have been remapped. SigC::Signal0 Dialogs::redrawGUI; diff --git a/src/frontends/gnome/FormUrl.C b/src/frontends/gnome/FormUrl.C index f3b6f51b01..686120f0c7 100644 --- a/src/frontends/gnome/FormUrl.C +++ b/src/frontends/gnome/FormUrl.C @@ -48,7 +48,7 @@ void FormUrl::build() bc().setOK(ok_btn()); bc().setCancel(cancel_btn()); bc().setApply(apply_btn()); - bc().setUndoAll(restore_btn()); + bc().setRestore(restore_btn()); // Make sure everything is in the correct state. bc().refresh(); diff --git a/src/frontends/gnome/GnomeBase.C b/src/frontends/gnome/GnomeBase.C index 8b68b16bb7..87ace2088f 100644 --- a/src/frontends/gnome/GnomeBase.C +++ b/src/frontends/gnome/GnomeBase.C @@ -21,7 +21,7 @@ #include -GnomeBase::GnomeBase(ControlButton & c, +GnomeBase::GnomeBase(ControlButtons & c, string const & glade_file, string const & name) : ViewBC(c) , file_(glade_file), widget_name_(name), xml_(0) diff --git a/src/frontends/gnome/GnomeBase.h b/src/frontends/gnome/GnomeBase.h index b7541b7c73..fe3751474e 100644 --- a/src/frontends/gnome/GnomeBase.h +++ b/src/frontends/gnome/GnomeBase.h @@ -33,7 +33,7 @@ class Dialog; class GnomeBase : public ViewBC, public SigC::Object { public: /// - GnomeBase(ControlButton & c, string const & glade_file, string const & name); + GnomeBase(ControlButtons & c, string const & glade_file, string const & name); /// virtual ~GnomeBase(); diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 1bd4938480..9bc9b0b1be 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,19 @@ +2001-04-03 John Levon + + * FormCharacter.C: + * FormDocument.h: + * FormSearch.C: + * Dialogs.C: s/popup/dialog/ + + * qt2BC.h: + * qt2BC.C: + * FormCitation.C: + * FormDocument.C: s/UndoAll/Restore/ + + * Qt2Base.h: + * Qt2Base.C: s/ControlButton/ControlButtons/ + + 2001-04-02 Kalle Dalheimer * Makefile.am: Simplified Makefile.am diff --git a/src/frontends/qt2/Dialogs.C b/src/frontends/qt2/Dialogs.C index b2b7166353..f0357d449f 100644 --- a/src/frontends/qt2/Dialogs.C +++ b/src/frontends/qt2/Dialogs.C @@ -53,7 +53,7 @@ #include "qt2BC.h" -// Signal enabling all visible popups to be redrawn if so desired. +// Signal enabling all visible dialogs to be redrawn if so desired. // E.g., when the GUI colours have been remapped. SigC::Signal0 Dialogs::redrawGUI; diff --git a/src/frontends/qt2/FormCharacter.C b/src/frontends/qt2/FormCharacter.C index 05262d2a75..81bddf4c77 100644 --- a/src/frontends/qt2/FormCharacter.C +++ b/src/frontends/qt2/FormCharacter.C @@ -25,7 +25,7 @@ using Liason::setMinibuffer; FormCharacter::FormCharacter(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) { - // let the popup be shown + // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. d->showLayoutCharacter.connect(slot(this, &FormCharacter::show)); diff --git a/src/frontends/qt2/FormCitation.C b/src/frontends/qt2/FormCitation.C index 53adc6a43b..12f146ff12 100644 --- a/src/frontends/qt2/FormCitation.C +++ b/src/frontends/qt2/FormCitation.C @@ -80,7 +80,7 @@ void FormCitation::build() bc().setOK(dialog_->okPB); bc().setApply(dialog_->applyPB); bc().setCancel(dialog_->cancelPB); - bc().setUndoAll(dialog_->restorePB); + bc().setRestore(dialog_->restorePB); bc().addReadOnly(dialog_->addPB); bc().addReadOnly(dialog_->delPB); diff --git a/src/frontends/qt2/FormDocument.C b/src/frontends/qt2/FormDocument.C index 94e4325600..c42706faa0 100644 --- a/src/frontends/qt2/FormDocument.C +++ b/src/frontends/qt2/FormDocument.C @@ -64,7 +64,7 @@ void FormDocument::build() bc().setOK(dialog_->okPB); bc().setApply(dialog_->applyPB); bc().setCancel(dialog_->cancelPB); - bc().setUndoAll(dialog_->restorePB); + bc().setRestore(dialog_->restorePB); bc().refresh(); // the document paper page diff --git a/src/frontends/qt2/FormDocument.h b/src/frontends/qt2/FormDocument.h index 1515f9490f..a251d91c72 100644 --- a/src/frontends/qt2/FormDocument.h +++ b/src/frontends/qt2/FormDocument.h @@ -30,7 +30,7 @@ class BufferParams; class LyXView; class Dialogs; -/** This class provides an Qt2 implementation of the FormDocument Popup. +/** This class provides an Qt2 implementation of the FormDocument dialog. The table-layout-form here changes values for latex-tabulars @author Kalle Dalheimer */ @@ -38,7 +38,6 @@ class FormDocument : public Qt2CB > { public: - /// #FormDocument x(Communicator ..., Popups ...);# FormDocument(LyXView *, Dialogs *); private: /// @@ -80,11 +79,11 @@ private: virtual void build(); // /// Filter the inputs // virtual bool input( FL_OBJECT *, long ); - /// Update the popup. + /// Update the dialog. virtual void update(); - /// Apply from popup + /// Apply from dialog virtual void apply(); - /// Cancel from popup + /// Cancel from dialog virtual void cancel(); // /// diff --git a/src/frontends/qt2/FormSearch.C b/src/frontends/qt2/FormSearch.C index 98e1fbcd6b..ecd567a007 100644 --- a/src/frontends/qt2/FormSearch.C +++ b/src/frontends/qt2/FormSearch.C @@ -24,7 +24,7 @@ using Liason::setMinibuffer; FormSearch::FormSearch(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) { - // let the popup be shown + // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. d->showSearch.connect(SigC::slot(this, &FormSearch::show)); diff --git a/src/frontends/qt2/Qt2Base.C b/src/frontends/qt2/Qt2Base.C index 0e2e63b7b0..6841c940bb 100644 --- a/src/frontends/qt2/Qt2Base.C +++ b/src/frontends/qt2/Qt2Base.C @@ -28,7 +28,7 @@ #include -Qt2Base::Qt2Base(::ControlButton & c, QString const & t) +Qt2Base::Qt2Base(ControlButtons & c, QString const & t) : ViewBC(c), title_(t) {} diff --git a/src/frontends/qt2/Qt2Base.h b/src/frontends/qt2/Qt2Base.h index 8dcb95f504..d697dd8933 100644 --- a/src/frontends/qt2/Qt2Base.h +++ b/src/frontends/qt2/Qt2Base.h @@ -28,7 +28,7 @@ class QDialog; #include "ViewBase.h" #include "LString.h" #include "ButtonPolicies.h" -#include "ControlButton.h" +#include "ControlButtons.h" class qt2BC; @@ -39,7 +39,7 @@ class Qt2Base : public QObject, public ViewBC Q_OBJECT public: /// - Qt2Base(::ControlButton &, const QString &); + Qt2Base(ControlButtons &, const QString &); /// virtual ~Qt2Base() {} @@ -85,7 +85,7 @@ class Qt2DB: public Qt2Base { protected: /// - Qt2DB(::ControlButton &, const QString&); + Qt2DB(ControlButtons &, const QString&); /// Pointer to the actual instantiation of the Qt dialog virtual QDialog* form() const; /// Real GUI implementation. @@ -94,7 +94,7 @@ protected: template -Qt2DB::Qt2DB(::ControlButton & c, const QString& t) +Qt2DB::Qt2DB(ControlButtons & c, const QString& t) : Qt2Base(c, t) {} @@ -111,14 +111,14 @@ class Qt2CB: public Base { protected: /// - Qt2CB(::ControlButton &, const QString&); + Qt2CB(ControlButtons &, const QString&); /// The parent controller Controller & controller() const; }; template -Qt2CB::Qt2CB(::ControlButton & c, const QString& t) +Qt2CB::Qt2CB(ControlButtons & c, const QString& t) : Base(c, t) {} diff --git a/src/frontends/qt2/qt2BC.C b/src/frontends/qt2/qt2BC.C index c2d195fc98..5a862ab15d 100644 --- a/src/frontends/qt2/qt2BC.C +++ b/src/frontends/qt2/qt2BC.C @@ -1,5 +1,5 @@ /** - * \file xformsBC.C + * \file qt2BC.C * Copyright 2001 the LyX Team * Read the file COPYING * @@ -19,7 +19,7 @@ qt2BC::qt2BC(string const & cancel, string const & close) : ButtonControllerBase(cancel, close), - okay_(0), apply_(0), cancel_(0), undo_all_(0), read_only_() + okay_(0), apply_(0), cancel_(0), restore_(0), read_only_() {} @@ -39,11 +39,11 @@ void qt2BC::refresh() apply_->setEnabled( false ); } } - if (undo_all_) { - if (bp().buttonStatus(ButtonPolicy::UNDO_ALL)) { - undo_all_->setEnabled( true ); + if (restore_) { + if (bp().buttonStatus(ButtonPolicy::RESTORE)) { + restore_->setEnabled( true ); } else { - undo_all_->setEnabled( false ); + restore_->setEnabled( false ); } } if (cancel_) { diff --git a/src/frontends/qt2/qt2BC.h b/src/frontends/qt2/qt2BC.h index 1f7de47f16..8d6a602ab4 100644 --- a/src/frontends/qt2/qt2BC.h +++ b/src/frontends/qt2/qt2BC.h @@ -58,8 +58,8 @@ public: cancel_ = obj; } /// - void setUndoAll(QButton * obj) { - undo_all_ = obj; + void setRestore(QButton * obj) { + restore_ = obj; } /// void addReadOnly(QWidget * obj) { @@ -82,7 +82,7 @@ private: /// QButton * cancel_; /// - QButton * undo_all_; + QButton * restore_; /// List of items to be deactivated when in one of the read-only states std::list read_only_; }; diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index f8485fb51e..ea9729d47a 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,16 @@ +2001-04-03 John Levon + + * Dialogs.C: s/popup/dialog/ + + * Form*.C: + * FormBase.h: + * FormBase.C: s/ControlButton/ControlButtons/ + move bc().refresh() into base show() method + + * Form*.C: + * FormBaseDeprecated.C: + s/UndoAll/restore/ + 2001-03-30 Angus Leeming * FormMathsPanel.C (c-tor): set button controller cancel label to close. diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index 0bb03c43c0..0121bd3d10 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -96,7 +96,7 @@ #include "FormPreferences.h" #include "FormTabular.h" -// Signal enabling all visible popups to be redrawn if so desired. +// Signal enabling all visible dialogs to be redrawn if so desired. // E.g., when the GUI colours have been remapped. SigC::Signal0 Dialogs::redrawGUI; diff --git a/src/frontends/xforms/FormBase.C b/src/frontends/xforms/FormBase.C index 8ba2319ff6..470d0aa368 100644 --- a/src/frontends/xforms/FormBase.C +++ b/src/frontends/xforms/FormBase.C @@ -25,7 +25,7 @@ extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *); -FormBase::FormBase(ControlButton & c, string const & t) +FormBase::FormBase(ControlButtons & c, string const & t) : ViewBC(c), minw_(0), minh_(0), title_(t) {} @@ -42,6 +42,8 @@ void FormBase::show() if (!form()) { build(); + bc().refresh(); + // work around dumb xforms sizing bug minw_ = form()->w; minh_ = form()->h; diff --git a/src/frontends/xforms/FormBase.h b/src/frontends/xforms/FormBase.h index e2911c42ff..b43db6a66b 100644 --- a/src/frontends/xforms/FormBase.h +++ b/src/frontends/xforms/FormBase.h @@ -33,7 +33,7 @@ class FormBase : public ViewBC { public: /// - FormBase(ControlButton &, string const &); + FormBase(ControlButtons &, string const &); /// virtual ~FormBase() {} @@ -76,7 +76,7 @@ class FormDB: public FormBase { protected: /// - FormDB(ControlButton &, string const &); + FormDB(ControlButtons &, string const &); /// Pointer to the actual instantiation of xform's form virtual FL_FORM * form() const; /// Real GUI implementation. @@ -85,7 +85,7 @@ protected: template -FormDB::FormDB(ControlButton & c, string const & t) +FormDB::FormDB(ControlButtons & c, string const & t) : FormBase(c, t) {} @@ -103,14 +103,14 @@ class FormCB: public Base { protected: /// - FormCB(ControlButton &, string const &); + FormCB(ControlButtons &, string const &); /// The parent controller Controller & controller() const; }; template -FormCB::FormCB(ControlButton & c, string const & t) +FormCB::FormCB(ControlButtons & c, string const & t) : Base(c, t) {} diff --git a/src/frontends/xforms/FormBaseDeprecated.C b/src/frontends/xforms/FormBaseDeprecated.C index 7c0c0b27fb..d6336b5706 100644 --- a/src/frontends/xforms/FormBaseDeprecated.C +++ b/src/frontends/xforms/FormBaseDeprecated.C @@ -194,7 +194,7 @@ void FormBaseDeprecated::RestoreCB(FL_OBJECT * ob, long) FormBaseDeprecated * pre = static_cast(ob->form->u_vdata); Assert(pre); - pre->bc().undoAll(); + pre->bc().restore(); pre->restore(); } diff --git a/src/frontends/xforms/FormBibitem.C b/src/frontends/xforms/FormBibitem.C index 9584cedc3b..0b85396a77 100644 --- a/src/frontends/xforms/FormBibitem.C +++ b/src/frontends/xforms/FormBibitem.C @@ -36,7 +36,6 @@ void FormBibitem::build() // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setCancel(dialog_->button_cancel); - bc().refresh(); bc().addReadOnly(dialog_->key); bc().addReadOnly(dialog_->label); diff --git a/src/frontends/xforms/FormBibtex.C b/src/frontends/xforms/FormBibtex.C index cd29bcdd06..923b147684 100644 --- a/src/frontends/xforms/FormBibtex.C +++ b/src/frontends/xforms/FormBibtex.C @@ -36,7 +36,6 @@ void FormBibtex::build() // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setCancel(dialog_->button_cancel); - bc().refresh(); bc().addReadOnly(dialog_->database); bc().addReadOnly(dialog_->style); diff --git a/src/frontends/xforms/FormBrowser.C b/src/frontends/xforms/FormBrowser.C index 64d8610ff5..54a1f355f0 100644 --- a/src/frontends/xforms/FormBrowser.C +++ b/src/frontends/xforms/FormBrowser.C @@ -12,7 +12,7 @@ #include "form_browser.h" #include "xformsBC.h" -FormBrowser::FormBrowser(ControlButton & c, string const & t) +FormBrowser::FormBrowser(ControlButtons & c, string const & t) : FormDB(c, t) {} @@ -23,5 +23,4 @@ void FormBrowser::build() // Manage the close button bc().setCancel(dialog_->button_close); - bc().refresh(); } diff --git a/src/frontends/xforms/FormBrowser.h b/src/frontends/xforms/FormBrowser.h index ed54aec323..1e6a891e3e 100644 --- a/src/frontends/xforms/FormBrowser.h +++ b/src/frontends/xforms/FormBrowser.h @@ -25,7 +25,7 @@ struct FD_form_browser; class FormBrowser : public FormDB { public: /// - FormBrowser(ControlButton &, string const &); + FormBrowser(ControlButtons &, string const &); private: /// Build the dialog. diff --git a/src/frontends/xforms/FormCharacter.C b/src/frontends/xforms/FormCharacter.C index a96ee60217..161a581fca 100644 --- a/src/frontends/xforms/FormCharacter.C +++ b/src/frontends/xforms/FormCharacter.C @@ -105,7 +105,6 @@ void FormCharacter::build() // Manage the ok, apply and cancel/close buttons bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_close); - bc().refresh(); bc().addReadOnly(dialog_->check_toggle_all); } diff --git a/src/frontends/xforms/FormCharacter.h b/src/frontends/xforms/FormCharacter.h index bfeb4d8471..42c2aa61eb 100644 --- a/src/frontends/xforms/FormCharacter.h +++ b/src/frontends/xforms/FormCharacter.h @@ -37,10 +37,10 @@ public: FormCharacter(ControlCharacter &); private: - /// Apply from popup + /// Apply from dialog virtual void apply(); - /// Build the popup + /// Build the dialog virtual void build(); /// Nothing to update... diff --git a/src/frontends/xforms/FormCitation.C b/src/frontends/xforms/FormCitation.C index 8f235a759d..c31010064b 100644 --- a/src/frontends/xforms/FormCitation.C +++ b/src/frontends/xforms/FormCitation.C @@ -75,7 +75,7 @@ void FormCitation::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); + bc().setRestore(dialog_->button_restore); bc().addReadOnly(dialog_->button_add); bc().addReadOnly(dialog_->button_del); @@ -85,7 +85,6 @@ void FormCitation::build() bc().addReadOnly(dialog_->input_before); bc().addReadOnly(dialog_->input_after); - bc().refresh(); } diff --git a/src/frontends/xforms/FormCopyright.C b/src/frontends/xforms/FormCopyright.C index 08f132cccb..5103aa535a 100644 --- a/src/frontends/xforms/FormCopyright.C +++ b/src/frontends/xforms/FormCopyright.C @@ -47,5 +47,4 @@ void FormCopyright::build() // Manage the cancel/close button bc().setCancel(dialog_->button_cancel); - bc().refresh(); } diff --git a/src/frontends/xforms/FormCredits.C b/src/frontends/xforms/FormCredits.C index 09ff4c597c..89c320e55a 100644 --- a/src/frontends/xforms/FormCredits.C +++ b/src/frontends/xforms/FormCredits.C @@ -35,7 +35,6 @@ void FormCredits::build() // Manage the cancel/close button bc().setCancel(dialog_->button_cancel); - bc().refresh(); std::stringstream ss; fl_add_browser_line(dialog_->browser_credits, diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index 0a114121bb..b15857a504 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -46,7 +46,7 @@ using SigC::slot; FormDocument::FormDocument(LyXView * lv, Dialogs * d) : FormBaseBD(lv, d, _("Document Layout")), fbullet(0) { - // let the popup be shown + // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. d->showLayoutDocument.connect(slot(this, &FormDocument::show)); @@ -84,8 +84,7 @@ void FormDocument::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); - bc().refresh(); + bc().setRestore(dialog_->button_restore); // the document paper form paper_.reset(build_doc_paper()); @@ -245,7 +244,7 @@ void FormDocument::build() bullets_->form); if ((XpmVersion < 4) || (XpmVersion == 4 && XpmRevision < 7)) { lyxerr << _("Your version of libXpm is older than 4.7.\n" - "The `bullet' tab of the document popup " + "The `bullet' tab of the document dialog " "has been disabled") << '\n'; fl_deactivate_object(fbullet); fl_set_object_lcol(fbullet, FL_INACTIVE); diff --git a/src/frontends/xforms/FormDocument.h b/src/frontends/xforms/FormDocument.h index 2f5d2fc894..0f22c5b54a 100644 --- a/src/frontends/xforms/FormDocument.h +++ b/src/frontends/xforms/FormDocument.h @@ -32,13 +32,12 @@ struct FD_form_doc_language; struct FD_form_doc_options; struct FD_form_doc_bullet; -/** This class provides an XForms implementation of the FormDocument Popup. +/** This class provides an XForms implementation of the FormDocument dialog. The table-layout-form here changes values for latex-tabulars @author Jürgen Vigna */ class FormDocument : public FormBaseBD { public: - /// #FormDocument x(Communicator ..., Popups ...);# FormDocument(LyXView *, Dialogs *); /// static void ComboInputCB(int, void *, Combox *); @@ -85,11 +84,11 @@ private: virtual void build(); /// Filter the inputs virtual bool input( FL_OBJECT *, long ); - /// Update the popup. + /// Update the dialog. virtual void update(); - /// Apply from popup + /// Apply from dialog virtual void apply(); - /// Cancel from popup + /// Cancel from dialog virtual void cancel(); /// diff --git a/src/frontends/xforms/FormError.C b/src/frontends/xforms/FormError.C index a475649a00..3611736614 100644 --- a/src/frontends/xforms/FormError.C +++ b/src/frontends/xforms/FormError.C @@ -37,7 +37,6 @@ void FormError::build() // Manage the cancel/close button bc().setCancel(dialog_->button_cancel); - bc().refresh(); } diff --git a/src/frontends/xforms/FormExternal.C b/src/frontends/xforms/FormExternal.C index 41bb9fa289..edf65d0c4d 100644 --- a/src/frontends/xforms/FormExternal.C +++ b/src/frontends/xforms/FormExternal.C @@ -57,7 +57,6 @@ void FormExternal::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().refresh(); bc().addReadOnly(dialog_->input_filename); bc().addReadOnly(dialog_->button_filenamebrowse); diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index 36b1ab081f..a4ef19ad23 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -123,8 +123,7 @@ void FormGraphics::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); - bc().refresh(); + bc().setRestore(dialog_->button_restore); bc().addReadOnly(dialog_->input_filename); bc().addReadOnly(dialog_->button_browse); diff --git a/src/frontends/xforms/FormInclude.C b/src/frontends/xforms/FormInclude.C index 78f80f2738..372db8d422 100644 --- a/src/frontends/xforms/FormInclude.C +++ b/src/frontends/xforms/FormInclude.C @@ -37,7 +37,6 @@ void FormInclude::build() // Manage the ok and cancel buttons bc().setOK(dialog_->button_ok); bc().setCancel(dialog_->button_cancel); - bc().refresh(); bc().addReadOnly(dialog_->button_browse); bc().addReadOnly(dialog_->check_verbatim); diff --git a/src/frontends/xforms/FormIndex.C b/src/frontends/xforms/FormIndex.C index c8e07766b1..c2057a5a99 100644 --- a/src/frontends/xforms/FormIndex.C +++ b/src/frontends/xforms/FormIndex.C @@ -40,11 +40,10 @@ void FormIndex::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); + bc().setRestore(dialog_->button_restore); bc().addReadOnly(dialog_->input_key); - bc().refresh(); } diff --git a/src/frontends/xforms/FormMathsBitmap.C b/src/frontends/xforms/FormMathsBitmap.C index 91e8a1a64a..62c51987a4 100644 --- a/src/frontends/xforms/FormMathsBitmap.C +++ b/src/frontends/xforms/FormMathsBitmap.C @@ -90,7 +90,6 @@ void FormMathsBitmap::build() fl_end_form(); bc().setCancel(button_cancel); - bc().refresh(); } diff --git a/src/frontends/xforms/FormMathsBitmap.h b/src/frontends/xforms/FormMathsBitmap.h index ff412d00a2..0e820dfeb3 100644 --- a/src/frontends/xforms/FormMathsBitmap.h +++ b/src/frontends/xforms/FormMathsBitmap.h @@ -41,7 +41,7 @@ private: /// int GetIndex(FL_OBJECT *); - /// Build the popup + /// Build the dialog virtual void build(); /// apply the data virtual void apply(); diff --git a/src/frontends/xforms/FormMathsDeco.C b/src/frontends/xforms/FormMathsDeco.C index dbb12bb24a..eb422e2965 100644 --- a/src/frontends/xforms/FormMathsDeco.C +++ b/src/frontends/xforms/FormMathsDeco.C @@ -53,7 +53,6 @@ void FormMathsDeco::build() bc().setCancel(dialog_->button_cancel); bc().addReadOnly(dialog_->bmtable); - bc().refresh(); } diff --git a/src/frontends/xforms/FormMathsDeco.h b/src/frontends/xforms/FormMathsDeco.h index c8c9089390..ff1a485d78 100644 --- a/src/frontends/xforms/FormMathsDeco.h +++ b/src/frontends/xforms/FormMathsDeco.h @@ -30,7 +30,7 @@ public: FormMathsDeco(LyXView *, Dialogs *, FormMathsPanel const &); private: - /// Build the popup + /// Build the dialog virtual void build(); /// Apply from dialog (modify or create inset) virtual void apply(); @@ -38,7 +38,7 @@ private: /// Pointer to the actual instantiation of the xforms form virtual FL_FORM * form() const; - // build the popup + // build the form FD_form_maths_deco * build_maths_deco(); // Real GUI implementation diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C index b20405a268..049cfb1a67 100644 --- a/src/frontends/xforms/FormMathsDelim.C +++ b/src/frontends/xforms/FormMathsDelim.C @@ -75,8 +75,6 @@ void FormMathsDelim::build() bc().addReadOnly(dialog_->radio_right); bc().addReadOnly(dialog_->radio_left); bc().addReadOnly(dialog_->button_pix); - - bc().refresh(); } diff --git a/src/frontends/xforms/FormMathsDelim.h b/src/frontends/xforms/FormMathsDelim.h index 1e3861ac2c..efacd5c6b6 100644 --- a/src/frontends/xforms/FormMathsDelim.h +++ b/src/frontends/xforms/FormMathsDelim.h @@ -30,7 +30,7 @@ public: FormMathsDelim(LyXView *, Dialogs *, FormMathsPanel const &); private: - /// Build the popup + /// Build the dialog virtual void build(); /// input handler virtual bool input(FL_OBJECT *, long); @@ -40,7 +40,7 @@ private: /// Pointer to the actual instantiation of the xforms form virtual FL_FORM * form() const; - // build the popup + // build the form FD_form_maths_delim * build_maths_delim(); // Real GUI implementation diff --git a/src/frontends/xforms/FormMathsMatrix.C b/src/frontends/xforms/FormMathsMatrix.C index 92961e5cd9..f8e9509441 100644 --- a/src/frontends/xforms/FormMathsMatrix.C +++ b/src/frontends/xforms/FormMathsMatrix.C @@ -68,8 +68,6 @@ void FormMathsMatrix::build() bc().addReadOnly(dialog_->slider_columns); bc().addReadOnly(dialog_->choice_valign); bc().addReadOnly(dialog_->input_halign); - - bc().refresh(); } diff --git a/src/frontends/xforms/FormMathsMatrix.h b/src/frontends/xforms/FormMathsMatrix.h index b96103df3f..e071bd128d 100644 --- a/src/frontends/xforms/FormMathsMatrix.h +++ b/src/frontends/xforms/FormMathsMatrix.h @@ -31,7 +31,7 @@ public: int AlignFilter(char const *, int); private: - /// Build the popup + /// Build the dialog virtual void build(); /// input handler virtual bool input(FL_OBJECT *, long); @@ -41,7 +41,7 @@ private: /// Pointer to the actual instantiation of the xforms form virtual FL_FORM * form() const; - // build the popup + // build the form FD_form_maths_matrix * build_maths_matrix(); // Real GUI implementation diff --git a/src/frontends/xforms/FormMathsPanel.C b/src/frontends/xforms/FormMathsPanel.C index 0f206660f8..8c4beae9cc 100644 --- a/src/frontends/xforms/FormMathsPanel.C +++ b/src/frontends/xforms/FormMathsPanel.C @@ -158,7 +158,6 @@ void FormMathsPanel::build() varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits); bc().setCancel(dialog_->button_close); - bc().refresh(); } bool FormMathsPanel::input(FL_OBJECT *, long data) diff --git a/src/frontends/xforms/FormMathsPanel.h b/src/frontends/xforms/FormMathsPanel.h index 72a330b9ff..bb88a4c4dd 100644 --- a/src/frontends/xforms/FormMathsPanel.h +++ b/src/frontends/xforms/FormMathsPanel.h @@ -62,7 +62,7 @@ private: /// Pointer to the actual instantiation of the ButtonController. virtual xformsBC & bc(); - /// Build the popup + /// Build the dialog virtual void build(); /// input handler virtual bool input(FL_OBJECT *, long); diff --git a/src/frontends/xforms/FormMathsSpace.C b/src/frontends/xforms/FormMathsSpace.C index 31ca06b767..6946a6e919 100644 --- a/src/frontends/xforms/FormMathsSpace.C +++ b/src/frontends/xforms/FormMathsSpace.C @@ -51,8 +51,6 @@ void FormMathsSpace::build() bc().addReadOnly(dialog_->radio_negative); bc().addReadOnly(dialog_->radio_quadratin); bc().addReadOnly(dialog_->radio_twoquadratin); - - bc().refresh(); } diff --git a/src/frontends/xforms/FormMathsSpace.h b/src/frontends/xforms/FormMathsSpace.h index cc1e9edfca..675cd3fb5d 100644 --- a/src/frontends/xforms/FormMathsSpace.h +++ b/src/frontends/xforms/FormMathsSpace.h @@ -30,7 +30,7 @@ public: FormMathsSpace(LyXView *, Dialogs *, FormMathsPanel const &); private: - /// Build the popup + /// Build the dialog virtual void build(); /// input handler virtual bool input(FL_OBJECT *, long); @@ -40,7 +40,7 @@ private: /// Pointer to the actual instantiation of the xforms form virtual FL_FORM * form() const; - // build the popup + // build the form FD_form_maths_space * build_maths_space(); // Real GUI implementation diff --git a/src/frontends/xforms/FormMinipage.C b/src/frontends/xforms/FormMinipage.C index bf31c4f7c8..73d9a17645 100644 --- a/src/frontends/xforms/FormMinipage.C +++ b/src/frontends/xforms/FormMinipage.C @@ -45,15 +45,13 @@ void FormMinipage::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); + bc().setRestore(dialog_->button_restore); bc().addReadOnly(dialog_->input_width); bc().addReadOnly(dialog_->choice_width_units); bc().addReadOnly(dialog_->radio_top); bc().addReadOnly(dialog_->radio_middle); bc().addReadOnly(dialog_->radio_bottom); - - bc().refresh(); } diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 02a6f88d49..7a59f86343 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -35,7 +35,7 @@ using SigC::slot; FormParagraph::FormParagraph(LyXView * lv, Dialogs * d) : FormBaseBD(lv, d, _("Paragraph Layout")) { - // let the popup be shown + // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. d->showLayoutParagraph.connect(slot(this, &FormParagraph::show)); @@ -71,8 +71,7 @@ void FormParagraph::build() bc_.setOK(dialog_->button_ok); bc_.setApply(dialog_->button_apply); bc_.setCancel(dialog_->button_cancel); - bc_.setUndoAll(dialog_->button_restore); - bc_.refresh(); + bc_.setRestore(dialog_->button_restore); // the general paragraph data form general_.reset(build_paragraph_general()); diff --git a/src/frontends/xforms/FormParagraph.h b/src/frontends/xforms/FormParagraph.h index 2cd2442ee5..d72fac11b7 100644 --- a/src/frontends/xforms/FormParagraph.h +++ b/src/frontends/xforms/FormParagraph.h @@ -28,7 +28,7 @@ struct FD_form_tabbed_paragraph; struct FD_form_paragraph_general; struct FD_form_paragraph_extra; -/** This class provides an XForms implementation of the FormParagraph Popup. +/** This class provides an XForms implementation of the FormParagraph dialog. * @author Jürgen Vigna */ class FormParagraph : public FormBaseBD { @@ -41,11 +41,11 @@ private: /** Redraw the form (on receipt of a Signal indicating, for example, that the xforms colours have been re-mapped). */ virtual void redraw(); - /// Build the popup + /// Build the dialog virtual void build(); - /// Apply from popup + /// Apply from dialog virtual void apply(); - /// Update the popup. + /// Update the dialog virtual void update(); /// Filter the inputs on callback from xforms virtual bool input(FL_OBJECT * ob, long); diff --git a/src/frontends/xforms/FormPreamble.C b/src/frontends/xforms/FormPreamble.C index 9e37c1df32..6e9a13b679 100644 --- a/src/frontends/xforms/FormPreamble.C +++ b/src/frontends/xforms/FormPreamble.C @@ -36,7 +36,6 @@ void FormPreamble::build() bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); bc().addReadOnly(dialog_->input_preamble); - bc().refresh(); } diff --git a/src/frontends/xforms/FormPreamble.h b/src/frontends/xforms/FormPreamble.h index 27dd6d0ed4..0b124177cf 100644 --- a/src/frontends/xforms/FormPreamble.h +++ b/src/frontends/xforms/FormPreamble.h @@ -25,11 +25,11 @@ public: /// FormPreamble(ControlPreamble &); private: - /// Apply from popup + /// Apply from dialog virtual void apply(); - /// Build the popup + /// Build the dialog virtual void build(); - /// Update the popup. + /// Update the dialog virtual void update(); /// Fdesign generated method diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 447a5a7142..80c9375a77 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -175,8 +175,7 @@ void FormPreferences::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); - bc().refresh(); + bc().setRestore(dialog_->button_restore); // build the tab folders converters_tab_.reset(build_outer_tab()); diff --git a/src/frontends/xforms/FormPrint.C b/src/frontends/xforms/FormPrint.C index fd5f7c776e..5e2c3b9ad0 100644 --- a/src/frontends/xforms/FormPrint.C +++ b/src/frontends/xforms/FormPrint.C @@ -54,7 +54,6 @@ void FormPrint::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().refresh(); // allow controlling of input and ok/apply (de)activation fl_set_input_return(dialog_->input_printer, diff --git a/src/frontends/xforms/FormRef.C b/src/frontends/xforms/FormRef.C index 7e245bb14f..5670eca6a4 100644 --- a/src/frontends/xforms/FormRef.C +++ b/src/frontends/xforms/FormRef.C @@ -62,8 +62,7 @@ void FormRef::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); - bc().refresh(); + bc().setRestore(dialog_->button_restore); } diff --git a/src/frontends/xforms/FormSearch.C b/src/frontends/xforms/FormSearch.C index ec3387358b..34077d94f4 100644 --- a/src/frontends/xforms/FormSearch.C +++ b/src/frontends/xforms/FormSearch.C @@ -33,7 +33,6 @@ void FormSearch::build() bc().addReadOnly(dialog_->input_replace); bc().addReadOnly(dialog_->replace); bc().addReadOnly(dialog_->replaceall); - bc().refresh(); } diff --git a/src/frontends/xforms/FormTabularCreate.C b/src/frontends/xforms/FormTabularCreate.C index 8a0073c3c5..5ba8c441f5 100644 --- a/src/frontends/xforms/FormTabularCreate.C +++ b/src/frontends/xforms/FormTabularCreate.C @@ -44,7 +44,6 @@ void FormTabularCreate::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().refresh(); } diff --git a/src/frontends/xforms/FormToc.C b/src/frontends/xforms/FormToc.C index d818a07078..2971305078 100644 --- a/src/frontends/xforms/FormToc.C +++ b/src/frontends/xforms/FormToc.C @@ -43,7 +43,6 @@ void FormToc::build() // Manage the cancel/close button bc().setCancel(dialog_->button_cancel); - bc().refresh(); } diff --git a/src/frontends/xforms/FormUrl.C b/src/frontends/xforms/FormUrl.C index 62ef744794..f8a1f88553 100644 --- a/src/frontends/xforms/FormUrl.C +++ b/src/frontends/xforms/FormUrl.C @@ -40,8 +40,7 @@ void FormUrl::build() bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); - bc().refresh(); + bc().setRestore(dialog_->button_restore); bc().addReadOnly(dialog_->name); bc().addReadOnly(dialog_->url); diff --git a/src/frontends/xforms/input_validators.C b/src/frontends/xforms/input_validators.C index ecde4ae6e9..e511e10e59 100644 --- a/src/frontends/xforms/input_validators.C +++ b/src/frontends/xforms/input_validators.C @@ -1,6 +1,6 @@ /* input_validators.C * A collection of input filtering and validating functions for use in - * XForms popups. Mainly meant for filtering input boxes although may + * XForms dialogs. Mainly meant for filtering input boxes although may * be extended to include other generally useful xforms-specific tools. */ diff --git a/src/frontends/xforms/input_validators.h b/src/frontends/xforms/input_validators.h index 5b68c7fad8..d0736a901d 100644 --- a/src/frontends/xforms/input_validators.h +++ b/src/frontends/xforms/input_validators.h @@ -12,7 +12,7 @@ /** Input validators and filters for xforms. * A collection of input filtering and validating functions for use in - * XForms popups. Mainly meant for filtering input boxes although may + * XForms dialogs. Mainly meant for filtering input boxes although may * be extended to include other generally useful xforms-specific tools. */ -- 2.39.2