Alex Bennee wrote: > Do you still want a patch to grey out the pop-up box if no records have a > SHA1? > I had an intial go but the *_get_selection function seems to unselect > everything. I'm guessing itterating through the selection everytime > popup_refresh is called is not the way to go.
With Gtk+ 1.2 you can just check whether selection != NULL. For GTK 2.x you'd have to iterate through the complete selection. There's no way to check whether *anything* is selected by poking at a single variable. Don't be fooled by any convience functions, they do nothing less. However, if at all you should use gtk_tree_selection_foreach() and use a callback that just sets a variable to true (pass the address of it as user_data). On a modern system it's probably no big issue, but I've never done that on principle. The only reasonable way would be using some of the signals but they don't seem to pass the affected iterators. For people making such a big fuzz about their shiny Human Interface Guidelines this is nothing but pathetic i.e., butchering performance for a very basic user feedback. -- Christian
pgpAFV9C097xr.pgp
Description: PGP signature
