Closed
Bug 215440
Opened 21 years ago
Closed 21 years ago
Support titledefault attribute for specifying titles to use in lieu of document titles
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: hyatt, Assigned: hyatt)
References
Details
Attachments
(2 files)
3.16 KB,
patch
|
bugs
:
review+
mscott
:
superreview+
chofmann
:
approval1.5b+
|
Details | Diff | Splinter Review |
1.31 KB,
patch
|
brendan
:
review+
brendan
:
superreview+
brendan
:
approval1.5b+
|
Details | Diff | Splinter Review |
Necessary for XUL clients that don't wish to use the titlemodifier/separator stuff.
Assignee | ||
Comment 1•21 years ago
|
||
Comment 2•21 years ago
|
||
Comment on attachment 129373 [details] [diff] [review] Implement titledefault r=ben@bengoodger.com
Attachment #129373 -
Flags: review+
Updated•21 years ago
|
Attachment #129373 -
Flags: superreview+
*** Bug 215353 has been marked as a duplicate of this bug. ***
Comment 4•21 years ago
|
||
Comment on attachment 129373 [details] [diff] [review] Implement titledefault approved for 1.5b landing
Attachment #129373 -
Flags: approval1.5b+
If you're substituting something for the lack of a title, shouldn't you distinguish documents without a TITLE element from documents with <TITLE></TITLE>?
Comment on attachment 129373 [details] [diff] [review] Implement titledefault >+ if (!mTitlePreface.IsEmpty()) { >+ // Title will be: "Preface: Doc Title - Mozilla" >+ title.Assign(mTitlePreface); >+ title.Append(docTitle); >+ } >+ else { >+ // Title will be: "Doc Title - Mozilla" >+ title = docTitle; >+ } Also, why bother with this if-else when the then-part would do the same thing in all cases? (Also, the comment is slightly misleading since it could be taken to imply that a separator is inserted after the Preface. Or did you intend to do that, which would require the if-else?)
Comment on attachment 129373 [details] [diff] [review] Implement titledefault ...which would allow the entire function (other than the initial null-checks) to be simplified to): nsDependentString inTitle(aTitle); nsAFlatString& title = PromiseFlatString( mTitlePreface + (inTitle.IsEmpty() ? mTitleDefault : inTitle) + mTitleSeparator + mWindowTitleModifier); // XXX Don't need to fully qualify this once I remove nsWebShellWindow::SetTitle // return mXULWindow->SetTitle(title.get()); return mXULWindow->nsXULWindow::SetTitle(title.get());
But maybe you wouldn't want that to happen, since if there's no title, and the XUL didn't provide a titledefault, you don't want to append the separator, do you?
Comment 9•21 years ago
|
||
You realize this also has major effects on Thunderbird? I really do not approve of these changes. They should be applied to Mac ONLY... The changes affects way to many applications for it to be be justified
Comment 10•21 years ago
|
||
Tom: mscott's in charge of thunderbird, and he sr'd the patch. What other apps are affected? Does this patch do anything to SeaMonkey? It shouldn't. I'm more concerned that the code was crappy before and hyatt didn't fix it up enough. Hyatt, see dbaron's comments. /be
Comment 11•21 years ago
|
||
I would think it affects all applications based on XUL. I don't know how many that is?
Assignee | ||
Comment 12•21 years ago
|
||
Tom, the C++ changes have zero effect on XUL applications. All the C++ changes do is add an additional attribute called titledefault that can be used when document titles are empty (to avoid having a blank titlebar). If you want to protest the removal of the titlemodifier and titleseparator attributes from the Firebird and Thunderbird XUL, go back to the other bug. This bug is purely about adding a feature to XUL that is completely backwards-compatible with Seamonkey and other XUL apps. dbaron, I just re-indented the code and removed conditionals (and added an init of docTitle to match the titleDefault). The other code you're critiquing is the same as it was before. If you want to rewrite it/clean it up, go for it, but that's not what this patch was about. Also, I don't think there's any reason to distinguish between <title></title> and an untitled page. The point is to avoid a blank titlebar (which looks terrible).
Assignee | ||
Comment 13•21 years ago
|
||
dbaron, right. If you have no doctitle (or titledefault), then you don't append the separator.
Assignee | ||
Comment 14•21 years ago
|
||
Which makes what I did wrong. Patch forthcoming.
Assignee | ||
Comment 15•21 years ago
|
||
Comment 16•21 years ago
|
||
Comment on attachment 129388 [details] [diff] [review] Make sure the code is exactly the same as it was before except for the doctitle initialization r+sr+a=brendan@mozilla.org, get it in for 1.5b. /be
Attachment #129388 -
Flags: superreview+
Attachment #129388 -
Flags: review+
Attachment #129388 -
Flags: approval1.5b+
Assignee | ||
Comment 17•21 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 18•21 years ago
|
||
This is STILL broken. It's fixed if you open a new Firebird WINDOW and set it to about:blank. However, if you open a new TAB, the title bar goes to completely blank.
Comment 19•21 years ago
|
||
*** Bug 215557 has been marked as a duplicate of this bug. ***
Comment 20•21 years ago
|
||
Reopening in light of comment 18.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 21•21 years ago
|
||
BTW, sorry about opening Bug 215557. I didn't know if this one would get reopened or not... mea culpa.
Comment 22•21 years ago
|
||
*** Bug 215569 has been marked as a duplicate of this bug. ***
Comment 23•21 years ago
|
||
Would someone please change the OS from MacOS X to Linux? I see this problem using Red Hat. Sorry for having opened #215669. Thanks for marking that duplicate, Dean.
Comment 24•21 years ago
|
||
It's not only Linux, it's ALL. Opening a new tab will make the "title" go away in windows too...
Assignee | ||
Comment 26•21 years ago
|
||
Fixed.
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•