[gtk/shortcuts-rebased-again: 115/135] widget: Pass shortcuts to the action muxer
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shortcuts-rebased-again: 115/135] widget: Pass shortcuts to the action muxer
- Date: Sun, 23 Jun 2019 15:11:42 +0000 (UTC)
commit c1baeb54e7769bf8ce8b7df3606ade306b59dab2
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jun 21 15:08:40 2019 +0000
widget: Pass shortcuts to the action muxer
Send the shortcuts used by shortcut managers
and the per-class shortcuts to the action muxer
for associating accels with actions. The
action muxer has existing machinery for propagating
accels to the UI.
gtk/gtkwidget.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 05ef6c6ccf..1d67f18a2b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11734,6 +11734,19 @@ _gtk_widget_get_action_muxer (GtkWidget *widget,
if (create || priv->actions)
{
muxer = gtk_action_muxer_new (widget, priv->actions);
+
+ gtk_action_muxer_add_shortcuts (muxer, G_LIST_MODEL (GTK_WIDGET_GET_CLASS (widget)->priv->shortcuts));
+ if (GTK_IS_SHORTCUT_MANAGER (widget))
+ {
+ GListModel *shortcuts;
+
+ shortcuts = G_LIST_MODEL (g_object_get_data (G_OBJECT (widget), "gtk-shortcut-manager-bubble"));
+ gtk_action_muxer_add_shortcuts (muxer, shortcuts);
+
+ shortcuts = G_LIST_MODEL (g_object_get_data (G_OBJECT (widget), "gtk-shortcut-manager-capture"));
+ gtk_action_muxer_add_shortcuts (muxer, shortcuts);
+ }
+
g_object_set_qdata_full (G_OBJECT (widget),
quark_action_muxer,
muxer,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]