Quick access to Options?

User Help for Mozilla Thunderbird
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Quick access to Options?

Post by semigeek »

By default, the only access to TB's Options is through the Alt-menu under Tools... and to make it worse, Add-on Options comes before Options so you can't even type Alt-T O! There's no icon for Options to drag onto the toolbar either, and no key shortcut for it. (In the past I used keyconfig to make one for both TB and FF, but gather there's no equivalent of that anymore?)

So what can one do? Is there an addon to create icons or shortcuts for this, or anything else? (All I could find was one that adds an icon shortcut for about:config.)

Incidentally, why on earth does TB have Add-on Options in the Tools menu instead of on the add-ons page like Firefox?

[Edit: sorry, forgot to mention, using TB 68]
Last edited by semigeek on June 1st, 2021, 2:10 pm, edited 1 time in total.
sfhowes
Posts: 755
Joined: April 1st, 2012, 10:21 am

Re: Quick access to Options?

Post by sfhowes »

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

Re: Quick access to Options?

Post by morat »

Dillinger has a config button addon and restart button addon as well.

Alternative to keyconfig: http://forums.mozillazine.org/viewtopic ... #p14872763
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

morat wrote:Alternative to keyconfig: http://forums.mozillazine.org/viewtopic ... #p14872763
Thanks, tbkey looks great! I'm trying it out... (is there an equivalent for Firefox?)

I've successfully set up a keyboard shortcut for Options, using the function "openOptionsDialog". But I can't find the equivalent function for the Addons page? (I don't see it on the KB page that lists many commands... by the way, the KB seems to be online again?)
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Quick access to Options?

Post by morat »

No equivalent for the Firefox release build.

Unofficial versions by xiaoxiaoflood (super advanced users only)
http://github.com/xiaoxiaoflood/firefox ... extensions

Try these:

Code: Select all

window.openOptionsDialog();

Code: Select all

window.openAddonsMgr();

Code: Select all

window.document.getElementById('tabmail').openTab('chromeTab', {chromePage: 'about:config'});
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

Great, "func:openAddonsMgr" worked to set up a tbkey shortcut for that too.

Oddly though, if I duplicate these shortcuts in the Compose window section of tbkey, they still don't work there?
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Quick access to Options?

Post by morat »

Try this:

Code: Select all

window.Services.wm.getMostRecentWindow('mail:3pane').openOptionsDialog();
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

Yes, that worked. The only thing is it doesn't shift focus back to the main window where the Options tab opened. But it's a great example of using js in a tbkey, thanks. And maybe it doesn't make sense for such a shortcut to work from the Compose window anyway.

This is icing on the cake...
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Quick access to Options?

Post by morat »

Use the focus method to focus the other window.

Code: Select all

(function () {
  var win = window.Services.wm.getMostRecentWindow('mail:3pane');
  win.openOptionsDialog();
  win.focus();
})();
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

tbkey doesn't like that (box turns red on save, definition reverts to previous one), and I can't guess why. (tried several variants too)
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Quick access to Options?

Post by morat »

Remember to remove the newline characters in custom commands so the input is a valid JSON string.

Tips: http://forums.mozillazine.org/viewtopic ... #p14872763

More info: http://forums.mozillazine.org/viewtopic ... #p14878573
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

Sorry about that, I actually saw you say that before somewhere... but I got confused by text wrapping within the tbkey box. Works now!
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

I'm converting some old TB keyconfig... this is accepted by tbkey but doesn't work, have the functions changed?
GetCurrentEditor().insertText('.........');
(I assume single quotes are needed because tbkey encloses the whole thing in doubles?)
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: Quick access to Options?

Post by morat »

Remember to include the window object in custom commands.

Try the following code snippets in the compose window:

Code: Select all

window.GetCurrentEditor().insertText('Mozilla');

Code: Select all

window.GetCurrentEditor().insertHTML('<a href="http://www.mozilla.org/">Mozilla</a>');

Code: Select all

window.GetCurrentEditor().insertHTML('<a href=\'http://www.mozilla.org/\'>Mozilla</a>');
The second example fails because of the double quote characters.

P.S.

Remember to include the window object for event parameters as well.

Example
http://github.com/wshanks/tbkeys/issues/65
semigeek
Posts: 322
Joined: April 16th, 2014, 8:54 pm
Location: Colorado

Re: Quick access to Options?

Post by semigeek »

Sure enough, "remember to include the window object"... I saw that before too. I think it would help if I understood why (why it worked in TB 2 without?), whether that's specific to tbkey, etc. Thanks for the pointer to the tbkey issues page, I'll scan those.

Does tbkeys/mousetrap bind to function keys? I don't see "F1" etc in the list of special keys, and they don't work.
Last edited by semigeek on June 2nd, 2021, 10:45 pm, edited 6 times in total.
Post Reply