How do I unselect a path in a TreeView?
If all you need to do is query and change the current cursor state, you can use the gtk.TreeView class functions set_cursor() and get_cursor(). However, the gtk.TreeView class functions don’t directly let you do more complex selection work, such as unselecting everything in a TreeView, or unselecting anything at all for that matter. However, a TreeSelection object lets you do that just those sorts of things. You can get the TreeSelection object associated with any Treeview with the TreeView’s get_selection() member function. Every Treeview has one gtk.TreeSelection object associated with it. This object is associated with the TreeView, not its underlying model. (So if a particular model has multiple views, each view will have a separate selection object associated with it.