| 903 | |
| 904 | |
| 905 | ResultType UserMenu::SetDefault(UserMenuItem *aMenuItem, bool aUpdateGuiMenuBars) |
| 906 | { |
| 907 | if (mDefault == aMenuItem) |
| 908 | return OK; |
| 909 | mDefault = aMenuItem; |
| 910 | if (!mMenu) // No further action required: the new setting will be in effect when the menu is created. |
| 911 | return OK; |
| 912 | if (aMenuItem) // A user-defined menu item is being made the default. |
| 913 | SetMenuDefaultItem(mMenu, aMenuItem->mMenuID, FALSE); // This also ensures that only one is default at a time. |
| 914 | else |
| 915 | SetMenuDefaultItem(mMenu, -1, FALSE); |
| 916 | if (aUpdateGuiMenuBars) |
| 917 | UPDATE_GUI_MENU_BARS(mMenuType, mMenu) // Testing shows that menu bars themselves can have default items, and that this is necessary. |
| 918 | return OK; |
| 919 | } |
| 920 | |
| 921 | |
| 922 |
nothing calls this directly
no outgoing calls
no test coverage detected