mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
* in fact we have more than one menubar at the moment, even on Mac. It
should be possible to only keep one, but then the reference to menuBar() in GuiView must go or point to the global one. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23733 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9adb5cef26
commit
cc4955b4a2
@ -1213,12 +1213,6 @@ struct Menus::Impl {
|
|||||||
*/
|
*/
|
||||||
void Menus::Impl::macxMenuBarInit(GuiView * view, QMenuBar * qmb)
|
void Menus::Impl::macxMenuBarInit(GuiView * view, QMenuBar * qmb)
|
||||||
{
|
{
|
||||||
// The Mac menubar initialisation must be done only once!
|
|
||||||
static bool done = false;
|
|
||||||
if (done)
|
|
||||||
return;
|
|
||||||
done = true;
|
|
||||||
|
|
||||||
/* Since Qt 4.2, the qt/mac menu code has special code for
|
/* Since Qt 4.2, the qt/mac menu code has special code for
|
||||||
specifying the role of a menu entry. However, it does not
|
specifying the role of a menu entry. However, it does not
|
||||||
work very well with our scheme of creating menus on demand,
|
work very well with our scheme of creating menus on demand,
|
||||||
@ -1251,11 +1245,14 @@ void Menus::Impl::macxMenuBarInit(GuiView * view, QMenuBar * qmb)
|
|||||||
};
|
};
|
||||||
const size_t num_entries = sizeof(entries) / sizeof(entries[0]);
|
const size_t num_entries = sizeof(entries) / sizeof(entries[0]);
|
||||||
|
|
||||||
// the special menu for Menus.
|
// the special menu for Menus. Fill it up only once.
|
||||||
for (size_t i = 0 ; i < num_entries ; ++i) {
|
if (specialmenu_.size() == 0) {
|
||||||
FuncRequest const func(entries[i].action,
|
for (size_t i = 0 ; i < num_entries ; ++i) {
|
||||||
from_utf8(entries[i].arg));
|
FuncRequest const func(entries[i].action,
|
||||||
specialmenu_.add(MenuItem(MenuItem::Command, entries[i].label, func));
|
from_utf8(entries[i].arg));
|
||||||
|
specialmenu_.add(MenuItem(MenuItem::Command,
|
||||||
|
entries[i].label, func));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the entries to a QMenu that will eventually be empty
|
// add the entries to a QMenu that will eventually be empty
|
||||||
|
Loading…
Reference in New Issue
Block a user