]> git.lyx.org Git - lyx.git/commitdiff
Now that fewer dialogs use the old scheme, can merge three files into one.
authorAngus Leeming <leeming@lyx.org>
Wed, 26 Mar 2003 12:41:27 +0000 (12:41 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 26 Mar 2003 12:41:27 +0000 (12:41 +0000)
Dialogs2.C will go when all dialogs are ported to the new scheme.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6584 a592a061-630c-0410-9148-cb99ea01b6c8

12 files changed:
src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/Dialogs2.C
src/frontends/qt2/Dialogs3.C [deleted file]
src/frontends/qt2/Dialogs_impl.h [deleted file]
src/frontends/qt2/Makefile.am
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs.C
src/frontends/xforms/Dialogs2.C
src/frontends/xforms/Dialogs3.C [deleted file]
src/frontends/xforms/Dialogs_impl.h [deleted file]
src/frontends/xforms/Makefile.am

index 00b14a6edffa3a675bff786e2a299ae1af5dfa9a..f68c5fb6e5ccceffb3555c9702b33a4f89df4bfe 100644 (file)
@@ -1,3 +1,14 @@
+2003-03-26  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C:
+       * Dialogs2.C:
+       * Dialogs3.C:
+       * Dialogs_impl.h:
+       move the contents of Dialogs.C and Dialogs_impl.h into Dialogs2.C.
+       move Dialog3.C to Dialogs.C.
+
+       * Makefile.am: remove Dialogs_impl.h, Dialog3.C.
+
 2003-03-26  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.C:
index 04eb5f80ad48f73a07d261962cf2cdd54d5d7e05..804083b78fab97fc3414aaede46b0864ea35ebac 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \file qt2/Dialogs.C
+ * \file qt2/Dialogs3.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
 
 #include <config.h>
 
-#include "Dialogs_impl.h"
+#include "Dialogs.h"
+#include "Dialog.h"
+
+#include "ControlAboutlyx.h"
+#include "ControlBibtex.h"
+#include "ControlChanges.h"
+#include "ControlCharacter.h"
+#include "ControlCitation.h"
+#include "ControlError.h"
+#include "ControlERT.h"
+#include "ControlExternal.h"
+#include "ControlFloat.h"
+#include "ControlGraphics.h"
+#include "ControlInclude.h"
+#include "ControlLog.h"
+#include "ControlMinipage.h"
+#include "ControlParagraph.h"
+#include "ControlRef.h"
+#include "ControlShowFile.h"
+#include "ControlTabular.h"
+#include "ControlTabularCreate.h"
+#include "ControlToc.h"
+#include "ControlVCLog.h"
+#include "ControlWrap.h"
+
+#include "QAbout.h"
+#include "QBibitem.h"
+#include "QBibtex.h"
+#include "QChanges.h"
+#include "QCharacter.h"
+#include "QCitation.h"
+#include "QError.h"
+#include "QERT.h"
+#include "QExternal.h"
+#include "QFloat.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.
+#undef signals
+#include "QGraphics.h"
+#include "QInclude.h"
+#include "QIndex.h"
+#include "QLog.h"
+#include "QMinipage.h"
+#include "QParagraph.h"
+#include "QRef.h"
+#include "QShowFile.h"
+#include "QTabular.h"
+#include "QTabularCreate.h"
+#include "QToc.h"
+#include "QURL.h"
+#include "QVCLog.h"
+#include "QWrap.h"
+
+#ifdef HAVE_LIBAIKSAURUS
+#include "ControlThesaurus.h"
+#include "QThesaurus.h"
+#endif
+
+#include "Qt2BC.h"
 #include "ButtonController.h"
+#include "qt_helpers.h"
+
+
+namespace {
+
+char const * const dialognames[] = { "about", "bibitem", "bibtex", "changes",
+"character", "citation", "error", "ert", "external", "file", "float",
+"graphics", "include", "index", "label", "log", "minipage", "paragraph",
+"ref", "tabular", "tabularcreate",
+
+#ifdef HAVE_LIBAIKSAURUS
+"thesaurus",
+#endif
+
+"toc", "url", "vclog", "wrap" };
+
+char const * const * const end_dialognames =
+       dialognames + (sizeof(dialognames) / sizeof(char *));
 
+struct cmpCStr {
+       cmpCStr(char const * name) : name_(name) {}
+       bool operator()(char const * other) {
+               return strcmp(other, name_) == 0;
+       }
+private:
+       char const * name_;
+};
 
-void Dialogs::init_pimpl()
+
+} // namespace anon
+
+
+bool Dialogs::isValidName(string const & name) const
 {
-       pimpl_ = new Impl(lyxview_, *this);
+       return std::find_if(dialognames, end_dialognames,
+                           cmpCStr(name.c_str())) != end_dialognames;
 }
 
 
-Dialogs::~Dialogs()
+Dialog * Dialogs::build(string const & name)
 {
-       delete pimpl_;
+       if (!isValidName(name))
+               return 0;
+
+       Dialog * dialog = new Dialog(lyxview_, name);
+       dialog->bc().view(new Qt2BC(dialog->bc()));
+
+       if (name == "about") {
+               dialog->setController(new ControlAboutlyx(*dialog));
+               dialog->setView(new QAbout(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "bibitem") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new QBibitem(*dialog));
+               dialog->bc().bp(new OkCancelReadOnlyPolicy);
+       } else if (name == "bibtex") {
+               dialog->setController(new ControlBibtex(*dialog));
+               dialog->setView(new QBibtex(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "changes") {
+               dialog->setController(new ControlChanges(*dialog));
+               dialog->setView(new QChanges(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "character") {
+               dialog->setController(new ControlCharacter(*dialog));
+               dialog->setView(new QCharacter(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "citation") {
+               dialog->setController(new ControlCitation(*dialog));
+               dialog->setView(new QCitation(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "error") {
+               dialog->setController(new ControlError(*dialog));
+               dialog->setView(new QError(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "ert") {
+               dialog->setController(new ControlERT(*dialog));
+               dialog->setView(new QERT(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "external") {
+               dialog->setController(new ControlExternal(*dialog));
+               dialog->setView(new QExternal(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "file") {
+               dialog->setController(new ControlShowFile(*dialog));
+               dialog->setView(new QShowFile(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "float") {
+               dialog->setController(new ControlFloat(*dialog));
+               dialog->setView(new QFloat(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "graphics") {
+               dialog->setController(new ControlGraphics(*dialog));
+               dialog->setView(new QGraphics(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "include") {
+               dialog->setController(new ControlInclude(*dialog));
+               dialog->setView(new QInclude(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "index") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new QIndex(*dialog,
+                                          qt_("LyX: Insert Index Entry"),
+                                          qt_("&Keyword")));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "label") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new QIndex(*dialog,
+                                          qt_("LyX: Insert Label"),
+                                          qt_("&Label")));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "log") {
+               dialog->setController(new ControlLog(*dialog));
+               dialog->setView(new QLog(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "minipage") {
+               dialog->setController(new ControlMinipage(*dialog));
+               dialog->setView(new QMinipage(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "paragraph") {
+               dialog->setController(new ControlParagraph(*dialog));
+               dialog->setView(new QParagraph(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "ref") {
+               dialog->setController(new ControlRef(*dialog));
+               dialog->setView(new QRef(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "tabular") {
+               dialog->setController(new ControlTabular(*dialog));
+               dialog->setView(new QTabular(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "tabularcreate") {
+               dialog->setController(new ControlTabularCreate(*dialog));
+               dialog->setView(new QTabularCreate(*dialog));
+               dialog->bc().bp(new IgnorantPolicy);
+#ifdef HAVE_LIBAIKSAURUS
+       } else if (name == "thesaurus") {
+               dialog->setController(new ControlThesaurus(*dialog));
+               dialog->setView(new QThesaurus(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+#endif
+       } else if (name == "toc") {
+               dialog->setController(new ControlToc(*dialog));
+               dialog->setView(new QToc(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "url") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new QURL(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "vclog") {
+               dialog->setController(new ControlVCLog(*dialog));
+               dialog->setView(new QVCLog(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "wrap") {
+               dialog->setController(new ControlWrap(*dialog));
+               dialog->setView(new QWrap(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       }
+
+       return dialog;
 }
 
 
-Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
-       : document(lv, d),
-         prefs(lv, d),
-         print(lv, d),
-         search(lv, d),
-         sendto(lv, d),
-         spellchecker(lv, d),
-         texinfo(lv, d)
+void Dialogs::toggleTooltips()
 {}
+
+
+/// Are the tooltips on or off?
+bool Dialogs::tooltipsEnabled()
+{
+       return false;
+}
index e658b97735ad5bf188d6430e64515f5076823c80..1f7475da805c8eb8e31651ff18b4d612ebdac5a3 100644 (file)
 
 #include <config.h>
 
-#include "Dialogs_impl.h"
+#include "Dialogs.h"
+#include "controllers/GUI.h"
+#include "ButtonController.h"
+
+#include "ControlDocument.h"
+#include "ControlForks.h"
+#include "ControlPrefs.h"
+#include "ControlPrint.h"
+#include "ControlSearch.h"
+#include "ControlSendto.h"
+#include "ControlSpellchecker.h"
+#include "ControlTexinfo.h"
+
+#include "QCharacter.h"
+#include "QCharacterDialog.h"
+#include "QDocument.h"
+#include "QDocumentDialog.h"
+//#include "QForks.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.
+#undef signals
+#include "QPrefs.h"
+#include "QPrefsDialog.h"
+#include "QPrint.h"
+#include "QLPrintDialog.h"
+#include "QSearch.h"
+#include "QSearchDialog.h"
+#include "QSendto.h"
+#include "QSendtoDialog.h"
+#include "QSpellchecker.h"
+#include "QSpellcheckerDialog.h"
+#include "QTexinfo.h"
+#include "QTexinfoDialog.h"
+
+#include "Qt2BC.h"
+
+
+
+typedef GUI<ControlDocument, QDocument, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
+DocumentDialog;
+
+typedef GUI<ControlPrefs, QPrefs, OkApplyCancelPolicy, Qt2BC>
+PrefsDialog;
+
+typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
+PrintDialog;
+
+typedef GUI<ControlSearch, QSearch, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
+SearchDialog;
+
+typedef GUI<ControlSendto, QSendto, OkApplyCancelPolicy, Qt2BC>
+SendtoDialog;
+
+typedef GUI<ControlSpellchecker, QSpellchecker, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
+SpellcheckerDialog;
+
+typedef GUI<ControlTexinfo, QTexinfo, OkCancelPolicy, Qt2BC>
+TexinfoDialog;
+
+struct Dialogs::Impl {
+       Impl(LyXView & lv, Dialogs & d);
+
+       DocumentDialog      document;
+       PrefsDialog         prefs;
+       PrintDialog         print;
+       SearchDialog        search;
+       SendtoDialog        sendto;
+       SpellcheckerDialog  spellchecker;
+       TexinfoDialog       texinfo;
+};
+
+
+Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
+       : document(lv, d),
+         prefs(lv, d),
+         print(lv, d),
+         search(lv, d),
+         sendto(lv, d),
+         spellchecker(lv, d),
+         texinfo(lv, d)
+{}
+
+
+void Dialogs::init_pimpl()
+{
+       pimpl_ = new Impl(lyxview_, *this);
+}
+
+
+Dialogs::~Dialogs()
+{
+       delete pimpl_;
+}
 
 
 void Dialogs::showDocument()
diff --git a/src/frontends/qt2/Dialogs3.C b/src/frontends/qt2/Dialogs3.C
deleted file mode 100644 (file)
index 804083b..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
- * \file qt2/Dialogs3.C
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS
- */
-
-#include <config.h>
-
-#include "Dialogs.h"
-#include "Dialog.h"
-
-#include "ControlAboutlyx.h"
-#include "ControlBibtex.h"
-#include "ControlChanges.h"
-#include "ControlCharacter.h"
-#include "ControlCitation.h"
-#include "ControlError.h"
-#include "ControlERT.h"
-#include "ControlExternal.h"
-#include "ControlFloat.h"
-#include "ControlGraphics.h"
-#include "ControlInclude.h"
-#include "ControlLog.h"
-#include "ControlMinipage.h"
-#include "ControlParagraph.h"
-#include "ControlRef.h"
-#include "ControlShowFile.h"
-#include "ControlTabular.h"
-#include "ControlTabularCreate.h"
-#include "ControlToc.h"
-#include "ControlVCLog.h"
-#include "ControlWrap.h"
-
-#include "QAbout.h"
-#include "QBibitem.h"
-#include "QBibtex.h"
-#include "QChanges.h"
-#include "QCharacter.h"
-#include "QCitation.h"
-#include "QError.h"
-#include "QERT.h"
-#include "QExternal.h"
-#include "QFloat.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.
-#undef signals
-#include "QGraphics.h"
-#include "QInclude.h"
-#include "QIndex.h"
-#include "QLog.h"
-#include "QMinipage.h"
-#include "QParagraph.h"
-#include "QRef.h"
-#include "QShowFile.h"
-#include "QTabular.h"
-#include "QTabularCreate.h"
-#include "QToc.h"
-#include "QURL.h"
-#include "QVCLog.h"
-#include "QWrap.h"
-
-#ifdef HAVE_LIBAIKSAURUS
-#include "ControlThesaurus.h"
-#include "QThesaurus.h"
-#endif
-
-#include "Qt2BC.h"
-#include "ButtonController.h"
-#include "qt_helpers.h"
-
-
-namespace {
-
-char const * const dialognames[] = { "about", "bibitem", "bibtex", "changes",
-"character", "citation", "error", "ert", "external", "file", "float",
-"graphics", "include", "index", "label", "log", "minipage", "paragraph",
-"ref", "tabular", "tabularcreate",
-
-#ifdef HAVE_LIBAIKSAURUS
-"thesaurus",
-#endif
-
-"toc", "url", "vclog", "wrap" };
-
-char const * const * const end_dialognames =
-       dialognames + (sizeof(dialognames) / sizeof(char *));
-
-struct cmpCStr {
-       cmpCStr(char const * name) : name_(name) {}
-       bool operator()(char const * other) {
-               return strcmp(other, name_) == 0;
-       }
-private:
-       char const * name_;
-};
-
-
-} // namespace anon
-
-
-bool Dialogs::isValidName(string const & name) const
-{
-       return std::find_if(dialognames, end_dialognames,
-                           cmpCStr(name.c_str())) != end_dialognames;
-}
-
-
-Dialog * Dialogs::build(string const & name)
-{
-       if (!isValidName(name))
-               return 0;
-
-       Dialog * dialog = new Dialog(lyxview_, name);
-       dialog->bc().view(new Qt2BC(dialog->bc()));
-
-       if (name == "about") {
-               dialog->setController(new ControlAboutlyx(*dialog));
-               dialog->setView(new QAbout(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "bibitem") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new QBibitem(*dialog));
-               dialog->bc().bp(new OkCancelReadOnlyPolicy);
-       } else if (name == "bibtex") {
-               dialog->setController(new ControlBibtex(*dialog));
-               dialog->setView(new QBibtex(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "changes") {
-               dialog->setController(new ControlChanges(*dialog));
-               dialog->setView(new QChanges(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "character") {
-               dialog->setController(new ControlCharacter(*dialog));
-               dialog->setView(new QCharacter(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "citation") {
-               dialog->setController(new ControlCitation(*dialog));
-               dialog->setView(new QCitation(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "error") {
-               dialog->setController(new ControlError(*dialog));
-               dialog->setView(new QError(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "ert") {
-               dialog->setController(new ControlERT(*dialog));
-               dialog->setView(new QERT(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "external") {
-               dialog->setController(new ControlExternal(*dialog));
-               dialog->setView(new QExternal(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "file") {
-               dialog->setController(new ControlShowFile(*dialog));
-               dialog->setView(new QShowFile(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "float") {
-               dialog->setController(new ControlFloat(*dialog));
-               dialog->setView(new QFloat(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "graphics") {
-               dialog->setController(new ControlGraphics(*dialog));
-               dialog->setView(new QGraphics(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "include") {
-               dialog->setController(new ControlInclude(*dialog));
-               dialog->setView(new QInclude(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "index") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new QIndex(*dialog,
-                                          qt_("LyX: Insert Index Entry"),
-                                          qt_("&Keyword")));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "label") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new QIndex(*dialog,
-                                          qt_("LyX: Insert Label"),
-                                          qt_("&Label")));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "log") {
-               dialog->setController(new ControlLog(*dialog));
-               dialog->setView(new QLog(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "minipage") {
-               dialog->setController(new ControlMinipage(*dialog));
-               dialog->setView(new QMinipage(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "paragraph") {
-               dialog->setController(new ControlParagraph(*dialog));
-               dialog->setView(new QParagraph(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "ref") {
-               dialog->setController(new ControlRef(*dialog));
-               dialog->setView(new QRef(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "tabular") {
-               dialog->setController(new ControlTabular(*dialog));
-               dialog->setView(new QTabular(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "tabularcreate") {
-               dialog->setController(new ControlTabularCreate(*dialog));
-               dialog->setView(new QTabularCreate(*dialog));
-               dialog->bc().bp(new IgnorantPolicy);
-#ifdef HAVE_LIBAIKSAURUS
-       } else if (name == "thesaurus") {
-               dialog->setController(new ControlThesaurus(*dialog));
-               dialog->setView(new QThesaurus(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-#endif
-       } else if (name == "toc") {
-               dialog->setController(new ControlToc(*dialog));
-               dialog->setView(new QToc(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "url") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new QURL(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "vclog") {
-               dialog->setController(new ControlVCLog(*dialog));
-               dialog->setView(new QVCLog(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "wrap") {
-               dialog->setController(new ControlWrap(*dialog));
-               dialog->setView(new QWrap(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       }
-
-       return dialog;
-}
-
-
-void Dialogs::toggleTooltips()
-{}
-
-
-/// Are the tooltips on or off?
-bool Dialogs::tooltipsEnabled()
-{
-       return false;
-}
diff --git a/src/frontends/qt2/Dialogs_impl.h b/src/frontends/qt2/Dialogs_impl.h
deleted file mode 100644 (file)
index 2f3845f..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-// -*- C++ -*-
-/**
- * \file qt2/Dialogs_impl.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS
- */
-
-#ifndef DIALOGS_IMPL_H
-#define DIALOGS_IMP_H
-
-#include "Dialogs.h"
-#include "controllers/GUI.h"
-
-#include "ControlDocument.h"
-#include "ControlForks.h"
-#include "ControlPrefs.h"
-#include "ControlPrint.h"
-#include "ControlSearch.h"
-#include "ControlSendto.h"
-#include "ControlSpellchecker.h"
-#include "ControlTexinfo.h"
-
-#include "QCharacter.h"
-#include "QCharacterDialog.h"
-#include "QDocument.h"
-#include "QDocumentDialog.h"
-//#include "QForks.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.
-#undef signals
-#include "QPrefs.h"
-#include "QPrefsDialog.h"
-#include "QPrint.h"
-#include "QLPrintDialog.h"
-#include "QSearch.h"
-#include "QSearchDialog.h"
-#include "QSendto.h"
-#include "QSendtoDialog.h"
-#include "QSpellchecker.h"
-#include "QSpellcheckerDialog.h"
-#include "QTexinfo.h"
-#include "QTexinfoDialog.h"
-
-#include "Qt2BC.h"
-
-
-
-typedef GUI<ControlDocument, QDocument, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
-DocumentDialog;
-
-typedef GUI<ControlPrefs, QPrefs, OkApplyCancelPolicy, Qt2BC>
-PrefsDialog;
-
-typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
-PrintDialog;
-
-typedef GUI<ControlSearch, QSearch, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
-SearchDialog;
-
-typedef GUI<ControlSendto, QSendto, OkApplyCancelPolicy, Qt2BC>
-SendtoDialog;
-
-typedef GUI<ControlSpellchecker, QSpellchecker, NoRepeatedApplyReadOnlyPolicy, Qt2BC>
-SpellcheckerDialog;
-
-typedef GUI<ControlTexinfo, QTexinfo, OkCancelPolicy, Qt2BC>
-TexinfoDialog;
-
-struct Dialogs::Impl {
-       Impl(LyXView & lv, Dialogs & d);
-
-       DocumentDialog      document;
-       PrefsDialog         prefs;
-       PrintDialog         print;
-       SearchDialog        search;
-       SendtoDialog        sendto;
-       SpellcheckerDialog  spellchecker;
-       TexinfoDialog       texinfo;
-};
-
-#endif // DIALOGS_IMPL_H
index 83ab731c92396724984a4cb001cd0dc0d94f8e74..b674fc6f3a2199edc3f63ac228b10b479a80c396 100644 (file)
@@ -22,8 +22,6 @@ libqt2_la_SOURCES = \
        bulletstrings.C bulletstrings.h \
        Dialogs.C \
        Dialogs2.C \
-       Dialogs3.C \
-       Dialogs_impl.h \
        FileDialog.C \
        LyXKeySymFactory.C \
        LyXScreenFactory.C \
index 82a5b31bcf40b1699ffa04035cf676223261383a..4bb0a7fdb6aec07e68af9ed1928576da43408600 100644 (file)
@@ -1,3 +1,14 @@
+2003-03-26  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C:
+       * Dialogs2.C:
+       * Dialogs3.C:
+       * Dialogs_impl.h:
+       move the contents of Dialogs.C and Dialogs_impl.h into Dialogs2.C.
+       move Dialog3.C to Dialogs.C.
+
+       * Makefile.am: remove Dialogs_impl.h, Dialog3.C.
+
 2003-03-26  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.C:
index 8bb519e1d40926d91b11bf0fff91a8a4977b29d1..10d47c6d124e7583a554d4db71b97ed4ff5f319b 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \file xforms/Dialogs.C
+ * \file xforms/Dialogs3.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
 
 #include <config.h>
 
-#include "Dialogs_impl.h"
+#include "Dialogs.h"
+#include "Dialog.h"
+
+#include "Tooltips.h"
+
+#include "ControlAboutlyx.h"
+#include "ControlBibtex.h"
+#include "ControlChanges.h"
+#include "ControlCharacter.h"
+#include "ControlCitation.h"
+#include "ControlCommand.h"
+#include "ControlError.h"
+#include "ControlERT.h"
+#include "ControlExternal.h"
+#include "ControlFloat.h"
+#include "ControlGraphics.h"
+#include "ControlInclude.h"
+#include "ControlLog.h"
+#include "ControlMinipage.h"
+#include "ControlParagraph.h"
+#include "ControlRef.h"
+#include "ControlShowFile.h"
+#include "ControlTabular.h"
+#include "ControlTabularCreate.h"
+#include "ControlToc.h"
+#include "ControlVCLog.h"
+#include "ControlWrap.h"
+
+#include "FormAboutlyx.h"
+#include "FormBibitem.h"
+#include "FormBibtex.h"
+#include "FormChanges.h"
+#include "FormCharacter.h"
+#include "FormCitation.h"
+#include "FormError.h"
+#include "FormERT.h"
+#include "FormExternal.h"
+#include "FormFloat.h"
+#include "FormGraphics.h"
+#include "FormInclude.h"
+#include "FormLog.h"
+#include "FormMinipage.h"
+#include "FormParagraph.h"
+#include "FormRef.h"
+#include "FormTabular.h"
+#include "FormShowFile.h"
+#include "FormTabularCreate.h"
+#include "FormText.h"
+#include "FormToc.h"
+#include "FormUrl.h"
+#include "FormVCLog.h"
+#include "FormWrap.h"
+
+#ifdef HAVE_LIBAIKSAURUS
+#include "ControlThesaurus.h"
+#include "FormThesaurus.h"
+#endif
+
+#include "xformsBC.h"
 #include "ButtonController.h"
 
 
-void Dialogs::init_pimpl()
+namespace {
+
+char const * const dialognames[] = { "about", "bibitem", "bibtex", "changes",
+"character", "citation", "error", "ert", "external", "file", "float",
+"graphics", "include", "index", "label", "log", "minipage", "paragraph",
+"ref", "tabular", "tabularcreate",
+
+#ifdef HAVE_LIBAIKSAURUS
+"thesaurus",
+#endif
+
+"toc", "url", "vclog", "wrap" };
+
+char const * const * const end_dialognames =
+       dialognames + (sizeof(dialognames) / sizeof(char *));
+
+struct cmpCStr {
+       cmpCStr(char const * name) : name_(name) {}
+       bool operator()(char const * other) {
+               return strcmp(other, name_) == 0;
+       }
+private:
+       char const * name_;
+};
+
+
+} // namespace anon
+
+
+bool Dialogs::isValidName(string const & name) const
 {
-       pimpl_ = new Impl(lyxview_, *this);
+       return std::find_if(dialognames, end_dialognames,
+                           cmpCStr(name.c_str())) != end_dialognames;
 }
 
 
-Dialogs::~Dialogs()
+Dialog * Dialogs::build(string const & name)
 {
-       delete pimpl_;
+       if (!isValidName(name))
+               return 0;
+
+       Dialog * dialog = new Dialog(lyxview_, name);
+       dialog->bc().view(new xformsBC(dialog->bc()));
+
+       if (name == "about") {
+               dialog->setController(new ControlAboutlyx(*dialog));
+               dialog->setView(new FormAboutlyx(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "bibitem") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new FormBibitem(*dialog));
+               dialog->bc().bp(new OkCancelReadOnlyPolicy);
+       } else if (name == "bibtex") {
+               dialog->setController(new ControlBibtex(*dialog));
+               dialog->setView(new FormBibtex(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "character") {
+               dialog->setController(new ControlCharacter(*dialog));
+               dialog->setView(new FormCharacter(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "changes") {
+               dialog->setController(new ControlChanges(*dialog));
+               dialog->setView(new FormChanges(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "citation") {
+               dialog->setController(new ControlCitation(*dialog));
+               dialog->setView(new FormCitation(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "error") {
+               dialog->setController(new ControlError(*dialog));
+               dialog->setView(new FormError(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "ert") {
+               dialog->setController(new ControlERT(*dialog));
+               dialog->setView(new FormERT(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "external") {
+               dialog->setController(new ControlExternal(*dialog));
+               dialog->setView(new FormExternal(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "file") {
+               dialog->setController(new ControlShowFile(*dialog));
+               dialog->setView(new FormShowFile(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "float") {
+               dialog->setController(new ControlFloat(*dialog));
+               dialog->setView(new FormFloat(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "graphics") {
+               dialog->setController(new ControlGraphics(*dialog));
+               dialog->setView(new FormGraphics(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "include") {
+               dialog->setController(new ControlInclude(*dialog));
+               dialog->setView(new FormInclude(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "index") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new FormText(*dialog,
+                                            _("Index"), _("Keyword:|#K")));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "label") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new FormText(*dialog,
+                                            _("Label"), _("Label:|#L")));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "log") {
+               dialog->setController(new ControlLog(*dialog));
+               dialog->setView(new FormLog(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "minipage") {
+               dialog->setController(new ControlMinipage(*dialog));
+               dialog->setView(new FormMinipage(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "paragraph") {
+               dialog->setController(new ControlParagraph(*dialog));
+               dialog->setView(new FormParagraph(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+       } else if (name == "ref") {
+               dialog->setController(new ControlRef(*dialog));
+               dialog->setView(new FormRef(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "tabular") {
+               dialog->setController(new ControlTabular(*dialog));
+               dialog->setView(new FormTabular(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "tabularcreate") {
+               dialog->setController(new ControlTabularCreate(*dialog));
+               dialog->setView(new FormTabularCreate(*dialog));
+               dialog->bc().bp(new IgnorantPolicy);
+#ifdef HAVE_LIBAIKSAURUS
+       } else if (name == "thesaurus") {
+               dialog->setController(new ControlThesaurus(*dialog));
+               dialog->setView(new FormThesaurus(*dialog));
+               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
+#endif
+       } else if (name == "toc") {
+               dialog->setController(new ControlToc(*dialog));
+               dialog->setView(new FormToc(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "url") {
+               dialog->setController(new ControlCommand(*dialog, name));
+               dialog->setView(new FormUrl(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       } else if (name == "vclog") {
+               dialog->setController(new ControlVCLog(*dialog));
+               dialog->setView(new FormVCLog(*dialog));
+               dialog->bc().bp(new OkCancelPolicy);
+       } else if (name == "wrap") {
+               dialog->setController(new ControlWrap(*dialog));
+               dialog->setView(new FormWrap(*dialog));
+               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
+       }
+
+       return dialog;
 }
 
 
-Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
-       : document(lv, d),
-         forks(lv, d),
-         mathpanel(lv, d),
-         preamble(lv, d),
-         preferences(lv, d),
-         print(lv, d),
-         search(lv, d),
-         sendto(lv, d),
-         spellchecker(lv, d),
-         texinfo(lv, d)
-{}
+void Dialogs::toggleTooltips()
+{
+       Tooltips::toggleEnabled();
+}
+
+
+/// Are the tooltips on or off?
+bool Dialogs::tooltipsEnabled()
+{
+       return Tooltips::enabled();
+}
index 44edb1b071b72df8feba216033a77106c88ea5b5..ae61936131da069791adee639d53a2f270ded2d4 100644 (file)
 
 #include <config.h>
 
-#include "Dialogs_impl.h"
+#include "Dialogs.h"
+#include "controllers/GUI.h"
+#include "ButtonController.h"
+
+#include "Tooltips.h"
+#include "xformsBC.h"
+#include "combox.h"
+
+#include "ControlDocument.h"
+#include "FormDocument.h"
+#include "forms/form_document.h"
+
+#include "ControlForks.h"
+#include "FormForks.h"
+#include "forms/form_forks.h"
+
+#include "ControlMath.h"
+#include "FormMathsPanel.h"
+#include "forms/form_maths_panel.h"
+
+#include "ControlPreamble.h"
+#include "FormPreamble.h"
+#include "forms/form_preamble.h"
+
+#include "ControlPrefs.h"
+#include "FormPreferences.h"
+#include "forms/form_preferences.h"
+
+#include "ControlPrint.h"
+#include "FormPrint.h"
+#include "forms/form_print.h"
+
+#include "ControlSearch.h"
+#include "FormSearch.h"
+#include "forms/form_search.h"
+
+#include "ControlSendto.h"
+#include "FormSendto.h"
+#include "forms/form_sendto.h"
+
+#include "ControlSpellchecker.h"
+#include "FormSpellchecker.h"
+#include "forms/form_spellchecker.h"
+
+#include "ControlTexinfo.h"
+#include "FormTexinfo.h"
+#include "forms/form_texinfo.h"
+
+typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+DocumentDialog;
+
+typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
+ForksDialog;
+
+typedef GUI<ControlMath, FormMathsPanel, OkCancelReadOnlyPolicy, xformsBC>
+MathPanelDialog;
+
+typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+PreambleDialog;
+
+typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
+PreferencesDialog;
+
+typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
+PrintDialog;
+
+typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+SearchDialog;
+
+typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
+SendtoDialog;
+
+typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
+SpellcheckerDialog;
+
+typedef GUI<ControlTexinfo, FormTexinfo, OkCancelPolicy, xformsBC>
+TexinfoDialog;
+
+struct Dialogs::Impl {
+       Impl(LyXView & lv, Dialogs & d);
+
+       DocumentDialog      document;
+       ForksDialog         forks;
+       MathPanelDialog     mathpanel;
+       PreambleDialog      preamble;
+       PreferencesDialog   preferences;
+       PrintDialog         print;
+       SearchDialog        search;
+       SendtoDialog        sendto;
+       SpellcheckerDialog  spellchecker;
+       TexinfoDialog       texinfo;
+};
+
+
+Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
+       : document(lv, d),
+         forks(lv, d),
+         mathpanel(lv, d),
+         preamble(lv, d),
+         preferences(lv, d),
+         print(lv, d),
+         search(lv, d),
+         sendto(lv, d),
+         spellchecker(lv, d),
+         texinfo(lv, d)
+{}
+
+
+void Dialogs::init_pimpl()
+{
+       pimpl_ = new Impl(lyxview_, *this);
+}
+
+
+Dialogs::~Dialogs()
+{
+       delete pimpl_;
+}
 
 
 void Dialogs::showDocument()
diff --git a/src/frontends/xforms/Dialogs3.C b/src/frontends/xforms/Dialogs3.C
deleted file mode 100644 (file)
index 10d47c6..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- * \file xforms/Dialogs3.C
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS
- */
-
-#include <config.h>
-
-#include "Dialogs.h"
-#include "Dialog.h"
-
-#include "Tooltips.h"
-
-#include "ControlAboutlyx.h"
-#include "ControlBibtex.h"
-#include "ControlChanges.h"
-#include "ControlCharacter.h"
-#include "ControlCitation.h"
-#include "ControlCommand.h"
-#include "ControlError.h"
-#include "ControlERT.h"
-#include "ControlExternal.h"
-#include "ControlFloat.h"
-#include "ControlGraphics.h"
-#include "ControlInclude.h"
-#include "ControlLog.h"
-#include "ControlMinipage.h"
-#include "ControlParagraph.h"
-#include "ControlRef.h"
-#include "ControlShowFile.h"
-#include "ControlTabular.h"
-#include "ControlTabularCreate.h"
-#include "ControlToc.h"
-#include "ControlVCLog.h"
-#include "ControlWrap.h"
-
-#include "FormAboutlyx.h"
-#include "FormBibitem.h"
-#include "FormBibtex.h"
-#include "FormChanges.h"
-#include "FormCharacter.h"
-#include "FormCitation.h"
-#include "FormError.h"
-#include "FormERT.h"
-#include "FormExternal.h"
-#include "FormFloat.h"
-#include "FormGraphics.h"
-#include "FormInclude.h"
-#include "FormLog.h"
-#include "FormMinipage.h"
-#include "FormParagraph.h"
-#include "FormRef.h"
-#include "FormTabular.h"
-#include "FormShowFile.h"
-#include "FormTabularCreate.h"
-#include "FormText.h"
-#include "FormToc.h"
-#include "FormUrl.h"
-#include "FormVCLog.h"
-#include "FormWrap.h"
-
-#ifdef HAVE_LIBAIKSAURUS
-#include "ControlThesaurus.h"
-#include "FormThesaurus.h"
-#endif
-
-#include "xformsBC.h"
-#include "ButtonController.h"
-
-
-namespace {
-
-char const * const dialognames[] = { "about", "bibitem", "bibtex", "changes",
-"character", "citation", "error", "ert", "external", "file", "float",
-"graphics", "include", "index", "label", "log", "minipage", "paragraph",
-"ref", "tabular", "tabularcreate",
-
-#ifdef HAVE_LIBAIKSAURUS
-"thesaurus",
-#endif
-
-"toc", "url", "vclog", "wrap" };
-
-char const * const * const end_dialognames =
-       dialognames + (sizeof(dialognames) / sizeof(char *));
-
-struct cmpCStr {
-       cmpCStr(char const * name) : name_(name) {}
-       bool operator()(char const * other) {
-               return strcmp(other, name_) == 0;
-       }
-private:
-       char const * name_;
-};
-
-
-} // namespace anon
-
-
-bool Dialogs::isValidName(string const & name) const
-{
-       return std::find_if(dialognames, end_dialognames,
-                           cmpCStr(name.c_str())) != end_dialognames;
-}
-
-
-Dialog * Dialogs::build(string const & name)
-{
-       if (!isValidName(name))
-               return 0;
-
-       Dialog * dialog = new Dialog(lyxview_, name);
-       dialog->bc().view(new xformsBC(dialog->bc()));
-
-       if (name == "about") {
-               dialog->setController(new ControlAboutlyx(*dialog));
-               dialog->setView(new FormAboutlyx(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "bibitem") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new FormBibitem(*dialog));
-               dialog->bc().bp(new OkCancelReadOnlyPolicy);
-       } else if (name == "bibtex") {
-               dialog->setController(new ControlBibtex(*dialog));
-               dialog->setView(new FormBibtex(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "character") {
-               dialog->setController(new ControlCharacter(*dialog));
-               dialog->setView(new FormCharacter(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "changes") {
-               dialog->setController(new ControlChanges(*dialog));
-               dialog->setView(new FormChanges(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "citation") {
-               dialog->setController(new ControlCitation(*dialog));
-               dialog->setView(new FormCitation(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "error") {
-               dialog->setController(new ControlError(*dialog));
-               dialog->setView(new FormError(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "ert") {
-               dialog->setController(new ControlERT(*dialog));
-               dialog->setView(new FormERT(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "external") {
-               dialog->setController(new ControlExternal(*dialog));
-               dialog->setView(new FormExternal(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "file") {
-               dialog->setController(new ControlShowFile(*dialog));
-               dialog->setView(new FormShowFile(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "float") {
-               dialog->setController(new ControlFloat(*dialog));
-               dialog->setView(new FormFloat(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "graphics") {
-               dialog->setController(new ControlGraphics(*dialog));
-               dialog->setView(new FormGraphics(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "include") {
-               dialog->setController(new ControlInclude(*dialog));
-               dialog->setView(new FormInclude(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "index") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new FormText(*dialog,
-                                            _("Index"), _("Keyword:|#K")));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "label") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new FormText(*dialog,
-                                            _("Label"), _("Label:|#L")));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "log") {
-               dialog->setController(new ControlLog(*dialog));
-               dialog->setView(new FormLog(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "minipage") {
-               dialog->setController(new ControlMinipage(*dialog));
-               dialog->setView(new FormMinipage(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "paragraph") {
-               dialog->setController(new ControlParagraph(*dialog));
-               dialog->setView(new FormParagraph(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-       } else if (name == "ref") {
-               dialog->setController(new ControlRef(*dialog));
-               dialog->setView(new FormRef(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "tabular") {
-               dialog->setController(new ControlTabular(*dialog));
-               dialog->setView(new FormTabular(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "tabularcreate") {
-               dialog->setController(new ControlTabularCreate(*dialog));
-               dialog->setView(new FormTabularCreate(*dialog));
-               dialog->bc().bp(new IgnorantPolicy);
-#ifdef HAVE_LIBAIKSAURUS
-       } else if (name == "thesaurus") {
-               dialog->setController(new ControlThesaurus(*dialog));
-               dialog->setView(new FormThesaurus(*dialog));
-               dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
-#endif
-       } else if (name == "toc") {
-               dialog->setController(new ControlToc(*dialog));
-               dialog->setView(new FormToc(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "url") {
-               dialog->setController(new ControlCommand(*dialog, name));
-               dialog->setView(new FormUrl(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "vclog") {
-               dialog->setController(new ControlVCLog(*dialog));
-               dialog->setView(new FormVCLog(*dialog));
-               dialog->bc().bp(new OkCancelPolicy);
-       } else if (name == "wrap") {
-               dialog->setController(new ControlWrap(*dialog));
-               dialog->setView(new FormWrap(*dialog));
-               dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       }
-
-       return dialog;
-}
-
-
-void Dialogs::toggleTooltips()
-{
-       Tooltips::toggleEnabled();
-}
-
-
-/// Are the tooltips on or off?
-bool Dialogs::tooltipsEnabled()
-{
-       return Tooltips::enabled();
-}
diff --git a/src/frontends/xforms/Dialogs_impl.h b/src/frontends/xforms/Dialogs_impl.h
deleted file mode 100644 (file)
index aa1982b..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-// -*- C++ -*-
-/**
- * \file xforms/Dialogs_impl.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS
- */
-
-#ifndef DIALOGS_IMPL_H
-#define DIALOGS_IMP_H
-
-#include "Dialogs.h"
-#include "controllers/GUI.h"
-
-#include "Tooltips.h"
-#include "xformsBC.h"
-#include "combox.h"
-
-#include "ControlDocument.h"
-#include "FormDocument.h"
-#include "forms/form_document.h"
-
-#include "ControlForks.h"
-#include "FormForks.h"
-#include "forms/form_forks.h"
-
-#include "ControlMath.h"
-#include "FormMathsPanel.h"
-#include "forms/form_maths_panel.h"
-
-#include "ControlPreamble.h"
-#include "FormPreamble.h"
-#include "forms/form_preamble.h"
-
-#include "ControlPrefs.h"
-#include "FormPreferences.h"
-#include "forms/form_preferences.h"
-
-#include "ControlPrint.h"
-#include "FormPrint.h"
-#include "forms/form_print.h"
-
-#include "ControlSearch.h"
-#include "FormSearch.h"
-#include "forms/form_search.h"
-
-#include "ControlSendto.h"
-#include "FormSendto.h"
-#include "forms/form_sendto.h"
-
-#include "ControlSpellchecker.h"
-#include "FormSpellchecker.h"
-#include "forms/form_spellchecker.h"
-
-#include "ControlTexinfo.h"
-#include "FormTexinfo.h"
-#include "forms/form_texinfo.h"
-
-typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
-DocumentDialog;
-
-typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
-ForksDialog;
-
-typedef GUI<ControlMath, FormMathsPanel, OkCancelReadOnlyPolicy, xformsBC>
-MathPanelDialog;
-
-typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
-PreambleDialog;
-
-typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
-PreferencesDialog;
-
-typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
-PrintDialog;
-
-typedef GUI<ControlSearch, FormSearch, NoRepeatedApplyReadOnlyPolicy, xformsBC>
-SearchDialog;
-
-typedef GUI<ControlSendto, FormSendto, OkApplyCancelPolicy, xformsBC>
-SendtoDialog;
-
-typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
-SpellcheckerDialog;
-
-typedef GUI<ControlTexinfo, FormTexinfo, OkCancelPolicy, xformsBC>
-TexinfoDialog;
-
-struct Dialogs::Impl {
-       Impl(LyXView & lv, Dialogs & d);
-
-       DocumentDialog      document;
-       ForksDialog         forks;
-       MathPanelDialog     mathpanel;
-       PreambleDialog      preamble;
-       PreferencesDialog   preferences;
-       PrintDialog         print;
-       SearchDialog        search;
-       SendtoDialog        sendto;
-       SpellcheckerDialog  spellchecker;
-       TexinfoDialog       texinfo;
-};
-
-#endif // DIALOGS_IMPL_H
index 094f1e7950a85a5c76ba517b8c8746c8b3bdc42c..980495d15a6d9261dadc78492c9630ed99b10588 100644 (file)
@@ -48,8 +48,6 @@ libxforms_la_SOURCES = \
        ColorHandler.h \
        Dialogs.C \
        Dialogs2.C \
-       Dialogs3.C \
-       Dialogs_impl.h \
        DropDown.h \
        DropDown.C \
        FileDialog.C \