[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 17 09:27:44 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit d0940e0cca552f65ea4e85d9895682afab230c87
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 16 15:06:05 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 17 11:27:11 2021 +0200
gtk4: get menus attached to menubuttons after load time working
run update_action_group_from_popover_model on the newly attached menu
Change-Id: If871dea4833c60efc5853de19031fc6e45544170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122198
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Jenkins
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 60b2a7450846..9f0cada7e763 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10763,11 +10763,13 @@ void GtkInstanceMenuButton::set_menu(weld::Menu* pMenu)
{
GtkInstanceMenu* pPopoverWidget = dynamic_cast<GtkInstanceMenu*>(pMenu);
m_pPopover = nullptr;
- GtkWidget* pMenuWidget = GTK_WIDGET(pPopoverWidget ? pPopoverWidget->getMenu() : nullptr);
+ m_pMenu = pPopoverWidget ? pPopoverWidget->getMenu() : nullptr;
+
#if !GTK_CHECK_VERSION(4, 0, 0)
- gtk_menu_button_set_popup(m_pMenuButton, pMenuWidget);
+ gtk_menu_button_set_popup(m_pMenuButton, GTK_WIDGET(m_pMenu));
#else
- gtk_menu_button_set_popover(m_pMenuButton, pMenuWidget);
+ gtk_menu_button_set_popover(m_pMenuButton, GTK_WIDGET(m_pMenu));
+ update_action_group_from_popover_model();
#endif
}
More information about the Libreoffice-commits
mailing list