Closed Bug 423236 Opened 16 years ago Closed 16 years ago
Tree view headers should correctly tell the GTK engine if its sorted or not
On some themes like Aurora, if a tree view column is sorted then the header can completely change its colour in addition to getting a sort arrow, like what Mac OS X does. We abuse the variable that the engine reads though, so in themes that support this every tree header gets coloured as if it was sorted; which is probably why the more widely used themes aren't taking on this nice usability enhancement :(
Comment on attachment 309726 [details] [diff] [review] Patch + // In this case, the flag denotes whether the header is the sorted one or not + if (GetTreeSortDirection(aFrame) == eTreeSortDirection_Natural) Shouldn't the flags be documented in gtk2drawing.h instead of in the caller? That'd make more sense and be more Webkit-friendly too...
None of the flags are documented in gtkdrawing.h. Even so, Webkit doesn't use anything except the standard HTML form controls and the fact that the argument is named isSorted should be hint enough.
Comment on attachment 309726 [details] [diff] [review] Patch a1.9=beltzner
Attachment #309726 - Flags: approval1.9? → approval1.9+
Checking in widget/src/gtk2/gtk2drawing.c; /cvsroot/mozilla/widget/src/gtk2/gtk2drawing.c,v <-- gtk2drawing.c new revision: 1.99; previous revision: 1.98 done Checking in widget/src/gtk2/nsNativeThemeGTK.cpp; /cvsroot/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp,v <-- nsNativeThemeGTK.cpp new revision: 1.155; previous revision: 1.154 done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
In function ‘ensure_tree_header_cell_widget’: http://mxr.mozilla.org/mozilla/source/widget/src/gtk2/gtk2drawing.c#676 warning: assignment from incompatible pointer type
That warning is for this line: 709 gMiddleTreeViewColumn = gtk_tree_view_column_new(); http://hg.mozilla.org/releases/mozilla-1.9.1/annotate/674255e22a5f/widget/src/gtk2/gtk2drawing.c#l709 The problem is: -- gMiddleTreeViewColumn is of type GtkWidget* -- gtk_tree_view_column_new() returns values of type GtkTreeViewColumn* -- these types are unrelated (see links below) -- hence, the assignment is invalid I don't know much about GTK code, but the object hierarchies here indicate that these types are indeed unrelated (except as siblings): > http://library.gnome.org/devel/gtk/stable/GtkTreeViewColumn.html#GtkTreeViewColumn.object-hierarchy > http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget.object-hierarchy
Ah -- the issue described in comment 5 and comment 6 was fixed on mozilla-central in bug 483883.
Depends on: 483883
You need to log in before you can comment on or make changes to this bug.