places sidebar: Fix the popovers

We need to check-resize the popovers.
This commit is contained in:
Matthias Clasen 2020-03-21 18:28:57 -04:00
parent 84e58aa393
commit a197b202b8

View File

@ -2396,7 +2396,11 @@ show_rename_popover (GtkSidebarRow *row)
sidebar->rename_uri = g_strdup (uri); sidebar->rename_uri = g_strdup (uri);
gtk_editable_set_text (GTK_EDITABLE (sidebar->rename_entry), name); gtk_editable_set_text (GTK_EDITABLE (sidebar->rename_entry), name);
g_object_ref (sidebar->rename_popover);
gtk_widget_unparent (sidebar->rename_popover);
gtk_widget_set_parent (sidebar->rename_popover, GTK_WIDGET (row)); gtk_widget_set_parent (sidebar->rename_popover, GTK_WIDGET (row));
g_object_unref (sidebar->rename_popover);
setup_popover_shadowing (sidebar->rename_popover); setup_popover_shadowing (sidebar->rename_popover);
gtk_popover_popup (GTK_POPOVER (sidebar->rename_popover)); gtk_popover_popup (GTK_POPOVER (sidebar->rename_popover));
@ -4084,6 +4088,9 @@ gtk_places_sidebar_size_allocate (GtkWidget *widget,
&(GtkAllocation) { 0, 0, width, height }, &(GtkAllocation) { 0, 0, width, height },
baseline); baseline);
if (sidebar->popover)
gtk_native_check_resize (GTK_NATIVE (sidebar->popover));
if (sidebar->rename_popover) if (sidebar->rename_popover)
gtk_native_check_resize (GTK_NATIVE (sidebar->rename_popover)); gtk_native_check_resize (GTK_NATIVE (sidebar->rename_popover));
} }