summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcutssection.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-08-12 15:42:01 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-03-18 23:00:50 -0400
commite4d628b4104c64652c79c272a59fcabe844c14c2 (patch)
treec940888358b5e4bd8829529048410af0e6bf518f /gtk/gtkshortcutssection.c
parente11d799460c5b053a59298954594e379bb10dafc (diff)
downloadgtk+-e4d628b4104c64652c79c272a59fcabe844c14c2.tar.gz
shortcutssection: Port bindings to use shortcuts
Diffstat (limited to 'gtk/gtkshortcutssection.c')
-rw-r--r--gtk/gtkshortcutssection.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/gtk/gtkshortcutssection.c b/gtk/gtkshortcutssection.c
index 6a95e348a1..337ece2539 100644
--- a/gtk/gtkshortcutssection.c
+++ b/gtk/gtkshortcutssection.c
@@ -30,7 +30,6 @@
#include "gtkorientable.h"
#include "gtksizegroup.h"
#include "gtkwidget.h"
-#include "gtkbindings.h"
#include "gtkprivate.h"
#include "gtkmarshalers.h"
#include "gtkgesturepan.h"
@@ -307,7 +306,6 @@ 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;
@@ -388,23 +386,23 @@ gtk_shortcuts_section_class_init (GtkShortcutsSectionClass *klass)
G_TYPE_BOOLEAN, 1,
G_TYPE_INT);
- 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_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);
+
gtk_widget_class_set_css_name (widget_class, I_("shortcuts-section"));
}