[nautilus/wip/antoniof/popover-workaround-for-workaround: 3/4] Revert "files-view: Set popover menu's parent to scrolled window"
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/popover-workaround-for-workaround: 3/4] Revert "files-view: Set popover menu's parent to scrolled window"
- Date: Tue, 23 Aug 2022 19:16:10 +0000 (UTC)
commit 73e77399bc0054607c8755f7fb2d2f0065bc27cf
Author: António Fernandes <antoniof gnome org>
Date: Tue Aug 23 19:49:58 2022 +0100
Revert "files-view: Set popover menu's parent to scrolled window"
This reverts commit 60f40431e218964153f223026e7cc2339d445701.
It caused popovers not to resize when new menu items are enabled.
We are going to use a different workaround.
src/nautilus-files-view.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 554c69ab3..3663834e9 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -8393,8 +8393,7 @@ nautilus_files_view_pop_up_selection_context_menu (NautilusFilesView *view,
* closed because it wouldn't activate the actions then. */
g_clear_pointer (&priv->selection_menu, gtk_widget_unparent);
priv->selection_menu = gtk_popover_menu_new_from_model (NULL);
- /* If the view is the parent it doesn't get the focus back, so make the scrolled window the parent
instead */
- gtk_widget_set_parent (priv->selection_menu, priv->scrolled_window);
+ gtk_widget_set_parent (priv->selection_menu, GTK_WIDGET (view));
gtk_popover_set_has_arrow (GTK_POPOVER (priv->selection_menu), FALSE);
gtk_widget_set_halign (priv->selection_menu, GTK_ALIGN_START);
@@ -8446,8 +8445,7 @@ nautilus_files_view_pop_up_background_context_menu (NautilusFilesView *view,
* closed because it wouldn't activate the actions then. */
g_clear_pointer (&priv->background_menu, gtk_widget_unparent);
priv->background_menu = gtk_popover_menu_new_from_model (NULL);
- /* If the view is the parent it doesn't get the focus back, so make the scrolled window the parent
instead */
- gtk_widget_set_parent (priv->background_menu, priv->scrolled_window);
+ gtk_widget_set_parent (priv->background_menu, GTK_WIDGET (view));
gtk_popover_set_has_arrow (GTK_POPOVER (priv->background_menu), FALSE);
gtk_widget_set_halign (priv->background_menu, GTK_ALIGN_START);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]