From: Matthias Clasen Date: Mon, 30 Dec 2019 00:52:22 +0000 (-0500) Subject: docs: Mention the demise of menus in the migration guide X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~486^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=85bf4cf895c0d2e757d6435873b1887e6621c09c;p=gtk4.git docs: Mention the demise of menus in the migration guide This needs more details, but it is a start. Also add sections about grabs and about toolbar overflow handling. --- diff --git a/docs/reference/gtk/migrating-3to4.xml b/docs/reference/gtk/migrating-3to4.xml index 3e0cc368e5..c7fa65e835 100644 --- a/docs/reference/gtk/migrating-3to4.xml +++ b/docs/reference/gtk/migrating-3to4.xml @@ -305,6 +305,18 @@ +
+ Stop using grabs + + GTK 4 no longer provides the gdk_device_grab() or gdk_seat_grab() apis. + + + If you need to dismiss a popup when the user clicks outside (a common + use for grabs), you can use the GdkSurface #GdkSurface:autohide property instead. + GtkPopover also has a #GtkPopover:autohide property. + +
+
Adapt to coordinate API changes @@ -673,7 +685,7 @@
Adapt to changes in the API of GtkEntry, GtkSearchEntry and GtkSpinButton - The GtkEditable has been made more useful, and the core functionality of + The GtkEditable interface has been made more useful, and the core functionality of GtkEntry has been broken out as a GtkText widget. GtkEntry, GtkSearchEntry, GtkSpinButton and the new GtkPasswordEntry now use a GtkText widget internally and implement GtkEditable. In particular, this means that it is no longer @@ -851,6 +863,36 @@
+
+ GtkMenu, GtkMenuBar and GtkMenuItem are gone + + These widgets were heavily relying on X11-centric concepts such as + override-redirect windows and grabs, and were hard to adjust to other + windowing systems. + + + Menus can already be replaced using GtkPopoverMenu in GTK 3. Additionally, + GTK 4 introduces GtkPopoverMenuBar to replace menubars. These new widgets + can only be constructed from menu models, so the porting effort involves + switching to menu models and actions. + + + Since menus are gone, GtkMenuButton and GtkMenuToolButton also lost their + ability to show menus, and need to be used with popovers in GTK 4. + +
+ +
+ GtkToolbar overflow handling has changed + + The handling of overflow in toolbars has been simplified. + Instead of creating a proxy menuitem and setting it with + gtk_tool_item_set_proxy_menu_item(), you simply provide + a label for the overflow menu with gtk_tool_item_set_overflow_text(). + GTK will figure out itself whether to create a check- or + radioitem as proxy. + +