summaryrefslogtreecommitdiff
path: root/gtk/gtktreemodel.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/gtktreemodel.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/gtktreemodel.c')
-rw-r--r--gtk/gtktreemodel.c41
1 files changed, 27 insertions, 14 deletions
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c
index f556440950..3ee9cab003 100644
--- a/gtk/gtktreemodel.c
+++ b/gtk/gtktreemodel.c
@@ -116,13 +116,16 @@
* ## Acquiring a #GtkTreeIter-struct
*
* |[<!-- language="C" -->
- * /&ast; Three ways of getting the iter pointing to the location &ast;/
+ * /&ast; Three ways of getting the iter pointing to the
+ * location &ast;/
* GtkTreePath *path;
* GtkTreeIter iter;
* GtkTreeIter parent_iter;
*
* /&ast; get the iterator from a string &ast;/
- * gtk_tree_model_get_iter_from_string (model, &iter, "3:2:5");
+ * gtk_tree_model_get_iter_from_string (model,
+ * &iter,
+ * "3:2:5");
*
* /&ast; get the iterator from a path &ast;/
* path = gtk_tree_path_new_from_string ("3:2:5");
@@ -130,11 +133,14 @@
* gtk_tree_path_free (path);
*
* /&ast; walk the tree to find the iterator &ast;/
- * gtk_tree_model_iter_nth_child (model, &iter, NULL, 3);
+ * gtk_tree_model_iter_nth_child (model, &iter,
+ * NULL, 3);
* parent_iter = iter;
- * gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 2);
+ * gtk_tree_model_iter_nth_child (model, &iter,
+ * &parent_iter, 2);
* parent_iter = iter;
- * gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 5);
+ * gtk_tree_model_iter_nth_child (model, &iter,
+ * &parent_iter, 5);
* ]|
*
* This second example shows a quick way of iterating through a list
@@ -161,22 +167,26 @@
* gint row_count = 0;
*
* /&ast; make a new list_store &ast;/
- * list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
+ * list_store = gtk_list_store_new (N_COLUMNS,
+ * G_TYPE_STRING,
+ * G_TYPE_INT);
*
* /&ast; Fill the list store with data &ast;/
* populate_model (list_store);
*
- * /&ast; Get the first iter in the list, check it is valid and walk
- * &ast; through the list, reading each row. &ast;/
- * for (valid = gtk_tree_model_get_iter_first (list_store, &iter);
- * valid;
- * valid = gtk_tree_model_iter_next (list_store, &iter))
+ * /&ast; Get the first iter in the list, check it is
+ * valid and walk through the list, reading each row.
+ * &ast;/
+ *
+ * valid = gtk_tree_model_get_iter_first (list_store,
+ * &iter);
+ * while (valid)
* {
* gchar *str_data;
* gint int_data;
*
- * /&ast; Make sure you terminate calls to gtk_tree_model_get()
- * &ast; with a “-1” value
+ * /&ast; Make sure you terminate calls to
+ * &ast; gtk_tree_model_get() with a “-1” value
* &ast;/
* gtk_tree_model_get (list_store, &iter,
* STRING_COLUMN, &str_data,
@@ -184,9 +194,12 @@
* -1);
*
* /&ast; Do something with the data &ast;/
- * g_print ("Row %d: (%s,%d)\n", row_count, str_data, int_data);
+ * g_print ("Row %d: (%s,%d)\n",
+ * row_count, str_data, int_data);
* g_free (str_data);
*
+ * valid = gtk_tree_model_iter_next (list_store,
+ * &iter);
* row_count++;
* }
* ]|