From 2c9a2e94c834b9e93dc67cf1c14d738e7984a1de Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 28 Sep 2021 15:40:41 -0400 Subject: [PATCH 1/2] entry: Clarify docs Mention that max length is in characters. --- gtk/gtkentry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 9ad392ba3c..399a065d04 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2295,7 +2295,7 @@ gtk_entry_get_overwrite_mode (GtkEntry *entry) * Sets the maximum allowed length of the contents of the widget. * * If the current contents are longer than the given length, then - * they will be truncated to fit. + * they will be truncated to fit. The length is is in characters. * * This is equivalent to getting @entry's `GtkEntryBuffer` and * calling [method@Gtk.EntryBuffer.set_max_length] on it. From 83b434d6a506326f4a2948cca9396af9e94bd13d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 28 Sep 2021 15:47:06 -0400 Subject: [PATCH 2/2] docs: Mention popovers in the migration guide Things have changed around popovers, we should mention that. --- docs/reference/gtk/migrating-3to4.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md index 45b007549b..492e8628e4 100644 --- a/docs/reference/gtk/migrating-3to4.md +++ b/docs/reference/gtk/migrating-3to4.md @@ -1332,6 +1332,18 @@ pointer coordinates as inout arguments any more, but as normal in ones. See: [method@Gtk.TreeView.get_tooltip_context], [method@Gtk.IconView.get_tooltip_context] +### Adapt to GtkPopover changes + +In GTK 3, a `GtkPopover` could be attached to any widget, using the `relative-to` +property. This is no longer possible in GTK 4. The parent widget has to be aware +of its popover children, and manage their size allocation. Therefore, only widgets +with dedicated popover support can have them, such as [class@Gtk.MenuButton] or +[class@Gtk.PopoverMenuBar]. + +If you want to make a custom widget that has an attached popover, you need to call +[method@Gtk.Popover.present] in your [vfunc@Gtk.Widget.size_allocate] vfunc, in order +to update the positioning of the popover. + ### Stop using GtkFileChooserButton The `GtkFileChooserButton` widget was removed, due to its shortcomings in