What ?

Replace

::populate-popup
:populate-all

with

gtk_widget_get/set_context_menu()
gtk_entry/label/text_view_get_default_context_menu()

Why ?

Part of the larger plan to take menus private

Complications

  • Entries have 2 different context menus (for links and for selection)
  • Hard the keep the action state constantly updated, do it just-in-time for now
  • Needed to invent a invent a way to convert a menu model into a touch bubble
    • touch-icon
    • only show enabled actions
    • support toggle actions
    • do we need radio actions?

Unsolved issues

  • Popping up a menu in response to GtkEntry::icon-press (see gtk-demo search example)

  • Formatting in menu items see widget-factory text view)
  • Can we make this generic? (gtk_widget_set_context_menu kinda is)
  • Should the action muxer machinery be entirely private?

Hackfests/GTK2019/Agenda/context menus (last edited 2019-01-29 15:37:17 by MatthiasClasen)