MozillaZine

TB78 moves addon buttons back to customize toolbar

User Help for Mozilla Thunderbird
hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted July 31st, 2020, 6:00 am

The drag is successful, I can drag to addon buttons to any toolbar.
However after restart they are back again in the customize toolbar, except for the buttons moved into mail toolbar (Get messages, ....)

For example:
uBlock0_1.28.5b9.thunderbird.xpi
preferences_button-1.0-tb.xpi
toggle_message_pane-1.0-tb.xpi
config_button-1.1-tb.xpi
restart_button-1.0-tb.xpi
taskviewlayout-55.3-tb.xpi

Can I do something to keep the buttons where I moved them?

DanRaisch
Moderator

User avatar
 
Posts: 123868
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted July 31st, 2020, 6:27 am

Are you using any sort of cleanup utility, li CcLeaner?
Have you confirmed that all of those extensions are compatible with version 78?

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted July 31st, 2020, 7:16 am

I tried the restart button on the menubar. It is in the customize toolbar window at startup.

Restart Button by Dillinger
http://addons.thunderbird.net/thunderbird/addon/987787

Config Button by Dillinger
http://addons.thunderbird.net/thunderbird/addon/987784

Preferences Button by Dillinger
http://addons.thunderbird.net/thunderbird/addon/987857

Toggle Message Pane by Dillinger
http://addons.thunderbird.net/thunderbird/addon/987785

P.S.

ThunderKdB (see "Thunderbird 78 Compatible" for extension list)
http://cleidigh.github.io/ThunderKdB/index.html
Last edited by morat on August 15th, 2020, 9:51 am, edited 1 time in total.

hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted July 31st, 2020, 9:06 am

DanRaisch wrote:Are you using any sort of cleanup utility, li CcLeaner?
Have you confirmed that all of those extensions are compatible with version 78?


Yes, I'm using CcLeaner.
EDIT: Only "Compact databases" is set for Thunderbird

Preferences_button, toggle_message_pane, config_button, restart_button and taskviewlayout is from addons.thunderbird.net and marked as "Works with Thunderbird 68.0 - *",

I use regularly preferences_button, toggle_message_pane, config_button, restart_button, and they work fine, I'm just getting to know taskviewlayout.

uBlock0 is beta, and is from Gitgub, works fine.
Last edited by hopalongrock on July 31st, 2020, 9:28 am, edited 1 time in total.

hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted July 31st, 2020, 9:19 am

morat wrote:ThunderKdB (see "Thunderbird 78 Compatible" for extension list)
http://cleidigh.github.io/ThunderKdB/index.html


Thanks for the list, Preferences_button, toggle_message_pane, config_button, restart_button and taskviewlayout is in "Thunderbird MailExtension or 78 Compatible (83)" list.

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 11th, 2020, 12:20 pm

The restart button is a browserAction button and the default toolbar is the "Mail Toolbar".

A browserAction button works correctly on the default toolbar. If I move a browserAction button to the "Menu Bar", then the button moves to the customize toolbar window at startup.

browserAction buttons don't persist outside the default toolbar
http://bugzilla.mozilla.org/show_bug.cgi?id=1598190
http://bugzilla.mozilla.org/show_bug.cgi?id=1584160#c14

I tried to set the "Menu Bar" currentset in the xulstore.json file using the error console, but the workaround fails.

hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted August 11th, 2020, 1:12 pm

morat wrote:The restart button is a browserAction button and the default toolbar is the "Mail Toolbar".

A browserAction button works correctly on the default toolbar. If I move a browserAction button to the "Menu Bar", then the button moves to the customize toolbar window at startup.

browserAction buttons don't persist outside the default toolbar
http://bugzilla.mozilla.org/show_bug.cgi?id=1598190
http://bugzilla.mozilla.org/show_bug.cgi?id=1584160#c14


So this is officially a bug, unfortunately for 9 months now.

The Mail Toolbar is unfortunate as default as I think, because in most cases the tabs hide it, so the buttons are not visible.

Is the default the developer's decision or a Mozilla default?

morat wrote:I tried to set the "Menu Bar" currentset in the xulstore.json file using the error console, but the workaround fails.

I don’t know about this, it is beyond my knowledge.

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 11th, 2020, 1:26 pm

The default toolbar is the decision of the app developers, not the addon developer.

Restart Button Source
http://github.com/cleidigh/ThunderKdB/t ... button/src

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 15th, 2020, 12:55 pm

You could use the userChromeJS extension to set the "Menu Bar" currentset at startup. (for advanced users only)

You need to add the id for each item on the "Menu Bar" to the userChrome.js file.

Code: Select all
/* Thunderbird userChrome.js */

// Thunderbird 68 uses the messenger.xul page.
// Thunderbird 78 uses the messenger.xhtml page.

(function () {
  if (location == "chrome://messenger/content/messenger.xul" ||
      location == "chrome://messenger/content/messenger.xhtml") {
    setTimeout(function () {
      try {
        var ids = [];
        ids.push("menubar-items"); // File Edit View Go Message Tools Help Wrapper

        ids.push("restartbutton_dillinger-browserAction-toolbarbutton");     // Restart Button
        ids.push("configbutton_dillinger-browserAction-toolbarbutton");      // Config Button
        ids.push("prefsbutton_dillinger-browserAction-toolbarbutton");       // Preferences Button
        ids.push("togglemessagepane_dillinger-browserAction-toolbarbutton"); // Preview Button

        ids.push("spring");              // Flexible Space
        ids.push("mailviews-container"); // Mail Views

        var toolbar = document.getElementById("mail-toolbar-menubar2"); // Menu Bar
        toolbar.currentSet = ids.join(",");
        toolbar.setAttribute("currentset", ids.join(","));
        Services.xulStore.persist(toolbar, "currentset");  // stores to xulstore.json file
      } catch (e) {
        Components.utils.reportError(e);
      }
    }, 1000);
  }
})();

userChromeJS by jikamens (compatible with TB 68 and TB 78)
http://addons.thunderbird.net/thunderbird/addon/986610

Instructions:

1. install userChromeJS extension
2. close email client
3. create or edit the userChrome.js file in the chrome folder
4. open email client

You do not need to purge the caches with jikamens' version.

userChromeJS by alta88 (obsolete)
http://userchromejs.mozdev.org/
http://userchromejs.mozdev.org/faq.html

I tested the userChrome.js file in Thunderbird 78 with Dillinger's buttons. It works for me.

P.S.

Here is how to show the "Menu Bar" currentset using the error console. (useful for testing)

Code: Select all
(function () {
  var url = "chrome://messenger/content/messenger.xul";   // Thunderbird 68
  var url = "chrome://messenger/content/messenger.xhtml"; // Thunderbird 78
  var id = "mail-toolbar-menubar2";                       // Menu Bar
  var toolbar = document.getElementById(id);
  var arr = [];
  arr.push("1: " + Services.xulStore.getValue(url, id, "currentset"));
  arr.push("2: " + toolbar.getAttribute("currentset"));
  arr.push("3: " + toolbar.currentSet);
  console.log(arr.join("\n\n"));
})();

hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted August 15th, 2020, 1:58 pm

The addon and Your userChrome.js works fine, thank you!

I don't understand the meaning of this sentence:
"Here is how to show the "Menu Bar" currentset using the error console. (useful for testing)"

When I copied the code into the error console, I get the error:

Failed to analyze input string unterminated string literal js-property-provider.js:370:13

(function () {
var url = "chrome://messenger/content/messenger.xul"; // Thunderbird 68
var url = "chrome://messenger/content/messenger.xhtml"; // Thunderbird 78
var id = "mail-toolbar-menubar2"; // Menu Bar
var toolbar = document.getElementById(id);
var arr = [];
arr.push("1: " + Services.xulStore.getValue(url, id, "currentset"));
arr.push("2: " + toolbar.getAttribute("currentset"));
arr.push("3: " + toolbar.currentSet);
console.log(arr.join("\n\n"));
})();

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 15th, 2020, 3:51 pm

In Thunderbird, the browser console is called the error console.

Tools > Developer Tools > Error Console (Ctrl+Shift+J)

You need to enable the "Logs" button to show the output in the error console.

If you evaluate the follow expression with the "Logs" button disabled, then you won't see the output.

Code: Select all
console.log("test");

Error Console
http://developer.mozilla.org/docs/Tools/Browser_Console

Failed to analyze input string unterminated string literal js-property-provider.js:370:13

I get the js-property-provider.js error as well. Ignore it. The cause of the error isn't the code snippet.

hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted August 16th, 2020, 1:33 am

Thanks.

How can I add the Add-ons button instead of Mail Views button.
I commented out ids.push("mailviews-container"); // Mail Views ,
but don't know the name or id for the Add-ons button.
Is somewhere a table ?

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 16th, 2020, 6:38 am

You can customize the menubar using the customize toolbar window, then run the following code snippet in the error console to show the menubar currentset.

Code: Select all
document.getElementById("mail-toolbar-menubar2").currentSet;

If you move the "Reply" button to the menubar, then the "button-reply" id is added to the menubar currentset.

You can add the "button-reply" id to the userChrome.js file like so...

Code: Select all
ids.push("button-reply"); // Reply

hopalongrock
 
Posts: 41
Joined: October 7th, 2017, 11:19 am

Post Posted August 16th, 2020, 8:30 am

Many thanks, Add-ons button is now fixed in menubar with ids.push("button-addons");

pdrummond

User avatar
 
Posts: 128
Joined: December 31st, 2004, 1:23 pm
Location: Ottawa Canada

Post Posted September 8th, 2020, 10:45 am

morat wrote:...browserAction buttons don't persist outside the default toolbar
http://bugzilla.mozilla.org/show_bug.cgi?id=1598190
http://bugzilla.mozilla.org/show_bug.cgi?id=1584160#c14

I suggest everyone vote for these bugs so they get a higher priority. Nothing has happened in 10 months. It looks like it wouldn't take much time :wink:

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 3 guests