I try to solve one of the last puzzle for
http://www.lyx.org/trac/ticket/10283
and
http://www.lyx.org/trac/ticket/10428
What I need is to use a standard context menu from stdcontext.inc rather
than the hard coded one as the application/toolbar context menu.
I tried to replace the toolBarPopup method in GuiView.cpp by
QMenu * toolBarPopup(GuiView * parent)
{
std::string name = "context-toolbars";
QMenu * menu = guiApp->menus().menu(toqstr(name), *parent);
return menu;
}
and adding to stdcontext.inc a
#
# Toolbars context menu
#
Menu "context-toolbars"
Toolbars
End
Unfortunately no context menu appears when I try to open the
application/toolbar context menu.
The code does not create any errors
I tested whether the Toolbars menu is available as a context menu
replacing another standard context menu by it. It works, so that is not
the problem either.
Maybe my usage of parent as the GuiView is the problem
Any suggestions very welcome!
Daniel