[gtk+] searchbar: Make a code snippet compile
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] searchbar: Make a code snippet compile
- Date: Wed, 3 Jan 2018 16:09:57 +0000 (UTC)
commit 3744bbdc27fd6eac2a75bd1b4a9ba0862c8e394f
Author: Timm Bäder <mail baedert org>
Date: Wed Jan 3 14:37:01 2018 +0100
searchbar: Make a code snippet compile
gtk/gtksearchbar.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index 28aa69b..316abc3 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -195,10 +195,19 @@ gtk_search_bar_handle_event_for_entry (GtkSearchBar *bar,
* return gtk_search_bar_handle_event (bar, event);
* }
*
- * g_signal_connect (window,
- * "key-press-event",
- * G_CALLBACK (on_key_press_event),
- * search_bar);
+ * static void
+ * create_toplevel (void)
+ * {
+ * GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ * GtkWindow *search_bar = gtk_search_bar_new ();
+ *
+ * // Add more widgets to the window...
+ *
+ * g_signal_connect (window,
+ * "key-press-event",
+ * G_CALLBACK (on_key_press_event),
+ * search_bar);
+ * }
* ]|
*
* Returns: %GDK_EVENT_STOP if the key press event resulted
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]