Closed Bug 506510 Opened 15 years ago Closed 15 years ago

Disable filters menu item when no accounts are set up

Categories

(SeaMonkey :: MailNews: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0b2

People

(Reporter: mkmelin, Assigned: InvisibleSmiley)

References

Details

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #67219 +++

When no account are set up, the message filters menu is not disabled as it should be. (Fixed for tb in bug 67219.)
Whiteboard: [good first bug]
Attached patch proposed patch (obsolete) — Splinter Review
The "no account" case is probably not much of an issue for SM since you're prompted to create an account each time you open MailNews until an account exists. OTOH the solution is simple so we may just as well fix this.
Assignee: nobody → jh
Status: NEW → ASSIGNED
Attachment #391643 - Flags: superreview?(neil)
Attachment #391643 - Flags: review?(mnyromyr)
Hmm, saw Good First Bug only after submitting the patch. Now it's too late. Anyway, there have been several calls for participation without much effect in the past so it probably doesn't make much of a difference. Still I'll try to wait a little longer next time... if I notice. ;-)
Comment on attachment 391643 [details] [diff] [review]
proposed patch

>diff --git a/suite/mailnews/mailWindowOverlay.xul b/suite/mailnews/mailWindowOverlay.xul
>+  <command id="cmd_displayMsgFilters"
>+           oncommand="goDoCommand('cmd_displayMsgFilters');" disabled="true"/>

Move disabled on its own line before the oncommand.

r=me with that.
Attachment #391643 - Flags: review?(mnyromyr) → review+
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #391643 - Attachment is obsolete: true
Attachment #391648 - Flags: superreview?(neil)
Attachment #391648 - Flags: review+
Attachment #391643 - Flags: superreview?(neil)
Comment on attachment 391648 [details] [diff] [review]
patch v2

>+      case "cmd_displayMsgFilters":
>+        return gDBView;
Unfortunately this disables the menuitem when Account Central is showing... this is the Account Central that proudly displays "Manage message filters" ...
Attachment #391648 - Flags: superreview?(neil) → superreview-
(In reply to comment #5)
> (From update of attachment 391648 [details] [diff] [review])
> >+      case "cmd_displayMsgFilters":
> >+        return gDBView;
> Unfortunately this disables the menuitem when Account Central is showing...
> this is the Account Central that proudly displays "Manage message filters" ...

You're right, and that also applies to TB.

There's gAccountCentralLoaded (SM only) but it's useless since it's also TRUE if there are no accounts. :-(

The only reliable thing I could find is this:

return gDBView || window.frames["accountCentralPane"].location
                                .href == pref.getComplexValue("mailnews.account_central_page.url",
                                  Components.interfaces.nsIPrefLocalizedString).data;

window.frames["accountCentralPane"].location.href is equal to about:blank in case there are no accounts but just checking against that feels like a bad idea to me.

Magnus, how would you fix this for TB?
Added a followup patch to bug 67219. 
Re good first bug, no worries, we could add that notation a lot more, and a i think a lot of smaller porting bugs are that almost automatically.
Thanks Neil and Magnus. This is obviously better. :-)
Attachment #391648 - Attachment is obsolete: true
Attachment #391903 - Flags: superreview?(neil)
Attachment #391903 - Flags: review?(mnyromyr)
Comment on attachment 391903 [details] [diff] [review]
patch v3
[Checkin: Comment 10]

You know me, I always like finding Thunderbird bugs ;-)
Attachment #391903 - Flags: superreview?(neil) → superreview+
Attachment #391903 - Flags: review?(mnyromyr) → review+
Keywords: checkin-needed
Depends on: 67219
Version: unspecified → Trunk
Comment on attachment 391903 [details] [diff] [review]
patch v3
[Checkin: Comment 10]


http://hg.mozilla.org/comm-central/rev/8662b1b4e546
Attachment #391903 - Attachment description: patch v3 → patch v3 [Checkin: Comment 10]
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [good first bug]
Target Milestone: --- → seamonkey2.0b2
You need to log in before you can comment on or make changes to this bug.