Page MenuHome

Fix: Nav_bar context menu in preferences. And merge Context Menu keymaps to one.
ClosedPublic

Authored by George Vogiatzis (Gvgeo) on Apr 24 2019, 11:14 PM.

Details

Summary
  1. Fix T63860 Add Context menu for nav_bar for all spaces.
  1. Merge header, footer, nav_bar context menu as 1 operator, named screen_context_menu

Diff Detail

Event Timeline

will renaming be a problem? can it break saved keymaps?

I wanted to add the context_menu operator in the User Interface keymap.
But context_menu operator was firing in other regions too.

This revision is now accepted and ready to land.May 5 2019, 4:24 PM

Logic for the change seems to be sharing a keymap for 3 different region types because they all happen to use a similar context menu.

Header/Footer makes since they're basically the same,
Using the same keymap for BUTTONS_OT_context_menu doesn't seem so closely related - sharing a keymap for a space type with the keymap for a region type.

Suggest to share the keymap for header footer but leave other key-maps/menu's as-is.

Also a "Context Menu" keymap is too vague, suggest "Screen Context Menu" km_screen_context_menu(...) since we have many other kinds of context menus.

George Vogiatzis (Gvgeo) planned changes to this revision.May 6 2019, 6:46 AM
George Vogiatzis (Gvgeo) edited the summary of this revision. (Show Details)
  1. Add back BUTTONS_OT_context_menu.
  2. Kept nav_bar menu in screen_context_menu. We need it to be a region based, so it can work in preferences too.
  3. Renamed every "context menu" to "screen context menu". Including functions for clarification and consistency.
This revision is now accepted and ready to land.May 6 2019, 10:40 PM

I removed the area menu from navigation bar. This is inline with the current behavior of header/footer.