MozillaZine


Mail Tweak (for Thunderbird)

Announce and Discuss the Latest Theme and Extension Releases.
Killjay

User avatar
 
Posts: 178
Joined: June 13th, 2003, 8:12 pm
Location: Watertown, NY

Post Posted October 22nd, 2008, 6:02 pm

Rod Whiteley wrote:I knew the height setting could be wrong by a few pixels, but I did not know it could be wrong by a whole line. It seems to depend on the display settings, but I have never been able to figure out what the problem really is.


I think something has changed. With Tb 2.0.0.17, Sky Pilot Classic (SPC) theme, on Vista win32 I am now seeing One addressing box with Two set in the Mail Tweak 0.16 options. Earlier combinations of Tb and the extension did produce two.

With DOMi the height of the .addressingWidgetItem is 28px while the #addressingWidget is shown as 50px when using the Box Model view.
Killjay
Tower, request takeoff clearance, branch 3.0
Thunderbird cleared for takeoff, flyby @ mach 3.0b3 authorized

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted October 23rd, 2008, 3:45 am

Well, the theme could certainly affect it. I'm seeing the correct number of lines in 2.0.0.17 and 3.0a1 with default themes.

The problem is that the heights are calculated before the window is displayed. After the window is displayed, something in Thunderbird or Gecko changes the height of each address line, making the calculation wrong. I was able to fix it by delaying the calculation, so that it uses the final height of the address lines, but this display-calculate-redisplay sequence caused a visible jump, which I felt was more annoying than the original problem.
Rod

GeorgeCarvill
 
Posts: 34
Joined: April 26th, 2005, 6:57 am

Post Posted October 23rd, 2008, 4:29 am

Some notes (from the guy who started this)
FYI, I am using a Mac. I'm using tweak v 1.0pre2
Suggestion... Maybe change the argument from "Lines" to "pixels" and add an explanation that the resulting number of lines visible will depend on the platform, resolution, theme, etc. Give some quick examples, e.g. On a MacBookPro x number of pixels usually results in 2 lines. On a Windows machine running Vista y number of pixels usually results in 2 lines, etc. The users can experiment with what they want. When I set 2 lines, I really see sightly more than one line, but not 2.

Killjay

User avatar
 
Posts: 178
Joined: June 13th, 2003, 8:12 pm
Location: Watertown, NY

Post Posted October 23rd, 2008, 5:34 am

Rod Whiteley wrote:Well, the theme could certainly affect it. I'm seeing the correct number of lines in 2.0.0.17 and 3.0a1 with default themes.

The problem is that the heights are calculated before the window is displayed. After the window is displayed, something in Thunderbird or Gecko changes the height of each address line, making the calculation wrong. I was able to fix it by delaying the calculation, so that it uses the final height of the address lines, but this display-calculate-redisplay sequence caused a visible jump, which I felt was more annoying than the original problem.


First a correction to my prior comment. If I had hit return I would have had a second row address box. What Your doing is setting a two row clipping box when the option is set to two rows, and I misunderstood, it is a limit before Overflow kicks in.

I closed Tb 2.0 and fired up Shredder 3.0b1pre and activated Mail Tweak 1.0pre2 with the CSS Selector and Address Row options. Looking at the address box I found it has a min-height:22px specified. However with a second address row it is being cut off at ~1.8 rows, or about 4 pix short of showing the full height of the second address box.

To make Your calculation, where are You looking up the min-height spec for row heights? I am willing to tear apart a theme Jar and dig in if I have an idea which packaged files I want to target.
Killjay
Tower, request takeoff clearance, branch 3.0
Thunderbird cleared for takeoff, flyby @ mach 3.0b3 authorized

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted October 23rd, 2008, 7:48 am

It's all computed (except for that 4 :( ):
Code: Select all
var list = document.getElementById("addressingWidget")
var row = list.getItemAtIndex(0).boxObject.height
var ab = document.getElementById("addresses-box")
var h1 = ab.firstChild.boxObject.height // From
   + row
   + ab.lastChild.boxObject.height // Subject
   + 4 // margins, border (in default theme)
var hn = h1 + (n - 1) * row

with (document.getElementById("MsgHeadersToolbar").style)
   minHeight = String(h1) + "px",
   height = String(hn) + "px"
Rod

Killjay

User avatar
 
Posts: 178
Joined: June 13th, 2003, 8:12 pm
Location: Watertown, NY

Post Posted October 23rd, 2008, 1:34 pm

Rod Whiteley wrote:It's all computed (except for that 4 :( ):
Code: Select all
var list = document.getElementById("addressingWidget")
var row = list.getItemAtIndex(0).boxObject.height
var ab = document.getElementById("addresses-box")
var h1 = ab.firstChild.boxObject.height // From
   + row
   + ab.lastChild.boxObject.height // Subject
   + 4 // margins, border (in default theme)
var hn = h1 + (n - 1) * row

with (document.getElementById("MsgHeadersToolbar").style)
   minHeight = String(h1) + "px",
   height = String(hn) + "px"


Where is the allowance for Padding? With SPC the the DOMi Box Model showed top:2px and bottom:2px per row, a total of 8px for a 2 row option. The padding partialy explains why SPC uses 28px per row while the Default uses 22px. I did note in a CSS item that the basic height default is 20px.

Took a while to see that You have to step up the Node tree to "MsgHeaderToolbar" where you set the height for all the elements it houses. That some elements are fixed height, while others have "Flex".

My guess is some CSS is being applied after You have grabbed data from the XUL.
Killjay
Tower, request takeoff clearance, branch 3.0
Thunderbird cleared for takeoff, flyby @ mach 3.0b3 authorized

WBAENZO
 
Posts: 10
Joined: February 27th, 2007, 11:25 am

Post Posted October 24th, 2008, 5:31 am

I've installed the extension but cannot change any options - I have a spinning hourglass and a greyed out OK button. Any ideas?

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted October 24th, 2008, 7:24 am

Killjay: Padding is inside an element, so it gets included in the box object height. I agree that there is a timing issue, but I'm not getting data from the XUL. The XUL is parsed as a document and styled using CSS before I get the computed height, but something changes it later. When I looked into this before, I was not able to find any dynamically-applied stylesheet that would account for this.

WBAENZO: The OK button is normally disabled until you change something. The hourglass means it cannot load the data, and I don't know what would cause that. First choose Tools – Error Console, then try again to see whether any error message appears in the console.
Rod

Milesch
 
Posts: 113
Joined: May 23rd, 2006, 2:01 pm
Location: San Francisco

Post Posted October 25th, 2008, 9:35 am

Discovered that Mail Tweak was the cause of a delay when opening Moz newsgroups in TB 2.0.0.16 & .17. "Looking up" appeared for up to 17 seconds. Unchecking all options makes no difference. Disabled MT and only see "looking up" for a split second. Interesting this does not occur with any other newsgroup.

I have perhaps 20 extensions, and don't knows if this could be in association with one of the others.

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted October 27th, 2008, 3:11 am

"Looking up" means Thunderbird is waiting for DNS to look up the IP address of the server. Mail Tweak does not contain any code that would affect DNS lookup directly, so the delay is mysterious. I don't see any delay on my system looking up news.mozilla.org — without Mail Tweak's status message cache it's so fast I don't see the "Looking up" message at all. A bad interaction with another extension is possible, though. If you can find out more, I'll investigate further.
Rod

WBAENZO
 
Posts: 10
Joined: February 27th, 2007, 11:25 am

Post Posted October 27th, 2008, 1:15 pm

Rod Whiteley wrote:Killjay: Padding is inside an element, so it gets included in the box object height. I agree that there is a timing issue, but I'm not getting data from the XUL. The XUL is parsed as a document and styled using CSS before I get the computed height, but something changes it later. When I looked into this before, I was not able to find any dynamically-applied stylesheet that would account for this.

WBAENZO: The OK button is normally disabled until you change something. The hourglass means it cannot load the data, and I don't know what would cause that. First choose Tools – Error Console, then try again to see whether any error message appears in the console.


OK, the error seems to be as below. Does that mean anything to anyone?

Error: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://mailtweak/content/options.js :: anonymous :: line 261" data: no]
Source File: chrome://mailtweak/content/options.js
Line: 261

Rod Whiteley

User avatar
 
Posts: 11480
Joined: December 6th, 2004, 3:41 am
Location: UK

Post Posted October 28th, 2008, 1:06 am

That's a font settings error. Unfortunately the settings are complex. Use the Config Editor to check these preferences, and reset any that are shown in bold:
    general.useragent.locale
    font.default.x-western
    font.name.sans-serif.x-western
    font.name.serif.x-western
Then go to Tools – Options – Display – Formatting – Fonts... and check that the font settings there are the way you want them.

If that does not help, send me a private message and I'll investigate this issue further with you.
Rod

WBAENZO
 
Posts: 10
Joined: February 27th, 2007, 11:25 am

Post Posted October 28th, 2008, 6:59 am

Rod Whiteley wrote:That's a font settings error. Unfortunately the settings are complex. Use the Config Editor to check these preferences, and reset any that are shown in bold:
    general.useragent.locale
    font.default.x-western
    font.name.sans-serif.x-western
    font.name.serif.x-western
Then go to Tools – Options – Display – Formatting – Fonts... and check that the font settings there are the way you want them.

If that does not help, send me a private message and I'll investigate this issue further with you.


Thanks Rod - that did the trick.

markrlondon
 
Posts: 7
Joined: October 24th, 2007, 4:00 am

Post Posted November 17th, 2008, 10:34 am

Rod,

Thank you very much for an excellent and very well thought through addon!

I've got a few minor issues here which may be of interest to you. In all cases I'm running Tweak Mail 0.16, Thunderbird 2.0.0.17, Vista x64.

1. Insert|'Characters and Symbols' has no effect in text mode.
The menu option appears but when I click on it nothing happens. Insert|'Text file' does work as expected.

2. Word count doesn't appear when Virtual Identity 0.5.8 is enabled.
I've not tested this with other versions of Virtual Identity.

3. When Tweak Mail is enabled, the Server Settings page on the Account Settings dialog is made a little wider than normal and right hand edge is cut off. Only this page of Account Settings is affected. This is an aesthetic issue only as it doesn't hide any buttons or other control elements.
MarkR

Milesch
 
Posts: 113
Joined: May 23rd, 2006, 2:01 pm
Location: San Francisco

Post Posted November 17th, 2008, 1:29 pm

In reply to Rod Whiteley's post Oct 27, "A bad interaction with another extension is possible, though. If you can find out more, I'll investigate further." Rod, sorry, I haven't yet had time to test out these extensions in conjunction with yours. However, if someone else notices the same difficulty, perhaps this list of the 33 extensions in use will be of assistance:

* Adblock Plus 0.7.5.5
* Attachment Extractor 1.1.1
* Attachment Reminder 0.3.10
* Auto Zip Attachments 0.6.2
* Birthday Reminder 1.0.4.2
* Buttons! 0.5.3.2
* Contacts Add BCC button 0.0.5
* Correct Identity 1.3.1
* Custom Buttons² 2.0.7.7
* DebugLogger 0.2.2
* DictionarySearch 3.0.0
* DOM Inspector 1.8.1.2
* EverNote Web Clipper 1.0.0.81
* Exit Button Thunderbird 0.5
* Folderpane Tools 0.0.5.1
* forwardas 0.1.2
* Launchy 4.2.0
* Menu Editor 1.2.3.3
* MenuManipulator 20080929
* MIME Edit 0.60
* MoreFunctionsForAddressBook 0.5.3
* MR Tech Toolkit 6.0.3.1
* NestedQuote Remover 0.8.1
* New Mail Alert Config 0.1.0
* NewsWorthy for Thunderbird 1.5 0.2.0.4
* QuickQuote 0.8.1
* Quote Colors 0.2.8
* ReminderFox 1.8
* Smilie Inserter 0.7.0
* Status Buttons 1.0
* Talkback 2.0.0.9
* TB Header Tools Extension 0.6.6
* Xpunge 0.3

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 1 guest