Last Comment Bug 529418 - Name of Default HTML Message Font not shown in Preferences
: Name of Default HTML Message Font not shown in Preferences
Product: SeaMonkey
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: All All
-- normal (vote)
: seamonkey2.15
Assigned To: Philip Chee
Depends on:
  Show dependency treegraph
Reported: 2009-11-17 15:56 PST by Andy Boze
Modified: 2012-09-25 06:29 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1.0 Proposed fix. (1.34 KB, patch)
2012-09-11 06:19 PDT, Philip Chee
iann_bugzilla: review+
Details | Diff | Splinter Review

Description User image Andy Boze 2009-11-17 15:56:29 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091117 SeaMonkey/2.0.1pre Firefox/3.5.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091117 SeaMonkey/2.0.1pre

In the Mail & Newsgroups Preferences (not the Account Preferences), you can set a default font for HTML messages. Although you can successfully set a font, if you close Preferences window, then reopen it, the name of the selected font will not be displayed, just a blank box. The exceptions to this are the five font types at the top of the list: Variable Width; Fixed Width; Helvetica, Arial; Times; and Courier. If any of those five are selected, they will be displayed in the font selection box.

Reproducible: Always

Steps to Reproduce:
1. Open Edit | Preferences | Mail & Newsgroups | Composition
2. In the "Defaults for HTML Messages" section, select any font other than one of the first five.
3. Click OK to close the Preferences window.
4. Repeat step 1.
Actual Results:  
The name of the previously selected font is not shown. The box is blank.

Expected Results:  
The font name should be shown.

The selected font is actually saved in preferences, as can be shown by attempting to compose an HTML e-mail. The name of the font is just not shown in the Preferences window. Also reported to happen in SM 2.0.
Comment 1 User image Philip Chee 2012-09-11 06:19:13 PDT
Created attachment 660054 [details] [diff] [review]
Patch v1.0 Proposed fix.

Based on Thunderbird Bug 468774 (Preference window incorrectly shows default font).

> -      if (localFonts[i] != "") {
Is this ever empty?
Comment 2 User image Ian Neal 2012-09-24 10:49:32 PDT
Comment on attachment 660054 [details] [diff] [review]
Patch v1.0 Proposed fix.

>     var localFontCount = { value: 0 }
>     var localFonts = enumerator.EnumerateAllFonts(localFontCount);
We don't use localFontCount any more so could just do enumerator.EnumerateAllFonts({});

Toolkit doesn't check for != "" whereas SM and TB do. Neil might know the answer.
Comment 3 User image Philip Chee 2012-09-25 06:29:14 PDT
Pushed to comm-central:

Note You need to log in before you can comment on or make changes to this bug.