summaryrefslogtreecommitdiff
path: root/gtk/gtktogglebutton.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <william.jon.mccann@gmail.com>2014-02-12 16:09:09 -0500
committerWilliam Jon McCann <william.jon.mccann@gmail.com>2014-02-12 18:42:50 -0500
commit37a8ee6e952fb8c837ffbabfe3a5068b08e75b13 (patch)
treed48dc51ab27f65571678687ef1d254f4caa85d32 /gtk/gtktogglebutton.c
parent74c48203f0a790ae6b6bb33cf7cf6ed2c3a4d3d5 (diff)
downloadgtk+-37a8ee6e952fb8c837ffbabfe3a5068b08e75b13.tar.gz
docs: fully break lines in examples
Try to do a better job of keeping example content from being too wide. It is often rendered as <pre> text so the only time we can wrap it is in the source. It is best to full break lines at all punctuation and to try to keep the width under 70 chars or so.
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r--gtk/gtktogglebutton.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index de12f53560..31c84be324 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -63,23 +63,33 @@
* |[<!-- language="C" -->
* void make_toggles (void) {
* GtkWidget *dialog, *toggle1, *toggle2;
+ * GtkWidget *content_area;
+ * const char *text;
*
- * dialog = gtk_dialog_new ();
- * toggle1 = gtk_toggle_button_new_with_label ("Hi, i’m a toggle button.");
+ * dialog = gtk_dialog_new (text);
+ * content_area = gtk_dialog_get_content_area ();
+ *
+ * text = "Hi, i’m a toggle button.";
+ * toggle1 = gtk_toggle_button_new_with_label (text);
*
* /&ast; Makes this toggle button invisible &ast;/
- * gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE);
+ * gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1),
+ * TRUE);
*
* g_signal_connect (toggle1, "toggled",
- * G_CALLBACK (output_state), NULL);
- * gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+ * G_CALLBACK (output_state),
+ * NULL);
+ * gtk_box_pack_start (GTK_BOX (content_area),
* toggle1, FALSE, FALSE, 2);
*
- * toggle2 = gtk_toggle_button_new_with_label ("Hi, i’m another toggle button.");
- * gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE);
+ * text = "Hi, i’m a toggle button.";
+ * toggle2 = gtk_toggle_button_new_with_label (text);
+ * gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2),
+ * FALSE);
* g_signal_connect (toggle2, "toggled",
- * G_CALLBACK (output_state), NULL);
- * gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+ * G_CALLBACK (output_state),
+ * NULL);
+ * gtk_box_pack_start (GTK_BOX (content_area),
* toggle2, FALSE, FALSE, 2);
*
* gtk_widget_show_all (dialog);