[gtk+] bindings: Fix code snippet



commit 1c232ed583592c0fe34b408f58ecfc41c92bd18b
Author: Timm Bäder <mail baedert org>
Date:   Wed Oct 11 13:01:27 2017 +0200

    bindings: Fix code snippet
    
    Just use a more realistic example, adapted from gtklistbox.c

 gtk/gtkbindings.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index 068744b..ac16ddf 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -1005,9 +1005,14 @@ _gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
  * ## Adding a Key Binding
  *
  * |[<!-- language="C" -->
- * gtk_binding_entry_add_signal (binding_set, keyval, modmask,
- *                               "move-cursor", 3,
- *                               G_TYPE_ENUM, step,
+ * GtkBindingSet *binding_set;
+ * GdkModifierType modmask = GDK_CONTROL_MASK;
+ * int count = 1;
+ * gtk_binding_entry_add_signal (binding_set,
+ *                               GDK_KEY_space,
+ *                               modmask,
+ *                               "move-cursor", 2,
+ *                               GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_PAGES,
  *                               G_TYPE_INT, count,
  *                               G_TYPE_BOOLEAN, FALSE);
  * ]|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]