"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

VERIFIED FIXED in Thunderbird 14.0

Status

Thunderbird
Mail Window Front End
--
minor
VERIFIED FIXED
8 years ago
5 years ago

People

(Reporter: wsmwk, Assigned: Magnus Melin)

Tracking

(Blocks: 2 bugs)

Thunderbird 14.0
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

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?

Comment 2

8 years ago
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.
(Reporter)

Updated

8 years ago
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: → bug 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
Blocks: 713979
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?
(Assignee)

Comment 5

5 years ago
Created attachment 611300 [details] [diff] [review]
proposed fix

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)
(Assignee)

Comment 6

5 years ago
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?
(Assignee)

Comment 8

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

No, that's a separate issue.
(Assignee)

Comment 9

5 years ago
Created attachment 611549 [details] [diff] [review]
proposed fix v2

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.
(Reporter)

Updated

5 years ago
Duplicate of this bug: 395596
(Assignee)

Comment 14

5 years ago
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.)
(Reporter)

Updated

5 years ago
Blocks: 395596
(Assignee)

Comment 15

5 years ago
http://hg.mozilla.org/comm-central/rev/6e3a62f70261 ->FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
(Assignee)

Updated

5 years ago
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.