Closed
Bug 72530
Opened 23 years ago
Closed 23 years ago
Common dialogs CSS is messed up in Modern
Categories
(SeaMonkey :: Themes, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: sfraser_bugs, Assigned: hewitt)
References
Details
(Keywords: modern)
Attachments
(4 files)
10.01 KB,
patch
|
Details | Diff | Splinter Review | |
5.84 KB,
patch
|
Details | Diff | Splinter Review | |
6.38 KB,
patch
|
Details | Diff | Splinter Review | |
18.49 KB,
patch
|
Details | Diff | Splinter Review |
The common dialogs CSS seems to be messed up, and common dialogs are missing images in some cases. For example, open a new composer window, type, then hit the close box. You'll see a "Save/don't save" dialog. Notice that the dialog is missing its image, and has the wrong style buttons. The image is missing because callers specify the image URI (stupid idea in the first place), and composer uses "chrome://global/skin/question-icon.gif". To find all callers of this dialog, LXR for "UniversalDialog". Note that if you build with files, not jars, in chrome, then this dialog does not come up at all, the window is left in an unresponsive state, and you have to force-quit the app, so this is fairly serious.
Reporter | ||
Comment 1•23 years ago
|
||
This at least makes the dialog come up in non-jar builds: Index: mozilla/xpfe/global/resources/content/commonDialog.xul =================================================================== RCS file: /cvsroot/mozilla/xpfe/global/resources/content/commonDialog.xul,v retrieving revision 1.29 diff -b -u -2 -r1.29 commonDialog.xul --- commonDialog.xul 2001/03/11 12:17:29 1.29 +++ commonDialog.xul 2001/03/19 21:29:22 @@ -18,5 +18,5 @@ <box flex="1"> <box autostretch="never" valign="top"> - <image id="info.icon" class="spaced" src="chrome://global/skin/message- icon.gif" /> + <image id="info.icon" class="spaced" src="chrome://global/skin/icons/ alert-message.gif" /> </box> <separator orient="vertical" class="thin"/> and this fixes editor's URL {value:0}, - "chrome://global/skin/question-icon.gif", + "chrome://global/skin/icons/alert-question.gif", {value:"false"}, Hewitt, it seems that you need to grep for everyone using the old icon urls, and fix them. These patches do *not* fix the bad button CSS that I still see.
Reporter | ||
Comment 2•23 years ago
|
||
The page title dialog also needs some fixing.
Reporter | ||
Comment 3•23 years ago
|
||
There seem to be a bunch of places that use "global/skin/icon/" rather than 'global/skin/icons/" too: /themes/modern/global/console.css, line 97 -- list-style-image: url("chrome:// global/skin/icons/alert-error.gif"); /themes/modern/global/console.css, line 101 -- list-style-image: url("chrome:// global/skin/icons/alert-exclam.gif"); /themes/modern/global/console.css, line 105 -- list-style-image: url("chrome:// global/skin/icons/alert-message.gif"); /themes/modern/global/global.css, line 88 -- list-style-image: url("chrome:// global/skin/icon/alert-message.gif"); /themes/modern/global/global.css, line 92 -- list-style-image: url("chrome:// global/skin/icon/alert-exclam.gif"); /themes/modern/global/global.css, line 96 -- list-style-image: url("chrome:// global/skin/icon/alert-error.gif"); /themes/modern/global/global.css, line 100 -- list-style-image: url("chrome:// global/skin/icon/alert-question.gif"); /themes/modern/messenger/messengercompose/messengercompose.css, line 270 -- list- style-image: url("chrome://global/skin/icon/alert-question.gif"); /themes/modern/messenger/messengercompose/messengercompose.css, line 274 -- list- style-image: url("chrome://global/skin/icon/alert-question.gif"); /themes/modern/messenger/messengercompose/messengercompose.css, line 278 -- list- style-image: url("chrome://global/skin/icon/alert-exclam.gif"); /themes/modern/messenger/messengercompose/messengercompose.css, line 283 -- list- style-image: url("chrome://global/skin/icon/alert-question.gif");
Reporter | ||
Comment 5•23 years ago
|
||
It seems that the Classic skin still has the old layout, so we can't currently write CSS that works in both skins, for alert icons and such. This needs fixing fast. Lots of dialogs in Modern are missing icons because of it, and in some cases it causes dialogs to not come up at all.
Keywords: nsCatFood
Reporter | ||
Comment 6•23 years ago
|
||
This improves things a little: Index: global/global.css =================================================================== RCS file: /cvsroot/mozilla/themes/modern/global/global.css,v retrieving revision 1.30 diff -b -u -2 -r1.30 global.css --- global.css 2001/03/17 01:53:05 1.30 +++ global.css 2001/03/30 23:28:36 @@ -86,17 +86,17 @@ .message-icon { - list-style-image: url("chrome://global/skin/icon/alert-message.gif"); + list-style-image: url("chrome://global/skin/icons/alert-message.gif"); } .alert-icon { - list-style-image: url("chrome://global/skin/icon/alert-exclam.gif"); + list-style-image: url("chrome://global/skin/icons/alert-exclam.gif"); } .error-icon { - list-style-image: url("chrome://global/skin/icon/alert-error.gif"); + list-style-image: url("chrome://global/skin/icons/alert-error.gif"); } .question-icon { - list-style-image: url("chrome://global/skin/icon/alert-question.gif"); + list-style-image: url("chrome://global/skin/icons/alert-question.gif"); } Note that there are lots of places in both C++ and JS that will need fixing too: <http://lxr.mozilla.org/seamonkey/search?string=skin%2Fquestion> <http://lxr.mozilla.org/seamonkey/search?string=skin%2Falert> <http://lxr.mozilla.org/seamonkey/search?string=skin%2Ferror> <http://lxr.mozilla.org/seamonkey/search?string=skin%2Fmessage>
Marking nsbeta1+ and 0.9
Assignee | ||
Comment 8•23 years ago
|
||
Not a good idea to hard code these image URLs all over the place. Class names should be used instead. Forthcoming patch to fix this... BTW, thanks for the good lead, Simon. I had no idea common dialogs were hard coding those URLs.
Status: NEW → ASSIGNED
Reporter | ||
Comment 10•23 years ago
|
||
This bug is also cause the full-screen, content-less dialogs to show up on Windows. It's nasty.
Assignee | ||
Comment 11•23 years ago
|
||
Comment 12•23 years ago
|
||
Mind changing those string names also (since you're no longer assigning urls to them)?
Reporter | ||
Comment 13•23 years ago
|
||
Presumably Classic will need to be fixed to use the new icon classes, no?
Assignee | ||
Comment 14•23 years ago
|
||
Fortunately, classic (mac and win) already correctly uses these icon classes.
Reporter | ||
Comment 15•23 years ago
|
||
You should change the comments and the parameter name at: http://lxr.mozilla.org/seamonkey/source/xpfe/appshell/src/ nsNetSupportDialog.cpp#134 and http://lxr.mozilla.org/seamonkey/source/xpfe/appshell/src/ nsNetSupportDialog.cpp#134 and http://lxr.mozilla.org/seamonkey/source/xpfe/appshell/src/ nsWebShellWindow.cpp#2050 This also needs fixing: http://lxr.mozilla.org/seamonkey/source/themes/classic/messenger/0 So I'd like to see the aIconUrl parameter renamed for nsICommonDialogs.UniversalDialog, in the interface file and all implementations. Maybe law or alecf can do this.
Reporter | ||
Comment 16•23 years ago
|
||
Classic already uses the icon classes? Not according to LXR: /themes/classic/global/mac/console.css, line 102 -- list-style-image : url("chrome://global/skin/error-icon.gif"); /themes/classic/global/mac/global.css, line 105 -- list-style-image : url("chrome://global/skin/error-icon.gif"); /themes/classic/global/win/console.css, line 102 -- list-style-image : url("chrome://global/skin/error-icon.gif"); /themes/classic/global/win/global.css, line 97 -- list-style-image : url("chrome://global/skin/error-icon.gif");
Reporter | ||
Comment 17•23 years ago
|
||
Oops, ignore that last comment. Those are the class definitions, duh.
Reporter | ||
Comment 18•23 years ago
|
||
I see that http://lxr.mozilla.org/seamonkey/source/themes/classic/messenger/0 is actually fine. so sr=sfraser on the fixes in this patch, but I encourage you to fix the comments as mentioned, and to get someone to change the parameter name in nsICommonDialogs. Is Classic going to move to the same layout as modern at some point?
Comment 19•23 years ago
|
||
Comment 20•23 years ago
|
||
as requested - along with some conversion from C++ only enums to script-friendly const longs which I had in my tree care to sr=?
Reporter | ||
Comment 21•23 years ago
|
||
alecf: looks good apart from this comment: + in wstring inIconClass, /* url of icon to be displayed in dialog */
Comment 22•23 years ago
|
||
doh! fixed in my tree. thanks
Reporter | ||
Comment 23•23 years ago
|
||
Can we get this in please? We have to make windows common dialogs not be full- screen and empty.
Reporter | ||
Comment 24•23 years ago
|
||
sr=sfraser on alecf's parts too.
Comment 25•23 years ago
|
||
r=jag
Comment 26•23 years ago
|
||
*** Bug 75210 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 27•23 years ago
|
||
Tried to land this last night and found that danm had hooked up nsIPromptService all over the place, this invalidating parts of my patch. Upcoming patch is updated to work with nsIPromptService instead of nsICommonDialogs.
Assignee | ||
Comment 28•23 years ago
|
||
Comment 29•23 years ago
|
||
Not your code, but since you're touching it: + nsAutoString url; url.AssignWithConversion( "question-icon" ); + block->SetString( nsIPromptService::eIconClass, url.GetUnicode()); NS_NAMED_LITERAL_STRING(styleClass, "question-icon"); block->SetString(nsIPromptService::eIconClass, styleClass.get()); nsString url; - url.AssignWithConversion(kAlertIconURL); - block->SetString(eIconURL, url.GetUnicode()); + url.AssignWithConversion(kAlertIconClass); + block->SetString(eIconClass, url.GetUnicode()); NS_ConvertASCIItoUCS2 styleClass(kAlertIconClass); block->SetString(eIconClass, styleClass.get()); (same pattern repeated a few times, make sure any other |url| is changed to |styleClass|) Or, since kAlertIconClass is only used at two places, either #define ALERT_ICON_CLASS "alert-icon" ... NS_NAMED_LITERAL_STRING(styleClass, ALERT_ICON_CLASS); (though I vaguely recall this not working on all platforms) or just specify the string explicitely: NS_NAMED_LITERAL_STRING(styleClass, "alert-icon"); All instances of GetUnicode() can be converted to get() here, btw.
Reporter | ||
Comment 30•23 years ago
|
||
The nsCommonDialogs code is still there, so I think you should fix both.
Assignee | ||
Comment 31•23 years ago
|
||
I am still fixing the common dialog code. The second patch is in addition to the first patch.
Assignee | ||
Comment 32•23 years ago
|
||
Comment 33•23 years ago
|
||
r=jag (with that nit discussed on irc fixed)
Comment 34•23 years ago
|
||
sr=alecf under the assumption that the nits are with the lack of NS_LITERAL_STRING()/too much *WithConversion()
Comment 35•23 years ago
|
||
Yeah. The ones in nsCommonDialogs.cpp are moot because that file isn't part of the build any longer, and he fixed the one in nsPermissions.cpp.
Assignee | ||
Comment 36•23 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 37•23 years ago
|
||
What about this one: http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/navigatorDD.js#311.
Comment 38•23 years ago
|
||
*** Bug 74174 has been marked as a duplicate of this bug. ***
Comment 39•23 years ago
|
||
Marking verified on Mac (2001-04-25-09-Mtrunk).
Status: RESOLVED → VERIFIED
Updated•16 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•