[gtk/shortcuts-rebased-again: 2/4] 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: 2/4] widget: Pass shortcuts to the action muxer
- Date: Fri, 21 Jun 2019 15:49:22 +0000 (UTC)
commit 6fbe7af26acad2f713c4df3ab0166370cab2fac4
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 b0bc184569..51005a56b6 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]