GNOME Bugzilla – Bug 352738
gtk_tree_view_column_set_sort_indicator() fails to show a sort indicator with GTK+-2.10
Last modified: 2008-09-04 10:47:11 UTC
Please describe the problem: Calling gtk_tree_view_column_set_sort_indicator() with GTK+-2.10 fails to show a sort indicator in the tree view column header. A test case is attached which shows a sort indicator correctly when compiled and run against GTK+-2.8 (with cairo-1.2 and pango-1.14 or cairo-1.0 and pango-1.12) but fails to show the sort indicator when compiled against GTK+-2.10.1 and GTK+-2.10.2 (with cairo-1.2 and pango-1.14). (I have not tested it with GTK+-2.10.0). Steps to reproduce: 1. Compile the test case with GTK+-2.10.2 2. Run the executable which is produced. 3. Actual results: No sort indicator is shown. Expected results: An arrowed sort indicator showing ascending sorting should be shown. Does this happen every time? Yes Other information: Simple test case attached.
Created attachment 71547 [details] test case
Fixed on HEAD, will backmerge later. 2006-09-24 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button): draw the indicator if the column has a sort column id (and the model is sortable) or if the user explicitly requested the indicator to be shown. (Fixes #352738, Chris Vine).
This bug may be in 2.8.18 too. because: "or if the user explicitly requested the indicator to be shown." doesn't work for me (win32).
(backmerged to 2-10)
I'm using gtk+-2.10.6 and gtkmm-2.10.4 and this sort indicator is still not shown on linux. But the sort indicator is shown on windows. I'm using clearlooks theme, in case if this creates problem. Surya
This bug is marked fixed. I'm using gtk+-2.10.6 and still the sort indicator is not shown. Am i missing some thing here? or the fix will appear in another version? Surya
(In reply to comment #6) > This bug is marked fixed. I'm using gtk+-2.10.6 and still the sort indicator is > not shown. Am i missing some thing here? or the fix will appear in another > version? Are you also experiencing problems on Linux when using the default GTK+ theme? If yes, could you provide a testcase showing the problem (or point at an application showing the problem)?
The sample code provided earlier shows the problem. I've just compiled with gtk+-2.8.20 and the sort indicator is shown. With gtk+-2.10.6, the sort indicator is not shown. I'm using default gtk+ theme.
There is no need for another test case. There was one in the original bug report. The point is that there has not been a new release of GTK+ since the fix was said to be backmerged to GTK+2.10 in October.
Okay, Thank you for the info. Surya
This is broken again with GTK+-2.12.1. It worked OK with later versions of GTK+-2.10, including GTK+-2.10.14. The test case originally posted will demonstrate the problem. Chris
*** Bug 491520 has been marked as a duplicate of this bug. ***
This broke when trying to fix part of 448343. Seems to be a little troublesome; trying to work out a different fix for 331338 now.
Created attachment 98849 [details] [review] patch I don't really get why I didn't figure this earlier, but this patch seems to do the trick. It makes sense too somewhat -- usually there is only a sensible sort order set when show_sort_indicator is TRUE. In all other cases we want the default, GTK_ARROW_NONE. Another if-clause later on will control whether the arrow (a real arrow or none) will have to be shown. Not committing yet, I want to sanity check this again before I commit for real.
Committed this on HEAD for now. (r19188).
Don't know why this one is still open; marking as FIXED.
This is not fixed in 2.12. See comment #11. (It may or may not be fixed in 2.13/2.14, I have not tested.) The bug title has become misleading. If you want to close it I suggest you do so after filing a new bug for 2.12.
Commit is now also in the 2-12 branch (r20338) -- should be in the next 2.12 release.
*** Bug 502738 has been marked as a duplicate of this bug. ***
*** Bug 550813 has been marked as a duplicate of this bug. ***