[gtk/shortcuts-rebased-again: 115/129] 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/129] widget: Pass shortcuts to the action muxer
- Date: Sat, 22 Jun 2019 14:00:57 +0000 (UTC)
commit 02658f8b5f438ca17cb7bea192f585f7a7ad689d
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 d7db026e5f..8ce8ee02aa 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]