[gtk+/gtk-3-22] expander: Make a code snippet compile



commit 456ca1062b125e746dc1449887ca49f648650481
Author: Timm Bäder <mail baedert org>
Date:   Wed Jan 3 14:29:00 2018 +0100

    expander: Make a code snippet compile

 gtk/gtkexpander.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 37e2519..cd77178 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -43,12 +43,6 @@
  * connection as follows:
  *
  * |[<!-- language="C" -->
- * expander = gtk_expander_new_with_mnemonic ("_More Options");
- * g_signal_connect (expander, "notify::expanded",
- *                   G_CALLBACK (expander_callback), NULL);
- *
- * ...
- *
  * static void
  * expander_callback (GObject    *object,
  *                    GParamSpec *param_spec,
@@ -67,6 +61,16 @@
  *       // Hide or destroy widgets
  *     }
  * }
+ *
+ * static void
+ * create_expander (void)
+ * {
+ *   GtkWidget *expander = gtk_expander_new_with_mnemonic ("_More Options");
+ *   g_signal_connect (expander, "notify::expanded",
+ *                     G_CALLBACK (expander_callback), NULL);
+ *
+ *   // ...
+ * }
  * ]|
  *
  * # GtkExpander as GtkBuildable


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