[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 22 07:46:12 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 18d74a391e8037ff02decb7002031080b7dee9d5
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 20 20:49:28 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 22 09:45:33 2020 +0200
make mnemonic-activate do the right thing for a MenuToggleButton
i.e. activate the toggle button part of it
Change-Id: If9fee25c3487feab11bdf81f1483b5e0b67688e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104633
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 9db6e5951917..f42b767bf843 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7730,6 +7730,12 @@ private:
g_signal_handler_disconnect(m_pMenu, nSignalId);
}
+ static gboolean signalMenuToggleButton(GtkWidget*, gboolean bGroupCycling, gpointer widget)
+ {
+ GtkInstanceMenuToggleButton* pThis = static_cast<GtkInstanceMenuToggleButton*>(widget);
+ return gtk_widget_mnemonic_activate(GTK_WIDGET(pThis->m_pToggleButton), bGroupCycling);
+ }
+
public:
GtkInstanceMenuToggleButton(GtkBuilder* pMenuToggleButtonBuilder, GtkMenuButton* pMenuButton,
GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
@@ -7783,6 +7789,8 @@ public:
gtk_menu_detach(m_pMenu);
gtk_menu_attach_to_widget(m_pMenu, GTK_WIDGET(m_pToggleButton), nullptr);
+
+ g_signal_connect(m_pContainer, "mnemonic-activate", G_CALLBACK(signalMenuToggleButton), this);
}
virtual void disable_notify_events() override
More information about the Libreoffice-commits
mailing list