After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 352738 - gtk_tree_view_column_set_sort_indicator() fails to show a sort indicator with GTK+-2.10
gtk_tree_view_column_set_sort_indicator() fails to show a sort indicator with...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
: 491520 502738 550813 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-08-24 21:19 UTC by Chris Vine
Modified: 2008-09-04 10:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
test case (1.35 KB, text/plain)
2006-08-24 21:20 UTC, Chris Vine
  Details
patch (479 bytes, patch)
2007-11-09 23:38 UTC, Kristian Rietveld
committed Details | Review

Description Chris Vine 2006-08-24 21:19:29 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.
Comment 1 Chris Vine 2006-08-24 21:20:36 UTC
Created attachment 71547 [details]
test case
Comment 2 Kristian Rietveld 2006-09-24 17:04:10 UTC
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).

Comment 3 Hans Oesterholt-Dijkema 2006-10-09 21:24:09 UTC
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).
Comment 4 Kristian Rietveld 2006-10-30 12:28:06 UTC
(backmerged to 2-10)
Comment 5 Surya Kiran 2006-12-21 06:56:29 UTC
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
Comment 6 Surya Kiran 2007-01-03 23:00:23 UTC
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
Comment 7 Kristian Rietveld 2007-01-04 01:06:03 UTC
(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)?
Comment 8 Surya Kiran 2007-01-04 04:25:17 UTC
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.
Comment 9 Chris Vine 2007-01-04 10:36:06 UTC
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.
Comment 10 Surya Kiran 2007-01-04 10:44:45 UTC
Okay,
Thank you for the info.

Surya
Comment 11 Chris Vine 2007-10-27 00:38:14 UTC
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
Comment 12 Kristian Rietveld 2007-11-05 14:08:42 UTC
*** Bug 491520 has been marked as a duplicate of this bug. ***
Comment 13 Kristian Rietveld 2007-11-05 14:17:10 UTC
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.
Comment 14 Kristian Rietveld 2007-11-09 23:38:51 UTC
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.
Comment 15 Kristian Rietveld 2007-12-17 13:28:53 UTC
Committed this on HEAD for now. (r19188).
Comment 16 Kristian Rietveld 2008-06-08 13:16:43 UTC
Don't know why this one is still open; marking as FIXED.

Comment 17 Chris Vine 2008-06-08 16:34:38 UTC
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.
Comment 18 Kristian Rietveld 2008-06-08 20:41:11 UTC
Commit is now also in the 2-12 branch (r20338) -- should be in the next 2.12 release.
Comment 19 Jonathan Matthew 2008-08-13 06:34:23 UTC
*** Bug 502738 has been marked as a duplicate of this bug. ***
Comment 20 Jonathan Matthew 2008-09-04 10:47:11 UTC
*** Bug 550813 has been marked as a duplicate of this bug. ***