From 2f10d02e30eb7fc63ce59d2b427d12bf525377d7 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 31 Mar 2004 18:51:11 +0000 Subject: [PATCH] Convert the prefs dialog to the Dialog-based scheme. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8573 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/ChangeLog | 6 + lib/ui/classic.ui | 2 +- lib/ui/stdmenus.ui | 2 +- src/ChangeLog | 4 + src/frontends/ChangeLog | 5 + src/frontends/Dialogs.h | 2 - src/frontends/controllers/ChangeLog | 9 + src/frontends/controllers/ControlPrefs.C | 31 +-- src/frontends/controllers/ControlPrefs.h | 20 +- src/frontends/controllers/Dialog.C | 7 +- src/frontends/controllers/Kernel.C | 6 + src/frontends/controllers/Kernel.h | 4 + src/frontends/gtk/ChangeLog | 4 + src/frontends/gtk/Dialogs.C | 11 +- src/frontends/guiapi.C | 6 - src/frontends/guiapi.h | 1 - src/frontends/qt2/ChangeLog | 7 + src/frontends/qt2/Dialogs.C | 10 +- src/frontends/qt2/Dialogs2.C | 17 +- src/frontends/qt2/QPrefs.C | 6 +- src/frontends/qt2/QPrefs.h | 10 +- src/frontends/xforms/ChangeLog | 8 + src/frontends/xforms/Dialogs.C | 11 +- src/frontends/xforms/Dialogs2.C | 16 -- src/frontends/xforms/FormPreferences.C | 10 +- src/frontends/xforms/FormPreferences.h | 7 +- .../xforms/forms/form_preferences.fd | 242 +++++++++--------- src/lyxfunc.C | 4 +- 28 files changed, 249 insertions(+), 219 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 9893e0f6cd..5b3f69ebd6 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2004-03-31 Angus Leeming + + * ui/classic.ui: + * ui/stdmenus.ui: bring up the preferences dialog with + "dialog-show prefs" rather than "dialog-show preferences". + 2004-03-30 Angus Leeming * bind/aqua.bind: diff --git a/lib/ui/classic.ui b/lib/ui/classic.ui index de54f0b631..04eddb56eb 100644 --- a/lib/ui/classic.ui +++ b/lib/ui/classic.ui @@ -103,7 +103,7 @@ Menuset Item "Open/Close Float|l" "inset-toggle" Submenu "Change Tracking|g" "edit_change" Separator - Item "Preferences...|P" "dialog-show preferences" + Item "Preferences...|P" "dialog-show prefs" Item "Reconfigure|R" "reconfigure" End diff --git a/lib/ui/stdmenus.ui b/lib/ui/stdmenus.ui index 1962093ab7..39fc3f2808 100644 --- a/lib/ui/stdmenus.ui +++ b/lib/ui/stdmenus.ui @@ -418,7 +418,7 @@ Menuset # should be rarely used - Edit menu is not a good place to # have it. Item "Reconfigure|R" "reconfigure" - Item "Preferences...|P" "dialog-show preferences" + Item "Preferences...|P" "dialog-show prefs" End # diff --git a/src/ChangeLog b/src/ChangeLog index 38dc70cf59..c24bff5714 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-03-31 Angus Leeming + + * lyxfunc.C (getStatus, dispatch): changed invocation of the + preferences dialog. 2004-03-31 Alfredo Braunstein diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 44baae294d..286af7a6be 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,8 @@ +2004-03-31 Angus Leeming + + * Dialogs.h (showPreferences): + * guiapi.[Ch] (gui_ShowPreferences): removed. + 2004-03-30 Angus Leeming * Dialogs.h (showDocument): removed. diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 0e1c17230d..ef6c781507 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -67,8 +67,6 @@ public: //@{ /// void showPreamble(); - /// - void showPreferences(); /// bring up the spellchecker void showSpellchecker(); //@} diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index cd7a7e592f..35050585cb 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,12 @@ +2004-03-31 Angus Leeming + + * ControlPrefs.[Ch]: converted to the dialog-based scheme. + + * Dialog.C (apply): bug fix. Enable the dispatch of dialogs + which aren't dependent on a buffer when no buffer is open. + + Kernel.[Ch] (redrawGUI): new function. + 2004-03-31 Angus Leeming * ControlPrefs.C: a bit of an overhaul, moving the local Converters diff --git a/src/frontends/controllers/ControlPrefs.C b/src/frontends/controllers/ControlPrefs.C index aeb590e4a5..d1f70d1b07 100644 --- a/src/frontends/controllers/ControlPrefs.C +++ b/src/frontends/controllers/ControlPrefs.C @@ -13,24 +13,19 @@ #include "ControlPrefs.h" #include "helper_funcs.h" -#include "ViewBase.h" +#include "Kernel.h" #include "bufferlist.h" #include "gettext.h" #include "funcrequest.h" #include "LColor.h" -#include "frontends/Dialogs.h" -#include "frontends/LyXView.h" - #include "support/filetools.h" #include "support/globbing.h" #include "support/path_defines.h" #include "support/std_sstream.h" -#include - using lyx::support::AddName; using lyx::support::FileFilterList; using lyx::support::system_lyxdir; @@ -44,14 +39,14 @@ using std::vector; extern BufferList bufferlist; -ControlPrefs::ControlPrefs(LyXView & lv, Dialogs & d) - : ControlDialogBI(lv, d), +ControlPrefs::ControlPrefs(Dialog & parent) + : Dialog::Controller(parent), redraw_gui_(false), update_screen_font_(false) {} -void ControlPrefs::setParams() +bool ControlPrefs::initialiseParams(std::string const &) { rc_ = lyxrc; formats_ = ::formats; @@ -60,16 +55,16 @@ void ControlPrefs::setParams() colors_.clear(); redraw_gui_ = false; update_screen_font_ = false; + + return true; } -void ControlPrefs::apply() +void ControlPrefs::dispatchParams() { - view().apply(); - ostringstream ss; rc_.write(ss); - lv_.dispatch(FuncRequest(LFUN_LYXRC_APPLY, ss.str())); + kernel().dispatch(FuncRequest(LFUN_LYXRC_APPLY, ss.str())); // FIXME: these need lfuns bufferlist.setCurrentAuthor(rc_.user_name, rc_.user_email); @@ -83,22 +78,22 @@ void ControlPrefs::apply() vector::const_iterator it = colors_.begin(); vector::const_iterator const end = colors_.end(); for (; it != end; ++it) - lv_.dispatch(FuncRequest(LFUN_SET_COLOR, *it)); + kernel().dispatch(FuncRequest(LFUN_SET_COLOR, *it)); colors_.clear(); if (redraw_gui_) { - lv_.getDialogs().redrawGUI(); + kernel().redrawGUI(); redraw_gui_ = false; } if (update_screen_font_) { - lv_.dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE)); + kernel().dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE)); update_screen_font_ = false; } // The Save button has been pressed - if (isClosing()) { - lv_.dispatch(FuncRequest(LFUN_SAVEPREFERENCES)); + if (dialog().isClosing()) { + kernel().dispatch(FuncRequest(LFUN_SAVEPREFERENCES)); } } diff --git a/src/frontends/controllers/ControlPrefs.h b/src/frontends/controllers/ControlPrefs.h index 63e455cc94..d6e0393457 100644 --- a/src/frontends/controllers/ControlPrefs.h +++ b/src/frontends/controllers/ControlPrefs.h @@ -12,7 +12,7 @@ #ifndef CONTROLPREFS_H #define CONTROLPREFS_H -#include "ControlDialog_impl.h" +#include "Dialog.h" #include "converter.h" #include "format.h" #include "lyxrc.h" @@ -23,9 +23,17 @@ class LColor_color; -class ControlPrefs : public ControlDialogBI { +class ControlPrefs : public Dialog::Controller { public: - ControlPrefs(LyXView &, Dialogs &); + ControlPrefs(Dialog &); + /// + virtual bool initialiseParams(std::string const &); + /// + virtual void clearParams() {} + /// + virtual void dispatchParams(); + /// + virtual bool isBufferDependent() const { return false; } LyXRC & rc() { return rc_; } LyXRC const & rc() const { return rc_; } @@ -60,12 +68,6 @@ public: void updateScreenFonts(); private: - /// get current lyxrc - virtual void setParams(); - - /// apply current lyxrc - virtual void apply(); - /// temporary lyxrc LyXRC rc_; diff --git a/src/frontends/controllers/Dialog.C b/src/frontends/controllers/Dialog.C index 84bb79ecc6..ea236111dd 100644 --- a/src/frontends/controllers/Dialog.C +++ b/src/frontends/controllers/Dialog.C @@ -116,8 +116,11 @@ void Dialog::hide() void Dialog::apply() { - if (kernel().isBufferReadonly()) - return; + if (controller().isBufferDependent()) { + if (!kernel().isBufferAvailable() || + kernel().isBufferReadonly()) + return; + } view().apply(); controller().dispatchParams(); diff --git a/src/frontends/controllers/Kernel.C b/src/frontends/controllers/Kernel.C index c7371efd5a..46520bb3c1 100644 --- a/src/frontends/controllers/Kernel.C +++ b/src/frontends/controllers/Kernel.C @@ -80,6 +80,12 @@ Kernel::DocTypes Kernel::docType() const } +void Kernel::redrawGUI() const +{ + lyxview_.getDialogs().redrawGUI(); +} + + BufferView * Kernel::bufferview() { return lyxview_.view().get(); diff --git a/src/frontends/controllers/Kernel.h b/src/frontends/controllers/Kernel.h index 2c09befb6d..726722a570 100644 --- a/src/frontends/controllers/Kernel.h +++ b/src/frontends/controllers/Kernel.h @@ -78,6 +78,10 @@ public: /// The type of the current buffer. DocTypes docType() const; + /** A request that the GUI be redrawn, + * e.g. because the colors have been remapped. + */ + void redrawGUI() const; /** \name Kernel Nasties * Unpleasantly public internals of the LyX kernel. diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 2e229cea8e..0d5ae83587 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,3 +1,7 @@ +2004-03-31 Angus Leeming + + * Dialogs.C (build): added preferences dialog. + 2004-03-30 Angus Leeming * Dialogs.C (build) added document dialog. diff --git a/src/frontends/gtk/Dialogs.C b/src/frontends/gtk/Dialogs.C index 17e99732d7..2e13676406 100644 --- a/src/frontends/gtk/Dialogs.C +++ b/src/frontends/gtk/Dialogs.C @@ -34,6 +34,7 @@ #include "ControlMath.h" #include "ControlNote.h" #include "ControlParagraph.h" +#include "ControlPrefs.h" #include "ControlPrint.h" #include "ControlRef.h" #include "ControlSearch.h" @@ -71,6 +72,7 @@ #include "FormMathsStyle.h" #include "FormNote.h" #include "FormParagraph.h" +#include "FormPreferences.h" #include "FormPrint.h" #include "FormRef.h" #include "FormSearch.h" @@ -130,13 +132,14 @@ char const * const dialognames[] = { "mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc", "mathamsarrows", "mathamsrelations", "mathamsnegatedrelations", "mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle", -"box", "note", "paragraph", "print", "ref", "sendto", "tabular", "tabularcreate", +"note", "paragraph", "prefs", "print", "ref", "sendto", "tabular", +"tabularcreate", "texinfo", #ifdef HAVE_LIBAIKSAURUS "thesaurus", #endif -"texinfo", "toc", "url", "vspace", "wrap" }; +"toc", "url", "vspace", "wrap" }; char const * const * const end_dialognames = dialognames + (sizeof(dialognames) / sizeof(char *)); @@ -445,6 +448,10 @@ Dialog * Dialogs::build(string const & name) dialog->setController(new ControlParagraph(*dialog)); dialog->setView(new FormParagraph(*dialog)); dialog->bc().bp(new OkApplyCancelReadOnlyPolicy); + } else if (name == "prefs") { + dialog->setController(new ControlPrefs(*dialog)); + dialog->setView(new FormPreferences(*dialog)); + dialog->bc().bp(new OkApplyCancelPolicy); } else if (name == "print") { dialog->setController(new ControlPrint(*dialog)); dialog->setView(new FormPrint(*dialog)); diff --git a/src/frontends/guiapi.C b/src/frontends/guiapi.C index 28537c4448..4a9fdb93cc 100644 --- a/src/frontends/guiapi.C +++ b/src/frontends/guiapi.C @@ -28,12 +28,6 @@ void gui_ShowPreamble(Dialogs & d) } -void gui_ShowPreferences(Dialogs & d) -{ - d.showPreferences(); -} - - void gui_ShowSpellchecker(Dialogs & d) { d.showSpellchecker(); diff --git a/src/frontends/guiapi.h b/src/frontends/guiapi.h index 1182517e35..47ea0b9382 100644 --- a/src/frontends/guiapi.h +++ b/src/frontends/guiapi.h @@ -21,7 +21,6 @@ extern "C" { void gui_show_dialog(Dialogs *, char const * name, char const * data); void gui_ShowPreamble(Dialogs &); -void gui_ShowPreferences(Dialogs &); void gui_ShowSpellchecker(Dialogs &); } // extern "C" diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 65a9beeebb..4d3965b968 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,10 @@ +2004-03-31 Angus Leeming + + * Dialogs.C (build): added preferences dialog. + * Dialogs2.C (showPreferences): removed. + + * QPrefs.[Ch]: converted to the Dialog-based scheme. + 2004-03-31 Angus Leeming * QPrefs.[Ch]: diff --git a/src/frontends/qt2/Dialogs.C b/src/frontends/qt2/Dialogs.C index 47dea061de..a0eddcbfc9 100644 --- a/src/frontends/qt2/Dialogs.C +++ b/src/frontends/qt2/Dialogs.C @@ -30,6 +30,7 @@ #include "ControlMath.h" #include "ControlNote.h" #include "ControlParagraph.h" +#include "ControlPrefs.h" #include "ControlPrint.h" #include "ControlRef.h" #include "ControlSearch.h" @@ -67,6 +68,7 @@ #include "QMath.h" #include "QNote.h" #include "QParagraph.h" +#include "QPrefs.h" #include "QPrint.h" #include "QRef.h" #include "QSearch.h" @@ -96,8 +98,8 @@ char const * const dialognames[] = { "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character", "citation", "document", "error", "errorlist", "ert", "external", "file", "findreplace", "float", "graphics", "include", "index", "label", "log", -"mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph", "print", -"ref", "sendto", "tabular", "tabularcreate", "texinfo", +"mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph", "prefs", +"print", "ref", "sendto", "tabular", "tabularcreate", "texinfo", #ifdef HAVE_LIBAIKSAURUS "thesaurus", @@ -240,6 +242,10 @@ Dialog * Dialogs::build(string const & name) dialog->setController(new ControlParagraph(*dialog)); dialog->setView(new QParagraph(*dialog)); dialog->bc().bp(new OkApplyCancelReadOnlyPolicy); + } else if (name == "prefs") { + dialog->setController(new ControlPrefs(*dialog)); + dialog->setView(new QPrefs(*dialog)); + dialog->bc().bp(new OkApplyCancelPolicy); } else if (name == "print") { dialog->setController(new ControlPrint(*dialog)); dialog->setView(new QPrint(*dialog)); diff --git a/src/frontends/qt2/Dialogs2.C b/src/frontends/qt2/Dialogs2.C index cb78d9d8b8..af2d29702f 100644 --- a/src/frontends/qt2/Dialogs2.C +++ b/src/frontends/qt2/Dialogs2.C @@ -25,31 +25,24 @@ // of the Qt headers, those most fucked up of disgusting ratholes. // But I won't. #undef signals -#include "QPrefs.h" -#include "QPrefsDialog.h" #include "QSpellchecker.h" #include "QSpellcheckerDialog.h" -typedef GUI -PrefsDialog; - typedef GUI SpellcheckerDialog; struct Dialogs::Impl { Impl(LyXView & lv, Dialogs & d); - PrefsDialog prefs; - SpellcheckerDialog spellchecker; + SpellcheckerDialog spellchecker; }; Dialogs::Impl::Impl(LyXView & lv, Dialogs & d) - : prefs(lv, d), - spellchecker(lv, d) + : spellchecker(lv, d) {} @@ -73,12 +66,6 @@ void Dialogs::showPreamble() } -void Dialogs::showPreferences() -{ - pimpl_->prefs.controller().show(); -} - - void Dialogs::showSpellchecker() { pimpl_->spellchecker.controller().show(); diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index b80c169221..349f204e4b 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -65,10 +65,10 @@ using std::pair; using std::vector; -typedef Qt2CB > base_class; +typedef QController > base_class; -QPrefs::QPrefs() - : base_class(_("LyX: Preferences")) +QPrefs::QPrefs(Dialog & parent) + : base_class(parent, _("LyX: Preferences")) { } diff --git a/src/frontends/qt2/QPrefs.h b/src/frontends/qt2/QPrefs.h index d3661f8afd..368dde630b 100644 --- a/src/frontends/qt2/QPrefs.h +++ b/src/frontends/qt2/QPrefs.h @@ -12,11 +12,7 @@ #ifndef QPREFS_H #define QPREFS_H - -#include "ControlPrefs.h" - -#include "Qt2Base.h" - +#include "QDialogView.h" #include class QPrefsDialog; @@ -24,13 +20,13 @@ class Controllers; class Formats; class QPrefs - : public Qt2CB > + : public QController > { public: friend class QPrefsDialog; - QPrefs(); + QPrefs(Dialog &); private: /// Apply changes diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 457956fe97..cb32131fd1 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,11 @@ +2004-03-31 Angus Leeming + + * Dialogs.C (build): added preferences dialog. + * Dialogs2.C (showPreferences): removed. + + * FormPreferences.[Ch]: + * forms/form_preferences.fd: converted to the Dialog-based scheme. + 2004-03-31 Angus Leeming * FormPreferences.[Ch]: changes due to the changed ControlPrefs diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index 3eb9a86c75..6192cb1bb9 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -31,6 +31,7 @@ #include "ControlMath.h" #include "ControlNote.h" #include "ControlParagraph.h" +#include "ControlPrefs.h" #include "ControlPrint.h" #include "ControlRef.h" #include "ControlSearch.h" @@ -66,6 +67,7 @@ #include "FormMathsStyle.h" #include "FormNote.h" #include "FormParagraph.h" +#include "FormPreferences.h" #include "FormPrint.h" #include "FormRef.h" #include "FormTabular.h" @@ -125,13 +127,14 @@ char const * const dialognames[] = { "mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc", "mathamsarrows", "mathamsrelations", "mathamsnegatedrelations", "mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle", -"note", "paragraph", "print", "ref", "sendto", "tabular", "tabularcreate", +"note", "paragraph", "prefs", "print", "ref", "sendto", "tabular", +"tabularcreate", "texinfo", #ifdef HAVE_LIBAIKSAURUS "thesaurus", #endif -"texinfo", "toc", "url", "vspace", "wrap" }; +"toc", "url", "vspace", "wrap" }; char const * const * const end_dialognames = dialognames + (sizeof(dialognames) / sizeof(char *)); @@ -435,6 +438,10 @@ Dialog * Dialogs::build(string const & name) dialog->setController(new ControlParagraph(*dialog)); dialog->setView(new FormParagraph(*dialog)); dialog->bc().bp(new OkApplyCancelReadOnlyPolicy); + } else if (name == "prefs") { + dialog->setController(new ControlPrefs(*dialog)); + dialog->setView(new FormPreferences(*dialog)); + dialog->bc().bp(new OkApplyCancelPolicy); } else if (name == "print") { dialog->setController(new ControlPrint(*dialog)); dialog->setView(new FormPrint(*dialog)); diff --git a/src/frontends/xforms/Dialogs2.C b/src/frontends/xforms/Dialogs2.C index 1e667e8fd6..67b6b7e363 100644 --- a/src/frontends/xforms/Dialogs2.C +++ b/src/frontends/xforms/Dialogs2.C @@ -22,11 +22,6 @@ #include "FormPreamble.h" #include "forms/form_preamble.h" -#include "ControlPrefs.h" -#include "FormPreferences.h" -#include "FormColorpicker.h" -#include "forms/form_preferences.h" - #include "ControlSpellchecker.h" #include "FormSpellchecker.h" #include "forms/form_spellchecker.h" @@ -34,9 +29,6 @@ typedef GUI PreambleDialog; -typedef GUI -PreferencesDialog; - typedef GUI SpellcheckerDialog; @@ -45,14 +37,12 @@ struct Dialogs::Impl { Impl(LyXView & lv, Dialogs & d); PreambleDialog preamble; - PreferencesDialog preferences; SpellcheckerDialog spellchecker; }; Dialogs::Impl::Impl(LyXView & lv, Dialogs & d) : preamble(lv, d), - preferences(lv, d), spellchecker(lv, d) {} @@ -75,12 +65,6 @@ void Dialogs::showPreamble() } -void Dialogs::showPreferences() -{ - pimpl_->preferences.controller().show(); -} - - void Dialogs::showSpellchecker() { pimpl_->spellchecker.controller().show(); diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 8d3faa4fcf..8654a865a6 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -84,11 +84,11 @@ bool const scalableTabfolders = true; } // namespace anon -typedef FormCB > base_class; +typedef FormController > base_class; -FormPreferences::FormPreferences() - : base_class(_("Preferences"), scalableTabfolders), +FormPreferences::FormPreferences(Dialog & parent) + : base_class(parent, _("Preferences"), scalableTabfolders), colors_(*this), converters_(*this), inputs_misc_(*this), formats_(*this), interface_(*this), language_(*this), lnf_misc_(*this), identity_(*this), outputs_misc_(*this), @@ -137,7 +137,7 @@ void FormPreferences::hide() FL_FORM * inner_form = fl_get_active_folder(dialog_->tabfolder_prefs); if (inner_form && inner_form->visible) fl_hide_form(inner_form); - FormBase::hide(); + FormDialogView::hide(); } @@ -297,7 +297,7 @@ void FormPreferences::apply() spelloptions_.apply(rc); // The "Save" button has been pressed. - if (controller().isClosing() && colors_.modifiedXformsPrefs) { + if (dialog().isClosing() && colors_.modifiedXformsPrefs) { string const filename = AddName(user_lyxdir(), "preferences.xform"); colors_.modifiedXformsPrefs = !XformsColor::write(filename); diff --git a/src/frontends/xforms/FormPreferences.h b/src/frontends/xforms/FormPreferences.h index 6503eec2c6..723b408dbc 100644 --- a/src/frontends/xforms/FormPreferences.h +++ b/src/frontends/xforms/FormPreferences.h @@ -13,7 +13,7 @@ #ifndef FORMPREFERENCES_H #define FORMPREFERENCES_H -#include "FormBase.h" +#include "FormDialogView.h" #include "lyx_forms.h" @@ -51,9 +51,10 @@ struct FD_preferences_spelloptions; /** This class provides an XForms implementation of the FormPreferences Dialog. * The preferences dialog allows users to set/save their preferences. */ -class FormPreferences : public FormCB > { +class FormPreferences + : public FormController > { public: - FormPreferences(); + FormPreferences(Dialog &); private: /** Redraw the form (on receipt of a Signal indicating, for example, diff --git a/src/frontends/xforms/forms/form_preferences.fd b/src/frontends/xforms/forms/form_preferences.fd index be885d9a77..84dff5f585 100644 --- a/src/frontends/xforms/forms/form_preferences.fd +++ b/src/frontends/xforms/forms/form_preferences.fd @@ -64,7 +64,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_restore -callback: C_FormBaseRestoreCB +callback: C_FormDialogView_RestoreCB argument: 0 -------------------- @@ -82,7 +82,7 @@ shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_ok -callback: C_FormBaseOKCB +callback: C_FormDialogView_OKCB argument: 0 -------------------- @@ -100,7 +100,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_apply -callback: C_FormBaseApplyCB +callback: C_FormDialogView_ApplyCB argument: 0 -------------------- @@ -118,7 +118,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_close -callback: C_FormBaseCancelCB +callback: C_FormDialogView_CancelCB argument: 0 -------------------- @@ -274,7 +274,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_roman -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -292,7 +292,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_sans -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -310,7 +310,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_typewriter -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -328,7 +328,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_screen_encoding -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -346,7 +346,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_scalable -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -365,7 +365,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_zoom -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 bounds: 0 999 precision: 0 @@ -387,7 +387,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_dpi -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 bounds: 0 999 precision: 0 @@ -409,7 +409,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_tiny -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -427,7 +427,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_script -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -445,7 +445,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_footnote -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -463,7 +463,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_small -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -481,7 +481,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_normal -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -499,7 +499,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_large -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -517,7 +517,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_larger -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -535,7 +535,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_largest -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -553,7 +553,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_huge -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -571,7 +571,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_huger -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -649,7 +649,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_popup_normal_font -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -667,7 +667,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_popup_bold_font -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -685,7 +685,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_popup_font_encoding -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -721,7 +721,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_ui_file -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -739,7 +739,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_ui_file_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -757,7 +757,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_bind_file -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -775,7 +775,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_bind_file_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -817,7 +817,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser_lyx_objs -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -853,7 +853,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_modify -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -895,7 +895,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_auto_region_delete -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -914,7 +914,7 @@ shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: check_cursor_follows_scrollbar -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -933,7 +933,7 @@ shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: check_dialogs_iconify_with_main -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -952,7 +952,7 @@ shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: counter_wm_jump -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 bounds: 0 250 precision: 0 @@ -974,7 +974,7 @@ shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: counter_autosave -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 bounds: 0 1200 precision: 0 @@ -996,7 +996,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_preview_latex -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -1015,7 +1015,7 @@ shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: choice_display -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -1057,7 +1057,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_user_name -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1075,7 +1075,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_user_email -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -1117,7 +1117,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice_spell_command -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1135,7 +1135,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_alt_lang -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1153,7 +1153,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_alt_lang -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1171,7 +1171,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_escape_chars -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1189,7 +1189,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_escape_chars -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1207,7 +1207,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_personal_dict -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1225,7 +1225,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_personal_dict -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1243,7 +1243,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_personal_dict -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1261,7 +1261,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_compound_words -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1279,7 +1279,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_input_enc -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1393,7 +1393,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_package -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1411,7 +1411,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: combox_default_lang -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1429,7 +1429,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_use_kbmap -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1447,7 +1447,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_kbmap1 -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1465,7 +1465,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_kbmap2 -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1483,7 +1483,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_kbmap1_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1501,7 +1501,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_kbmap2_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1519,7 +1519,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_rtl_support -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1537,7 +1537,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_auto_begin -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1555,7 +1555,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_use_babel -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1573,7 +1573,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_mark_foreign -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1591,7 +1591,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_auto_end -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1609,7 +1609,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_global_options -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1627,7 +1627,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_command_begin -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1645,7 +1645,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_command_end -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1741,7 +1741,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser_all -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1759,7 +1759,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_format -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1777,7 +1777,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_gui_name -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1795,7 +1795,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_shrtcut -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1813,7 +1813,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_extension -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1831,7 +1831,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_viewer -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1849,7 +1849,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_add -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1867,7 +1867,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_delete -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -1909,7 +1909,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browser_all -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1927,7 +1927,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice_from -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1945,7 +1945,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice_to -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1963,7 +1963,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_converter -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1981,7 +1981,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_flags -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -1999,7 +1999,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_add -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2017,7 +2017,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_delete -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -2059,7 +2059,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_default_path -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2077,7 +2077,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_default_path_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2095,7 +2095,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_template_path -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2113,7 +2113,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_template_path_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2131,7 +2131,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_temp_dir -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2149,7 +2149,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_temp_dir_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2167,7 +2167,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_last_files -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -2186,7 +2186,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_lastfiles -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2204,7 +2204,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_lastfiles_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2222,7 +2222,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_lastfiles -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 bounds: 0 9 precision: 0 @@ -2244,7 +2244,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_make_backups -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 value: 1 @@ -2263,7 +2263,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_backup_path -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2281,7 +2281,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_backup_path_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2299,7 +2299,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_serverpipe -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2317,7 +2317,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_serverpipe_browse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -2359,7 +2359,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_date_format -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 =============== FORM =============== @@ -2401,7 +2401,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_name -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2419,7 +2419,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_adapt_output -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2455,7 +2455,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_command -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2473,7 +2473,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_page_range -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2491,7 +2491,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_copies -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2509,7 +2509,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_reverse -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2527,7 +2527,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_to_printer -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2545,7 +2545,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_file_extension -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2563,7 +2563,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_spool_command -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2581,7 +2581,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_paper_type -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2599,7 +2599,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_even_pages -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2617,7 +2617,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_odd_pages -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2635,7 +2635,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_collated -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2653,7 +2653,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_landscape -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2671,7 +2671,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_to_file -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2689,7 +2689,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_extra_options -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2707,7 +2707,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_spool_prefix -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2725,7 +2725,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_paper_size -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2803,7 +2803,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: counter_line_len -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 bounds: 0 120 precision: 0 @@ -2825,7 +2825,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_tex_encoding -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2843,7 +2843,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: choice_default_papersize -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2879,7 +2879,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_ascii_roff -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2897,7 +2897,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_checktex -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2915,7 +2915,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_paperoption -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2933,7 +2933,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: check_autoreset_classopt -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 -------------------- @@ -2951,7 +2951,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: input_bibtex -callback: C_FormBaseInputCB +callback: C_FormDialogView_InputCB argument: 0 ============================== diff --git a/src/lyxfunc.C b/src/lyxfunc.C index ab209e97d0..4c506e2d78 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -436,7 +436,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const enable = name == "aboutlyx" || name == "file" || name == "forks" - || name == "preferences" + || name == "prefs" || name == "texinfo"; else if (name == "print") enable = Exporter::IsExportable(*buf, "dvi") @@ -1051,8 +1051,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose) } else if (name == "preamble") owner->getDialogs().showPreamble(); - else if (name == "preferences") - owner->getDialogs().showPreferences(); else if (name == "spellchecker") owner->getDialogs().showSpellchecker();