Closed
Bug 455069
Opened 16 years ago
Closed 16 years ago
"Search Messages...", compact folders grayed out when IMAP folder is selected
Categories
(MailNews Core :: Networking, defect)
MailNews Core
Networking
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0a3
People
(Reporter: mcsmurf, Assigned: mcsmurf)
References
Details
(Keywords: dogfood, regression)
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
standard8
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
To reproduce:
1. Fetch SeaMonkey trunk build
2. Select a folder from an IMAP account, may also happen with POP3, dunno
2. Try to select Tools->Search Messages...
Results:
"Search Messages..." is grayed out and cannot be selected.
This is probably a regression, I think this might have to do with Bug 422814. It changed the function nsImapIncomingServer::GetPrefForServerAttribut under http://hg.mozilla.org/comm-central/annotate/e4f4569d451a/mailnews/imap/src/nsImapIncomingServer.cpp#l26. This function is called from nsImapIncomingServer::GetCanSearchMessages (http://mxr.mozilla.org/comm-central/source/mailnews/imap/src/nsImapIncomingServer.cpp#2465) which is called by http://hg.mozilla.org/comm-central/annotate/e4f4569d451a/mailnews/base/resources/content/mail3PaneWindowCommands.js#l865.
The old function code under nsImapIncomingServer::GetPrefForServerAttribut did not make that much sense (it did not use the prefSuffix param, see the patch/diff), but with the new code I get this bug here.
Assignee | ||
Comment 1•16 years ago
|
||
Confirmed with a TB build, so MailNews Core.
Component: MailNews: Message Display → Networking
Product: SeaMonkey → MailNews Core
QA Contact: message-display → mailnews.networking
Comment 2•16 years ago
|
||
I think the old code didn't touch the out variable if the pref didn't exist, and the callers all set it to true, but the new code sets it to false if the pref doesn't exist.
Comment 3•16 years ago
|
||
file|compact folders is toast too
Assignee | ||
Updated•16 years ago
|
Blocks: autoconfig
Assignee | ||
Comment 4•16 years ago
|
||
I meant http://hg.mozilla.org/comm-central/annotate/e4f4569d451a/mailnews/imap/src/nsImapIncomingServer.cpp#l2691 in the first comment as first link.
Comment 6•16 years ago
|
||
What this patch does is to make GetPrefForServerAttribute act as it did before, i.e., don't change the value if the preference doesn't exist, unlike GetBoolValue.
Assignee: nobody → Pidgeot18
Status: NEW → ASSIGNED
Attachment #338413 -
Flags: superreview?(bienvenu)
Attachment #338413 -
Flags: review?(bienvenu)
Comment 7•16 years ago
|
||
Attachment #338413 -
Flags: superreview?(bienvenu)
Attachment #338413 -
Flags: superreview+
Attachment #338413 -
Flags: review?(bienvenu)
Attachment #338413 -
Flags: review+
Comment 8•16 years ago
|
||
Checked in as changeset b63a39af19cd.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•16 years ago
|
||
Still broken for me with a SeaMonkey trunk build.
Assignee | ||
Comment 10•16 years ago
|
||
GetBoolValue always returns NS_OK, so the NS_FAILED check cannot work. Maybe a clean fix would be better (no longer use the prefValue arg as in/out param).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 11•16 years ago
|
||
does this also break other things in some way? message counts, filtering
Comment 12•16 years ago
|
||
can I kill comment 11? :) ignore it - started with wrong profile.
Assignee | ||
Comment 13•16 years ago
|
||
Breaks basic functions of SeaMonkey MailNews (also see Bug 454936), so requesting blocking?.
Flags: blocking-seamonkey2.0a1?
Updated•16 years ago
|
Flags: in-testsuite?
Comment 14•16 years ago
|
||
Still broken with thunderbird also. The first time it might be non-grayed out, but it doesn't bring up the search dialog.
File | Compact and the Compact Button are always disabled for IMAP too.
Flags: blocking-thunderbird3+
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Thunderbird 3.0b1
Assignee | ||
Comment 15•16 years ago
|
||
So, I had the idea to add a parameter with the default value to GetBoolValue. That parameter is assigned to the return value when no pref was found. Comments welcome.
Assignee | ||
Comment 16•16 years ago
|
||
Comment on attachment 338554 [details] [diff] [review]
Idea for a patch
>- if (NS_FAILED(mPrefBranch->GetBoolPref(prefname, val)))
>- mDefPrefBranch->GetBoolPref(prefname, val);
>+ if (NS_FAILED(mPrefBranch->GetBoolPref(aPrefname, aVal)))
>+ if (NS_FAILED(mDefPrefBranch->GetBoolPref(aPrefname, aVal)))
>+ *aVal = aDefaultValue;
Looks like I forgot { ... } after the first if-clause.
Comment 17•16 years ago
|
||
(In reply to comment #15)
> Created an attachment (id=338554) [details]
> Idea for a patch
>
> So, I had the idea to add a parameter with the default value to GetBoolValue.
> That parameter is assigned to the return value when no pref was found. Comments
> welcome.
This seems a bit like overkill, when we could just replicate the appropraite actions on the function. It also means we have an inconsistent set of APIs for getting the different types of prefs. Have you also checked for javascript usages? I guess making that default paramenter [optional] would save changing those as well.
Comment 18•16 years ago
|
||
painful to use latest trunk
Keywords: dogfood
Summary: "Search Messages..." grayed out when IMAP folder is selected → "Search Messages...", compact folders grayed out when IMAP folder is selected
Assignee | ||
Comment 19•16 years ago
|
||
This is basically the GetBoolValue function implemented in the GetPrefForServerAt function, just with the input parameter as default return value when getting the prefs failed.
Assignee | ||
Updated•16 years ago
|
Attachment #338632 -
Flags: review?(bugzilla)
Comment 20•16 years ago
|
||
Comment on attachment 338632 [details] [diff] [review]
Another patch
[Checkin: See comment 22]
Please add a comment at the start of the function stating that the caller must initialise prefValue for the default value.
Note that we're accepting this in this format because those prefs should disappear because they are related to aol setups that weren't supported, and we believe they now are.
Attachment #338632 -
Flags: review?(bugzilla) → review+
Comment 21•16 years ago
|
||
(In reply to comment #20)
> Note that we're accepting this in this format because those prefs should
> disappear because they are related to aol setups that weren't supported, and we
> believe they now are.
I filed bug 455326.
Assignee | ||
Updated•16 years ago
|
Attachment #338632 -
Flags: superreview?(bienvenu)
Updated•16 years ago
|
Attachment #338632 -
Flags: superreview?(bienvenu) → superreview+
Assignee | ||
Comment 22•16 years ago
|
||
Pushed to c-c, changeset 713c34b1a232.
Assignee | ||
Updated•16 years ago
|
Assignee: Pidgeot18 → bugzilla
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Flags: blocking-seamonkey2.0a1?
Comment 25•16 years ago
|
||
This FIXED bug is flagged with in‑testsuite? It would be great if assignee or someone else can clear the flag if a test is not appropriate. And if appropriate, create a test and plus the flag to finish off the bug.
Updated•15 years ago
|
Attachment #338632 -
Attachment description: Another patch → Another patch
[Checkin: See comment 22]
Updated•15 years ago
|
Attachment #338413 -
Attachment description: Fix → Fix
[Checkin: Comment 8]
Updated•15 years ago
|
Attachment #338554 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•