]> git.lyx.org Git - features.git/commitdiff
Move the document dialog over to the Dialog-based scheme.
authorAngus Leeming <leeming@lyx.org>
Tue, 30 Mar 2004 19:18:14 +0000 (19:18 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 30 Mar 2004 19:18:14 +0000 (19:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8566 a592a061-630c-0410-9148-cb99ea01b6c8

23 files changed:
src/ChangeLog
src/frontends/ChangeLog
src/frontends/Dialogs.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlDocument.C
src/frontends/controllers/ControlDocument.h
src/frontends/gtk/ChangeLog
src/frontends/gtk/Dialogs.C
src/frontends/guiapi.C
src/frontends/guiapi.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/Dialogs2.C
src/frontends/qt2/QDocument.C
src/frontends/qt2/QDocument.h
src/frontends/qt2/QDocumentDialog.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs.C
src/frontends/xforms/Dialogs2.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormDocument.h
src/frontends/xforms/forms/form_document.fd
src/lyxfunc.C

index 82788e3b4d59c986d1bdb2d3eb65415f7edc5c74..2c82803a10ba2e1f1bf1d2259948949841040e43 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-30  Angus Leeming  <leeming@lyx.org>
+
+       * lyxfunc.C (dispatch): the specialization Dialogs::showDocument
+       has died. Fall through to the generic Dialogs::show("document").
+       
 2004-03-30  Angus Leeming  <leeming@lyx.org>
 
        * lfuns.h:
index 8f72b642c6db25ccc2583e1f48f82ff80438cf7d..44baae294d560e8bf71a2d9fd2ddbb84c243f8b7 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-30  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.h (showDocument): removed.
+
+       * guiapi.[Ch] (gui_ShowDocument): removed.
+
 2004-03-28  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.h (showPrint): removed.
index d3ec0d02b05875c029f94c6ecd91b4b2ed73d6cd..0e1c17230d7ca799a2a4f0e0d235aa061a0c5cfb 100644 (file)
@@ -66,8 +66,6 @@ public:
           Put into some sort of alphabetical order */
        //@{
        ///
-       void showDocument();
-       ///
        void showPreamble();
        ///
        void showPreferences();
index ab1ca56ef3723059dc9915fbc93ab25ea7a90318..4cab6a2f48e895e2299c4fa52728e0391d165bbc 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-30  Angus Leeming  <leeming@lyx.org>
+
+       * ControlDocument.[Ch]: converted to the dialog-based scheme.
+
 2004-03-30  Angus Leeming  <leeming@lyx.org>
 
        * ControlDocument.[Ch]: move all of the 'apply' code into the core
index 00f32ba1e07a5bafec210d0a4e9dd24cdc2b79d1..e353dece329754346e8cfb7c9eae0d84500e542f 100644 (file)
@@ -11,7 +11,7 @@
 #include <config.h>
 
 #include "ControlDocument.h"
-#include "ViewBase.h"
+#include "Kernel.h"
 
 #include "BranchList.h"
 #include "buffer.h"
 #include "LColor.h"
 #include "lyxtextclasslist.h"
 
-#include "frontends/LyXView.h"
-
 #include "support/std_sstream.h"
 
 using std::ostringstream;
 using std::string;
 
 
-ControlDocument::ControlDocument(LyXView & lv, Dialogs & d)
-       : ControlDialogBD(lv, d), bp_(0)
+ControlDocument::ControlDocument(Dialog & parent)
+       : Dialog::Controller(parent)
 {}
 
 
@@ -38,24 +36,28 @@ ControlDocument::~ControlDocument()
 {}
 
 
-void ControlDocument::setParams()
+bool ControlDocument::initialiseParams(std::string const &)
 {
-       if (!bp_.get())
-               bp_.reset(new BufferParams);
+       bp_.reset(new BufferParams);
+       *bp_ = kernel().buffer().params();
+       return true;
+}
 
-       /// Set the buffer parameters
-       *bp_ = buffer()->params();
+
+void ControlDocument::clearParams()
+{
+       bp_.reset();
 }
 
 
-BufferParams & ControlDocument::params()
+BufferParams & ControlDocument::params() const
 {
        BOOST_ASSERT(bp_.get());
        return *bp_;
 }
 
 
-LyXTextClass ControlDocument::textClass()
+LyXTextClass const & ControlDocument::textClass() const
 {
        return textclasslist[bp_->textclass];
 }
@@ -63,38 +65,35 @@ LyXTextClass ControlDocument::textClass()
 
 namespace {
 
-void dispatch_params(LyXView & lv, BufferParams const & bp, kb_action lfun)
+void dispatch_bufferparams(Kernel const & kernel, BufferParams const & bp,
+                          kb_action lfun)
 {
        ostringstream ss;
        bp.writeFile(ss);
        ss << "\\end_header\n";
-       lv.dispatch(FuncRequest(lfun, ss.str()));
+       kernel.dispatch(FuncRequest(lfun, ss.str()));
 }
 
 } // namespace anon
 
 
-void ControlDocument::apply()
+void ControlDocument::dispatchParams()
 {
-       if (!bufferIsAvailable())
-               return;
-
-       view().apply();
-
        // This must come first so that a language change is correctly noticed
        setLanguage();
 
        // Set the document class.
-       lyx::textclass_type const old_class = buffer()->params().textclass;
+       lyx::textclass_type const old_class =
+               kernel().buffer().params().textclass;
        lyx::textclass_type const new_class = bp_->textclass;
 
        if (new_class != old_class) {
                string const name = textclasslist[new_class].name();
-               lv_.dispatch(FuncRequest(LFUN_TEXTCLASS_APPLY, name));
+               kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_APPLY, name));
        }
 
        // Apply the BufferParams.
-       dispatch_params(lv_, params(), LFUN_BUFFERPARAMS_APPLY);
+       dispatch_bufferparams(kernel(), params(), LFUN_BUFFERPARAMS_APPLY);
 
        // Generate the colours requested by each new branch.
        BranchList & branchlist = params().branchlist();
@@ -112,29 +111,29 @@ void ControlDocument::apply()
                        x11hexname = lcolor.getX11Name(LColor::background);
                // display the new color
                string const str = current_branch  + ' ' + x11hexname;
-               lv_.dispatch(FuncRequest(LFUN_SET_COLOR, str));
+               kernel().dispatch(FuncRequest(LFUN_SET_COLOR, str));
        }
 
        // Open insets of selected branches, close deselected ones
-       lv_.dispatch(FuncRequest(LFUN_ALL_INSETS_TOGGLE, "toggle branch"));
+       kernel().dispatch(FuncRequest(LFUN_ALL_INSETS_TOGGLE, "toggle branch"));
 }
 
 
-void ControlDocument::setLanguage()
+void ControlDocument::setLanguage() const
 {
        Language const * const newL = bp_->language;
-       if (buffer()->params().language == newL)
+       if (kernel().buffer().params().language == newL)
                return;
 
        string const lang_name = newL->lang();
-       lv_.dispatch(FuncRequest(LFUN_LANGUAGE_BUFFER, lang_name));
+       kernel().dispatch(FuncRequest(LFUN_LANGUAGE_BUFFER, lang_name));
 }
 
 
 bool ControlDocument::loadTextclass(lyx::textclass_type tc) const
 {
        string const name = textclasslist[tc].name();
-       lv_.dispatch(FuncRequest(LFUN_TEXTCLASS_LOAD, name));
+       kernel().dispatch(FuncRequest(LFUN_TEXTCLASS_LOAD, name));
 
        // Report back whether we were able to change the class.
        bool const success = textclasslist[tc].loaded();
@@ -142,7 +141,7 @@ bool ControlDocument::loadTextclass(lyx::textclass_type tc) const
 }
 
 
-void ControlDocument::saveAsDefault()
+void ControlDocument::saveAsDefault() const
 {
-       dispatch_params(lv_, params(), LFUN_SAVE_AS_DEFAULT);
+       dispatch_bufferparams(kernel(), params(), LFUN_SAVE_AS_DEFAULT);
 }
index 8aeabc291dc56123a7f993b19a9e59e3001d58f5..f761a787ffcb64e39b354a52463be60fa944cc7a 100644 (file)
 #ifndef CONTROLDOCUMENT_H
 #define CONTROLDOCUMENT_H
 
-#include "ControlDialog_impl.h"
-
+#include "Dialog.h"
 #include "support/types.h"
-
 #include <boost/scoped_ptr.hpp>
 
 class BufferParams;
-class Language;
 class LyXTextClass;
 
 
 /** A controller for Document dialogs.
  */
-class ControlDocument : public ControlDialogBD {
+class ControlDocument : public Dialog::Controller {
 public:
        ///
-       ControlDocument(LyXView &, Dialogs &);
+       ControlDocument(Dialog &);
        ///
        ~ControlDocument();
        ///
-       void setLanguage();
+       virtual bool initialiseParams(std::string const & data);
+       ///
+       virtual void clearParams();
+       ///
+       virtual void dispatchParams();
+       ///
+       virtual bool isBufferDependent() const { return true; }
+       ///
+       LyXTextClass const & textClass() const;
        ///
-       LyXTextClass textClass();
+       BufferParams & params() const;
        ///
-       BufferParams & params();
+       void setLanguage() const;
        ///
-       void saveAsDefault();
+       void saveAsDefault() const;
        ///
        bool loadTextclass(lyx::textclass_type tc) const;
 private:
-       /// apply settings
-       void apply();
-       /// set the params before show or update
-       void setParams();
        ///
        boost::scoped_ptr<BufferParams> bp_;
 };
index cfe3a7667a8b93db1169fe87a45c35b92d187b6b..2e229cea8ec7e0b7bb60ac6f297302fca8e5a925 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-30  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C (build) added document dialog.
+
 2004-03-28  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.C (build): added print dialog.
index 24fcfef6d5d3ad73ff27ca93b3d9c62ccdeb808f..17e99732d7b478a32b826aebdd9d00815849632e 100644 (file)
@@ -23,6 +23,7 @@
 #include "ControlCharacter.h"
 #include "ControlCitation.h"
 #include "ControlCommand.h"
+#include "ControlDocument.h"
 #include "ControlErrorList.h"
 #include "ControlERT.h"
 #include "ControlExternal.h"
@@ -55,6 +56,7 @@
 #include "FormChanges.h"
 #include "FormCharacter.h"
 #include "FormCitation.h"
+#include "FormDocument.h"
 #include "FormErrorList.h"
 #include "FormERT.h"
 #include "FormExternal.h"
@@ -122,9 +124,9 @@ FormMathsBitmap * createFormBitmap(Dialog & parent, string const & title,
 
 char const * const dialognames[] = {
 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
-"citation", "error", "errorlist" , "ert", "external", "file", "findreplace",
-"float", "graphics", "include", "index", "label", "log", "mathpanel",
-"mathaccents", "matharrows", "mathoperators", "mathrelations",
+"citation", "document", "error", "errorlist" , "ert", "external", "file",
+"findreplace", "float", "graphics", "include", "index", "label", "log",
+"mathpanel", "mathaccents", "matharrows", "mathoperators", "mathrelations",
 "mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
 "mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
 "mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
@@ -195,6 +197,10 @@ Dialog * Dialogs::build(string const & name)
                dialog->setController(new ControlCitation(*dialog));
                dialog->setView(new FormCitation(*dialog));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "document") {
+               dialog->setController(new ControlDocument(*dialog));
+               dialog->setView(new FormDocument(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "errorlist") {
                dialog->setController(new ControlErrorList(*dialog));
                dialog->setView(new FormErrorList(*dialog));
index 398604b8c8917eff4af54652640c106b8657cddf..28537c4448fd991b285d6945bc0ed0c007b79371 100644 (file)
@@ -22,12 +22,6 @@ void gui_show_dialog(Dialogs * d, char const * name, char const * data)
        d->show(name, data, 0);
 }
 
-void gui_ShowDocument(Dialogs & d)
-{
-       d.showDocument();
-}
-
-
 void gui_ShowPreamble(Dialogs & d)
 {
        d.showPreamble();
index ec72c87641763eaac3c20ffab6ec6bb063ec5b29..1182517e359c7a584e1f3289a7542622d736a7ad 100644 (file)
@@ -20,7 +20,6 @@ extern "C" {
 
 void gui_show_dialog(Dialogs *, char const * name, char const * data);
 
-void gui_ShowDocument(Dialogs &);
 void gui_ShowPreamble(Dialogs &);
 void gui_ShowPreferences(Dialogs &);
 void gui_ShowSpellchecker(Dialogs &);
index 6d94a8f9e30d32ee74e7c660be66d94b55d885d3..7885b8e6dc1f98570914c7aa4f2492b1d0f727ed 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-30  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C (build): added document dialog.
+       * Dialogs2.C (showDocument): removed.
+
+       * QDocument.[Ch]: converted to the Dialog-based scheme.
+
 2004-03-29  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * QBibtex.C:
index 244125cb78e9af4b32005f286f34170f606ea104..47dea061de6cf1ad875a77eda65d0b8041cbb329 100644 (file)
@@ -19,6 +19,7 @@
 #include "ControlChanges.h"
 #include "ControlCharacter.h"
 #include "ControlCitation.h"
+#include "ControlDocument.h"
 #include "ControlErrorList.h"
 #include "ControlERT.h"
 #include "ControlExternal.h"
@@ -50,6 +51,7 @@
 #include "QChanges.h"
 #include "QCharacter.h"
 #include "QCitation.h"
+#include "QDocument.h"
 #include "QErrorList.h"
 #include "QERT.h"
 #include "QExternal.h"
@@ -92,10 +94,10 @@ namespace {
 
 char const * const dialognames[] = {
 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
-"citation", "error", "errorlist", "ert", "external", "file", "findreplace",
-"float", "graphics", "include", "index", "label", "log", "mathpanel",
-"mathdelimiter", "mathmatrix", "note", "paragraph", "print", "ref", "sendto",
-"tabular", "tabularcreate", "texinfo",
+"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",
 
 #ifdef HAVE_LIBAIKSAURUS
 "thesaurus",
@@ -166,6 +168,10 @@ Dialog * Dialogs::build(string const & name)
                dialog->setController(new ControlCitation(*dialog));
                dialog->setView(new QCitation(*dialog));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "document") {
+               dialog->setController(new ControlDocument(*dialog));
+               dialog->setView(new QDocument(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "errorlist") {
                dialog->setController(new ControlErrorList(*dialog));
                dialog->setView(new QErrorList(*dialog));
index ddbccb88d3a476df459211c4c23ff8209bcf80e0..cb78d9d8b8863a32cde744704d0f377be798281d 100644 (file)
 #include "controllers/GUI.h"
 #include "ButtonController.h"
 
-#include "ControlDocument.h"
+#include "Qt2BC.h"
+
 #include "ControlSpellchecker.h"
 
-#include "QDocument.h"
-#include "QDocumentDialog.h"
 // Here would be an appropriate point to lecture on the evils
 // of the Qt headers, those most fucked up of disgusting ratholes.
 // But I won't.
@@ -34,9 +33,6 @@
 
 
 
-typedef GUI<ControlDocument, QDocument, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
-DocumentDialog;
-
 typedef GUI<ControlPrefs, QPrefs, OkApplyCancelPolicy, Qt2BC>
 PrefsDialog;
 
@@ -46,15 +42,13 @@ SpellcheckerDialog;
 struct Dialogs::Impl {
        Impl(LyXView & lv, Dialogs & d);
 
-       DocumentDialog      document;
        PrefsDialog         prefs;
        SpellcheckerDialog  spellchecker;
 };
 
 
 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
-       : document(lv, d),
-         prefs(lv, d),
+       : prefs(lv, d),
          spellchecker(lv, d)
 {}
 
@@ -71,15 +65,9 @@ Dialogs::~Dialogs()
 }
 
 
-void Dialogs::showDocument()
-{
-       pimpl_->document.controller().show();
-}
-
-
 void Dialogs::showPreamble()
 {
-       pimpl_->document.controller().show();
+       show("document");
        // Oh Angus, won't you help a poor child ?
        //pimpl_->document.view()->showPreamble();
 }
index 1109771c1b1b23194d5bc120fb84365d52ad119a..54dba167fd33f05f5dc9b29661ba212e19a05e7e 100644 (file)
 
 #include <config.h>
 
-#include "debug.h"
-#include "qt_helpers.h"
-
-#include "ControlDocument.h"
-#include "QDocument.h"
-#include "QDocumentDialog.h"
+#include "controllers/ControlDocument.h"
 
 #include "bufferparams.h"
+#include "debug.h"
 #include "language.h"
 #include "helper_funcs.h" // getSecond()
 #include "frnt_lang.h"
+#include "gettext.h"
 #include "lyxrc.h" // defaultUnit
 #include "tex-strings.h" // tex_graphics
 #include "support/tostr.h"
 #include "lyxtextclasslist.h"
 #include "floatplacement.h"
 
+#include "QDocument.h"
+#include "QDocumentDialog.h"
+#include "Qt2BC.h"
+
+#include "qt_helpers.h"
+
 #include <qpushbutton.h>
 #include <qmultilineedit.h>
 #include <qradiobutton.h>
@@ -45,7 +48,7 @@ using std::vector;
 using std::string;
 
 
-typedef Qt2CB<ControlDocument, Qt2DB<QDocumentDialog> > base_class;
+typedef QController<ControlDocument, QView<QDocumentDialog> > base_class;
 
 
 namespace {
@@ -59,8 +62,8 @@ char const * encodings[] = { "LaTeX default", "latin1", "latin2",
 }
 
 
-QDocument::QDocument()
-       : base_class(_("LyX: Document Settings")),
+QDocument::QDocument(Dialog & parent)
+       : base_class(parent, _("LyX: Document Settings")),
                lang_(getSecond(frnt::getLanguageData(false)))
 {}
 
index cbfc832482c6fe26e5609ce89b212466205aa1fc..52fef8f633cadfd9384e3c7cdc8346dc61b91790 100644 (file)
 #ifndef QDOCUMENT_H
 #define QDOCUMENT_H
 
-
-#include "Qt2Base.h"
-#include "Qt2BC.h"
-
+#include "QDialogView.h"
 #include "BranchList.h"
-
 #include <boost/scoped_ptr.hpp>
 #include <string>
+#include <vector>
 
 
 class ControlDocument;
@@ -29,13 +26,13 @@ class LengthCombo;
 class  QLineEdit;
 
 class QDocument
-       : public Qt2CB<ControlDocument, Qt2DB<QDocumentDialog> >
+       : public QController<ControlDocument, QView<QDocumentDialog> >
 {
 public:
 
        friend class QDocumentDialog;
 
-       QDocument();
+       QDocument(Dialog &);
 
        void showPreamble();
 
index 25dcf9edadbf54f5de2b8a216de756ffaf38c9c4..17b4cb0082be6235764995dcc64a9388c1803f52 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "bufferparams.h"
 #include "debug.h"
+#include "gettext.h"
 #include "lyxrc.h"
 
 #include "controllers/ControlDocument.h"
index 6fb67f15cae5154f08e86d3aee0369157f301d74..4ac69a3d972be13b7df0f65a462ccbf730fa4aa3 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-30  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C (build): added document dialog.
+       * Dialogs2.C (showDocument): removed.
+
+       * FormDocument.[Ch]:
+       * fomrs/form_document.fd: converted to the Dialog-based scheme.
+
 2004-03-29  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * FormBibtex.C:
index 7f535e59313011b8fa67ea98497af5719183dfd1..3eb9a86c754bc8c1923e8bfcc0d2bf65157aa35a 100644 (file)
@@ -20,6 +20,7 @@
 #include "ControlBranch.h"
 #include "ControlChanges.h"
 #include "ControlCitation.h"
+#include "ControlDocument.h"
 #include "ControlErrorList.h"
 #include "ControlERT.h"
 #include "ControlExternal.h"
@@ -49,6 +50,7 @@
 #include "FormChanges.h"
 #include "FormCharacter.h"
 #include "FormCitation.h"
+#include "FormDocument.h"
 #include "FormErrorList.h"
 #include "FormERT.h"
 #include "FormExternal.h"
@@ -117,9 +119,9 @@ FormMathsBitmap * createFormBitmap(Dialog & parent, string const & title,
 
 char const * const dialognames[] = {
 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
-"citation", "error", "errorlist" , "ert", "external", "file", "findreplace",
-"float", "graphics", "include", "index", "label", "log", "mathpanel",
-"mathaccents", "matharrows", "mathoperators", "mathrelations",
+"citation", "document", "error", "errorlist" , "ert", "external", "file",
+"findreplace", "float", "graphics", "include", "index", "label", "log",
+"mathpanel", "mathaccents", "matharrows", "mathoperators", "mathrelations",
 "mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
 "mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
 "mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
@@ -193,6 +195,10 @@ Dialog * Dialogs::build(string const & name)
                dialog->setController(new ControlCitation(*dialog));
                dialog->setView(new FormCitation(*dialog));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "document") {
+               dialog->setController(new ControlDocument(*dialog));
+               dialog->setView(new FormDocument(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "errorlist") {
                dialog->setController(new ControlErrorList(*dialog));
                dialog->setView(new FormErrorList(*dialog));
index 156c4ffe2db80a25176042b84daf2268f58c79fc..1e667e8fd622fdde92a0fc116d319757caa873fd 100644 (file)
 #include "xformsBC.h"
 #include "xforms_helpers.h"
 
-#include "ControlDocument.h"
-#include "FormDocument.h"
-#include "forms/form_document.h"
-
 #include "ControlPreamble.h"
 #include "FormPreamble.h"
 #include "forms/form_preamble.h"
@@ -35,9 +31,6 @@
 #include "FormSpellchecker.h"
 #include "forms/form_spellchecker.h"
 
-typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
-DocumentDialog;
-
 typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
 PreambleDialog;
 
@@ -51,7 +44,6 @@ SpellcheckerDialog;
 struct Dialogs::Impl {
        Impl(LyXView & lv, Dialogs & d);
 
-       DocumentDialog      document;
        PreambleDialog      preamble;
        PreferencesDialog   preferences;
        SpellcheckerDialog  spellchecker;
@@ -59,8 +51,7 @@ struct Dialogs::Impl {
 
 
 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
-       : document(lv, d),
-         preamble(lv, d),
+       : preamble(lv, d),
          preferences(lv, d),
          spellchecker(lv, d)
 {}
@@ -78,12 +69,6 @@ Dialogs::~Dialogs()
 }
 
 
-void Dialogs::showDocument()
-{
-       pimpl_->document.controller().show();
-}
-
-
 void Dialogs::showPreamble()
 {
        pimpl_->preamble.controller().show();
index 07bc5bb08623ba13fcbee093c537ab63354d922d..c64a5d34e83be1d87ffa581d1d233a2ed2584959 100644 (file)
 #include <config.h>
 
 #include "FormDocument.h"
-#include "ControlDocument.h"
 #include "forms/form_document.h"
 
+#include "controllers/ControlDocument.h"
+
 #include "bmtable.h"
 #include "checkedwidgets.h"
 #include "ColorHandler.h"
@@ -76,13 +77,17 @@ enum {
        JURABIB
 };
 
+enum GuiColors {
+       GUI_COLOR_CHOICE = FL_FREE_COL15
+};
+
 } // namespace anon
 
 
-typedef FormCB<ControlDocument, FormDB<FD_document> > base_class;
+typedef FormController<ControlDocument, FormView<FD_document> > base_class;
 
-FormDocument::FormDocument()
-       : base_class(_("Document Settings"), scalableTabfolders),
+FormDocument::FormDocument(Dialog & parent)
+       : base_class(parent, _("Document Settings"), scalableTabfolders),
          ActCell(0), Confirmed(0),
          current_bullet_panel(0), current_bullet_depth(0), fbullet(0)
 {}
@@ -1307,8 +1312,7 @@ void FormDocument::bullets_update(BufferParams const & params)
             (XpmVersion==4 && XpmRevision<7)))
                return;
 
-       bool const isLinuxDoc =
-               controller().docType() == ControlDocument::LINUXDOC;
+       bool const isLinuxDoc = kernel().docType() == Kernel::LINUXDOC;
        setEnabled(fbullet, !isLinuxDoc);
 
        if (isLinuxDoc) return;
@@ -1369,7 +1373,7 @@ void FormDocument::branch_update(BufferParams const & params)
 
 void FormDocument::checkReadOnly()
 {
-       if (bc().readOnly(controller().bufferIsReadonly())) {
+       if (bc().readOnly(kernel().isBufferReadonly())) {
                postWarning(_("Document is read-only."
                              " No changes to layout permitted."));
        } else {
index 729043ac3213d348b25841b7a768abb31a712c06..c93ff2ebca309c126c13fdbee276fa412e002b67 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef FORM_DOCUMENT_H
 #define FORM_DOCUMENT_H
 
-#include "FormBase.h"
+#include "FormDialogView.h"
 #include "BranchList.h"
 #include "RadioButtonGroup.h"
 
@@ -35,22 +35,13 @@ struct FD_document_options;
 struct FD_document_bullet;
 struct FD_document_branch;
 
-namespace {
-
-enum GuiColors {
-       GUI_COLOR_CHOICE   = FL_FREE_COL15
-};
-
-
-}
-
-
 /** This class provides an XForms implementation of the FormDocument dialog.
  *  The table-layout-form here changes values for latex-tabulars
  */
-class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
+class FormDocument
+       : public FormController<ControlDocument, FormView<FD_document> > {
 public:
-       FormDocument();
+       FormDocument(Dialog &);
 private:
        /** Redraw the form (on receipt of a Signal indicating, for example,
            that the xforms colours have been re-mapped). */
index e696ee4693b361125a66b52c1c852f731c8f3a06..d09c332368f9af1c16534605dec192690719bf3c 100644 (file)
@@ -64,7 +64,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_close
-callback: C_FormBaseCancelCB
+callback: C_FormDialogView_CancelCB
 argument: 0
 
 --------------------
@@ -82,7 +82,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_apply
-callback: C_FormBaseApplyCB
+callback: C_FormDialogView_ApplyCB
 argument: 0
 
 --------------------
@@ -100,7 +100,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_ok
-callback: C_FormBaseOKCB
+callback: C_FormDialogView_OKCB
 argument: 0
 
 --------------------
@@ -136,7 +136,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_restore
-callback: C_FormBaseRestoreCB
+callback: C_FormDialogView_RestoreCB
 argument: 0
 
 --------------------
@@ -154,7 +154,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_save_defaults
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -172,7 +172,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_reset_defaults
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 =============== FORM ===============
@@ -232,7 +232,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_papersize
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -250,7 +250,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_custom_width
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -268,7 +268,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_custom_width_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -286,7 +286,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_custom_height
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -304,7 +304,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_custom_height_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -358,7 +358,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_portrait
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -376,7 +376,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_landscape
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -430,7 +430,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_use_geometry
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -448,7 +448,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_paperpackage
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -466,7 +466,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_top_margin
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -484,7 +484,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_top_margin_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -502,7 +502,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_bottom_margin
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -520,7 +520,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_bottom_margin_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -538,7 +538,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_inner_margin
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -556,7 +556,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_inner_margin_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -574,7 +574,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_outer_margin
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -592,7 +592,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_outer_margin_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -610,7 +610,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_head_height
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -628,7 +628,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_head_height_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -646,7 +646,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_head_sep
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -664,7 +664,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_head_sep_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -682,7 +682,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_foot_skip
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -700,7 +700,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_foot_skip_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 =============== FORM ===============
@@ -796,7 +796,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_fonts
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -814,7 +814,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_fontsize
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -832,7 +832,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: combox_class
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -850,7 +850,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_pagestyle
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -868,7 +868,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_spacing
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -886,7 +886,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_extra
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -904,7 +904,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_skip
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -922,7 +922,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_skip
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -958,7 +958,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_sides_one
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -976,7 +976,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_sides_two
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1030,7 +1030,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_columns_one
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1048,7 +1048,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_columns_two
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1102,7 +1102,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_indent
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1120,7 +1120,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_skip
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
        value: 1
 
@@ -1157,7 +1157,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_spacing
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1175,7 +1175,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: choice_skip_units
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 =============== FORM ===============
@@ -1217,7 +1217,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_inputenc
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1235,7 +1235,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_quotes_language
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1253,7 +1253,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: combox_language
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 =============== FORM ===============
@@ -1295,7 +1295,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_float_placement
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1313,7 +1313,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_secnumdepth
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
   bounds: -2 5
   precision: 0
@@ -1335,7 +1335,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: counter_tocdepth
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
   bounds: -1 5
   precision: 0
@@ -1357,7 +1357,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_postscript_driver
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1375,7 +1375,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_use_natbib
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1393,7 +1393,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_citation_format
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1411,7 +1411,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_ams_math
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1447,7 +1447,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_use_jurabib
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1465,7 +1465,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_use_defcite
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1483,7 +1483,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: check_bibtopic
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 =============== FORM ===============
@@ -1543,7 +1543,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: bmtable_panel
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1561,7 +1561,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: choice_size
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1579,7 +1579,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: input_latex
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1615,7 +1615,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_depth_1
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
        value: 1
 
@@ -1634,7 +1634,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_depth_2
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1652,7 +1652,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_depth_3
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1670,7 +1670,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: radio_depth_4
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1724,7 +1724,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_panel_standard
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
        value: 1
 
@@ -1743,7 +1743,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_panel_maths
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1761,7 +1761,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_panel_ding1
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1779,7 +1779,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_panel_ding2
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1797,7 +1797,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_panel_ding3
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1815,7 +1815,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: radio_panel_ding4
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1875,7 +1875,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: input_all_branches
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1893,7 +1893,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_add_branch
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1911,7 +1911,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_remove_branch
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1929,7 +1929,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: browser_all_branches
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1947,7 +1947,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: browser_selection
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1965,7 +1965,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_select
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -1983,7 +1983,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_deselect
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 --------------------
@@ -2019,7 +2019,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_modify
-callback: C_FormBaseInputCB
+callback: C_FormDialogView_InputCB
 argument: 0
 
 ==============================
index fe575daf3cb615146901500da8e2ef63337da889..dc86b748b5b76f366e71317d69bff453f1577991 100644 (file)
@@ -1024,8 +1024,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
                                if (!data.empty())
                                        owner->getDialogs().show("character", data);
                        }
-                       else if (name == "document")
-                               owner->getDialogs().showDocument();
                        else if (name == "preamble")
                                owner->getDialogs().showPreamble();
                        else if (name == "preferences")