Closed Bug 1584160 Opened 2 months ago Closed 10 days ago

Toolbar buttons of add-ons in the menubar are not shown after startup

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set

Tracking

(thunderbird_esr6871+ fixed, thunderbird71 fixed, thunderbird72 fixed)

RESOLVED FIXED
Thunderbird 72.0
Tracking Status
thunderbird_esr68 71+ fixed
thunderbird71 --- fixed
thunderbird72 --- fixed

People

(Reporter: myaddons, Assigned: darktrojan)

References

Details

Attachments

(3 files)

Use the "Customize Toolbar" functionality in the Main Window of Thunderbird to drag and drop some toolbar buttons into the menubar (=not the toolbar!).

Toolbar buttons of Thunderbird itself are correctly shown after a restart of Thunderbird. However, toolbar buttons of add-ons, e.g. "Lightning -> Calender" and "Lightning -> Tasks", are not shown anymore after a restart of Thunderbird.

Another observation: When you toggle the visibility of the menubar to hide and then again show the menubar, the toolbar buttons are also shown again.

The problem does affect Thunderbird 68.1.1; but it does not affect Thunderbird 60.9.0.

Flags: needinfo?(richard.marti)

I tried Mail Redirect and moved the button to the menubar. After restart of TB the button is still there. Also start with hidden menubar lets the button in the menubar.
What add-ons do you use?

Flags: needinfo?(richard.marti)

Actually I have used a new profile without any additional add-ons, i.e. only Thunderbird & Lightning. This is only happening in Thunderbird 68. (In Thunderbird 60 it works as expected.)

Originally the problem was brought to my attention in the German Thunderbird Forum at www.thunderbird-mail.de:
https://www.thunderbird-mail.de/forum/thread/82640-bug-bei-anpassung-symbolleiste-mit-tb-68-1-0/

Attached image Menubar before restart

The menubar with "Lightning -> Calendar" and "Lightning -> Tasks" before the restart

Attached image Menubar after restart

The menubar with "Lightning -> Calendar" and "Lightning -> Tasks" missing(!) after the restart

I have this exact problem too when customizing the menubar with the buttons for the "Xpunge" and "Mark All Read Button" extensions: customization works fine, and the buttons do what they are supposed to do, but after restarting Thunderbird the buttons are gone and I have to add them again, and again, and again, for each restart. This applies to Thunderbird 68.2.1 and its predecessor 68.2.0, on Windows 10 64-bit. In the past it all worked without any problems.

Flags: needinfo?(geoff)
See Also: → 1582888

There's a bunch of things going on here, in all cases the persisted state could include things provided by an overlay, but didn't have the state refreshed after the overlay arrived. We have code to do this, but it didn't take into account a number of things:

  • Menu toolbars are specifically excluded. ISTR we did this on purpose but that seems illogical to me now.
  • Toolbars that use a palette that an item is added to, but that aren't a descendant of the toolbox the palette belongs to, aren't included.
  • Toolbars that come from an overlay, not the original document, aren't included.

I believe this fixes bug 1582888 too and in a more general way.

Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(geoff)
Attachment #9106376 - Flags: review?(paul)
Duplicate of this bug: 1578470
  • Menu toolbars are specifically excluded. ISTR we did this on purpose but that seems illogical to me now.

This is particularly important for addons like uBlock, where the icon/state needs to be displayed in a toolbar that is visible for content tabs, so thanks for fixing the error.

Comment on attachment 9106376 [details] [diff] [review]
1584160-toolbar-persist-restore-1.diff

Review of attachment 9106376 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.  Great to have a more general fix for bug 1582888.  I checked adding/removing buttons to the menu bar and the Calendar toolbar (overlay toolbar), and the changes persist across restarts.
Attachment #9106376 - Flags: review?(paul) → review+
Attachment #9106376 - Flags: approval-comm-esr68+
Attachment #9106376 - Flags: approval-comm-beta+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/e2512bf794d1
Restore persisted state of all toolbars possibly affected by an overlay. r=pmorris

Status: ASSIGNED → RESOLVED
Closed: 10 days ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 72.0
Duplicate of this bug: 1582888
You need to log in before you can comment on or make changes to this bug.