Le 05/01/2014 21:35, Stephan Witt a écrit :
This looks interesting - from the Qt docs:

"If you want all windows in a Mac application to share one menu bar, you must 
create a menu bar that does not have a parent.
Create a parent-less menu bar this way:
  QMenuBar *menuBar = new QMenuBar(0);
Note: Do not call QMainWindow::menuBar() to create the shared menu bar, because that 
menu bar will have theQMainWindow as its parent. That menu bar would only be 
displayed for the parent QMainWindow."

This is the relevant code from LyX:

GuiView.cpp, lines 434 and 435:

        // Fill up the menu bar.
        guiApp->menus().fillMenuBar(menuBar(), this, true);

So, it's done exactly the wrong way.

This is indeed quite interesting, but might be for master only for now. OTOH, having Reconfigure inserted only once might be good for 2.0.7. I cannot test it myself, unfortunately. Maybe the static array could have a bool member indicating whether the said entry has already been handled and in this case one would skip it.

JMarc

Reply via email to