Closed Bug 1620123 Opened 1 year ago Closed 1 year ago

Calendar menus and menu items appear in message windows

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 75.0

People

(Reporter: pmorris, Assigned: pmorris)

References

(Regression)

Details

Attachments

(1 file)

Back when calendar was an add-on the calendar menus and menu items ("Events and Tasks" etc.) did not appear in the menu bar or app menu of single message windows. Now they do but they shouldn't (and they do not work there anyway).

Discovered while working on bug 1619732. Caused by the transition from overlays to inlining and pre-processor includes in bug 1608610.

One possible fix (somewhat ugly but consistent) would be to break the menu item code (e.g. mainNavigationToolbox.inc.xhtml) into a lot of separate include files, then they could be re-assembled for one window type without the calendar parts and for another window type with the calendar parts.

Or better yet, if it works, define a pre-processor flag and then use that in a pre-processor conditional (#ifdef) to leave out the calendar parts in one place but include them in another. This seems promising.

Finally, we could dynamically insert the menu items where needed using JS as explored in bug 1597596. But that is inconsistent with the way the rest of the UI is implemented so not ideal.

Summary: Calendar menus appear in message windows → Calendar menus and menu items appear in message windows

I've added the MAIN_WINDOW define, see https://searchfox.org/comm-central/rev/e400e7859d4e5e5b93e609e2ad4a8d71a7a75597/mail/base/content/mainNavigationToolbox.inc.xhtml#835. This could help you to add elements on the main window but not to the stand alone window.

Thanks Richard, MAIN_WINDOW is perfect -- the right tool for the job.

Attachment #9131095 - Flags: review?(geoff)
Status: NEW → ASSIGNED
Attachment #9131095 - Flags: review?(geoff) → review+
Target Milestone: --- → 75

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5b32371fa02f
Do not include calendar menus and menu items in message windows. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.