summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcombobox.c12
-rw-r--r--gtk/gtkentry.c2
-rw-r--r--gtk/gtkentrycompletion.c2
-rw-r--r--gtk/gtkfilechooserdefault.c14
-rw-r--r--gtk/gtkfilesystemmodel.c2
-rw-r--r--gtk/gtkiconview.c36
-rw-r--r--gtk/gtkliststore.c4
-rw-r--r--gtk/gtktreemodel.c25
-rw-r--r--gtk/gtktreemodel.h6
-rw-r--r--gtk/gtktreemodelfilter.c36
-rw-r--r--gtk/gtktreestore.c6
-rw-r--r--gtk/gtktreeview.c12
-rw-r--r--gtk/tests/filtermodel.c6
-rw-r--r--gtk/tests/liststore.c2
-rw-r--r--gtk/tests/treestore.c2
-rw-r--r--gtk/tests/treeview-scrolling.c4
16 files changed, 76 insertions, 95 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 64c8e05658..20558236e1 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -744,7 +744,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
* The item which is currently active. If the model is a non-flat treemodel,
* and the active item is not an immediate child of the root of the tree,
* this property has the value
- * <literal>gtk_tree_path_get_indices (path)[0]</literal>,
+ * <literal>gtk_tree_path_get_indices (path, NULL)[0]</literal>,
* where <literal>path</literal> is the #GtkTreePath of the active item.
*
* Since: 2.4
@@ -1836,7 +1836,7 @@ gtk_combo_box_menu_popup (GtkComboBox *combo_box,
if (gtk_tree_row_reference_valid (priv->active_row))
{
path = gtk_tree_row_reference_get_path (priv->active_row);
- active_item = gtk_tree_path_get_indices (path)[0];
+ active_item = gtk_tree_path_get_indices (path, NULL)[0];
gtk_tree_path_free (path);
if (priv->add_tearoffs)
@@ -3552,7 +3552,7 @@ gtk_combo_box_menu_row_inserted (GtkTreeModel *model,
return;
depth = gtk_tree_path_get_depth (path);
- pos = gtk_tree_path_get_indices (path)[depth - 1];
+ pos = gtk_tree_path_get_indices (path, NULL)[depth - 1];
if (depth > 1)
{
ppath = gtk_tree_path_copy (path);
@@ -4901,7 +4901,7 @@ gtk_combo_box_set_column_span_column (GtkComboBox *combo_box,
* Returns the index of the currently active item, or -1 if there's no
* active item. If the model is a non-flat treemodel, and the active item
* is not an immediate child of the root of the tree, this function returns
- * <literal>gtk_tree_path_get_indices (path)[0]</literal>, where
+ * <literal>gtk_tree_path_get_indices (path, NULL)[0]</literal>, where
* <literal>path</literal> is the #GtkTreePath of the active item.
*
* Return value: An integer which is the index of the currently active item,
@@ -4924,7 +4924,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
GtkTreePath *path;
path = gtk_tree_row_reference_get_path (priv->active_row);
- result = gtk_tree_path_get_indices (path)[0];
+ result = gtk_tree_path_get_indices (path, NULL)[0];
gtk_tree_path_free (path);
}
else
@@ -5030,7 +5030,7 @@ gtk_combo_box_set_active_internal (GtkComboBox *combo_box,
{
/* FIXME handle nested menus better */
gtk_menu_set_active (GTK_MENU (priv->popup_widget),
- gtk_tree_path_get_indices (path)[0]);
+ gtk_tree_path_get_indices (path, NULL)[0]);
}
if (priv->cell_view)
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 3c7aa25f94..604579d5d4 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -9474,7 +9474,7 @@ keypress_completion_out:
path = gtk_tree_path_new_from_indices (completion->priv->current_selected - matches, -1);
g_signal_emit_by_name (completion, "action-activated",
- gtk_tree_path_get_indices (path)[0]);
+ gtk_tree_path_get_indices (path, NULL)[0]);
gtk_tree_path_free (path);
}
else
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 6225b41dda..3bd2b612da 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -920,7 +920,7 @@ gtk_entry_completion_action_button_press (GtkWidget *widget,
&path, NULL, NULL, NULL))
{
g_signal_emit (completion, entry_completion_signals[ACTION_ACTIVATED],
- 0, gtk_tree_path_get_indices (path)[0]);
+ 0, gtk_tree_path_get_indices (path, NULL)[0]);
gtk_tree_path_free (path);
_gtk_entry_completion_popdown (completion);
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 7f1f31c0e2..8c41839d44 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -1439,7 +1439,7 @@ get_file_info_finished (GCancellable *cancellable,
/* Handle doesn't exist anymore in the model */
goto out;
- pos = gtk_tree_path_get_indices (path)[0];
+ pos = gtk_tree_path_get_indices (path, NULL)[0];
gtk_tree_model_get_iter (GTK_TREE_MODEL (request->impl->shortcuts_model),
&iter, path);
gtk_tree_path_free (path);
@@ -2237,7 +2237,7 @@ shortcuts_pane_filter_cb (GtkTreeModel *model,
if (!path)
return FALSE;
- pos = *gtk_tree_path_get_indices (path);
+ pos = *gtk_tree_path_get_indices (path, NULL);
gtk_tree_path_free (path);
return (pos < shortcuts_get_index (impl, SHORTCUTS_CURRENT_FOLDER_SEPARATOR));
@@ -3166,7 +3166,7 @@ shortcuts_compute_drop_position (GtkFileChooserDefault *impl,
return;
}
- row = *gtk_tree_path_get_indices (*path);
+ row = *gtk_tree_path_get_indices (*path, NULL);
gtk_tree_view_get_background_area (tree_view, *path, column, &cell);
gtk_tree_path_free (*path);
@@ -3317,7 +3317,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
g_assert_not_reached ();
path = gtk_tree_model_get_path (GTK_TREE_MODEL (impl->shortcuts_model), &iter);
- old_position = *gtk_tree_path_get_indices (path);
+ old_position = *gtk_tree_path_get_indices (path, NULL);
gtk_tree_path_free (path);
bookmarks_index = shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS);
@@ -3383,7 +3383,7 @@ shortcuts_drag_data_received_cb (GtkWidget *widget,
bookmarks_index = shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS);
shortcuts_compute_drop_position (impl, x, y, &tree_path, &tree_pos);
- position = *gtk_tree_path_get_indices (tree_path);
+ position = *gtk_tree_path_get_indices (tree_path, NULL);
gtk_tree_path_free (tree_path);
if (tree_pos == GTK_TREE_VIEW_DROP_AFTER)
@@ -4681,7 +4681,7 @@ shortcuts_combo_filter_func (GtkTreeModel *model,
tree_path = gtk_tree_model_get_path (GTK_TREE_MODEL (impl->shortcuts_model), iter);
g_assert (tree_path != NULL);
- indices = gtk_tree_path_get_indices (tree_path);
+ indices = gtk_tree_path_get_indices (tree_path, NULL);
retval = TRUE;
@@ -10293,7 +10293,7 @@ shortcuts_pane_model_filter_row_draggable (GtkTreeDragSource *drag_source,
model = SHORTCUTS_PANE_MODEL_FILTER (drag_source);
- pos = *gtk_tree_path_get_indices (path);
+ pos = *gtk_tree_path_get_indices (path, NULL);
bookmarks_pos = shortcuts_get_index (model->impl, SHORTCUTS_BOOKMARKS);
return (pos >= bookmarks_pos && pos < bookmarks_pos + model->impl->num_bookmarks);
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 7c9e1dca0f..a786ae94b1 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -516,7 +516,7 @@ gtk_file_system_model_get_iter (GtkTreeModel *tree_model,
return gtk_file_system_model_iter_nth_child (tree_model,
iter,
NULL,
- gtk_tree_path_get_indices (path)[0]);
+ gtk_tree_path_get_indices (path, NULL)[0]);
}
static GtkTreePath *
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index b46e660e6d..8cfcec5d4f 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1572,7 +1572,7 @@ gtk_icon_view_expose (GtkWidget *widget,
if (path)
{
- dest_index = gtk_tree_path_get_indices (path)[0];
+ dest_index = gtk_tree_path_get_indices (path, NULL)[0];
gtk_tree_path_free (path);
}
else
@@ -2035,7 +2035,7 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
if (gtk_tree_path_get_depth (path) == 1)
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item)
return;
@@ -3355,7 +3355,7 @@ gtk_icon_view_queue_draw_path (GtkIconView *icon_view,
GList *l;
gint index;
- index = gtk_tree_path_get_indices (path)[0];
+ index = gtk_tree_path_get_indices (path, NULL)[0];
for (l = icon_view->priv->items; l; l = l->next)
{
@@ -3616,7 +3616,7 @@ gtk_icon_view_row_changed (GtkTreeModel *model,
gtk_icon_view_stop_editing (icon_view, TRUE);
- index = gtk_tree_path_get_indices(path)[0];
+ index = gtk_tree_path_get_indices(path, NULL)[0];
item = g_list_nth_data (icon_view->priv->items, index);
gtk_icon_view_item_invalidate_size (item);
@@ -3641,7 +3641,7 @@ gtk_icon_view_row_inserted (GtkTreeModel *model,
iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
- index = gtk_tree_path_get_indices(path)[0];
+ index = gtk_tree_path_get_indices(path, NULL)[0];
item = gtk_icon_view_item_new ();
@@ -3683,7 +3683,7 @@ gtk_icon_view_row_deleted (GtkTreeModel *model,
icon_view = GTK_ICON_VIEW (data);
- index = gtk_tree_path_get_indices(path)[0];
+ index = gtk_tree_path_get_indices(path, NULL)[0];
list = g_list_nth (icon_view->priv->items, index);
item = list->data;
@@ -4396,7 +4396,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
if (gtk_tree_path_get_depth (path) > 0)
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item || item->width < 0 ||
!gtk_widget_get_realized (GTK_WIDGET (icon_view)))
@@ -4967,7 +4967,7 @@ gtk_icon_view_set_tooltip_cell (GtkIconView *icon_view,
if (gtk_tree_path_get_depth (path) > 0)
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item)
return;
@@ -5788,7 +5788,7 @@ gtk_icon_view_select_path (GtkIconView *icon_view,
if (gtk_tree_path_get_depth (path) > 0)
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (item)
gtk_icon_view_select_item (icon_view, item);
@@ -5814,7 +5814,7 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
g_return_if_fail (path != NULL);
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item)
return;
@@ -5947,7 +5947,7 @@ gtk_icon_view_path_is_selected (GtkIconView *icon_view,
g_return_val_if_fail (path != NULL, FALSE);
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item)
return FALSE;
@@ -5978,7 +5978,7 @@ gtk_icon_view_get_item_row (GtkIconView *icon_view,
g_return_val_if_fail (path != NULL, FALSE);
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item)
return -1;
@@ -6009,7 +6009,7 @@ gtk_icon_view_get_item_column (GtkIconView *icon_view,
g_return_val_if_fail (path != NULL, FALSE);
item = g_list_nth_data (icon_view->priv->items,
- gtk_tree_path_get_indices(path)[0]);
+ gtk_tree_path_get_indices(path, NULL)[0]);
if (!item)
return -1;
@@ -7325,7 +7325,7 @@ gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view,
icon_view->priv->empty_view_drop = FALSE;
if (pos == GTK_ICON_VIEW_DROP_ABOVE && path
&& gtk_tree_path_get_depth (path) == 1
- && gtk_tree_path_get_indices (path)[0] == 0)
+ && gtk_tree_path_get_indices (path, NULL)[0] == 0)
{
gint n_children;
@@ -7472,7 +7472,7 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
if (!gtk_widget_get_realized (widget))
return NULL;
- index = gtk_tree_path_get_indices (path)[0];
+ index = gtk_tree_path_get_indices (path, NULL)[0];
for (l = icon_view->priv->items; l; l = l->next)
{
@@ -9184,7 +9184,7 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model,
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
a11y_view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
- index = gtk_tree_path_get_indices(path)[0];
+ index = gtk_tree_path_get_indices(path, NULL)[0];
a11y_item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (
gtk_icon_view_accessible_find_child (atk_obj, index));
@@ -9228,7 +9228,7 @@ gtk_icon_view_accessible_model_row_inserted (GtkTreeModel *tree_model,
AtkObject *atk_obj;
gint index;
- index = gtk_tree_path_get_indices(path)[0];
+ index = gtk_tree_path_get_indices(path, NULL)[0];
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
priv = gtk_icon_view_accessible_get_priv (atk_obj);
@@ -9273,7 +9273,7 @@ gtk_icon_view_accessible_model_row_deleted (GtkTreeModel *tree_model,
AtkObject *atk_obj;
gint index;
- index = gtk_tree_path_get_indices(path)[0];
+ index = gtk_tree_path_get_indices(path, NULL)[0];
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj);
priv = gtk_icon_view_accessible_get_priv (atk_obj);
diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c
index d9cd3fd242..c913ff6d02 100644
--- a/gtk/gtkliststore.c
+++ b/gtk/gtkliststore.c
@@ -435,7 +435,7 @@ gtk_list_store_get_iter (GtkTreeModel *tree_model,
seq = list_store->seq;
- i = gtk_tree_path_get_indices (path)[0];
+ i = gtk_tree_path_get_indices (path, NULL)[0];
if (i >= g_sequence_get_length (seq))
return FALSE;
@@ -1388,7 +1388,7 @@ gtk_list_store_row_drop_possible (GtkTreeDragDest *drag_dest,
/* can drop before any existing node, or before one past any existing. */
- indices = gtk_tree_path_get_indices (dest_path);
+ indices = gtk_tree_path_get_indices (dest_path, NULL);
if (indices[0] <= g_sequence_get_length (GTK_LIST_STORE (drag_dest)->seq))
retval = TRUE;
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c
index 526d1688cf..af162d6384 100644
--- a/gtk/gtktreemodel.c
+++ b/gtk/gtktreemodel.c
@@ -608,36 +608,19 @@ gtk_tree_path_get_depth (GtkTreePath *path)
/**
* gtk_tree_path_get_indices:
* @path: A #GtkTreePath.
- *
- * Returns the current indices of @path. This is an array of integers, each
- * representing a node in a tree. This value should not be freed.
- *
- * Return value: The current indices, or %NULL.
- **/
-gint *
-gtk_tree_path_get_indices (GtkTreePath *path)
-{
- g_return_val_if_fail (path != NULL, NULL);
-
- return path->indices;
-}
-
-/**
- * gtk_tree_path_get_indices_with_depth:
- * @path: A #GtkTreePath.
- * @depth: Number of elements returned in the integer array
+ * @depth: (allow-none): Number of elements returned in the integer array
*
* Returns the current indices of @path.
* This is an array of integers, each representing a node in a tree.
* It also returns the number of elements in the array.
* The array should not be freed.
*
- * Return value: (array length=depth): The current indices, or %NULL.
+ * Return value: (transfer none) (array length=depth): The current indices, or %NULL.
*
* Since: 3.0
**/
gint *
-gtk_tree_path_get_indices_with_depth (GtkTreePath *path, gint *depth)
+gtk_tree_path_get_indices (GtkTreePath *path, gint *depth)
{
g_return_val_if_fail (path != NULL, NULL);
@@ -1854,7 +1837,7 @@ gtk_tree_row_ref_reordered (RowRefList *refs,
if (ref_depth > depth)
{
gint i;
- gint *indices = gtk_tree_path_get_indices (reference->path);
+ gint *indices = gtk_tree_path_get_indices (reference->path, NULL);
for (i = 0; i < length; i++)
{
diff --git a/gtk/gtktreemodel.h b/gtk/gtktreemodel.h
index e7f59c672b..99abdcabaa 100644
--- a/gtk/gtktreemodel.h
+++ b/gtk/gtktreemodel.h
@@ -133,10 +133,8 @@ void gtk_tree_path_append_index (GtkTreePath *path,
void gtk_tree_path_prepend_index (GtkTreePath *path,
gint index_);
gint gtk_tree_path_get_depth (GtkTreePath *path);
-gint *gtk_tree_path_get_indices (GtkTreePath *path);
-
-gint *gtk_tree_path_get_indices_with_depth (GtkTreePath *path,
- gint *depth);
+gint *gtk_tree_path_get_indices (GtkTreePath *path,
+ gint *depth);
void gtk_tree_path_free (GtkTreePath *path);
GtkTreePath *gtk_tree_path_copy (const GtkTreePath *path);
diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index a5f5db7e49..36c5bef19d 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -722,7 +722,7 @@ gtk_tree_model_filter_add_root (GtkTreePath *src,
retval = gtk_tree_path_copy (root);
for (i = 0; i < gtk_tree_path_get_depth (src); i++)
- gtk_tree_path_append_index (retval, gtk_tree_path_get_indices (src)[i]);
+ gtk_tree_path_append_index (retval, gtk_tree_path_get_indices (src, NULL)[i]);
return retval;
}
@@ -740,10 +740,10 @@ gtk_tree_model_filter_remove_root (GtkTreePath *src,
return NULL;
depth = gtk_tree_path_get_depth (src);
- indices = gtk_tree_path_get_indices (src);
+ indices = gtk_tree_path_get_indices (src, NULL);
for (i = 0; i < gtk_tree_path_get_depth (root); i++)
- if (indices[i] != gtk_tree_path_get_indices (root)[i])
+ if (indices[i] != gtk_tree_path_get_indices (root, NULL)[i])
return NULL;
retval = gtk_tree_path_new ();
@@ -1458,7 +1458,7 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model,
gboolean common_prefix = TRUE;
level = gtk_tree_path_get_depth (c_path) - 1;
- v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root);
+ v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root, NULL);
c_indices = gtk_tree_path_get_indices (c_path);
for (i = 0; i < level; i++)
@@ -1516,7 +1516,7 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model,
goto done;
elt = bsearch_elt_with_offset (level->array,
- gtk_tree_path_get_indices (real_path)[i],
+ gtk_tree_path_get_indices (real_path, NULL)[i],
&j);
if (!elt)
@@ -1556,7 +1556,7 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model,
goto done;
/* let's try to insert the value */
- offset = gtk_tree_path_get_indices (real_path)[gtk_tree_path_get_depth (real_path) - 1];
+ offset = gtk_tree_path_get_indices (real_path, NULL)[gtk_tree_path_get_depth (real_path) - 1];
/* update the offsets, yes if we didn't insert the node above, there will
* be a gap here. This will be filled with the node (via fetch_child) when
@@ -1807,7 +1807,7 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model,
gboolean common_prefix = TRUE;
level = gtk_tree_path_get_depth (c_path) - 1;
- v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root);
+ v_indices = gtk_tree_path_get_indices (filter->priv->virtual_root, NULL);
c_indices = gtk_tree_path_get_indices (c_path);
for (i = 0; i < level; i++)
@@ -1868,7 +1868,7 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model,
}
elt = bsearch_elt_with_offset (level->array,
- gtk_tree_path_get_indices (real_path)[i],
+ gtk_tree_path_get_indices (real_path, NULL)[i],
&j);
if (!elt || !elt->children)
@@ -1883,7 +1883,7 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model,
}
}
- offset = gtk_tree_path_get_indices (real_path)[gtk_tree_path_get_depth (real_path) - 1];
+ offset = gtk_tree_path_get_indices (real_path, NULL)[gtk_tree_path_get_depth (real_path) - 1];
gtk_tree_path_free (real_path);
if (!level)
@@ -2026,13 +2026,13 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model,
/* reorder root level of path */
for (i = 0; i < length; i++)
- if (new_order[i] == gtk_tree_path_get_indices (filter->priv->virtual_root)[0])
+ if (new_order[i] == gtk_tree_path_get_indices (filter->priv->virtual_root, NULL)[0])
new_pos = i;
if (new_pos < 0)
return;
- gtk_tree_path_get_indices (filter->priv->virtual_root)[0] = new_pos;
+ gtk_tree_path_get_indices (filter->priv->virtual_root, NULL)[0] = new_pos;
return;
}
@@ -2062,13 +2062,13 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model,
length = gtk_tree_model_iter_n_children (c_model, &real_c_iter);
for (i = 0; i < length; i++)
- if (new_order[i] == gtk_tree_path_get_indices (filter->priv->virtual_root)[level])
+ if (new_order[i] == gtk_tree_path_get_indices (filter->priv->virtual_root, NULL)[level])
new_pos = i;
if (new_pos < 0)
return;
- gtk_tree_path_get_indices (filter->priv->virtual_root)[level] = new_pos;
+ gtk_tree_path_get_indices (filter->priv->virtual_root, NULL)[level] = new_pos;
return;
}
@@ -2164,7 +2164,7 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model,
}
/* emit rows_reordered */
- if (!gtk_tree_path_get_indices (path))
+ if (!gtk_tree_path_get_indices (path, NULL))
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (data), path, NULL,
tmp_array);
else
@@ -2258,7 +2258,7 @@ gtk_tree_model_filter_get_iter_full (GtkTreeModel *model,
g_return_val_if_fail (GTK_IS_TREE_MODEL_FILTER (model), FALSE);
g_return_val_if_fail (filter->priv->child_model != NULL, FALSE);
- indices = gtk_tree_path_get_indices (path);
+ indices = gtk_tree_path_get_indices (path, NULL);
if (filter->priv->root == NULL)
gtk_tree_model_filter_build_level (filter, NULL, -1, FALSE);
@@ -2315,7 +2315,7 @@ gtk_tree_model_filter_get_iter (GtkTreeModel *model,
g_return_val_if_fail (GTK_IS_TREE_MODEL_FILTER (model), FALSE);
g_return_val_if_fail (filter->priv->child_model != NULL, FALSE);
- indices = gtk_tree_path_get_indices (path);
+ indices = gtk_tree_path_get_indices (path, NULL);
if (filter->priv->root == NULL)
gtk_tree_model_filter_build_level (filter, NULL, -1, FALSE);
@@ -3287,7 +3287,7 @@ gtk_real_tree_model_filter_convert_child_path_to_path (GtkTreeModelFilter *filte
return NULL;
retval = gtk_tree_path_new ();
- child_indices = gtk_tree_path_get_indices (real_path);
+ child_indices = gtk_tree_path_get_indices (real_path, NULL);
if (filter->priv->root == NULL && build_levels)
gtk_tree_model_filter_build_level (filter, NULL, -1, FALSE);
@@ -3426,7 +3426,7 @@ gtk_tree_model_filter_convert_path_to_child_path (GtkTreeModelFilter *filter,
/* convert path */
retval = gtk_tree_path_new ();
- filter_indices = gtk_tree_path_get_indices (filter_path);
+ filter_indices = gtk_tree_path_get_indices (filter_path, NULL);
if (!filter->priv->root)
gtk_tree_model_filter_build_level (filter, NULL, -1, FALSE);
level = FILTER_LEVEL (filter->priv->root);
diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c
index 7f5f15549c..39c0deff73 100644
--- a/gtk/gtktreestore.c
+++ b/gtk/gtktreestore.c
@@ -481,7 +481,7 @@ gtk_tree_store_get_iter (GtkTreeModel *tree_model,
tree_store->columns_dirty = TRUE;
- indices = gtk_tree_path_get_indices (path);
+ indices = gtk_tree_path_get_indices (path, NULL);
depth = gtk_tree_path_get_depth (path);
g_return_val_if_fail (depth > 0, FALSE);
@@ -2467,7 +2467,7 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
{
b = G_NODE (position->user_data);
- if (gtk_tree_path_get_indices (pos_path)[gtk_tree_path_get_depth (pos_path) - 1] > 0)
+ if (gtk_tree_path_get_indices (pos_path, NULL)[gtk_tree_path_get_depth (pos_path) - 1] > 0)
{
gtk_tree_path_prev (pos_path);
if (gtk_tree_store_get_iter (GTK_TREE_MODEL (tree_store),
@@ -2611,7 +2611,7 @@ gtk_tree_store_move (GtkTreeStore *tree_store,
/* emit signal */
if (position)
- new_pos = gtk_tree_path_get_indices (pos_path)[gtk_tree_path_get_depth (pos_path)-1];
+ new_pos = gtk_tree_path_get_indices (pos_path, NULL)[gtk_tree_path_get_depth (pos_path)-1];
else if (before)
{
if (depth)
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 22d25ab314..5f42a73526 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -7575,7 +7575,7 @@ gtk_tree_view_drag_data_received (GtkWidget *widget,
time);
if (gtk_tree_path_get_depth (dest_row) == 1
- && gtk_tree_path_get_indices (dest_row)[0] == 0)
+ && gtk_tree_path_get_indices (dest_row, NULL)[0] == 0)
{
/* special special case drag to "0", scroll to first item */
if (!tree_view->priv->scroll_to_path)
@@ -8392,7 +8392,7 @@ gtk_tree_view_row_inserted (GtkTreeModel *model,
/* Update all row-references */
gtk_tree_row_reference_inserted (G_OBJECT (data), path);
depth = gtk_tree_path_get_depth (path);
- indices = gtk_tree_path_get_indices (path);
+ indices = gtk_tree_path_get_indices (path, NULL);
/* First, find the parent tree */
while (i < depth - 1)
@@ -9025,7 +9025,7 @@ _gtk_tree_view_find_node (GtkTreeView *tree_view,
{
GtkRBNode *tmpnode = NULL;
GtkRBTree *tmptree = tree_view->priv->tree;
- gint *indices = gtk_tree_path_get_indices (path);
+ gint *indices = gtk_tree_path_get_indices (path, NULL);
gint depth = gtk_tree_path_get_depth (path);
gint i = 0;
@@ -11989,7 +11989,7 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view)
path = gtk_tree_path_new ();
gtk_tree_path_down (path);
- indices = gtk_tree_path_get_indices (path);
+ indices = gtk_tree_path_get_indices (path, NULL);
tree = tree_view->priv->tree;
node = tree->root;
@@ -12029,7 +12029,7 @@ gtk_tree_view_expand_to_path (GtkTreeView *tree_view,
g_return_if_fail (path != NULL);
depth = gtk_tree_path_get_depth (path);
- indices = gtk_tree_path_get_indices (path);
+ indices = gtk_tree_path_get_indices (path, NULL);
tmp = gtk_tree_path_new ();
g_return_if_fail (tmp != NULL);
@@ -13484,7 +13484,7 @@ gtk_tree_view_set_drag_dest_row (GtkTreeView *tree_view,
if (pos == GTK_TREE_VIEW_DROP_BEFORE && path
&& gtk_tree_path_get_depth (path) == 1
- && gtk_tree_path_get_indices (path)[0] == 0)
+ && gtk_tree_path_get_indices (path, NULL)[0] == 0)
{
gint n_children;
diff --git a/gtk/tests/filtermodel.c b/gtk/tests/filtermodel.c
index 22253e0144..f541030e64 100644
--- a/gtk/tests/filtermodel.c
+++ b/gtk/tests/filtermodel.c
@@ -455,7 +455,7 @@ strip_virtual_root (GtkTreePath *path,
for (j = 0; j < depth - root_depth; j++)
gtk_tree_path_append_index (real_path,
- gtk_tree_path_get_indices (path)[root_depth + j]);
+ gtk_tree_path_get_indices (path, NULL)[root_depth + j]);
}
else
real_path = gtk_tree_path_copy (path);
@@ -826,7 +826,7 @@ insert_path_with_visibility (FilterTest *fixture,
GtkTreeIter parent, iter;
path = gtk_tree_path_new_from_string (path_string);
- position = gtk_tree_path_get_indices (path)[gtk_tree_path_get_depth (path)];
+ position = gtk_tree_path_get_indices (path, NULL)[gtk_tree_path_get_depth (path)];
gtk_tree_path_up (path);
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (fixture->store), &parent, path))
@@ -1822,7 +1822,7 @@ specific_path_dependent_filter_func (GtkTreeModel *model,
GtkTreePath *path;
path = gtk_tree_model_get_path (model, iter);
- if (gtk_tree_path_get_indices (path)[0] < 4)
+ if (gtk_tree_path_get_indices (path, NULL)[0] < 4)
return FALSE;
return TRUE;
diff --git a/gtk/tests/liststore.c b/gtk/tests/liststore.c
index 6452fc2903..724e2b8b77 100644
--- a/gtk/tests/liststore.c
+++ b/gtk/tests/liststore.c
@@ -54,7 +54,7 @@ iter_position (GtkListStore *store,
if (!path)
return FALSE;
- if (gtk_tree_path_get_indices (path)[0] != n)
+ if (gtk_tree_path_get_indices (path, NULL)[0] != n)
ret = FALSE;
gtk_tree_path_free (path);
diff --git a/gtk/tests/treestore.c b/gtk/tests/treestore.c
index c9dbcffba8..be05b607dc 100644
--- a/gtk/tests/treestore.c
+++ b/gtk/tests/treestore.c
@@ -57,7 +57,7 @@ iter_position (GtkTreeStore *store,
if (!path)
return FALSE;
- if (gtk_tree_path_get_indices (path)[0] != n)
+ if (gtk_tree_path_get_indices (path, NULL)[0] != n)
ret = FALSE;
gtk_tree_path_free (path);
diff --git a/gtk/tests/treeview-scrolling.c b/gtk/tests/treeview-scrolling.c
index 81dfd8d752..7ba814b0be 100644
--- a/gtk/tests/treeview-scrolling.c
+++ b/gtk/tests/treeview-scrolling.c
@@ -256,7 +256,7 @@ get_pos_from_path (GtkTreeView *tree_view,
int row_start;
row_start = get_row_start_for_index (tree_view,
- gtk_tree_path_get_indices (path)[0]);
+ gtk_tree_path_get_indices (path, NULL)[0]);
if (row_start + row_height < vadj->page_size)
return POS_TOP;
@@ -406,7 +406,7 @@ test_position (GtkTreeView *tree_view,
path, NULL, &rect);
row_start = get_row_start_for_index (GTK_TREE_VIEW (tree_view),
- gtk_tree_path_get_indices (path)[0]);
+ gtk_tree_path_get_indices (path, NULL)[0]);
/* Ugh */
pos = get_pos_from_path (GTK_TREE_VIEW (tree_view),