[gtk/wip/matthiasc/shortcut-4: 38/139] shortcutssection: Port bindings to use shortcuts
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/shortcut-4: 38/139] shortcutssection: Port bindings to use shortcuts
- Date: Thu, 26 Mar 2020 02:40:02 +0000 (UTC)
commit 3f00e42ec9981e6d8ce24ac75276a962a8916b21
Author: Benjamin Otte <otte redhat com>
Date: Sun Aug 12 15:42:01 2018 +0200
shortcutssection: Port bindings to use shortcuts
gtk/gtkshortcutssection.c | 36 +++++++++++++++++-------------------
1 file 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"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]