Closed Bug 537378 Opened 15 years ago Closed 12 years ago

"search messages" (Ctrl+Shift+F) should always be enabled in the 3pane - doesn't open if no folder or account selected/focused in folder pane

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 14.0

People

(Reporter: wsmwk, Assigned: mkmelin)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

This may be more than one issue. 

1. folder pane in any folder mode (All, Smart, etc)
2. click a folder 
3. change mode
4. ctrl+shift+F or Edit | Find | Search Messages

Actual results:
* no Search Messages dialog, even though a folder is shown in thread pane, and is enabled in Edit Find UI
* nothing in error console

Expected results:
Search Messages dialog

mostly reproducible. seems to be worse with multiple tabs open.
If you don't see it, cycle to yet another folder mode.

If you still don't see it, open on folder an a second tab ... Edit | Find | Search Messages becomes enabled but dialog still doesn't appear
Joe, can you reproduce?
Reproducible every time here after a mode change.
Noticed the the folder selection disappears after any mode change, although
the threadpane display does not.
The same thing happens if you de-select a folder without a mode change.
(CTRL-click)
So I think the key here is to retain selection in the folderpane on mode change.
Severity: normal → minor
See also (similar, but for "search all messages"): https://bugzilla.mozilla.org/show_bug.cgi?id=525206
OS: Windows Vista → All
Hardware: x86 → All
See Also: → 525206
Summary: search messages should always work - doesn't open if no folder or account selected in folder pane → "search messages" (Ctrl+Shift+F) should always work - doesn't open if no folder or account selected/focused in folder pane
We could subsume Bug 395596 as a duplicate of this one, and actually do here what the current summary says: Ctrl+Shift+F should *always* work, regardless of focus or selection. Wayne?
Attached patch proposed fix (obsolete) — Splinter Review
Where we end up is selectFolder and that's very much set up to handle a null folder. http://mxr.mozilla.org/comm-central/source/mail/base/content/SearchDialog.js#338
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #611300 - Flags: review?(bugmail)
Comment on attachment 611300 [details] [diff] [review]
proposed fix

Actually, i realized there's the no-account setup yet case to consider.
Attachment #611300 - Flags: review?(bugmail)
(In reply to Magnus Melin from comment #6)
> Comment on attachment 611300 [details] [diff] [review]
> proposed fix
> 
> Actually, i realized there's the no-account setup yet case to consider.

Will this fix Bug 395596, too?
(In reply to Thomas D. from comment #7)
> Will this fix Bug 395596, too?

No, that's a separate issue.
Attached patch proposed fix v2Splinter Review
Checking against gDBView didn't work out since e.g. for no-favourite-folders view on startup that still null. 

To add confusion cmd_search was in the wrong commandset - so the meny item was only sometimes showing correct state. Grr.
Attachment #611300 - Attachment is obsolete: true
Attachment #611549 - Flags: review?(bugmail)
Comment on attachment 611549 [details] [diff] [review]
proposed fix v2

I think it's better to do "return !!gDBView;" if you don't want to do "return gDBView != null;" so the type is consistent.

As I read it, this change will make us err more on the side of bringing up the dialog even when it might not have anything to search.  But far better that then to not bring it up when it should work!
Attachment #611549 - Flags: review?(bugmail) → review+
(In reply to Andrew Sutherland (:asuth) from comment #10)

> As I read it, this change will make us err more on the side of bringing up
> the dialog even when it might not have anything to search.  But far better
> that then to not bring it up when it should work!

Andrew, can you illustrate a case where "Search messages" "might not have anything to search"? Imo, advanced "Search messages" is a general search (albeit not global) which can be useful from any starting point within the application because on the "Search messages" dialogue, user can pick freely which account/folder + subfolders should be searched. Notwithstanding the bug that we can't search cross-account with this search type (and gloda-global search is *not* a sufficient alternative for doing that).
(In reply to Thomas D. from comment #11)
> (In reply to Andrew Sutherland (:asuth) from comment #10)
> 
> > As I read it, this change will make us err more on the side of bringing up
> > the dialog even when it might not have anything to search.  But far better
> > that then to not bring it up when it should work!
> 
> Andrew, can you illustrate a case where "Search messages" "might not have
> anything to search"?

Was just trying to acknowledge that I saw that we are changing from explicit checking of being able to find a folder (with limited/broken heuristics) whose server indicates that it "canSearchMessages" to assuming the presence of any account indicates that we can search messages.  And that I'm cool with that, as I think there's nothing to be gained by being more paranoid about it.
Yep, there might be very little to actually search if you e.g. set up a chat account an nothing more. (Then you still have Local Folders, but of course no mail unless you drag-n-dropped mails there.)
Blocks: 395596
http://hg.mozilla.org/comm-central/rev/6e3a62f70261 ->FIXED
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
Summary: "search messages" (Ctrl+Shift+F) should always work - doesn't open if no folder or account selected/focused in folder pane → "search messages" (Ctrl+Shift+F) should always be enabled in the 3pane - doesn't open if no folder or account selected/focused in folder pane
thanks! works great. after ctrl+click too
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: