mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-02 08:10:39 +00:00
small changes to ButtonController usage
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@977 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
33f1a7576f
commit
28ae4652aa
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2000-08-17 Allan Rae <rae@lyx.org>
|
||||
|
||||
* src/frontends/xforms/Dialogs.C (Dialogs): Make a temporary connection
|
||||
so we can at least see the credits again.
|
||||
|
||||
* src/frontends/xforms/FormPreferences.C: Used the appropriate button
|
||||
controller calls for the appropriate callbacks. Note that since Ok
|
||||
calls apply followed by cancel, and apply isn't a valid input for the
|
||||
APPLIED state, the bc_ calls have to be made in the static callback not
|
||||
within each of the real callbacks.
|
||||
|
||||
* src/frontends/xforms/ButtonController.h (Ok): renamed from Okay()
|
||||
(setOk): renamed from setOkay()
|
||||
|
||||
2000-08-17 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/frontends/gnome/Menubar_pimpl.C (openByName): put this function
|
||||
|
@ -47,17 +47,6 @@ src/frontends/xforms/FormPrint.C
|
||||
src/frontends/xforms/form_print.C
|
||||
src/frontends/xforms/FormRef.C
|
||||
src/frontends/xforms/form_ref.C
|
||||
src/frontends/xforms/forms/form_citation.C
|
||||
src/frontends/xforms/forms/form_copyright.C
|
||||
src/frontends/xforms/forms/form_document.C
|
||||
src/frontends/xforms/forms/form_graphics.C
|
||||
src/frontends/xforms/forms/form_index.C
|
||||
src/frontends/xforms/forms/form_preferences.C
|
||||
src/frontends/xforms/forms/form_print.C
|
||||
src/frontends/xforms/forms/form_ref.C
|
||||
src/frontends/xforms/forms/form_tabular.C
|
||||
src/frontends/xforms/forms/form_toc.C
|
||||
src/frontends/xforms/forms/form_url.C
|
||||
src/frontends/xforms/FormTabular.C
|
||||
src/frontends/xforms/form_tabular.C
|
||||
src/frontends/xforms/FormToc.C
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
/**@name Initialise Button Functions */
|
||||
//@{
|
||||
/// Call refresh() when finished setting the buttons.
|
||||
void setOkay(FL_OBJECT * obj)
|
||||
void setOk(FL_OBJECT * obj)
|
||||
{ okay_ = obj; }
|
||||
///
|
||||
void setApply(FL_OBJECT * obj)
|
||||
@ -81,7 +81,7 @@ public:
|
||||
refresh();
|
||||
}
|
||||
///
|
||||
void okay()
|
||||
void ok()
|
||||
{ input(ButtonPolicy::SMI_OKAY); }
|
||||
///
|
||||
void apply()
|
||||
|
@ -18,6 +18,9 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
// temporary till ported
|
||||
extern void ShowCredits();
|
||||
|
||||
|
||||
Dialogs::Dialogs(LyXView * lv)
|
||||
{
|
||||
@ -33,6 +36,8 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
dialogs_.push_back(new FormToc(lv, this));
|
||||
dialogs_.push_back(new FormUrl(lv, this));
|
||||
|
||||
showCredits.connect(slot(ShowCredits));
|
||||
|
||||
// reduce the number of connections needed in
|
||||
// dialogs by a simple connection here.
|
||||
hideAll.connect(hideBufferDependent.slot());
|
||||
|
@ -62,7 +62,7 @@ void FormPreferences::build()
|
||||
dialog_ = build_preferences();
|
||||
|
||||
// manage the restore, save, apply and cancel/close buttons
|
||||
bc_->setOkay(dialog_->button_ok);
|
||||
bc_->setOk(dialog_->button_ok);
|
||||
bc_->setApply(dialog_->button_apply);
|
||||
bc_->setCancel(dialog_->button_cancel);
|
||||
bc_->setUndoAll(dialog_->button_restore);
|
||||
@ -202,7 +202,6 @@ void FormPreferences::hide()
|
||||
if (dialog_
|
||||
&& dialog_->form
|
||||
&& dialog_->form->visible) {
|
||||
bc_->hide();
|
||||
fl_hide_form(dialog_->form);
|
||||
}
|
||||
}
|
||||
@ -343,8 +342,6 @@ void FormPreferences::apply()
|
||||
lyxrc.make_backup = fl_get_button(paths_->check_make_backups);
|
||||
lyxrc.num_lastfiles = static_cast<unsigned int>
|
||||
(fl_get_counter_value(paths_->counter_lastfiles));
|
||||
|
||||
bc_->apply();
|
||||
}
|
||||
|
||||
|
||||
@ -551,6 +548,7 @@ int FormPreferences::WMHideCB(FL_FORM * form, void *)
|
||||
// window manager is used to close the dialog.
|
||||
FormPreferences * pre = static_cast<FormPreferences*>(form->u_vdata);
|
||||
pre->hide();
|
||||
pre->bc_->hide();
|
||||
return FL_CANCEL;
|
||||
}
|
||||
|
||||
@ -560,7 +558,7 @@ void FormPreferences::OKCB(FL_OBJECT * ob, long)
|
||||
FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
|
||||
pre->apply();
|
||||
pre->hide();
|
||||
|
||||
pre->bc_->ok();
|
||||
pre->lv_->getLyXFunc()->Dispatch(LFUN_SAVEPREFERENCES);
|
||||
}
|
||||
|
||||
@ -569,6 +567,7 @@ void FormPreferences::ApplyCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
|
||||
pre->apply();
|
||||
pre->bc_->apply();
|
||||
}
|
||||
|
||||
|
||||
@ -576,6 +575,7 @@ void FormPreferences::CancelCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
|
||||
pre->hide();
|
||||
pre->bc_->cancel();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user