I forgot one file in the patch.
Georg
Index: src/MenuBackend.C
===================================================================
--- src/MenuBackend.C (Revision 15835)
+++ src/MenuBackend.C (Arbeitskopie)
@@ -35,6 +35,8 @@
#include "lyx_main.h" // for lastfiles
#include "lyxfunc.h"
#include "lyxlex.h"
+#include "paragraph.h"
+#include "pariterator.h"
#include "toc.h"
#include "ToolbarBackend.h"
@@ -704,6 +706,15 @@ void expandToc(Menu & tomenu, Buffer con
return;
}
+ // Add an entry for the master doc if this is a child doc
+ Buffer const * const master = buf->getMasterBuffer();
+ if (buf != master) {
+ ParIterator const pit = par_iterator_begin(master->inset());
+ string const arg = convert<string>(pit->id());
+ FuncRequest f(LFUN_PARAGRAPH_GOTO, arg);
+ tomenu.add(MenuItem(MenuItem::Command, _("Master Document"), f));
+ }
+
FloatList const & floatlist = buf->params().getLyXTextClass().floats();
lyx::toc::TocList const & toc_list = lyx::toc::getTocList(*buf);
lyx::toc::TocList::const_iterator cit = toc_list.begin();