>>>>> "Jens" == Jens Noeckel <[EMAIL PROTECTED]> writes:

Jens> One more observation regarding the menu mix-up I'm seeing on LyX
Jens> 1.4.2: While it's clearly the LyX menu that's giving me the
Jens> wrong Lfunc for each menu entry, there's also something strange
Jens> in the adjacent File menu: it has as its bottom-most entry "Quit
Jens> LyX", the _same_ as the bottom-most entry in the LyX menu. I'm
Jens> not sure about cause and effect here - but maybe it's this
Jens> additional entry in the FIle menu that messes up the LyX menu.
Jens> Anyway, even when the LyX menu malfunctions, the File menu works
Jens> fine, and in particular the "Quit LyX" item in the File menu
Jens> does indeed quit LyX.

Let's start somewhere. I have really no idea of what happen, so I
propose to use the attached patch to do a bit of instrumentation.

Could you apply it and report what is printed on the console when you
use the menus? I hope it compiles, but of course I cannot really be
sure...

JMarc

Index: src/frontends/qt2/QLPopupMenu.C
===================================================================
--- src/frontends/qt2/QLPopupMenu.C	(revision 14801)
+++ src/frontends/qt2/QLPopupMenu.C	(working copy)
@@ -18,6 +18,7 @@
 #include "QLMenubar.h"
 #include "qt_helpers.h"
 
+#include "debug.h"
 #include "MenuBackend.h"
 
 #include "frontends/lyx_gui.h"
@@ -95,7 +96,11 @@
 	lyx_gui::sync_events();
 #ifdef Q_WS_MACX
 	if (index >= indexOffset) {
+		lyxerr << "fire: special entry [" << cit->label() 
+			       << "] with index" << indexOffset + i <<std::endl;
 		MenuItem mi = owner_->backend().getMenu("LyX")[index - indexOffset];
+		lyxerr << "fire: special entry [" << mi.label() 
+		       << "] with index" << index <<std::endl;
 		owner_->view()->activated(mi.func());
 	} else
 #endif
@@ -177,8 +182,11 @@
 		Menu::const_iterator end = special.end();
 		Menu::size_type i = 0;
 		for (Menu::const_iterator cit = special.begin();
-		     cit != end ; ++cit, ++i)
+		     cit != end ; ++cit, ++i) {
+			lyxerr << "Inserting [" << cit->label() 
+			       << "] with index" << indexOffset + i <<std::endl;
 			insertItem(toqstr(cit->label()), indexOffset + i);
+		}
 	}
 #endif
 }

Reply via email to