Reworked bookmark menu implementation to avoid MacOS menu issue

Without this commit, bookmark menus got grayed out
on MacOS with Qt5 sometimes. Now, the implementation
of recent file menu, bookmark menu, macro menu and
the static main menu use the same framewkork which
includes a workaround for the disabled menu issue.
This commit is contained in:
Matthias Koefferlein
2018-02-10 18:41:05 +01:00
parent 1e29b29c13
commit 6a762db29b
7 changed files with 127 additions and 77 deletions
+10 -1
View File
@@ -124,5 +124,14 @@ TEST(1)
menu.delete_item ("n1.c2");
EXPECT_EQ (menu_to_string (menu), "(n2)");
}
menu.clear_menu ("n1");
EXPECT_EQ (menu_to_string (menu), "(n2)");
menu.insert_menu ("end", "n1", lay::Action ("title:n1"));
menu.insert_item ("n1.begin", "c1", lay::Action ("title:c1"));
menu.insert_item ("n1.end", "c2", lay::Action ("title:c2"));
EXPECT_EQ (menu_to_string (menu), "(n2,n1(n1.c1,n1.c2))");
menu.clear_menu ("n1");
EXPECT_EQ (menu_to_string (menu), "(n2,n1)");
}