Closed Bug 265282 Opened 20 years ago Closed 20 years ago

[Mac] Unsorted tree columns are drawn as sorted (was: Unable to get Bookmarks columns in unsorted state)

Categories

(Core Graveyard :: GFX, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: marcia, Assigned: asaf)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Seen using Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3)
Gecko/20041018 Firefox/1.0:

STR:

1. Go to Manage Bookmarks
2. Observe that you can click on a column and get ascending and descending
order, but not unsorted.

I tested this on Windows and it behaves correctly - you can sort in ascending
order, descending order and if you click a third time you are in unsorted mode
with no triangle.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041107
Firefox/0.9.1+

Clicking to cycle through the states seems to work the way you want it!

More significantly, there is a menu item in the View menu that un-sorts
bookmarks.
Assignee: vladimir → vladimir+bm
ooh, this is a nsITheme issue... ("unsorted" does work, but the column header
isn't drawn properly). Some impl' (including ff and seamonkey bookmarks
frontend) assign "natural" to the sort-direction attribute, but
nsNativeTheme::IsSortedColumn only checks for empty/no direction attribute.
Assignee: vladimir+bm → general
Component: Bookmarks → GFX
Product: Firefox → Core
QA Contact: mconnor → ian
Target Milestone: --- → mozilla1.8beta2
Version: unspecified → Trunk
Attached patch patch (obsolete) — Splinter Review
see comment 2
Assignee: general → bugs.mano
Status: NEW → ASSIGNED
Attachment #176670 - Flags: superreview?(bzbarsky)
Attachment #176670 - Flags: review?(jhpedemonte)
So is "natural" actually a supported value? 

More interestingly, why are we duplicating that logic in various places (as we
clearly are)?  Can't we put it in one shared place somewhere?
"natural" appears to be a valid sort direction, presumably it exists for
persistence purposes, as nsXULTreeBuilder::EnsureSortVariables only checks for
"ascending" and "descending" (is this the duplication to which you refer?)
OK, so i guess the Right Thing would be to check if it the direction attribute
value is either "ascending" or "descending"?
I guess so, and while you're there you might return different enumeration values
for natural, ascending and descending which the caller then acts on.
Attachment #176670 - Flags: superreview?(bzbarsky)
Attachment #176670 - Flags: review?(jhpedemonte)
(In reply to comment #7)
> I guess so, and while you're there you might return different enumeration values
> for natural, ascending and descending which the caller then acts on.

isn't IsSortReversed used to do this?
Ah, but you don't want to have to check for sortDirection="descending" twice
(once for IsSortedColumn and once for IsSortReversed) do you?
Attached patch v2Splinter Review
Attachment #176670 - Attachment is obsolete: true
Attachment #176886 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #176886 - Flags: review?(jhpedemonte)
Comment on attachment 176886 [details] [diff] [review]
v2

>+      TreeSortDirection sortDirection;
>+      sortDirection = GetTreeSortDirection(aFrame);
No point having this on two lines, is there?

The rest looks ok; sr=me with this nit fixed.
Attachment #176886 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Attachment #176886 - Flags: review?(jhpedemonte) → review+
(In reply to comment #11)
> (From update of attachment 176886 [details] [diff] [review] [edit])
> >+      TreeSortDirection sortDirection;
> >+      sortDirection = GetTreeSortDirection(aFrame);
> No point having this on two lines, is there?
> 
> The rest looks ok; sr=me with this nit fixed.
> 

That would cause a crosses-initialization build error (this is inside a case).
Oh, I see.  In that case, just put { } around each 'case' block.
Summary: [Mac only] Unable to get Bookmarks columns in unsorted state → [Mac] Unsorted tree columns are drawn as sorted (was: Unable to get Bookmarks columns in unsorted state)
with those changes...

Checking in mac/nsNativeThemeMac.cpp;
/cvsroot/mozilla/gfx/src/mac/nsNativeThemeMac.cpp,v  <--  nsNativeThemeMac.cpp
new revision: 1.38; previous revision: 1.37
done
Checking in shared/nsNativeTheme.h;
/cvsroot/mozilla/gfx/src/shared/nsNativeTheme.h,v  <--  nsNativeTheme.h
new revision: 1.13; previous revision: 1.12
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: