TreeView/ListStore reordering by DND
- From: Stefan Salewski <mail ssalewski de>
- To: "gtk-list gnome org" <gtk-list gnome org>
- Subject: TreeView/ListStore reordering by DND
- Date: Sat, 01 Mar 2014 01:33:04 +0100
I have a simple list display built of a ListView and ListStore as
described in
https://developer.gnome.org/gtk3/stable/GtkTreeView.html
I used gtk_tree_view_set_reorderable () to allow the user to reorder the
list by grabbing rows and moving it up or down.
From
https://developer.gnome.org/gtk3/stable/GtkTreeView.html#gtk-tree-view-set-reorderable
we have:
"The developer can listen to these changes by connecting to the model's
row_inserted and row_deleted signals."
It seems that a "row_inserted" signal is emitted followed by a
"row_deleted" signal.
But how can I detect the row numbers of the two exchanged rows?
gtk_tree_path_get_indices ()
https://developer.gnome.org/gtk3/stable/GtkTreeModel.html#gtk-tree-path-get-indices
may work in the signal handler? But it is not very easy to find the
relation between the two exchanged rows and the indices.
Are better options available?
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]