Closed Bug 1002006 Opened 11 years ago Closed 9 years ago

MsgFilterList(args) should take targetFilter and pass it to FilterListDialog

Categories

(Thunderbird :: Filters, enhancement)

enhancement
Not set
normal

Tracking

(thunderbird46 fixed, thunderbird47 fixed, thunderbird_esr45 fixed)

RESOLVED FIXED
Thunderbird 47.0
Tracking Status
thunderbird46 --- fixed
thunderbird47 --- fixed
thunderbird_esr45 --- fixed

People

(Reporter: realRaven, Assigned: aceman)

References

Details

Attachments

(1 file, 3 obsolete files)

It should be possible to preselect a specific filter by adding args.filter = targetFilter; before calling MsgFilterList(args) It would also be good if we had a mechanism to select a filter when the filter dialog is already open. In my case I have written a merge assistant which opens the filter list after editing the resulting (merged) filter and I would like to highlight this filter within the list. [This functionality is part of my quickFilters addon]
Assignee: nobody → acelists
Depends on: 363982
Summary: MsgFilterList(args) should take targetFilter → MsgFilterList(args) should take targetFilter and pass it to FilterListDialog
Attached patch WIP patch (obsolete) — Splinter Review
This could do it. Patch to be applied on top of bug 363982.
Attachment #8413363 - Flags: feedback?(axelg)
Attached patch WIP patch v2 (obsolete) — Splinter Review
Found a small bug so that the .refresh() way didn't work right when creating new filter in the same account. This version also adds a usage of this functionality in core TB. The plain for loop over the filters doesn't look too efficient, but I have tested it to select the last filter of 10000 filters and didn't notice any significant slowdown (I mean it got hidden in the slowness of just showing such a filter list:)).
Attachment #8413363 - Attachment is obsolete: true
Attachment #8413363 - Flags: feedback?(axelg)
Attachment #8413372 - Flags: feedback?(axelg)
Attached patch patch v3 (obsolete) — Splinter Review
Patch updated after changes in bug 363982.
Attachment #8413372 - Attachment is obsolete: true
Attachment #8413372 - Flags: feedback?(axelg)
Attachment #8419079 - Flags: feedback?(axelg)
Attached patch patch v3.1Splinter Review
Axel, now that the required bug has landed, can you test this out and give me feedback so that we can proceed here?
Attachment #8419079 - Attachment is obsolete: true
Attachment #8419079 - Flags: feedback?(axelg)
Attachment #8429472 - Flags: feedback?(axelg)
Status: NEW → ASSIGNED
Axel, can you please look at this now?
(In reply to :aceman from comment #5) > Axel, can you please look at this now? I currently cannot compile, I promise I do it on Friday evening! I had already glanced over the code which looked fine to me but I need to compile to give you a full assessment.
Axel?
Flags: needinfo?(axelg)
Axel, can you get to this soon?
(In reply to :aceman from comment #8) > Axel, can you get to this soon? aceman, how can I test this without compiling a version of Thunderbird? Compiling on my system is broken so I don't know what else I should do? Just read the patch?
Flags: needinfo?(axelg)
I've started a try build at https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=13e569d08ec3 . You can then retrieve the binaries from it.
(In reply to :aceman from comment #10) > I've started a try build at > https://treeherder.mozilla.org/#/jobs?repo=try-comm- > central&revision=13e569d08ec3 . You can then retrieve the binaries from it. Thanks. Looking at that I need to go into one of the [B] links to get a binary, correct? I am going to wait for a while if the Win7 32bit build completes otherwise going to test the Windows XP one. Will write a patch in quickFilters to try it out.
Tried it, and would like to give feedback + (f+) I can now open the filterlist and preselect a certain filter.
Comment on attachment 8429472 [details] [diff] [review] patch v3.1 worked for me!
Attachment #8429472 - Flags: feedback?(axelg) → feedback+
Comment on attachment 8429472 [details] [diff] [review] patch v3.1 Thanks.
Attachment #8429472 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8429472 [details] [diff] [review] patch v3.1 Review of attachment 8429472 [details] [diff] [review]: ----------------------------------------------------------------- Looks ok to me. r=mkmelin ::: mail/base/content/FilterListDialog.js @@ +277,5 @@ > + * The listbox view is scrolled to the corresponding item. > + * > + * @param aFilter The nsIMsgFilter to select. > + * > + * @return True/false indicating whether the filter was found and selected. nit: true
Attachment #8429472 - Flags: review?(mkmelin+mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
Comment on attachment 8429472 [details] [diff] [review] patch v3.1 While this was not requested for TB45, its landing caused a later patch (that was requested) to not apply cleanly, so it was easier to accept this than fix the other patch. http://hg.mozilla.org/releases/comm-beta/rev/a7b82ccc9591 http://hg.mozilla.org/releases/comm-esr45/rev/82112f368aba
Attachment #8429472 - Flags: approval-comm-esr45+
Attachment #8429472 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: