From a84cbafcecc40c05cbed34b2bfd2ab89d1de500b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 8 Nov 2004 19:14:04 +0000 Subject: [PATCH] Add G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES as alternative names for 2004-11-08 Matthias Clasen * glib/gnode.h (enum GTraverseFlags): Add G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES as alternative names for G_TRAVERSE_LEAFS and G_TRAVERSE_NON_LEAFS, which are grammatically brutal. (#138853, Morten Welinder) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ docs/reference/ChangeLog | 3 +++ docs/reference/glib/tmpl/trees-nary.sgml | 18 +++++++++++------- glib/gnode.h | 10 ++++++---- 8 files changed, 45 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2849bca2..37114b44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ Mon Nov 8 10:45:50 2004 Manish Singh 2004-11-08 Matthias Clasen + * glib/gnode.h (enum GTraverseFlags): Add G_TRAVERSE_LEAVES + and G_TRAVERSE_NON_LEAVES as alternative names for + G_TRAVERSE_LEAFS and G_TRAVERSE_NON_LEAFS, which are + grammatically brutal. (#138853, Morten Welinder) + * glib/gasyncqueue.[hc]: * glib/ghook.[hc]: * glib/gmain.[hc]: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2849bca2..37114b44 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -9,6 +9,11 @@ Mon Nov 8 10:45:50 2004 Manish Singh 2004-11-08 Matthias Clasen + * glib/gnode.h (enum GTraverseFlags): Add G_TRAVERSE_LEAVES + and G_TRAVERSE_NON_LEAVES as alternative names for + G_TRAVERSE_LEAFS and G_TRAVERSE_NON_LEAFS, which are + grammatically brutal. (#138853, Morten Welinder) + * glib/gasyncqueue.[hc]: * glib/ghook.[hc]: * glib/gmain.[hc]: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 2849bca2..37114b44 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -9,6 +9,11 @@ Mon Nov 8 10:45:50 2004 Manish Singh 2004-11-08 Matthias Clasen + * glib/gnode.h (enum GTraverseFlags): Add G_TRAVERSE_LEAVES + and G_TRAVERSE_NON_LEAVES as alternative names for + G_TRAVERSE_LEAFS and G_TRAVERSE_NON_LEAFS, which are + grammatically brutal. (#138853, Morten Welinder) + * glib/gasyncqueue.[hc]: * glib/ghook.[hc]: * glib/gmain.[hc]: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2849bca2..37114b44 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -9,6 +9,11 @@ Mon Nov 8 10:45:50 2004 Manish Singh 2004-11-08 Matthias Clasen + * glib/gnode.h (enum GTraverseFlags): Add G_TRAVERSE_LEAVES + and G_TRAVERSE_NON_LEAVES as alternative names for + G_TRAVERSE_LEAFS and G_TRAVERSE_NON_LEAFS, which are + grammatically brutal. (#138853, Morten Welinder) + * glib/gasyncqueue.[hc]: * glib/ghook.[hc]: * glib/gmain.[hc]: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2849bca2..37114b44 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -9,6 +9,11 @@ Mon Nov 8 10:45:50 2004 Manish Singh 2004-11-08 Matthias Clasen + * glib/gnode.h (enum GTraverseFlags): Add G_TRAVERSE_LEAVES + and G_TRAVERSE_NON_LEAVES as alternative names for + G_TRAVERSE_LEAFS and G_TRAVERSE_NON_LEAFS, which are + grammatically brutal. (#138853, Morten Welinder) + * glib/gasyncqueue.[hc]: * glib/ghook.[hc]: * glib/gmain.[hc]: diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 7387a890..2847e81c 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,8 @@ 2004-11-08 Matthias Clasen + * glib/tmpl/trees-nary.sgml: Document G_TRAVERSE_LEAVES and + G_TRAVERSE_NON_LEAVES + * glib/tmpl/hooks.sgml: * glib/tmpl/iochannels.sgml: Updates diff --git a/docs/reference/glib/tmpl/trees-nary.sgml b/docs/reference/glib/tmpl/trees-nary.sgml index b72abd46..77843f27 100644 --- a/docs/reference/glib/tmpl/trees-nary.sgml +++ b/docs/reference/glib/tmpl/trees-nary.sgml @@ -232,7 +232,7 @@ The traversal can be halted at any point by returning %TRUE from @func. @order: the order in which nodes are visited - %G_IN_ORDER, %G_PRE_ORDER, %G_POST_ORDER, or %G_LEVEL_ORDER. @flags: which types of children are to be visited, one of %G_TRAVERSE_ALL, -%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS. +%G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES. @max_depth: the maximum depth of the traversal. Nodes below this depth will not be visited. If max_depth is -1 all nodes in the tree are visited. If depth is 1, only the root is visited. If depth is 2, the root @@ -247,10 +247,14 @@ Specifies which nodes are visited during several of the tree functions, including g_node_traverse() and g_node_find(). -@G_TRAVERSE_LEAFS: only leaf nodes should be visited. -@G_TRAVERSE_NON_LEAFS: only non-leaf nodes should be visited. +@G_TRAVERSE_LEAVES: only leaf nodes should be visited. This name has been + introduced in 2.6, for older version use %G_TRAVERSE_LEAFS. +@G_TRAVERSE_NON_LEAVES: only non-leaf nodes should be visited. This name + has been introduced in 2.6, for older version use %G_TRAVERSE_NON_LEAFS. @G_TRAVERSE_ALL: all nodes should be visited. @G_TRAVERSE_MASK: +@G_TRAVERSE_LEAFS: identical to %G_TRAVERSE_LEAVES +@G_TRAVERSE_NON_LEAFS: identical to %G_TRAVERSE_NON_LEAVES @@ -273,7 +277,7 @@ Note that it doesn't descend beneath the child nodes. @node: a #GNode. @flags: which types of children are to be visited, one of %G_TRAVERSE_ALL, -%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS. +%G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES. @func: the function to call for each visited node. @data: user data to pass to the function. @@ -307,7 +311,7 @@ Finds a #GNode in a tree. @order: the order in which nodes are visited - %G_IN_ORDER, %G_PRE_ORDER, %G_POST_ORDER, or %G_LEVEL_ORDER. @flags: which types of children are to be searched, one of %G_TRAVERSE_ALL, -%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS. +%G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES. @data: the data to find. @Returns: the found #GNode, or %NULL if the data is not found. @@ -319,7 +323,7 @@ Finds the first child of a #GNode with the given data. @node: a #GNode. @flags: which types of children are to be searched, one of %G_TRAVERSE_ALL, -%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS. +%G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES. @data: the data to find. @Returns: the found child #GNode, or %NULL if the data is not found. @@ -454,7 +458,7 @@ Gets the number of nodes in a tree. @root: a #GNode. @flags: which types of children are to be counted, one of %G_TRAVERSE_ALL, -%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS. +%G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES. @Returns: the number of nodes in the tree. diff --git a/glib/gnode.h b/glib/gnode.h index 7cc4fb00..9da362a9 100644 --- a/glib/gnode.h +++ b/glib/gnode.h @@ -36,10 +36,12 @@ typedef struct _GNode GNode; /* Tree traverse flags */ typedef enum { - G_TRAVERSE_LEAFS = 1 << 0, - G_TRAVERSE_NON_LEAFS = 1 << 1, - G_TRAVERSE_ALL = G_TRAVERSE_LEAFS | G_TRAVERSE_NON_LEAFS, - G_TRAVERSE_MASK = 0x03 + G_TRAVERSE_LEAVES = 1 << 0, + G_TRAVERSE_NON_LEAVES = 1 << 1, + G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES, + G_TRAVERSE_MASK = 0x03, + G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES, + G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES } GTraverseFlags; /* Tree traverse orders */ -- 2.34.1