From: Maxime H. <mhe...@gm...> - 2010-10-17 22:05:01
|
Hello all, The attached patch fixes a few minor problems in the gtk package. The treeModelFilterSetVisibleFunc function was accepting a "Maybe (TreeIter -> IO Bool)" type for the visible function, allowing to pass NULL to the corresponding gtk function when Nothing had been given. However, this isn't supported by the gtk API and causes an error message to be printed about it on the console. I just changed the type to a plain "TreeIter -> IO Bool" and removed the Nothing case. In a surprisingly symmetrical way, the treeSortableSetDefaultSortFunc was only accepting a "TreeIter -> TreeIter -> IO Ordering" type for the sort function, whereas this time, it is possible to pass NULL to the underlying gtk function. Doing so is actually quite useful: it allows to disable the "original" ordering of your rows. If you don't do that, clicking on a column header cycles through ascending sort, descending sort, *and* original order. Passing a NULL default sort function allows to have only the 2 usual sorting states. Needless to say, both fixes break the API, and I am not sure how you guys handle these kind of things. Thanks! Maxime Henrion |