[gtk/wip/ebassi/shortcut: 212/267] infobar: Port bindings to use shortcuts
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/shortcut: 212/267] infobar: Port bindings to use shortcuts
- Date: Thu, 6 Feb 2020 18:21:41 +0000 (UTC)
commit b4e36fd5036c86ce49a1a63c9808b401a153f4f0
Author: Benjamin Otte <otte redhat com>
Date: Sun Aug 12 16:57:37 2018 +0200
infobar: Port bindings to use shortcuts
gtk/gtkinfobar.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index a7b902cf17..ace4ec4d6d 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -39,7 +39,6 @@
#include "gtklabel.h"
#include "gtkbutton.h"
#include "gtkenums.h"
-#include "gtkbindings.h"
#include "gtkdialog.h"
#include "gtkrevealer.h"
#include "gtkintl.h"
@@ -365,14 +364,9 @@ gtk_info_bar_dispose (GObject *object)
static void
gtk_info_bar_class_init (GtkInfoBarClass *klass)
{
- GObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
- GtkBindingSet *binding_set;
-
- object_class = G_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
object_class->get_property = gtk_info_bar_get_property;
object_class->set_property = gtk_info_bar_set_property;
@@ -455,9 +449,10 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
NULL,
G_TYPE_NONE, 0);
- binding_set = gtk_binding_set_by_class (klass);
-
- gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "close", 0);
+ gtk_widget_class_add_binding_signal (widget_class,
+ GDK_KEY_Escape, 0,
+ "close",
+ NULL);
gtk_widget_class_set_css_name (widget_class, I_("infobar"));
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]