The default bug view has changed. See this FAQ.

Update SeaMonkey's treeView.js to match new view API

RESOLVED FIXED in seamonkey2.1a1

Status

SeaMonkey
General
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: mano, Assigned: neil@parkwaycc.co.uk)

Tracking

Trunk
seamonkey2.1a1
x86
Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

In bug 498130, we're changing the nsINavHistoryResultView and other places APIs. The new API isn't comapatible with he places tree view implementation of SM. I'm pretty sure that at this point you can just copy over the FX implementaion (we've removed showSessions too).

The API showed at the last patch there is very likely final. Please let me know if you want to correspond patch-landings.

Comment 1

8 years ago
Thanks for the note about it - I just so much would hope we'd have branched already, then doing this for trunk only would be fine, but due to Thunderbird folks blocking that branching, we need to keep things working with at least both 1.9.1 and trunk for now, and that complicates this. :(

Mark, here's a bug that we should take into account with branching plans, even if it's SeaMonkey-only.
(Assignee)

Comment 2

8 years ago
(In reply to comment #0)
> I'm pretty sure that at this point you can just copy over the FX
> implementaion (we've removed showSessions too).
We didn't before, so we may want to merge changes instead.
Depends on: 498130
Whiteboard: [needs branch]
It's now checked in.
Version: unspecified → Trunk
(Assignee)

Comment 4

7 years ago
Created attachment 414728 [details] [diff] [review]
Possible patch

This is the minimum necessary to fix the bug. Places used to define a viewIndex property on their nodes which defaulted to -1; we now have to set that on the root manually but fortunately their nodes have classInfo which means that we can set arbitrary properties.
As a followup we could change our code to match their code more in two ways:
1. Rename viewIndex to _viewIndex
2. Move .properties to .node._cellProperties and eliminate the holder object
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #414728 - Flags: review?(iann_bugzilla)

Comment 5

7 years ago
Comment on attachment 414728 [details] [diff] [review]
Possible patch

r=me, could you file the follow up bug(s) please?
Attachment #414728 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Comment 6

7 years ago
Pushed changeset 5d3acfe7d0d7 to comm-central.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [needs branch]
(Assignee)

Updated

7 years ago
Blocks: 531696
Target Milestone: --- → seamonkey2.1a1
You didn't update the observing methods afiact (item_Title_Changed etc.)).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 8

7 years ago
(In reply to comment #7)
> You didn't update the observing methods afiact (item_Title_Changed etc.)).
Could you be more specific? Neither item_Title_Changed nor itemTitleChanged show up in an MXR of mozilla-1.9.1 and there is one hit in mozilla-central.
(Assignee)

Comment 9

7 years ago
Oh, I see now, it used to be called itemChanged but now it's nodeXXXChanged.
(Assignee)

Comment 10

7 years ago
Created attachment 415655 [details] [diff] [review]
Update observing methods

* Renamed itemChanged to invalidateNode
* Added nodeXXXChanged methods
* Renamed [Ii]tem to [Nn]ode almost everywhere
Attachment #415655 - Flags: review?(iann_bugzilla)

Comment 11

7 years ago
Comment on attachment 415655 [details] [diff] [review]
Update observing methods

>+   * This counts how many rows an node takes in the tree, that is, the
Nit: "a" rather than "an".

>+   * node itself plus any nodes following it with an increased indent.
>+   * This allows you to figure out how many rows an node (=1) or a
Nit: "a" rather than "an".

>     if (oldViewIndex > this._visibleElements.length)
>-      throw("Trying to remove an item with an invalid viewIndex");
>+      throw("Trying to remove an node with an invalid viewIndex");
Nit: "a" rather than "an".
Attachment #415655 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Comment 12

7 years ago
Pushed changeset 4b63c4badb42 to comm-central.
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.