Closed Bug 235169 Opened 21 years ago Closed 18 years ago

ChatZilla's motifs should style the user list and other UI elements

Categories

(Other Applications :: ChatZilla, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rob, Assigned: Gijs)

References

Details

(Whiteboard: [cz-0.9.78])

Attachments

(1 file)

User-Agent: Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 it'd be awesome if the drag-and-drop css support styled the *entire* app. thanks for a great irc client. Reproducible: Always Steps to Reproduce: 1. 2. 3.
I'm not sure how possible this is (though it would be cool). I currently can't figure out any way to /add/ a stylesheet to a XUL window, so it may have to have a dummy one in the source that is just changed at run-time instead. Also, Mozilla *may* have objection to such changes, as the dynamic theme changing has been very prone to crashes in the past.
Product: Core → Other Applications
Depends on: 325358
Cleaning up UNCO's - valid enhancement request --> Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: css style user list, text entry, even tabs pls! → ChatZilla's motifs should style the user list and other UI elements
Attached patch PatchSplinter Review
Wee, patch! :-) So, I tested this on Mozilla 1.0. document.insertBefore totally b0rks there, so I added a fallback for that (ie, not do anything at all, and alert the user). Apart from this, it seems to work pretty well on current Fx 2.0 and trunk - with the exception that changes really don't get through to it. Even trying to force it to flush the cache before/after changing things (/eval getService("@mozilla.org/observer-service;1", "nsIObserverService").notifyObservers(null, "chrome-flush-caches", null)) didn't convince it to actually update the cached css. sync-output continues to work fine for the content part, however.
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #248636 - Flags: review?(silver)
Comment on attachment 248636 [details] [diff] [review] Patch >+function updateAppMotif(motifURL) >+{ >+ var node = document.firstChild; >+ while (node && ((node.nodeType != node.PROCESSING_INSTRUCTION_NODE) || >+ !(/name="dyn-motif"/).test(node.data))) >+ { >+ node = node.nextSibling; >+ } >+ >+ var dataStr = "href=\"" + motifURL + "\" name=\"dyn-motif\""; motifURL will need some sanity here; if it contains a double-quote, what happens? >+ try >+ { >+ // No dynamical style node yet. s/dynamical/dynamic/ This code makes me cry (it's so hacky), but r=silver with above problems fixed.
Attachment #248636 - Flags: review?(silver) → review+
Checked in with: motifURL = motifURL.replace(/"/g, "%22"); and the comment fix. URL-escaping it might even make something broken work - given that you can't have double quotes in URLs in the first place. We don't do a full encodeURIComponent cause that'd screw up all the 'special' characters that we really do want (slashes, colons, etc.) According to the spec, XML entities aren't parsed as such in PIs, luckily for us, so we can leave that part of the universe for what it is. Oh, right. --> FIXED. I was thinking, we might want to update the dark motif so it styles the userlist? Sander has done all the work for us anyway: http://weblog.juima.org/showpost.asp?postid=3379 We should probably file a new bug for that, depending on this one.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.78]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: