Closed Bug 255338 Opened 20 years ago Closed 8 years ago

Attachment icons are wrong

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jongampark, Unassigned)

References

Details

(Keywords: polish)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a3) Gecko/20040811 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a3) Gecko/20040811 Firefox/0.9.1+

When MS Excel file is attached, resedit icon appears on the attachement list of
the mail front end.

Other files are also same.


Reproducible: Always
Steps to Reproduce:
1. Try attaching MS Word, Excel files.
2.
3.

Actual Results:  
resedit icons for the attached files.

Expected Results:  
Proper icons
I see this bug in Thunderbird 0.8 nightly
Can you change the OS and hardware to "ALL" ?

Confirming this with TB version 0.9 (20041103) under Linux:
there is no icon displayed at all

Confirming this with TB version 0.9 (20041103) under Windows XP:
The generic system .EXE file icon is displayed.
Confirming. I found this because ZIP files are being displayed with the generic
Windows unknown file type icon.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached image Issue in Windows XP
I see this only in the cases where the MIME type of the attachment is not 
correctly specified.  For a zip file that is properly described with
   Content-Type: application/zip
the icon appears as expected.  For a zip file that is described with
   Content-Type: application/octet-stream
then the icon is generic.  Same for Word files, image files, and messages.
(viz bug 108186)

I set up a message with two .PDF attachments, originally both with .pdf 
extensions and application/pdf; one I changed to have a .abc extension, the 
other I changed to have:   Content-Type:application/whocares
The first is shown with the expected icon, the second gets the generic icon.
I don't have .PDF listed in the Attachments options.

JongAm Park, Jerry Baker -- does this match the messages where you see the 
problem?
Yes, it appears to be using the content-type to get the icon instead of the
extension. It does know to open the file with WinZip though (and it doesn't open
all application/octet-stream content with WinZip). Using content-type to do
anything on Windows is unreliable at best.
Is this bug a dupe of or related to bug 243838?
(In reply to comment #7)
> Is this bug a dupe of or related to bug 243838?

The Windows case is a dupe.  I would like JongAm Park to report back on the Mac 
case before duping.
Attached image still wrong
Well, partly, for example, zip files, this problem is solved but not fully.
(In reply to comment #9)
> Created an attachment (id=170421)
> still wrong

Does this mean that the icon you are seeing in that screenshot is not the right 
icon for a Word document on the Mac?  Is that the "default" icon for the Mac?

> Well, partly, for example, zip files, this problem is solved but not fully.

Does this mean that the problem you saw with Zip files was related to an 
incorrect MIME type in the message?
Hello, Mike Cowperthwaite.

No. Although the MIME header looks correct, the icon is still wrong.
The icon is for the ResEdit resource file.
A default icon is, I think, a blank document icon.

In zip file case, my zip files are associated with a StuffIt Expander.
If I attach a zip file, then the Thunderbird displays the correct StuffIt
Expander's zip file icon. I didn't mean that zip file is related to the wrong
icon display.
The symptoms here are quite different from bug 243838. If I receive an unknown
Content-Type, it will display as either a blank icon or a binary file icon. Only
certain files (so far, Excel & Word) display as ResEdit.

(BTW, ResEdit was an Apple utility from the 1980s used for tweaking executables,
libraries, and system files. In OS X terms, it's kinda like Interface Builder.)

Here are some icon examples from attachments in my mailbox. The "should be"
cases are ones where the icon is potentially valid but does not match my TBird &
OS X prefs for file association:

Content-Type: application/msword; name="Who to Call.doc"
 = ResEdit file icon (wrong)

Content-Type: application/msword; x-mac-type="5738424E";
x-mac-creator="4D535744"; name="Assignment1.doc"
 = ResEdit file icon (wrong)

Content-type: application/octet-stream; name="Weekly Case Activity.snp"
 = generic binary icon (close enough, I can't read this)

Content-Type: application/octet-stream; name="A01BCL72.zip"
 = Stuffit archive icon (correct)

Content-Type: application/octet-stream; name="schedule.xls"
 = ResEdit file icon (wrong)

Content-Type: application/pdf
Content-Disposition: attachment; filename=TechnicalRelease.pdf
 = Acrobat PDF icon (should be Preview)

Content-type: application/rtf; name="Weekly Case Activity.rtf"
 = Word RTF icon (should be TextEdit)

Content-Type: application/vnd.ms-powerpoint; x-mac-type="0"; x-mac-creator="0";
name="neuron.ppt"
 = PowerPoint icon (correct)

Content-Type: image/bmp; name="Error Message.bmp"
 = Preview BMP icon (correct)

Content-Type: image/jpeg; name="51188d2.jpg"; x-mac-type="4A504547";
x-mac-creator="4A565752"
 = Preview JPG icon (correct)

Content-Type: text/html; x-unix-mode=0644; name="compiled-discussion.htm"
 = Explorer HTML icon (should be FireFox or BBEdit)

Content-Type: text/plain; name="diagnostic.txt"
 = generic blank icon (should be BBEdit or TextEdit)

Content-Type: text/plain; name="prime.c"
 = generic blank icon (should be BBEdit or Project Builder)
Severity: normal → minor
Oh, and one more thing:

Content-Type: application/octet-stream; name="Programs.ppt";
x-mac-type="534C4433"; x-mac-creator="50505433"
 = PowerPoint icon (correct)

Apparently only the suffix matters to Thunderbird.
Hello.

I don't think these two cases are necessarily wrong.
Because if you install the Acrobat Reader and you changed your PDF hanlder from
the Preview to the Acrobat Reader, it could be correct.
Samething with the .rtf files.

Did you change the default programs for those files?

Content-Type: application/pdf
Content-Disposition: attachment; filename=TechnicalRelease.pdf
 = Acrobat PDF icon (should be Preview)

Content-type: application/rtf; name="Weekly Case Activity.rtf"
 = Word RTF icon (should be TextEdit)
OS: MacOS X → All
Hardware: Macintosh → All
Nope. Preview is my default app for PDF in both Finder and Moz/Tbird prefs. RTF
is unlisted in Moz/Tbird, but in Finder it belongs to TextEdit.

In any case, this bug is mainly about the clearly incorrect ResEdit icons.
QA Contact: front-end
I don't know if this is the root of the problem reported in comment 1, but this code seems to look up the icon by retrieving the Mac type and creator code:

http://mxr.mozilla.org/mozilla/source/modules/libpr0n/decoders/icon/mac/nsIconChannel.cpp

In Mac OS X, Mac type and creator code are not always used.

There is a newer API in Mac OS X 10.3 and above, GetIconRefFromTypeInfo, that allows retrieval of an icon based on Mac type and creator code, MIME Content-Type, and file extension. Perhaps this could be used instead.
This issue was reported in 2004 and is still marked new. Bug is still present in OS X Leopard with Thunderbird version 2.0.0.9 (20071031). This is basically a fairly minor issue but it is annoying.

API mentioned in above comment is described here:
http://developer.apple.com/documentation/Carbon/Reference/IconServices/Reference/reference.html#//apple_ref/c/func/GetIconRefFromTypeInfo
Nightly build version 3.0a1pre (2008022703) OS X is using new icons now: Has a patch landed that resolved this bug? No comments here, and it is still marked Open. Have not tested nightly on Win to confirm, but OS X nightly is using correct icons for .doc, .pdf, images, text files, and zip files.
and bug 243838 and bug 293804?
please clear wanted-thunderbird3 request if you determine this is WFM for all OS.
Flags: wanted-thunderbird3?
Keywords: polish
Assignee: mscott → nobody
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090126 Shredder/3.0b2pre ID:20090126025639

Does not WFM in latest nightly.

New format Office files are showing up with strange icons. Docx and xlsx files are using mpeg icon, for some reason.

Old MS Office files are also showing up strangely. Doc files have blank icon, xls files have an old black-and-white Excel icon (looks like they are from a OS 7-8 version?). For some reason ppt files have the correct icon.

pdf works, txt files work, but Office icons are mangled. Don't know where Tb is pulling up the icons; I only have Office 08 installed if it makes a difference.
Think it is safe to mark this as resolved? Works for me in Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 ID:20151228123010 CSet: 25ade5d7a4f7
Marking WFM as per comment 22. Please feel free to file a new bug otherwise.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Flags: wanted-thunderbird3?
(In reply to Joshua Nixon from comment #22)
> Think it is safe to mark this as resolved? Works for me in Mozilla/5.0
> (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
> ID:20151228123010 CSet: 25ade5d7a4f7

Thanks for the update!

What do we think about bug 243838 and bug 293804?
Flags: needinfo?(nixon049)
Flags: needinfo?(bugzilla2007)
Can't comment on those two - I would suspect they are resolved by now as well, but do not have a Windows install to test with.
Flags: needinfo?(nixon049)
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #24)
> 
> What do we think about bug 243838 and bug 293804?

Sorry I have nothing to say on these.
Flags: needinfo?(bugzilla2007)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: