ContextMenu: Migrate it from GtkMenu to GtkPopover | Apply Title Case where missing@ items
commit d7b1b8f3191bda17599272d6a1b148859df87dba (HEAD -> djb_ContextMenu_Popover)
Author: Daniel Boles <dboles.src+inkscape@gmail.com>
Date: Mon Sep 18 15:52:25 2023 +0100
ContextMenu: Migrate it from GtkMenu to GtkPopover
GTK4 lacks GtkMenu et al. So...
ContextMenu:
* Move from #include <giomm.h> to only including the headers we need.
* Be a Gtk::Popover instead of a Gtk::Menu.
* Make the class final. Remove the unnecessary defaulted destructor.
* Move static member functions that don't use private members → free fns
* Add show_all_images() to defeat GTK not bothering to ever show them...
* Use 'new' menuize_popover() noted below.
menu-set-tooltips-shift-icons:
* Handle Gtk::ModelButton, not just MenuItem. Use CSS name, not widget,
since in GTK4 they made GtkModelButton private, so be ready for that.
* Make the selector for MenuItems more strict to not interfere with the
new one for ModelButtons.
ui/menuize:
* Remove dependency on Gtk::Container since for_each_descendant() does
encapsulation for that now, so we don't need to worry about it here.
* Split from make_menuized_popover() to menuize_popover() to use in CM.
canvas-events | widget/canvas:
* Add and set `pos` member in KeyEvent structs too, as we need it for CM
* Add `orig_pos` in ButtonEvent and KeyEvent so we can popup_at() there.
* Remove now-unused `original` in ButtonEvent. Update its comment in Key
ui/popup-menu:
* Add a popup_at() overload taking a Geom::Point to specify the offset.
* Take shared_ptr by value to be clear that we copy i.e. take ref to it.
dialog/objects | tool-base:
* Adapt to ContextMenu now being a Popover, not a Gtk::Menu.
* Replace `new` of Dialog w shared_ptr & existing on_hide_reset() helper
ui/util:
* Add get_first_child() and optimise for Gtk::Bin. In GTK4 this can be
done via Widget.get_first_child() and avoid alloc of children vectors.
commit 04ece4b2b8d433df5431061f890b85f966dfd1a7
Author: Daniel Boles <dboles.src+inkscape@gmail.com>
Date: Mon Sep 18 15:32:18 2023 +0100
ContextMenu: Apply Title Case where missing@ items