Closed Bug 250793 Opened 20 years ago Closed 18 years ago

make customizeToolbar.xul / .js import stylesheets

Categories

(Toolkit :: Toolbars and Toolbar Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mvl, Assigned: philor)

References

Details

Attachments

(1 file)

toolkit/content/customizeToolbar.xul imports a css file from /browser. It needs
that style sheet in order to display the images on the buttons. But that makes
the xul file unusable for ather apps. The result is 3 copies in the tree so far.
And for sunbird, another one should be added. I don't want that.
If the stylesheets from the parent window would be imported using javascriptor
something, one copy would be enough.
http://lxr.mozilla.org/seamonkey/source/calendar/sunbird/base/content/customizeToolbar.xul
now has code that tries do the import stylesheet work. So far, it seems to work.
It's only for sunbird ofcourse.
*** Bug 255836 has been marked as a duplicate of this bug. ***
Component: Toolbars → Toolbars and Toolbar Customization
Product: Firefox → Toolkit
Isn't it possible to fix this with dynamic stylesheet overlays
<http://xulplanet.com/tutorials/xultu/crosspov.html> ? Or am I missing something? 
From what i know, when using overlays you can only have one window with
customizable toolbars per app. The calendar extension for firefox won't be able
to have customizable toolbars. (correct me if i'm wrong)
Looking at mozilla/browser/base/content/browser.css, the only style rule that
affects customizeToolbar.xul seems to be:

searchbar {
  -moz-binding: url("chrome://browser/content/search.xml#searchbar"); 
  
When I remove the reference to browser.css from customizeToolbar.xul the search
bar image does not show up in the Customize Toolbar dialog.

Instead of doing the whole stylesheet import mumbo jumbo, wouldn't it be
sufficient to just move the whole search xbl binding to toolkit. I could think
of some use cases for toolkit applications, that aren't browsers.
Assignee: bugs → nobody
QA Contact: bugzilla → nobody
did you also remove the reference to chrome://browser/skin/?
The idea of the import is that it imports the styles for the buttons. Those
styles are needed to make the buttons show up in the dialog.
(In reply to comment #6)
> did you also remove the reference to chrome://browser/skin/?

Nope. That problem would still have to be solved.
It seems to me that we could just use 
  style chrome://.../customizeToolbar.xul chrome://app-specific-style1
  style chrome://.../customizeToolbar.xul chrome://app-specific-style2
  ...
in *.manifest files. See http://developer.mozilla.org/en/docs/Chrome_Registration#style
Attached patch Fix v.1Splinter Review
I swear chrome.manifest uses Elfin Magic.

And yes, I'll file and take bugs for mail/ and calendar/, but I learned my lesson about needing too much review and having too few flags the last time around.
Assignee: nobody → philringnalda
Status: NEW → ASSIGNED
Attachment #244171 - Flags: first-review?(mano)
Comment on attachment 244171 [details] [diff] [review]
Fix v.1

r=mano
Attachment #244171 - Flags: first-review?(mano) → first-review+
browser/base/jar.mn 1.108
toolkit/content/customizeToolbar.xul 1.17
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 358994
Depends on: 363098
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: