On Wed, 2003-01-15 at 06:33, David M. Cook wrote: > On Tue, Jan 14, 2003 at 10:20:32PM +0000, Andrew S. Townley wrote: > > This time I've included an example of what I'm trying to do. It serves > > to illustrate both my previous "double selection signal" issue as well > > as something different. > > One thing is that you're passing an integer as a path when (I think) you > should be passing in a tuple (but pygtk doesn't seem to mind <shrug>). > However, using a tuple doesn't seem to make a difference.
That's actually from my mis-reading the docs of GtkTreeModel. I thought I read that it would automatically cast. Thanks for pointing it out, I'll fix it. > > To watch the first one, make sure the checkbox isn't checked, then click > > load. Choose a row, say the 4th one, and you'll see the double signals. > > I think this is the correct behavior for the first time something is selected. > But then I'm never sure what the intentions of the gtk authors really are. > If that's really the indented behavior, it seems pretty strange. I know from the docs of the GtkTreeSelection, it says that the "changed" signal is only a hint, but it seems like in order to have your application "do the right thing" you've got to write a lot of extra code to determine if there's been a previous tree selection or not so that you can ignore the very first changed signal that gets emitted by the control after it is loaded. From reading some of the other posts to this list about tree selection, it seems like the selection support in the new widget is pretty basic, and if you want to do something complicated, you've got to manage state information that is normally managed by the control in other toolkits. One other thing that I thought was interesting when I was putting together the previous test is that the control seems to ignore the unselect_all() method. If the TreeView is the only control in a window, the first row is *always* selected, even though attempting to walk the selection with selection_foreach() results in no method calls. Maybe that's the source of the problem. Guess it could be a bug in the control that unselect_all() only changes part of the state. If that was the case, why would the control not draw the selection when there are other widgets in the window? Seems pretty strange to me... -- Andrew S. Townley <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
