Closed Bug 269017 Opened 20 years ago Closed 17 years ago

FTP/Dir/Jar listings should be skinnable by use of style sheet in chrome

Categories

(Core Graveyard :: Networking: FTP, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 294800

People

(Reporter: jyaku, Assigned: alfredkayser)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041109 Firefox/1.0 (amano)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041109 Firefox/1.0 (amano)

In the Fierefox /res/html subdirectory there are certain files that are not
hooked up with the correspondent filetypes (anymore?). 

Only directories and files are recognized but all files are treated as "unknown"
and associated with the "gopher-unknown.gif" artwork. 

gopher-audio.gif, gopher-text.gif, gopher-telnet.gif, gopher-sound.gif,
gopher-movie.gif, gopher-image.gif, gopher-find.gif, gopher-binary.gif should be
hooked up as well (otherwise this artwork wouldn't serve any purpose).

To demonstrate this problem:
See the different artwork on the ftp-->http mozilla gateway (readme, ls-lr,
ls-lR.gz) in http://ftp.mozilla.org/pub/mozilla.org/

And compare the plain ftp view in ftp://ftp.mozilla.org/pub/mozilla.org/ (with
all filetypes looking the same).

Reproducible: Always
Steps to Reproduce:
1. http://ftp.mozilla.org/pub/mozilla.org/
2. ftp://ftp.mozilla.org/pub/mozilla.org/
3. Compare

Actual Results:  
In pure FTP the existing artwork isn't hooked up (anymore?).

Expected Results:  
A different icon for each filetype should be displayed.
> http://ftp.mozilla.org/pub/mozilla.org/

that's at least 5 different servers...

and I believe we removed support for <img src="gopher-audio"> (which is, I
suspect, what this bug is about) intentionally.
Assignee: dougt → general
Component: Networking: FTP → DOM
QA Contact: benc → ian
Related to gopher-audio.gif only? No. Related to all the unused artwork in
/res/html (at least in Firefox). It would be nice if pictures on FTP servers
would have a picture icon, .txt files would be displayed with a text icon, and
compressed files with an own icon as well. 
oh, you are seeing this on an ftp server? oh whoops, I had misread comment 0.
sorry :( back to ftp.
Assignee: general → dougt
Component: DOM → Networking: FTP
QA Contact: ian → benc
This works fine in SeaMonkey... sounds like a Firefox packaging issue.
Assignee: dougt → firefox
Component: Networking: FTP → General
Product: Browser → Firefox
QA Contact: benc → firefox.general
bz: so you get more icons than just the directory icon and the unknown file
icon? for example, text files get
http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/gopher-text.gif for
you? (they don't for me, in a file: listing)
Oh, I see what you mean.  You're right, this is an FTP issue.
Assignee: firefox → dougt
Status: UNCONFIRMED → NEW
Component: General → Networking: FTP
Ever confirmed: true
Product: Firefox → Browser
QA Contact: firefox.general → benc
May be we can change the summary to '/res/html/*.gif' icons as used in the FTP
listings should be skinnable and therefor in chrome://ftp/... ??? (or //global/
even...)
(wanting to clean up the /res directory mess).
Summary tweaked as per Alfred Kayser's suggestion.
Summary: Artwork in the /res/html directory is not hooked up with specific FTP/gopher filetypes → '/res/html/*.gif' icons as used in the FTP listings should be skinnable and therefor in chrome://ftp/...
References to 'gopher-' images in code:

/netwerk/streamconv/converters/nsIndexedToHTML.cpp, line 527 --
pushBuffer.AppendLiteral("resource://gre/res/html/gopher-menu.gif\"
alt=\"Directory: ");
/netwerk/streamconv/converters/nsIndexedToHTML.cpp, line 531 --
pushBuffer.AppendLiteral("resource://gre/res/html/gopher-unknown.gif\"
alt=\"File: ");
/layout/html/tests/block/bugs/17636.html, line 9 -- &nbsp;&nbsp;&nbsp;<img
alt="Diamond Home Page Header Logo" height="82"
src="resource://gre/res/html/gopher-menu.gif" width="83"><img border="0"
height="82" isMap onmouseover src="resource://gre/res/html/gopher-menu.gif"
width="477"></nobr><br>
/mailnews/mime/src/mimefilt.cpp, line 132 -- return
nsCRT::strdup("resource://gre/res/html/gopher-text.gif");
/mailnews/mime/src/mimefilt.cpp, line 134 -- return
nsCRT::strdup("resource://gre/res/html/gopher-image.gif");
/mailnews/mime/src/mimefilt.cpp, line 136 -- return
nsCRT::strdup("resource://gre/res/html/gopher-sound.gif");
/mailnews/mime/src/mimefilt.cpp, line 138 -- return
nsCRT::strdup("resource://gre/res/html/gopher-movie.gif");
/mailnews/mime/src/mimefilt.cpp, line 140 -- return
nsCRT::strdup("resource://gre/res/html/gopher-binary.gif");
/mailnews/mime/src/mimefilt.cpp, line 142 -- return
nsCRT::strdup("resource://gre/res/html/gopher-unknown.gif");
/mailnews/mime/src/mimemoz2.cpp, line 1218 -- return
nsCRT::strdup("<P><CENTER><IMG
SRC=\"resource://gre/res/network/gopher-image.gif\" ALT=\"[Image]\"></CENTER><P>");

Summarized:
[/netwerk/streamconv/converters/nsIndexedToHTML.cpp]
resource://gre/res/html/gopher-menu.gif
resource://gre/res/html/gopher-unknown.gif

[/layout/html/tests/block/bugs/17636.html]
resource://gre/res/html/gopher-menu.gif

[/mailnews/mime/src/mimefilt.cpp]
resource://gre/res/html/gopher-text.gif
resource://gre/res/html/gopher-image.gif
resource://gre/res/html/gopher-sound.gif
resource://gre/res/html/gopher-movie.gif
resource://gre/res/html/gopher-binary.gif

/mailnews/mime/src/mimemoz2.cpp]: 
resource://gre/res/html/gopher-unknown.gif

Proposal:
Add to chrome://global/skin/file: unknown.gif, folder.gif (or directory,
according to your preference...), 
text.gif, image.gif, sound.gif, movie.gif and binary.gif
Replace in above hardcoded mappings the 'resource://gre/res/html/' references
with the correspondig chrome://global/skin/file/' references.
I would prefer to put them in //global/skin, as these are fairly common icons,
reusable in other XUL applets.

Note,
Bug 240463 has up-to-date artwork for these icons: FTP/Gopher folders and files
and loading and broken images.

Blocks: 273459
An even better solution is to let nsIndexedToHTML.cpp and others, generate HTML which includes a stylesheet (chrome://global/skin/directory.css), so that themers can more easily change the look&feel of FTP and such (e.g JAR Directory) output.
Blocks: 240463
http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/converters/nsIndexedToHTML.cpp#578

573     pushBuffer.AppendLiteral("\"><img src=\"");
574 
575     switch (type) {
576     case nsIDirIndex::TYPE_DIRECTORY:
577     case nsIDirIndex::TYPE_SYMLINK:
578         pushBuffer.AppendLiteral("resource://gre/res/html/gopher-menu.gif\" alt=\"Directory: ");
579         break;
580     case nsIDirIndex::TYPE_FILE:
581     case nsIDirIndex::TYPE_UNKNOWN:
582         pushBuffer.AppendLiteral("resource://gre/res/html/gopher-unknown.gif\" alt=\"File: ");
583         break;
584     }
585     pushBuffer.AppendLiteral("\"/>");
586 


http://lxr.mozilla.org/seamonkey/source/mailnews/mime/src/mimemoz2.cpp#1225
1225     return nsCRT::strdup("<P><CENTER><IMG SRC=\"resource://gre/res/network/gopher-image.gif\" ALT=\"[Image]\"></CENTER><P>");
Updating summary.
I can do the patch for nsIndexedToHTML so that the generated HTML uses a chrome provided style sheet.
Severity: trivial → normal
Status: NEW → ASSIGNED
Summary: '/res/html/*.gif' icons as used in the FTP listings should be skinnable and therefor in chrome://ftp/... → FTP/Dir/Jar listings should be skinnable by use of style sheet in chrome
Working patch. index.css and images to be attached separately.

(Note, see also bug 294800)
Assignee: dougt → alfredkayser
Attachment #255718 - Flags: review?(cbiesinger)
This bug holds back the progress in bug 294800.

cbiesinger's last comment here dates back to 2004. Does he actually plan to review the patch?
Blocks: 294800
Any progress?
Comment on attachment 255718 [details] [diff] [review]
V1: The first version for the review

Bz, can you do the review?
Attachment #255718 - Flags: review?(cbiesinger) → review?(bzbarsky)
Not in any sort of reasonable time frame...  The earliest I would be likely to do it is mid-July.  Could be a lot longer, though.
Comment on attachment 255718 [details] [diff] [review]
V1: The first version for the review

cbiesinger says he "can do it... not now though".
Attachment #255718 - Flags: review?(bzbarsky) → review?(cbiesinger)
Comment on attachment 255718 [details] [diff] [review]
V1: The first version for the review

>+                         "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n"
>+                         "<link href=\"chrome://global/skin/index.css\" rel=\"stylesheet\" type=\"text/css\">\n"

for something that claims to be xml, this ins't well formed, <link ... /> please.

...
>         buffer.AppendLiteral("\"/>\n");
Attachment #255718 - Flags: review?(cbiesinger) → review-
Ideally, Gopher listings should use these filetype icons as well. It should be very simple to program: for example, match up the "g" and "I" filetypes in Gopher to gopher-image.gif, and the "T" filetype to gopher-telnet.gif.
Bug 294800 has now ui-review. Alfred, are you still working on this?
Attachment #255718 - Attachment is obsolete: true
Attachment #272627 - Flags: review?(timeless)
You should ask timeless if he wants to review this (in case you haven't already done that). It could be that he just wanted to help cbiesinger, who said he would do the review.
Comment on attachment 272627 [details] [diff] [review]
V2: addressed comments from timeless

Boris, can I ask you to do the review (given that I already addressed the comments from timeless)?
Attachment #272627 - Flags: review?(timeless) → review?(bzbarsky)
Not in the next few weeks, sorry.  Already pretty swamped.  :(
No problem. I am also away for two weeks.
yeah, my review was drive by, i don't have any other comments to add and am not a peer in network.
This patch/bug has little value given what will have to change in bug 294800. Because of the announced delay, it's easier to create the patch in bug 294800 from scratch.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Attachment #272627 - Flags: review?(bzbarsky)
No longer blocks: 294800
No longer blocks: 273459
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: