Ctrl+Tab MRU order

User Help for Mozilla Thunderbird
Post Reply
Wang Xiao Ming
Posts: 25
Joined: May 22nd, 2009, 7:10 am

Ctrl+Tab MRU order

Post by Wang Xiao Ming »

On Firefox it's easy to activate tabs in MRU order on Ctrl+Tab. Adding the same about:config bolean entry on TB does nothing.

I would like Thunderbird to switch to last opened tab when I hit Ctrl+Tab, but I could not find a way.

There is a simple legacy addon for firefox that I tried to install on TB:

https://addons.mozilla.org/en-GB/firefo ... src=search


i tried to edit the install.rdf file but TB complained that the addon is not compatible:
This is my edit:

Code: Select all

<?xml version='1.0' encoding='utf-8'?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
  <Description about="urn:mozilla:install-manifest">
    <em:id>jid0-mQYPFxeUP6JwB3NRF9n8oqu93CM@jetpack</em:id>
    <em:version>0.1.1-signed.1-signed</em:version>
    <em:type>2</em:type>
    <em:bootstrap>true</em:bootstrap>
    <em:unpack>false</em:unpack>
    
    <!-- Thunderbird -->
    <em:targetApplication>
      <Description>
        <em:id>{3e17310d-82e8-4a43-bd2f-7c3055bfe589}</em:id>
        <em:minVersion>9.0.0</em:minVersion>
        <em:maxVersion>47.9.0</em:maxVersion>
      </Description>
    </em:targetApplication>
    
    <!-- Front End MetaData -->
    <em:name>MRU Tabs</em:name>
    <em:description>This add-on alters the Ctrl+Tab hotkeys so that they cycle through all tabs in the order of their activation recency, much like the Alt+Tab hotkey does on the operating system level.</em:description>
    <em:creator>yves-goergen</em:creator>
    
    
    
  </Description>
</RDF>
Any ideas? Thanks
Last edited by Wang Xiao Ming on July 24th, 2018, 2:38 pm, edited 1 time in total.
morat
Posts: 6408
Joined: February 3rd, 2009, 6:29 pm

Re: Ctrl+Tab MRU order

Post by morat »

MRU Tabs is a SDK extension for Firefox. It's not compatible with Thunderbird.

LastTab is a legacy extension for Firefox. It's not compatible with Thunderbird.

Thunderbird uses a different API for tabs than Firefox.

Reference
http://dxr.mozilla.org/comm-release/sou ... abmail.xml
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Ctrl+Tab MRU order

Post by tanstaafl »

https://support.mozilla.org/en-US/kb/keyboard-shortcuts claims Control 9 will go to the last tab, not the ninth tab. Control 1 goes to the first tab. Seems to work as described on my system. If you want to use Ctrl+Tab instead you could remap it using the KeyConfig extension.
morat
Posts: 6408
Joined: February 3rd, 2009, 6:29 pm

Re: Ctrl+Tab MRU order

Post by morat »

The LastTab extension for Firefox allows navigation to the most recently used tab.

The last tab keyboard shortcut for Thunderbird allows navigation to the rightmost tab.
Wang Xiao Ming
Posts: 25
Joined: May 22nd, 2009, 7:10 am

Re: Ctrl+Tab MRU order

Post by Wang Xiao Ming »

Thanks.
It's a pity that this feature will probably not be implemented anytime soon. TB is the only application I use where ctrl tab does not work in mru order. I guess the workaround is to get used to use only two tabs
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Ctrl+Tab MRU order

Post by tanstaafl »

I suggest you experiment with using the message preview pane (press F8 to enable it) to read messages rather than restricting yourself to two tabs. Its pretty easy to navigate to other messages while using it. You might also think about using a custom tag if you want to browse a large set of messages without moving them to a dedicated folder. The quick filter bar makes it easy to select all messages that match a certain tag. You could also create a custom view for the mail view button in the toolbar or create a saved search folder whose search criteria was any messages with that tag.
Wang Xiao Ming
Posts: 25
Joined: May 22nd, 2009, 7:10 am

Re: Ctrl+Tab MRU order

Post by Wang Xiao Ming »

I have always been using the preview panel.
the thing is that tb can have tabs for different blogs and news feeds, calendar, emails that you want to read later, chat, carddav, etc..
So lately I am always having a number of tabs open and getting lost when I hit ctrl+tab
Wang Xiao Ming
Posts: 25
Joined: May 22nd, 2009, 7:10 am

Re: Ctrl+Tab MRU order

Post by Wang Xiao Ming »

it must not be too difficult to write a quick and dirty addon, but... I have no idea about legacy addons and right now it's not something very appealing to learn. Webextensions still don't work (I am stuck at 38 btw, due to addons no longer working with newer versions)
morat
Posts: 6408
Joined: February 3rd, 2009, 6:29 pm

Re: Ctrl+Tab MRU order

Post by morat »

Can you get the Custom Buttons extension to work with Thunderbird 38? I don't remember if the official version works with Thunderbird 38.

I'm using a fixed version by Infocatcher with Thunderbird 52.

Here is a custom button to switch to the most recently used tab.

Code: Select all

/*Initialization code*/
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
  getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow("mail:3pane");
var tabmail = win.document.getElementById("tabmail");
var tabMonitor = {
  onTabTitleChanged: function (aTab) {},
  onTabSwitched: function (aTab, aOldTab) {
    aTab.timestamp = Date.now();
  },
  onTabOpened: function (aTab, aIsFirstTab, aWasCurrentTab) {
    aTab.timestamp = Date.now();
  },
  onTabClosing: function (aTab) {},
  onTabPersist: function (aTab) {},
  onTabRestored: function (aTab, aState, aIsFirstTab) {
    aTab.timestamp = Date.now();
  },
};
tabmail.registerTabMonitor(tabMonitor);
setTimeout(function () {
  for (var i = 0; i < tabmail.tabInfo.length; i++) {
    var tab = tabmail.tabInfo[i];
    if (tabmail.tabContainer.selectedIndex == i) {
      tab.timestamp = Date.now();
    } else {
      tab.timestamp = 0;
    }
  }
}, 1000);
this.onclick = function (event) {
  if (event.button == 0) {
    var timestamp = 0;
    for (var i = 0; i < tabmail.tabInfo.length; i++) {
      var tab = tabmail.tabInfo[i];
      if (tabmail.tabContainer.selectedIndex != i) {
        timestamp = Math.max(timestamp, tab.timestamp);
      }
    }
    if (timestamp) {
      for (var i = 0; i < tabmail.tabInfo.length; i++) {
        var tab = tabmail.tabInfo[i];
        if (tab.timestamp == timestamp) {
          tabmail.tabContainer.selectedIndex = i;
          break;
        }
      }
    }
  }
};
this.onDestroy = function (reason) {
  if (reason == "update") {
    tabmail.unregisterTabMonitor(tabMonitor);
  }
  if (reason == "delete") {
    tabmail.unregisterTabMonitor(tabMonitor);
    custombuttons.alertBox("MRU Tab", "Tab monitor unregistered.");
  }
};
Reference
http://dxr.mozilla.org/comm-esr38/sourc ... abmail.xml
http://dxr.mozilla.org/comm-esr52/sourc ... abmail.xml

Similar thread
http://custombuttons.sourceforge.net/fo ... =2&t=37835

Thunderbird 52.9.1
Windows 7 SP1 32-bit
Post Reply