Re: Gtk::ListStore bug?



Murray Cumming wrote:

On Sun, 2006-04-30 at 02:10 -0500, Paul Davis wrote:
Hey,

I'm attempting to get a signal from a list store when the rows in the model change. But it doesn't seem to be emitting the signal.

I went and looked at the source and I don't see that ListStore is calling rows_reordered like its supposed to.

From the docs:

void Gtk::TreeModel::rows_reordered...

Emits the "row_reordered" signal on tree_model.
This should be called by models when their rows have been reordered.

And in liststore.ccg, there's no reference to rows_reordered.

It's a wrapper for C code.

I noticed after a bit that alot of the functionality seemed to pass through. I had (incorrectly) assumed that the sigc stuff would have to be coded ontop of Gtk. Silly me.

Granted I haven't gone through and extensive trace of the class hierarchy, but doing some grepping I don't see where it should be getting called.

If anyone knows a better way to detect when the user rearanges the rows in a liststore, I'd love to hear about it.

Do you mean via drag and drop?

I mean by using the set_reorderable() method. I don't do anything to override the default reorderable functionality. I did figure out that the signal_row_deleted is being called when a reorder event occurs, so I just used it as a hack. So for now, its working, but its one of those things I'd rather use the right signal if possible.

Thanks,
Paul Davis



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]