[gtk+/gtk-3-22] scrolledwindow: Fix code sample compilation
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] scrolledwindow: Fix code sample compilation
- Date: Sun, 7 Jan 2018 16:49:49 +0000 (UTC)
commit af1d5362abbbb0dd40ef25ef34ee2b02f1b67486
Author: Timm Bäder <mail baedert org>
Date: Wed Jan 3 13:51:03 2018 +0100
scrolledwindow: Fix code sample compilation
gtk/gtkscrolledwindow.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 25e5d1c..ac06f1c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -70,8 +70,13 @@
*
* If gtk_container_add() has added a #GtkViewport for you, you can remove
* both your added child widget from the #GtkViewport, and the #GtkViewport
- * from the GtkScrolledWindow, with either of these calls:
+ * from the GtkScrolledWindow, like this:
* |[<!-- language="C" -->
+ * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ * GtkWidget *child_widget = gtk_button_new ();
+ *
+ * // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
+ * // add a GtkViewport.
* gtk_container_remove (GTK_CONTAINER (scrolled_window),
* child_widget);
* // or
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]