diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-03-19 18:03:16 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-03-19 18:03:16 -0400 |
commit | 31db61588543a1ba0935ac8ecb2ecac574c0a836 (patch) | |
tree | a2e2092e086a9c7d618e2c9ae1fc7b5a659e8a7a /gtk/gtkshortcutssection.c | |
parent | 3ac4c76b18cc89a841ce09f0943539f16988fd21 (diff) | |
download | gtk+-31db61588543a1ba0935ac8ecb2ecac574c0a836.tar.gz |
Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18cc89a841ce09f0943539f16988fd21, reversing
changes made to 6ec96d2e989d029a303b8b20ec72b86f974c0e87.
Diffstat (limited to 'gtk/gtkshortcutssection.c')
-rw-r--r-- | gtk/gtkshortcutssection.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c index 337ece2539..6a95e348a1 100644 --- a/gtk/gtkshortcutssection.c +++ b/gtk/gtkshortcutssection.c @@ -30,6 +30,7 @@ #include "gtkorientable.h" #include "gtksizegroup.h" #include "gtkwidget.h" +#include "gtkbindings.h" #include "gtkprivate.h" #include "gtkmarshalers.h" #include "gtkgesturepan.h" @@ -306,6 +307,7 @@ gtk_shortcuts_section_class_init (GtkShortcutsSectionClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass); + GtkBindingSet *binding_set; object_class->finalize = gtk_shortcuts_section_finalize; object_class->get_property = gtk_shortcuts_section_get_property; @@ -386,23 +388,23 @@ gtk_shortcuts_section_class_init (GtkShortcutsSectionClass *klass) G_TYPE_BOOLEAN, 1, G_TYPE_INT); - gtk_widget_class_add_binding_signal (widget_class, - GDK_KEY_Page_Up, 0, - "change-current-page", - "(i)", -1); - gtk_widget_class_add_binding_signal (widget_class, - GDK_KEY_Page_Down, 0, - "change-current-page", - "(i)", 1); - gtk_widget_class_add_binding_signal (widget_class, - GDK_KEY_Page_Up, GDK_CONTROL_MASK, - "change-current-page", - "(i)", -1); - gtk_widget_class_add_binding_signal (widget_class, - GDK_KEY_Page_Down, GDK_CONTROL_MASK, - "change-current-page", - "(i)", 1); - + binding_set = gtk_binding_set_by_class (klass); + gtk_binding_entry_add_signal (binding_set, + GDK_KEY_Page_Up, 0, + "change-current-page", 1, + G_TYPE_INT, -1); + gtk_binding_entry_add_signal (binding_set, + GDK_KEY_Page_Down, 0, + "change-current-page", 1, + G_TYPE_INT, 1); + gtk_binding_entry_add_signal (binding_set, + GDK_KEY_Page_Up, GDK_CONTROL_MASK, + "change-current-page", 1, + G_TYPE_INT, -1); + gtk_binding_entry_add_signal (binding_set, + GDK_KEY_Page_Down, GDK_CONTROL_MASK, + "change-current-page", 1, + G_TYPE_INT, 1); gtk_widget_class_set_css_name (widget_class, I_("shortcuts-section")); } |