Closed Bug 641253 Opened 12 years ago Closed 11 years ago

Message > Mark menu shouldn't be disabled when no messages are selected


(Thunderbird :: Mail Window Front End, defect)

Not set


(Not tracked)

Thunderbird 5.0b1


(Reporter: squib, Assigned: squib)




(1 file, 1 obsolete file)

On trunk, the Message > Mark menu is disabled if no messages are selected. Since some of the submenu items apply to an entire folder (As Read by Date and All Read), it should remain enabled.
Taking this, since I have a patch in the works.
Assignee: nobody → squibblyflabbetydoo
Attached patch Fix this (obsolete) — Splinter Review
Here's a fix for this. I also fixed an edge case in SelectedMessagesAreRead where it would return true when no messages are selected. This doesn't have any effect in Thunderbird though (but an addon might be affected).

I'd write tests, but I'm sure they'd fail on Mac, since we can't actually open the Message menu via Mozmill there, and the context menu won't work, since it will always result in at least one selected message.

I'm open to the idea of putting SelectedMessagesAreRead in gFolderDisplay, but maybe that should be part of another, more general bug to get rid of some of the global namespace pollution.
Attachment #529334 - Flags: review?(bugmail)
Comment on attachment 529334 [details] [diff] [review]
Fix this

Thanks for improving the clarity of the read parameter!

The mac menu bar still has XUL widgets that exist; they just are bridged to the native stuff in the background.  As such, if you tell a menu it is being displayed (and there are no dynamically created XBL bindings, although cloneNode is fine), you can still look at the XUL stuff and make sure it's okay.  I concede I am unclear on what happens if you send synthetic events at our backing XUL widgets, however.

In any event, I am not majorly concerned about regressions in this functionality, so I'll give the test a pass.

However, please do migrate "isDummy" from being defined in messageWindow.js in the StandaloneMessageDisplayWidget constructor up onto the prototype of the MessageDisplayWidget since this code (and some already existing code) may access it outside of the standalone message window context.  (Although the 'undefined' default will save us, from an error-checking perspective, it's nice to not be accessing nonexistent properties.)
Attachment #529334 - Flags: review?(bugmail) → review+
This should be a pretty uncontroversial change, but I just wanted to make sure this was the most appropriate spot to put isDummy before I checked this in. Thanks!
Attachment #529334 - Attachment is obsolete: true
Attachment #529536 - Flags: review?(bugmail)
Oh yeah: I had tried in bug 575732 to test the Message menu, but it was failing on Mac, so either I did something wrong, or Mozmill can't adequately control global menus on Mac. Either way, I have no idea how to fix it, since I don't have a Mac. :)
Attachment #529536 - Flags: review?(bugmail) → review+
Checked in:
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.3a4
Blocks: 768025
You need to log in before you can comment on or make changes to this bug.