Re: TreeView help



In fact, I don't even understand very well how multiple selection works.
The user does Ctrl+Button1 on each item it wants, then what? When does
select_foreach() get called? When does gtk (or X?) that the user is done
picking items, and that the action on each item must be triggered?
GTK+ does not know this and that's why your code does not work as intended: Each time you call selected_foreach, your callback will be called for each selected item.

But you have to decide when you call it, and thus, when actions on these items are triggered. You may put a button somewhere, use a context menu or a timeout after the selection didn't change for five seconds - that's up to you.

 -- Armin



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