Hi,

my final contribution for today (soccer final starts in a few seconds!!!).

Does this patch make sense?

Michael


Index: src/frontends/gtk/lyx_gui.C
===================================================================
--- src/frontends/gtk/lyx_gui.C	(Revision 14401)
+++ src/frontends/gtk/lyx_gui.C	(Arbeitskopie)
@@ -187,10 +187,6 @@
 {
 	FuncStatus flag;
 	switch (ev.action) {
-	case LFUN_DIALOG_SHOW:
-		if (ev.argument == "preamble")
-			flag.unknown(true);
-		break;
 	case LFUN_TOOLTIPS_TOGGLE:
 		flag.unknown(true);
 		break;
Index: src/frontends/qt3/lyx_gui.C
===================================================================
--- src/frontends/qt3/lyx_gui.C	(Revision 14401)
+++ src/frontends/qt3/lyx_gui.C	(Arbeitskopie)
@@ -303,10 +303,6 @@
 {
 	FuncStatus flag;
 	switch (ev.action) {
-	case LFUN_DIALOG_SHOW:
-		if (ev.argument == "preamble")
-			flag.unknown(true);
-		break;
 	case LFUN_TOOLTIPS_TOGGLE:
 		flag.unknown(true);
 		break;
Index: src/frontends/qt3/Dialogs.C
===================================================================
--- src/frontends/qt3/Dialogs.C	(Revision 14401)
+++ src/frontends/qt3/Dialogs.C	(Arbeitskopie)
@@ -105,7 +105,7 @@
 "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
@@ -177,25 +177,10 @@
 		dialog->setController(new ControlCitation(*dialog));
 		dialog->setView(new QCitation(*dialog));
 		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));
Index: src/frontends/qt4/lyx_gui.C
===================================================================
--- src/frontends/qt4/lyx_gui.C	(Revision 14401)
+++ src/frontends/qt4/lyx_gui.C	(Arbeitskopie)
@@ -275,10 +275,6 @@
 {
 	FuncStatus flag;
 	switch (ev.action) {
-	case LFUN_DIALOG_SHOW:
-		if (ev.argument == "preamble")
-			flag.unknown(true);
-		break;
 	case LFUN_TOOLTIPS_TOGGLE:
 		flag.unknown(true);
 		break;
Index: src/frontends/qt4/Dialogs.C
===================================================================
--- src/frontends/qt4/Dialogs.C	(Revision 14401)
+++ src/frontends/qt4/Dialogs.C	(Arbeitskopie)
@@ -105,7 +105,7 @@
 "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 +178,10 @@
 		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));

Reply via email to