summaryrefslogtreecommitdiff
path: root/gtk/gtkmodelbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-03-23 14:46:20 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-03-25 23:14:45 -0400
commit1db5382c6d54a27af91dcf7483209bbb6f409b24 (patch)
treefc16aa38062dd5eee71f54f512a16c5a0ab890f2 /gtk/gtkmodelbutton.c
parent6e8c78714df532b6715b36cb4acb662cff508051 (diff)
downloadgtk+-1db5382c6d54a27af91dcf7483209bbb6f409b24.tar.gz
modelbutton: Remove accel poking
Stop manually poking GtkApplication for accels. GtkApplication already feeds them into the action muxer machinery, so that is where will get them.
Diffstat (limited to 'gtk/gtkmodelbutton.c')
-rw-r--r--gtk/gtkmodelbutton.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 49b69b28e8..54b1bf34b8 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -980,48 +980,6 @@ gtk_model_button_finalize (GObject *object)
G_OBJECT_CLASS (gtk_model_button_parent_class)->finalize (object);
}
-static void
-gtk_model_button_root (GtkWidget *widget)
-{
- GtkModelButton *self = GTK_MODEL_BUTTON (widget);
- GtkRoot *root;
- GtkApplication *app;
- const char *action_name;
- GVariant *action_target;
-
- GTK_WIDGET_CLASS (gtk_model_button_parent_class)->root (widget);
-
- if (!self->accel)
- return;
-
- root = gtk_widget_get_root (widget);
-
- if (!GTK_IS_WINDOW (root))
- return;
-
- app = gtk_window_get_application (GTK_WINDOW (root));
-
- if (!app)
- return;
-
- action_name = gtk_actionable_get_action_name (GTK_ACTIONABLE (widget));
- action_target = gtk_actionable_get_action_target_value (GTK_ACTIONABLE (widget));
-
- if (action_name)
- {
- char *detailed;
- char **accels;
-
- detailed = g_action_print_detailed_name (action_name, action_target);
- accels = gtk_application_get_accels_for_action (app, detailed);
-
- update_accel (self, accels[0]);
-
- g_strfreev (accels);
- g_free (detailed);
- }
-}
-
static gboolean
gtk_model_button_focus (GtkWidget *widget,
GtkDirectionType direction)
@@ -1094,7 +1052,6 @@ gtk_model_button_class_init (GtkModelButtonClass *class)
widget_class->state_flags_changed = gtk_model_button_state_flags_changed;
widget_class->direction_changed = gtk_model_button_direction_changed;
widget_class->focus = gtk_model_button_focus;
- widget_class->root = gtk_model_button_root;
widget_class->get_accessible = gtk_model_button_get_accessible;
/**