Display attachments at the SIDE of the message body?

User Help for Mozilla Thunderbird
Post Reply
Mikhail Ryazanov
Guest

Display attachments at the SIDE of the message body?

Post by Mikhail Ryazanov »

Is it possible to display the attachment list at the side of the massage body (like it is done in "The Bat!", for example)?
The list at the bottom (or the top) takes a lot of valuable vertical space, making the aspect ratio (especially on 1280x800 laptop screens) resembling that for 2.35:1 movies instead of a regular text page, as it should be...
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Re: Display attachments at the SIDE of the message body?

Post by Rod Whiteley »

Yes, by using a Binding to move things around, but it might have unpleasant side effects. Here's a binding to try:

Code: Select all

<binding id="messagepane">
  <implementation>
    <constructor><![CDATA[
      var sp = document.getElementById("attachment-splitter")
      var br = sp.previousSibling, at = sp.nextSibling
      with (this.insertBefore(document.createElement("hbox"), br))
        appendChild(this.removeChild(br)),
        appendChild(this.removeChild(sp)),
        appendChild(this.removeChild(at)),
        setAttribute("flex", "1")
      ]]></constructor>
    </implementation>
   </binding>

And here's the CSS:

Code: Select all

#messengerWindow #messagepanebox, #singlemessage {
  -moz-binding: url(chrome://userchrome/content/userChrome.xml#messagepane);
  }

I have not tested it much.

By the way, your operating system allows windows to be any size and shape you like — they do not have to fill the screen.
Rod
Mikhail Ryazanov
Guest

Re: Display attachments at the SIDE of the message body?

Post by Mikhail Ryazanov »

Thanks Rod!

After some investigation, where to insert the code, and how to make it work, I finally was able to see the effect. :-)
What are the possible "unpleasant side effects"?

Why the developers don't want to make such simple customization a little bit more user-friendly? Or I'm just the one, who needs it? :-\
I mean, moving View>Layouts menu to the Options dialog with more capabilities (and, perhaps, visual hints) wouldn't be a bad idea. (Or other people need to change the layouts so often, that it was placed in the main menu?)

Rod Whiteley wrote:By the way, your operating system allows windows to be any size and shape you like — they do not have to fill the screen.

It does allow, but the point is, that wrong aspect ratio seriously reduces the usability of the available window area, which is anyway limited by the screen size.
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Re: Display attachments at the SIDE of the message body?

Post by Rod Whiteley »

I do not know what might go wrong. I only know that the rest of Thunderbird's code does not expect the elements to be moved around like that.

It is already a problem that Thunderbird's developers go after cosmetic features that just a few people think are a good idea. I think extensions, the forums and the knowledge base are the proper places for these customizations. Indeed, I think moving all the layouts to one or more extensions would be a better design.
Rod
jawbone
Posts: 5
Joined: July 4th, 2010, 6:36 am
Contact:

Re: Display attachments at the SIDE of the message body?

Post by jawbone »

Could you explain a little bit more about bindings? I couldn't figure out where to put these files in order to make things done?
Thanks!
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Re: Display attachments at the SIDE of the message body?

Post by Rod Whiteley »

That knowledge base article explains exactly where to put them, but you will have to read it very carefully and you might also have to read other linked articles.
Rod
jawbone
Posts: 5
Joined: July 4th, 2010, 6:36 am
Contact:

Re: Display attachments at the SIDE of the message body?

Post by jawbone »

Ok, I've almost worked that out, but I'm still not sure what's wrong because it doesn't work. I use Windows XP.
1. Chrome folder created in the Profile directory.
2. UserChrome.xml file created in the Chrome folder with the code you provided.
3. UserCrome.css file created there. I guess pathway should be changed according to windows rules.
url(chrome://userchrome/content/userChrome.xml#messagepane) - which url needed?
This: C:\Documents and Settings\Admin\Application Data\Thunderbird\Profiles\xxxxxxxx.default\Chrome?
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Re: Display attachments at the SIDE of the message body?

Post by Rod Whiteley »

Some comments:
1. Are you certain it is the correct profile?
2. I do not know whether it works with a capital U. The file name normally has a lowercase u: userChrome.xml
3. No, it only works with a chrome URL, which is why you need to install an extension to make it work.
See also: http://kb.mozillazine.org/Editing_confi ... leshooting
Rod
Guest
Guest

Re: Display attachments at the SIDE of the message body?

Post by Guest »

Oh well! Thanks a lot, Rod!
It took some time but it's worth it.
One more thing: how to move attachment pane to the left? :-)
User avatar
Rod Whiteley
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Re: Display attachments at the SIDE of the message body?

Post by Rod Whiteley »

I have not tried it, but in theory switch around the lines that begin appendChild, so they are in reverse order — first the attachments ("at"), then the splitter ("sp"), then the browser ("br").
Rod
jawbone
Posts: 5
Joined: July 4th, 2010, 6:36 am
Contact:

Re: Display attachments at the SIDE of the message body?

Post by jawbone »

Cool!
Thanks again!
Post Reply