diff options
author | 5 <jrb@redhat.com> | 2000-10-15 17:46:23 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2000-10-15 17:46:23 +0000 |
commit | e6b9f2910bf999e0aca17a573aa285e98c57f06c (patch) | |
tree | 58a62a01f0f5408621753126f18a4bab8ecff8e6 | |
parent | 3cd1330d6e97dc7a7aaa6d49f27062af28171dbc (diff) | |
download | gtk+-e6b9f2910bf999e0aca17a573aa285e98c57f06c.tar.gz |
Fix GtkTreeNode *node ->GtkTreeNode node issue.
2000-10-15 <jrb@redhat.com>
* gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h,
gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c,
gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c,
gtk/gtktreemodel.h, gtk/gtktreeselection.c,
gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node
issue.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gtk/gtkliststore.c | 35 | ||||
-rw-r--r-- | gtk/gtkliststore.h | 48 | ||||
-rw-r--r-- | gtk/gtkmodelsimple.c | 24 | ||||
-rw-r--r-- | gtk/gtkmodelsimple.h | 8 | ||||
-rw-r--r-- | gtk/gtktreedatalist.c | 1 | ||||
-rw-r--r-- | gtk/gtktreemodel.h | 6 | ||||
-rw-r--r-- | gtk/gtktreeselection.c | 10 | ||||
-rw-r--r-- | gtk/gtktreeselection.h | 10 | ||||
-rw-r--r-- | gtk/gtktreestore.c | 74 | ||||
-rw-r--r-- | gtk/gtktreestore.h | 78 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 26 | ||||
-rw-r--r-- | gtk/gtktreeview.h | 6 |
19 files changed, 229 insertions, 160 deletions
@@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 23645f766b..fdfd0448b3 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 23645f766b..fdfd0448b3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 23645f766b..fdfd0448b3 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 23645f766b..fdfd0448b3 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 23645f766b..fdfd0448b3 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 23645f766b..fdfd0448b3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2000-10-15 <jrb@redhat.com> + + * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, + gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, + gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, + gtk/gtktreemodel.h, gtk/gtktreeselection.c, + gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node + issue. + 2000-10-14 Robert Brady <robert@suse.co.uk> * configure.in: Added "fa" (Persian) to ALL_LINGUAS. diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index 5fb475570f..61fd185967 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -256,7 +256,7 @@ gtk_list_store_node_next (GtkTreeModel *tree_model, if (node == NULL || *node == NULL) return FALSE; - *node = (GtkTreeNode *) G_SLIST (*node)->next; + *node = (GtkTreeNode) G_SLIST (*node)->next; return (*node != NULL); } @@ -285,7 +285,7 @@ gtk_list_store_node_n_children (GtkTreeModel *tree_model, static GtkTreeNode gtk_list_store_node_nth_child (GtkTreeModel *tree_model, GtkTreeNode node, - gint n) + gint n) { return NULL; } @@ -298,10 +298,10 @@ gtk_list_store_node_parent (GtkTreeModel *tree_model, } /* Public accessors */ -GtkTreeNode * +GtkTreeNode gtk_list_store_node_new (void) { - GtkTreeNode *retval = (GtkTreeNode *) g_slist_alloc (); + GtkTreeNode retval = (GtkTreeNode) g_slist_alloc (); return retval; } @@ -311,7 +311,7 @@ gtk_list_store_node_new (void) */ void gtk_list_store_node_set_cell (GtkListStore *list_store, - GtkTreeNode *node, + GtkTreeNode node, gint column, GValue *value) { @@ -361,15 +361,16 @@ gtk_list_store_node_set_cell (GtkListStore *list_store, void gtk_list_store_node_remove (GtkListStore *list_store, - GtkTreeNode *node) + GtkTreeNode node) { - + /* FIXME: implement */ + g_warning ("Remember to implement this function\n"); } -GtkTreeNode * +GtkTreeNode gtk_list_store_node_insert (GtkListStore *list_store, gint position, - GtkTreeNode *node) + GtkTreeNode node) { GSList *list; @@ -396,10 +397,10 @@ gtk_list_store_node_insert (GtkListStore *list_store, } -GtkTreeNode * +GtkTreeNode gtk_list_store_node_insert_before (GtkListStore *list_store, - GtkTreeNode *sibling, - GtkTreeNode *node) + GtkTreeNode sibling, + GtkTreeNode node) { g_return_val_if_fail (list_store != NULL, node); g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), node); @@ -414,9 +415,9 @@ gtk_list_store_node_insert_before (GtkListStore *list_store, return node; } -GtkTreeNode * +GtkTreeNode gtk_list_store_node_prepend (GtkListStore *list_store, - GtkTreeNode *node) + GtkTreeNode node) { g_return_val_if_fail (list_store != NULL, node); g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), node); @@ -428,9 +429,9 @@ gtk_list_store_node_prepend (GtkListStore *list_store, return node; } -GtkTreeNode * +GtkTreeNode gtk_list_store_node_append (GtkListStore *list_store, - GtkTreeNode *node) + GtkTreeNode node) { GSList *list; @@ -448,7 +449,7 @@ gtk_list_store_node_append (GtkListStore *list_store, return node; } -GtkTreeNode * +GtkTreeNode gtk_list_store_node_get_root (GtkListStore *list_store) { g_return_val_if_fail (list_store != NULL, NULL); diff --git a/gtk/gtkliststore.h b/gtk/gtkliststore.h index da643888d7..54f944af76 100644 --- a/gtk/gtkliststore.h +++ b/gtk/gtkliststore.h @@ -40,7 +40,7 @@ struct _GtkListStore GtkTreeModel parent; /*< private >*/ - GtkTreeNode *root; + GtkTreeNode root; gint n_columns; GType *column_headers; }; @@ -52,31 +52,31 @@ struct _GtkListStoreClass GtkType gtk_list_store_get_type (void); GtkObject *gtk_list_store_new (void); -GtkObject *gtk_list_store_new_with_types (gint n_columns, +GtkObject *gtk_list_store_new_with_types (gint n_columns, ...); -void gtk_list_store_set_n_columns (GtkListStore *store, - gint n_columns); -void gtk_list_store_set_column_type (GtkListStore *store, - gint column, - GType type); +void gtk_list_store_set_n_columns (GtkListStore *store, + gint n_columns); +void gtk_list_store_set_column_type (GtkListStore *store, + gint column, + GType type); +GtkTreeNode gtk_list_store_node_new (void); +void gtk_list_store_node_set_cell (GtkListStore *store, + GtkTreeNode node, + gint column, + GValue *value); +void gtk_list_store_node_remove (GtkListStore *store, + GtkTreeNode node); +GtkTreeNode gtk_list_store_node_insert (GtkListStore *store, + gint position, + GtkTreeNode node); +GtkTreeNode gtk_list_store_node_insert_before (GtkListStore *store, + GtkTreeNode sibling, + GtkTreeNode node); +GtkTreeNode gtk_list_store_node_prepend (GtkListStore *store, + GtkTreeNode node); +GtkTreeNode gtk_list_store_node_append (GtkListStore *store, + GtkTreeNode node); -GtkTreeNode *gtk_list_store_node_new (void); -void gtk_list_store_node_set_cell (GtkListStore *store, - GtkTreeNode *node, - gint column, - GValue *value); -void gtk_list_store_node_remove (GtkListStore *store, - GtkTreeNode *node); -GtkTreeNode *gtk_list_store_node_insert (GtkListStore *store, - gint position, - GtkTreeNode *node); -GtkTreeNode *gtk_list_store_node_insert_before (GtkListStore *store, - GtkTreeNode *sibling, - GtkTreeNode *node); -GtkTreeNode *gtk_list_store_node_prepend (GtkListStore *store, - GtkTreeNode *node); -GtkTreeNode *gtk_list_store_node_append (GtkListStore *store, - GtkTreeNode *node); #ifdef __cplusplus diff --git a/gtk/gtkmodelsimple.c b/gtk/gtkmodelsimple.c index 4e6d81d885..4aac34d091 100644 --- a/gtk/gtkmodelsimple.c +++ b/gtk/gtkmodelsimple.c @@ -307,8 +307,8 @@ gtk_real_model_simple_get_path (GtkTreeModel *tree_model, static void gtk_real_model_simple_node_get_value (GtkTreeModel *tree_model, GtkTreeNode node, - gint column, - GValue *value) + gint column, + GValue *value) { gtk_signal_emit (GTK_OBJECT (tree_model), model_simple_signals[NODE_GET_VALUE], node, column, value); } @@ -360,7 +360,7 @@ gtk_real_model_simple_node_n_children (GtkTreeModel *tree_model, static GtkTreeNode gtk_real_model_simple_node_nth_child (GtkTreeModel *tree_model, GtkTreeNode node, - gint n) + gint n) { GtkTreeNode retval = NULL; @@ -383,48 +383,48 @@ gtk_real_model_simple_node_parent (GtkTreeModel *tree_model, /* Public functions */ void gtk_model_simple_node_changed (GtkModelSimple *simple, - GtkTreePath *path, - GtkTreeNode *tree_node) + GtkTreePath *path, + GtkTreeNode node) { g_return_if_fail (simple != NULL); g_return_if_fail (GTK_IS_MODEL_SIMPLE (simple)); g_return_if_fail (path != NULL); - gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_changed", path, tree_node); + gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_changed", path, node); } void gtk_model_simple_node_inserted (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node) + GtkTreeNode node) { g_return_if_fail (simple != NULL); g_return_if_fail (GTK_IS_MODEL_SIMPLE (simple)); g_return_if_fail (path != NULL); - gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_inserted", path, tree_node); + gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_inserted", path, node); } void gtk_model_simple_node_child_toggled (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node) + GtkTreeNode node) { g_return_if_fail (simple != NULL); g_return_if_fail (GTK_IS_MODEL_SIMPLE (simple)); g_return_if_fail (path != NULL); - gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_child_toggled", path, tree_node); + gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_child_toggled", path, node); } void gtk_model_simple_node_deleted (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node) + GtkTreeNode node) { g_return_if_fail (simple != NULL); g_return_if_fail (GTK_IS_MODEL_SIMPLE (simple)); g_return_if_fail (path != NULL); - gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_deleted", path, tree_node); + gtk_signal_emit_by_name (GTK_OBJECT (simple), "node_deleted", path, node); } diff --git a/gtk/gtkmodelsimple.h b/gtk/gtkmodelsimple.h index bcce4fa471..262b029047 100644 --- a/gtk/gtkmodelsimple.h +++ b/gtk/gtkmodelsimple.h @@ -52,16 +52,16 @@ GtkObject *gtk_model_simple_new (void); void gtk_model_simple_node_changed (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node); + GtkTreeNode node); void gtk_model_simple_node_inserted (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node); + GtkTreeNode node); void gtk_model_simple_node_child_toggled (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node); + GtkTreeNode node); void gtk_model_simple_node_deleted (GtkModelSimple *simple, GtkTreePath *path, - GtkTreeNode *tree_node); + GtkTreeNode node); diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index e8a1cab7ae..3ed9fd287a 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -19,6 +19,7 @@ #include "gtktreedatalist.h" #include "gobject/gvalue.h" +#include "gobject/gvaluetypes.h" /* node allocation */ diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h index e70034943a..67e7387aef 100644 --- a/gtk/gtktreemodel.h +++ b/gtk/gtktreemodel.h @@ -50,13 +50,13 @@ struct _GtkTreeModelClass /* signals */ void (* node_changed) (GtkTreeModel *tree_model, GtkTreePath *path, - GtkTreeNode *node); + GtkTreeNode node); void (* node_inserted) (GtkTreeModel *tree_model, GtkTreePath *path, - GtkTreeNode *node); + GtkTreeNode node); void (* node_child_toggled) (GtkTreeModel *tree_model, GtkTreePath *path, - GtkTreeNode *node); + GtkTreeNode node); void (* node_deleted) (GtkTreeModel *tree_model, GtkTreePath *path); diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index 22d7a56744..96ec9eb5c3 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -184,7 +184,7 @@ gtk_tree_selection_get_user_data (GtkTreeSelection *selection) return selection->user_data; } -GtkTreeNode * +GtkTreeNode gtk_tree_selection_get_selected (GtkTreeSelection *selection) { GtkTreeNode *retval; @@ -355,7 +355,7 @@ gtk_tree_selection_unselect_path (GtkTreeSelection *selection, void gtk_tree_selection_select_node (GtkTreeSelection *selection, - GtkTreeNode *tree_node) + GtkTreeNode tree_node) { GtkTreePath *path; @@ -377,7 +377,7 @@ gtk_tree_selection_select_node (GtkTreeSelection *selection, void gtk_tree_selection_unselect_node (GtkTreeSelection *selection, - GtkTreeNode *tree_node) + GtkTreeNode tree_node) { GtkTreePath *path; @@ -404,7 +404,7 @@ struct _TempTuple { static void select_all_helper (GtkRBTree *tree, GtkRBNode *node, - gpointer data) + gpointer data) { struct _TempTuple *tuple = data; @@ -493,7 +493,7 @@ gtk_tree_selection_select_all (GtkTreeSelection *selection) static void unselect_all_helper (GtkRBTree *tree, GtkRBNode *node, - gpointer data) + gpointer data) { struct _TempTuple *tuple = data; diff --git a/gtk/gtktreeselection.h b/gtk/gtktreeselection.h index 7ea4e38289..61849016b0 100644 --- a/gtk/gtktreeselection.h +++ b/gtk/gtktreeselection.h @@ -45,7 +45,7 @@ typedef gboolean (* GtkTreeSelectionFunc) (GtkTreeSelection *selection, GtkTreePath *path, gpointer data); typedef void (* GtkTreeSelectionForeachFunc) (GtkTreeModel *model, - GtkTreeNode *node, + GtkTreeNode node, gpointer data); struct _GtkTreeSelection @@ -78,7 +78,8 @@ gpointer gtk_tree_selection_get_user_data (GtkTreeSelection /* Only meaningful if GTK_TREE_SELECTION_SINGLE is set */ /* Use selected_foreach for GTK_TREE_SELECTION_MULTI */ -GtkTreeNode *gtk_tree_selection_get_selected (GtkTreeSelection *selection); +GtkTreeNode gtk_tree_selection_get_selected (GtkTreeSelection *selection); + /* FIXME: Get a more convenient get_selection function???? one returning GSList?? */ void gtk_tree_selection_selected_foreach (GtkTreeSelection *selection, GtkTreeSelectionForeachFunc func, @@ -88,9 +89,9 @@ void gtk_tree_selection_select_path (GtkTreeSelection void gtk_tree_selection_unselect_path (GtkTreeSelection *selection, GtkTreePath *path); void gtk_tree_selection_select_node (GtkTreeSelection *selection, - GtkTreeNode *tree_node); + GtkTreeNode tree_node); void gtk_tree_selection_unselect_node (GtkTreeSelection *selection, - GtkTreeNode *tree_node); + GtkTreeNode tree_node); void gtk_tree_selection_select_all (GtkTreeSelection *selection); void gtk_tree_selection_unselect_all (GtkTreeSelection *selection); void gtk_tree_selection_select_range (GtkTreeSelection *selection, @@ -103,6 +104,7 @@ GtkObject *gtk_tree_selection_new_with_tree_view (GtkTreeView void gtk_tree_selection_set_tree_view (GtkTreeSelection *selection, GtkTreeView *tree_view); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index b944e4917d..f9da17d8c4 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -198,16 +198,16 @@ gtk_tree_store_get_node (GtkTreeModel *tree_model, GtkTreePath *path) { gint i; - GtkTreeNode *node; + GtkTreeNode node; gint *indices = gtk_tree_path_get_indices (path); node = GTK_TREE_STORE (tree_model)->root; for (i = 0; i < gtk_tree_path_get_depth (path); i ++) { - node = (GtkTreeNode *) gtk_tree_store_node_nth_child (tree_model, - (GtkTreeNode *) node, - indices[i]); + node = (GtkTreeNode) gtk_tree_store_node_nth_child (tree_model, + (GtkTreeNode) node, + indices[i]); if (node == NULL) return NULL; }; @@ -301,7 +301,7 @@ gtk_tree_store_node_next (GtkTreeModel *tree_model, if (node == NULL || *node == NULL) return FALSE; - *node = (GtkTreeNode *) G_NODE (*node)->next; + *node = (GtkTreeNode) G_NODE (*node)->next; return (*node != NULL); } @@ -325,11 +325,11 @@ gtk_tree_store_node_n_children (GtkTreeModel *tree_model, { gint i = 0; - node = (GtkTreeNode *) G_NODE (node)->children; + node = (GtkTreeNode) G_NODE (node)->children; while (node != NULL) { i++; - node = (GtkTreeNode *) G_NODE (node)->next; + node = (GtkTreeNode) G_NODE (node)->next; } return i; @@ -342,7 +342,7 @@ gtk_tree_store_node_nth_child (GtkTreeModel *tree_model, { g_return_val_if_fail (node != NULL, NULL); - return (GtkTreeNode *) g_node_nth_child (G_NODE (node), n); + return (GtkTreeNode) g_node_nth_child (G_NODE (node), n); } static GtkTreeNode @@ -353,12 +353,12 @@ gtk_tree_store_node_parent (GtkTreeModel *tree_model, } /* Public accessors */ -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_new (void) { - GtkTreeNode *retval; + GtkTreeNode retval; - retval = (GtkTreeNode *) g_node_new (NULL); + retval = (GtkTreeNode) g_node_new (NULL); return retval; } @@ -368,7 +368,7 @@ gtk_tree_store_node_new (void) */ void gtk_tree_store_node_set_cell (GtkTreeStore *tree_store, - GtkTreeNode *node, + GtkTreeNode node, gint column, GValue *value) { @@ -418,7 +418,7 @@ gtk_tree_store_node_set_cell (GtkTreeStore *tree_store, void gtk_tree_store_node_remove (GtkTreeStore *model, - GtkTreeNode *node) + GtkTreeNode node) { GtkTreePath *path; GNode *parent; @@ -446,11 +446,11 @@ gtk_tree_store_node_remove (GtkTreeStore *model, gtk_tree_path_free (path); } -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_insert (GtkTreeStore *model, - GtkTreeNode *parent, + GtkTreeNode parent, gint position, - GtkTreeNode *node) + GtkTreeNode node) { GtkTreePath *path; @@ -472,11 +472,11 @@ gtk_tree_store_node_insert (GtkTreeStore *model, return node; } -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_insert_before (GtkTreeStore *model, - GtkTreeNode *parent, - GtkTreeNode *sibling, - GtkTreeNode *node) + GtkTreeNode parent, + GtkTreeNode sibling, + GtkTreeNode node) { GtkTreePath *path; @@ -488,7 +488,7 @@ gtk_tree_store_node_insert_before (GtkTreeStore *model, parent = model->root; if (parent == NULL) - parent = (GtkTreeNode *) G_NODE (sibling)->parent; + parent = (GtkTreeNode) G_NODE (sibling)->parent; g_node_insert_before (G_NODE (parent), G_NODE (sibling), G_NODE (node)); @@ -501,11 +501,11 @@ gtk_tree_store_node_insert_before (GtkTreeStore *model, return node; } -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_insert_after (GtkTreeStore *model, - GtkTreeNode *parent, - GtkTreeNode *sibling, - GtkTreeNode *node) + GtkTreeNode parent, + GtkTreeNode sibling, + GtkTreeNode node) { GtkTreePath *path; @@ -517,7 +517,7 @@ gtk_tree_store_node_insert_after (GtkTreeStore *model, parent = model->root; if (parent == NULL) - parent = (GtkTreeNode *) G_NODE (sibling)->parent; + parent = (GtkTreeNode) G_NODE (sibling)->parent; g_node_insert_after (G_NODE (parent), G_NODE (sibling), G_NODE (node)); @@ -529,10 +529,10 @@ gtk_tree_store_node_insert_after (GtkTreeStore *model, return node; } -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_prepend (GtkTreeStore *model, - GtkTreeNode *parent, - GtkTreeNode *node) + GtkTreeNode parent, + GtkTreeNode node) { g_return_val_if_fail (model != NULL, node); g_return_val_if_fail (GTK_IS_TREE_STORE (model), node); @@ -574,10 +574,10 @@ gtk_tree_store_node_prepend (GtkTreeStore *model, return node; } -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_append (GtkTreeStore *model, - GtkTreeNode *parent, - GtkTreeNode *node) + GtkTreeNode parent, + GtkTreeNode node) { g_return_val_if_fail (model != NULL, node); g_return_val_if_fail (GTK_IS_TREE_STORE (model), node); @@ -619,20 +619,20 @@ gtk_tree_store_node_append (GtkTreeStore *model, return node; } -GtkTreeNode * +GtkTreeNode gtk_tree_store_node_get_root (GtkTreeStore *model) { g_return_val_if_fail (model != NULL, NULL); g_return_val_if_fail (GTK_IS_TREE_STORE (model), NULL); - return (GtkTreeNode *) model->root; + return (GtkTreeNode) model->root; } gboolean gtk_tree_store_node_is_ancestor (GtkTreeStore *model, - GtkTreeNode *node, - GtkTreeNode *descendant) + GtkTreeNode node, + GtkTreeNode descendant) { g_return_val_if_fail (model != NULL, FALSE); g_return_val_if_fail (GTK_IS_TREE_STORE (model), FALSE); @@ -645,7 +645,7 @@ gtk_tree_store_node_is_ancestor (GtkTreeStore *model, gint gtk_tree_store_node_depth (GtkTreeStore *model, - GtkTreeNode *node) + GtkTreeNode node) { g_return_val_if_fail (model != NULL, 0); g_return_val_if_fail (GTK_IS_TREE_STORE (model), 0); diff --git a/gtk/gtktreestore.h b/gtk/gtktreestore.h index dce0bafedf..02bfe216d3 100644 --- a/gtk/gtktreestore.h +++ b/gtk/gtktreestore.h @@ -38,7 +38,7 @@ typedef struct _GtkTreeStoreClass GtkTreeStoreClass; struct _GtkTreeStore { GtkTreeModel parent; - GtkTreeNode *root; + GtkTreeNode root; gint n_columns; GType *column_headers; }; @@ -48,47 +48,49 @@ struct _GtkTreeStoreClass GtkTreeModelClass parent_class; }; + GtkType gtk_tree_store_get_type (void); GtkObject *gtk_tree_store_new (void); -GtkObject *gtk_tree_store_new_with_values (gint n_columns, +GtkObject *gtk_tree_store_new_with_values (gint n_columns, ...); -void gtk_tree_store_set_n_columns (GtkTreeStore *tree_store, - gint n_columns); -void gtk_tree_store_set_column_type (GtkTreeStore *store, - gint column, - GType type); +void gtk_tree_store_set_n_columns (GtkTreeStore *tree_store, + gint n_columns); +void gtk_tree_store_set_column_type (GtkTreeStore *store, + gint column, + GType type); + +GtkTreeNode gtk_tree_store_node_new (void); +void gtk_tree_store_node_set_cell (GtkTreeStore *tree_store, + GtkTreeNode node, + gint column, + GValue *value); +void gtk_tree_store_node_remove (GtkTreeStore *tree_store, + GtkTreeNode node); +GtkTreeNode gtk_tree_store_node_insert (GtkTreeStore *tree_store, + GtkTreeNode parent, + gint position, + GtkTreeNode node); +GtkTreeNode gtk_tree_store_node_insert_before (GtkTreeStore *tree_store, + GtkTreeNode parent, + GtkTreeNode sibling, + GtkTreeNode node); +GtkTreeNode gtk_tree_store_node_insert_after (GtkTreeStore *tree_store, + GtkTreeNode parent, + GtkTreeNode sibling, + GtkTreeNode node); +GtkTreeNode gtk_tree_store_node_prepend (GtkTreeStore *tree_store, + GtkTreeNode parent, + GtkTreeNode node); +GtkTreeNode gtk_tree_store_node_append (GtkTreeStore *tree_store, + GtkTreeNode parent, + GtkTreeNode node); +GtkTreeNode gtk_tree_store_node_get_root (GtkTreeStore *tree_store); +gboolean gtk_tree_store_node_is_ancestor (GtkTreeStore *tree_store, + GtkTreeNode node, + GtkTreeNode descendant); +gint gtk_tree_store_node_depth (GtkTreeStore *tree_store, + GtkTreeNode node); -GtkTreeNode *gtk_tree_store_node_new (void); -void gtk_tree_store_node_set_cell (GtkTreeStore *tree_store, - GtkTreeNode *node, - gint column, - GValue *value); -void gtk_tree_store_node_remove (GtkTreeStore *tree_store, - GtkTreeNode *node); -GtkTreeNode *gtk_tree_store_node_insert (GtkTreeStore *tree_store, - GtkTreeNode *parent, - gint position, - GtkTreeNode *node); -GtkTreeNode *gtk_tree_store_node_insert_before (GtkTreeStore *tree_store, - GtkTreeNode *parent, - GtkTreeNode *sibling, - GtkTreeNode *node); -GtkTreeNode *gtk_tree_store_node_insert_after (GtkTreeStore *tree_store, - GtkTreeNode *parent, - GtkTreeNode *sibling, - GtkTreeNode *node); -GtkTreeNode *gtk_tree_store_node_prepend (GtkTreeStore *tree_store, - GtkTreeNode *parent, - GtkTreeNode *node); -GtkTreeNode *gtk_tree_store_node_append (GtkTreeStore *tree_store, - GtkTreeNode *parent, - GtkTreeNode *node); -GtkTreeNode *gtk_tree_store_node_get_root (GtkTreeStore *tree_store); -gboolean gtk_tree_store_node_is_ancestor (GtkTreeStore *tree_store, - GtkTreeNode *node, - GtkTreeNode *descendant); -gint gtk_tree_store_node_depth (GtkTreeStore *tree_store, - GtkTreeNode *node); #ifdef __cplusplus diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 8d18a046dd..f76ba84012 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -97,15 +97,15 @@ static void gtk_tree_view_set_adjustments (GtkTreeView *tree_view, GtkAdjustment *vadj); static void gtk_tree_view_node_changed (GtkTreeModel *model, GtkTreePath *path, - GtkTreeNode *tree_node, + GtkTreeNode tree_node, gpointer data); static void gtk_tree_view_node_inserted (GtkTreeModel *model, GtkTreePath *path, - GtkTreeNode *tree_node, + GtkTreeNode tree_node, gpointer data); static void gtk_tree_view_node_child_toggled (GtkTreeModel *model, GtkTreePath *path, - GtkTreeNode *tree_node, + GtkTreeNode tree_node, gpointer data); static void gtk_tree_view_node_deleted (GtkTreeModel *model, GtkTreePath *path, @@ -1151,7 +1151,7 @@ gtk_tree_view_button_press (GtkWidget *widget, { GtkTreeViewColumn *column = list->data; GtkCellRenderer *cell; - GtkTreeNode *tree_node; + GtkTreeNode tree_node; if (!column->visible) continue; @@ -1298,7 +1298,7 @@ gtk_tree_view_button_release (GtkWidget *widget, if (tree_view->priv->button_pressed_node == tree_view->priv->prelight_node && GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_ARROW_PRELIT)) { GtkTreePath *path; - GtkTreeNode *tree_node; + GtkTreeNode tree_node; /* Actually activate the node */ if (tree_view->priv->button_pressed_node->children == NULL) @@ -1893,7 +1893,7 @@ gtk_tree_view_forall (GtkContainer *container, static void gtk_tree_view_node_changed (GtkTreeModel *model, GtkTreePath *path, - GtkTreeNode *tree_node, + GtkTreeNode tree_node, gpointer data) { GtkTreeView *tree_view = (GtkTreeView *)data; @@ -1939,7 +1939,7 @@ gtk_tree_view_node_changed (GtkTreeModel *model, static void gtk_tree_view_node_inserted (GtkTreeModel *model, GtkTreePath *path, - GtkTreeNode *tree_node, + GtkTreeNode tree_node, gpointer data) { GtkTreeView *tree_view = (GtkTreeView *) data; @@ -2043,7 +2043,7 @@ gtk_tree_view_node_inserted (GtkTreeModel *model, static void gtk_tree_view_node_child_toggled (GtkTreeModel *model, GtkTreePath *path, - GtkTreeNode *tree_node, + GtkTreeNode tree_node, gpointer data) { GtkTreeView *tree_view = (GtkTreeView *)data; @@ -2117,8 +2117,8 @@ gtk_tree_view_node_deleted (GtkTreeModel *model, if (tree_view->priv->anchor) { gint i; - gint depth = gtk_tree_path_get_indices (path); - gint *indices = gtk_tree_path_get_depth (path); + gint depth = gtk_tree_path_get_depth (path); + gint *indices = gtk_tree_path_get_indices (path); gint select_depth = gtk_tree_path_get_depth (tree_view->priv->anchor); gint *select_indices = gtk_tree_path_get_indices (tree_view->priv->anchor); @@ -2371,7 +2371,7 @@ static void gtk_tree_view_discover_dirty (GtkTreeView *tree_view, GtkRBTree *tree, GtkTreeNode node, - gint depth) + gint depth) { GtkRBNode *temp = tree->root; GtkTreeViewColumn *column; @@ -2419,7 +2419,7 @@ static void gtk_tree_view_check_dirty (GtkTreeView *tree_view) { GtkTreePath *path; - GtkTreeNode *tree_node; + GtkTreeNode tree_node; gboolean dirty = FALSE; GList *list; GtkTreeViewColumn *column; @@ -3354,7 +3354,7 @@ gtk_tree_view_collapse_all_helper (GtkRBTree *tree, if (node->children) { GtkTreePath *path; - GtkTreeNode *tree_node; + GtkTreeNode tree_node; path = _gtk_tree_view_find_path (GTK_TREE_VIEW (data), node->children, diff --git a/gtk/gtktreeview.h b/gtk/gtktreeview.h index bc90c5f01d..38d3a4f84a 100644 --- a/gtk/gtktreeview.h +++ b/gtk/gtktreeview.h @@ -52,11 +52,11 @@ struct _GtkTreeViewClass { GtkContainerClass parent_class; - void (*set_scroll_adjustments) (GtkTreeView *tree_view, + void (*set_scroll_adjustments) (GtkTreeView *tree_view, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); - gint (*expand_row) (GtkTreeView *tree_view, - GtkTreeNode *node); + gint (*expand_row) (GtkTreeView *tree_view, + GtkTreeNode node); }; /* Creators */ |