Reorderable treeview and rows-reordered signal


#1

Hi.

I use a reorderable Gtk::TreeView. I want to call a method when the list
is reordered. I connect the rows-reordered signal of the model (a
Gtk::ListStore).
I can reoder the list but it seems that the rows-reordered is not send.
I post an example (see attachment).

How can I call a method when the list is reordered?


#2

Hi,

In removed_email_address@domain.invalid
“[ruby-gnome2-devel-en] reorderable treeview and rows-reordered
signal” on Mon, 19 Jan 2009 19:29:42 +0100,
Vincent C. removed_email_address@domain.invalid wrote:

I use a reorderable Gtk::TreeView. I want to call a method when the list
is reordered. I connect the rows-reordered signal of the model (a
Gtk::ListStore).
I can reoder the list but it seems that the rows-reordered is not send.
I post an example (see attachment).

How can I call a method when the list is reordered?

Attachments:
http://www.ruby-forum.com/attachment/3177/es.rb

Use ‘row-inserted’ and ‘row-deleted’ instead.

http://library.gnome.org/devel/gtk/stable/GtkTreeModel.html#GtkTreeModel-rows-reordered

Note that this signal is not emitted when rows are
reordered by DND, since this is implemented by removing
and then reinserting the row.

Thanks,

kou


#3

Thank you very much. I will use these two signals.