]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialogs.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / Dialogs.C
index cf29565e140f97e47afd2890f8dff20cca36c59a..7d03a3433e18e51391dd6c6f5aea0a02c669e2c4 100644 (file)
 #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"
@@ -105,7 +101,7 @@ char const * const dialognames[] = {
 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
 "citation", "document", "errorlist", "ert", "external", "file",
 "findreplace", "float", "graphics", "include", "index", "label", "log", "view-source",
-"mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph", "preamble",
+"mathpanel", "mathdelimiter", "mathmatrix", "note", "paragraph",
 "prefs", "print", "ref", "sendto", "spellchecker","tabular", "tabularcreate",
 
 #ifdef HAVE_LIBAIKSAURUS
@@ -178,25 +174,10 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
                dialog->setController(ci);
                dialog->setView(new QCitationDialog(*dialog, ci));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
-       } else if (name == "document" || name == "preamble") {
-
-               // This nastiness will exist only as long as xforms
-               // has a separate preamble dialog.
-
-               string const other = (name == "document") ?
-                       "preamble" : "document";
-
-               std::map<string, DialogPtr>::iterator it =
-                       dialogs_.find(other);
-
-               if (it != dialogs_.end())
-                       dialog = it->second;
-               else {
-                       dialog->setController(new ControlDocument(*dialog));
-                       dialog->setView(new QDocument(*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));
@@ -232,13 +213,13 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
        } else if (name == "index") {
                dialog->setController(new ControlCommand(*dialog, name));
                dialog->setView(new QIndex(*dialog,
-                                          _("Index Entry"),
+                                          lyx::to_utf8(_("Index Entry")),
                                           qt_("&Keyword:")));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "label") {
                dialog->setController(new ControlCommand(*dialog, name));
                dialog->setView(new QIndex(*dialog,
-                                          _("Label"),
+                                          lyx::to_utf8(_("Label")),
                                           qt_("&Label:")));
                dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
        } else if (name == "log") {