diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-02-05 09:01:51 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-02-05 09:01:51 +0100 |
| commit | 2ef4a81d183ccc43fb4183c39470a97bda4c75f8 (patch) | |
| tree | 20270ac0409964c40903c63fc483569f2a0d62b0 | |
| parent | e73f9d466da578f31af7b24d5f016eaa927a5c91 (diff) | |
Minor improvement in Fl_Mac_App_Menu::custom_application_menu_items().
| -rw-r--r-- | src/Fl_MacOS_Sys_Menu_Bar.mm | 2 | ||||
| -rw-r--r-- | test/menubar.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_MacOS_Sys_Menu_Bar.mm b/src/Fl_MacOS_Sys_Menu_Bar.mm index 88200ead6..57833511e 100644 --- a/src/Fl_MacOS_Sys_Menu_Bar.mm +++ b/src/Fl_MacOS_Sys_Menu_Bar.mm @@ -507,7 +507,7 @@ void Fl_Mac_App_Menu::custom_application_menu_items(const Fl_Menu_Item *m) if ([[menu itemAtIndex:2] action] != @selector(printPanel)) { // the 'Print' item was removed [menu insertItem:[NSMenuItem separatorItem] atIndex:1]; to_index = 2; - } else to_index = 4; // after the "Print Front Window/Toggle" items + } else to_index = 5; // after the "Print Front Window/Toggle" items and the separator NSInteger count = [menu numberOfItems]; createSubMenu(menu, m, NULL, @selector(customCallback)); // add new items at end of application menu NSInteger count2 = [menu numberOfItems]; diff --git a/test/menubar.cxx b/test/menubar.cxx index 1bb28baf6..7a4f4d87a 100644 --- a/test/menubar.cxx +++ b/test/menubar.cxx @@ -281,7 +281,7 @@ int main(int argc, char **argv) { Fl_Menu_Item custom[] = { {"Preferences…", 0, test_cb, NULL, FL_MENU_DIVIDER}, {"Radio1", 0, test_cb, NULL, FL_MENU_RADIO | FL_MENU_VALUE}, - {"Radio2", 0, test_cb, NULL, FL_MENU_RADIO}, + {"Radio2", 0, test_cb, NULL, FL_MENU_RADIO | FL_MENU_DIVIDER}, {0} }; Fl_Mac_App_Menu::custom_application_menu_items(custom); |
