[gtksourceview] vim: fix code example for GtkSourceVimIMContext
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] vim: fix code example for GtkSourceVimIMContext
- Date: Tue, 21 Jun 2022 18:37:31 +0000 (UTC)
commit ae834d82b0f37b04257c74e60317f8021fe5983b
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 21 11:37:22 2022 -0700
vim: fix code example for GtkSourceVimIMContext
gtksourceview/gtksourcevimimcontext.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcevimimcontext.c b/gtksourceview/gtksourcevimimcontext.c
index c7569bf8..087d5031 100644
--- a/gtksourceview/gtksourcevimimcontext.c
+++ b/gtksourceview/gtksourcevimimcontext.c
@@ -62,8 +62,8 @@
*
* ```c
* GtkEventController *key;
- * GtkSourceView *view;
* GtkIMContext *im_context;
+ * GtkWidget *view;
*
* view = gtk_source_view_new ();
* im_context = gtk_source_vim_im_context_new ();
@@ -71,7 +71,8 @@
*
* gtk_event_controller_key_set_im_context (GTK_EVENT_CONTROLLER_KEY (key), im_context);
* gtk_event_controller_set_propagation_phase (key, GTK_PHASE_CAPTURE);
- * gtk_widget_add_controller (GTK_WIDGET (view), key);
+ * gtk_widget_add_controller (view, key);
+ * gtk_im_context_set_client_widget (im_context, view);
*
* g_object_bind_property (im_context, "command-bar-text", command_bar_label, "label", 0);
* g_object_bind_property (im_context, "command-text", command_label, "label", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]