Thursday, February 18, 2010

thunderbird-3 hack: fix number of addresses shown before the "more" link

If you use thunderbird 3, you may have noticed an annoying link labeled 'more' on every address category (to, cc) after just 1 address is listed.

It is not smart  to see if there is some more extra space to fit any more of the addresses in the category even if there is a tonne of space available.

First rule of thumb when you use mozilla products, check the configuration to see if you can increase this number from 1 to say 10 - meaning, show 10 addresses before you encapsulate the rest into the "more" container. Sadly, there was none.

Here is the hack to fix it.

Step 1: Find messenger.jar in your installation
ubuntu users: dpkg --search messenger.jar
other os users: I am sure you can find a way :)

The jar would be in the install location directory similar to:
/usr/lib/thunderbird-3.0.2pre/chrome/messenger.jar

Step 2: Extract mailWidgets.xml from the jar
unzip -o content/messenger/mailWidgets.xml

Step 3: Fix the hardcoded variable maxAddressesBeforeMore in the xml file
eg:
<field name="maxAddressesBeforeMore">1</field>
to
<field name="maxAddressesBeforeMore">10</field>

Step 4: Rezip it back.
zip -f content/messenger/mailWidgets.xml

Now, restart your thunderbird, and you should see 10 emails in each category before the "more" link shows up.
You are welcome!

20 comments:

  1. thanks a lot!
    this should be by default in thunderbird.

    btw. windows users can find the file at...

    %PROGRAMFILES%\Mozilla Thunderbird\chrome\messenger.jar

    regards lual

    ReplyDelete
  2. Thanks sooooooo much for this hint! No way to use this for professional work otherwise. Best regards, Luca

    ReplyDelete
  3. NB. A couple tweaks:
    * Replace with "-1", instead of the suggested "10", to display unlimited addresses.
    * Also, delete from the same file all lines that have the "singleline" word in them. This way you get a multi-line address listing (otherwise, the addresses would be forced on the same line and long list won't be displayed properly).
    Again, thanks for the hints!
    Best, Luca

    ReplyDelete
  4. Great, thanks! NB replacing with "-1" will cause the more button to appear after EVERY email address.

    ReplyDelete
  5. Nice one! It's been bugging me for a while!

    ReplyDelete
  6. Great, thanks, but got into a muddle when I tried to implement Luca's suggestions.

    -1 seems undesirable, as pointed out by Jim, and removing all lines that have the "singleline" word in them got me into quite a mess.

    I ended up with using 4 as parameter, which is fine, but I would still be interested in how to display all recipient addresses in multi-line format.

    Best, Herbert

    ReplyDelete
  7. Mozilla software people are idiots to have decided to do it this way.

    ReplyDelete
  8. Herbert, I don't think what you're asking is possible with a simple fix.

    ReplyDelete
  9. Herbert, No, I dont think what you're asking is possible with a simple fix.

    ReplyDelete
  10. Herbert, look here: http://groups.google.com/group/mozilla.support.thunderbird/browse_thread/thread/bbfe2acae6f21473/da9dfa2da19a1d19?lnk=raot

    And um, with any update all the changes we make are gone so that sucks. Idiots, the people who made it.

    Could someone please file a bug and get this fixed? Please.

    ReplyDelete
  11. For those who don't like to manually hack Thunderbird, I've put together an extension called "Show More Recipients" that basically follows these instructions:

    See http://addons.mozilla.org/en-US/thunderbird/addon/96304

    ReplyDelete
  12. With the latest TB update (3.0.4) neither the hack, nor the addon, seems to work anymore. Back to square one again... *sigh*

    Anyone got ideas for how to make this quick fix work in 3.0.4?

    ReplyDelete
  13. The addon does not work anymore, but the hack certainly does work on 3.0.3pre. I hope they did not change something drastic!

    ReplyDelete
  14. I can confirm the hack still works in 3.0.4.

    ReplyDelete
  15. The extension worked for me in 3.0.4.

    ReplyDelete
  16. Aha - great, thanks!
    I'll try again, then. Must've made something wrong last time (all the previous re-hacks after each update worked fine...).

    ReplyDelete
  17. From MC: Installed this nifty extension and it's great. Except would like to see all addresses displayed. Tried "-1" and no addresses appeared! Then deleted all lines with "singleline" but no change. Would appreciate a bit of advice as to how to accomplish.

    (Prior had tried editing TB by opening the .xml file as vinay-srini advises but could not, even if changed the name to .zip. -- using WinXP with WinZip)

    ReplyDelete
  18. In WinXP with TB 3.1 have located the file messenger.jar, but do not understand step 2, how to extract the mail widget. Hopefully someone can give me a clue. (FYI the extension from Matthew no longer works with this version of TB.)

    ReplyDelete
  19. I'm sure this is common knowledge, but to lead all Google results to the same answer ...

    This is now handled via the TB option mailnews.headers.show_n_lines_before_more. See:

    http://kb.mozillazine.org/Thunderbird_3.1_-_New_Features_and_Changes

    for more info.

    ReplyDelete