Closed Bug 369030 Opened 19 years ago Closed 19 years ago

mainWindow title has no info about view

Categories

(Calendar :: General, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Taraman, Assigned: Taraman)

References

Details

Attachments

(2 files, 3 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1;en-US;rv:1.9a2pre) Gecko/20070108 Calendar/0.4a1 In Firefox, the Window Title holds the title of the currntly viewed page + " - Mozilla Firefox" In Thunderbird, it's the name of the mail-folder + " - Thunderbird" So I thought it would be a good thing to have something similar in Sunbird and Lightning. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Attached patch adds current view Title to the mainWindow (obsolete) β€” β€” Splinter Review
With this patch the Actual view title is set to be the window title and the short brand name is appended. e.g. if you view February 2007, the Sunbird window title changes to "February 2007 - Calendar" It also works for lightning, where " - Thunderbird" is appended as you expect it in the Mail Application.
Attached image Screenshot of the new look β€”
Comment on attachment 253697 [details] [diff] [review] adds current view Title to the mainWindow Again, please ask for review so that we can get these sweet patches into the tree! :-) drive-by comments: 1.) Fix indenting. 2.) Wrap lines to be < 80 chars.
Attached patch Adds view-Info to mainWindow-Title (obsolete) β€” β€” Splinter Review
fixed indentation and line-length...
Attachment #253697 - Attachment is obsolete: true
Attachment #253759 - Flags: first-review?(lilmatt)
Attachment #253759 - Flags: ui-review?(dmose)
Attachment #253759 - Flags: ui-review?(dmose) → ui-review?(mvl)
Comment on attachment 253759 [details] [diff] [review] Adds view-Info to mainWindow-Title Removing review request until this makes it through ui-r
Attachment #253759 - Flags: first-review?(lilmatt)
Comment on attachment 253759 [details] [diff] [review] Adds view-Info to mainWindow-Title ui-review=mvl
Attachment #253759 - Flags: ui-review?(mvl) → ui-review+
Comment on attachment 253759 [details] [diff] [review] Adds view-Info to mainWindow-Title >+ var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] >+ .getService(Components.interfaces.nsIStringBundleService); Align the .getService dot with the C.c dot please. >+ var props = sbs.createBundle("chrome://branding/locale/brand.properties"); Since this is the brand stringbundle, I would suggest renaming the variable to something else. We often use props for the calendar.properties stringbundle elsewhere in the code, and this might be confusing. I suggest "brand". >+ document.title = document.getAnonymousElementByAttribute(this, "anonid", >+ "title-0").label+" - "+props.GetStringFromName("brandShortName"); This needs to be split up to be more readable. My suggestion is to assign the doc.getAnonElement call to its own variable, and use that in the assignment to doc.title. Also, please put spaces around the + when concatenating strings. These are all style nita. r1=lilmatt with those fixed. Please post another version for whomever does r2.
Attachment #253759 - Flags: first-review+
Assignee: nobody → MarkusAdrario
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch changes from r1 (obsolete) β€” β€” Splinter Review
I changed the things lilmatt commented on. Thx for the good hints to a mozilla programming newbie.
Attachment #253759 - Attachment is obsolete: true
Attachment #254351 - Flags: ui-review+
Attachment #254351 - Flags: second-review?(jminta)
Attachment #254351 - Flags: first-review+
Comment on attachment 254351 [details] [diff] [review] changes from r1 There are some tabs in here that need to be converted to spaces (No tabs allowed in js, xul, or xml files). + var viewTitle = document.getAnonymousElementByAttribute(this, "anonid", "title-0") You should have a semicolon at the end of this line. But really, wouldn't it be easier to just get aNameArray[2], rather than reading off .label from the element? That would avoid the need for this whole line. r2=jminta with the tabs fixed, and either switching to aNameArray[2], or someone explaining to me why we can't. Thanks for the patch!
Attachment #254351 - Flags: second-review?(jminta) → second-review+
Thanks for the hint Joey! Why make it easy when you can take the difficult way. aNameArray[2] works fine, I just didn't see it. fixed that, which obsoletes the missing ; and fixed the tabs.
Attachment #254351 - Attachment is obsolete: true
Attachment #254457 - Flags: ui-review+
Attachment #254457 - Flags: second-review+
Attachment #254457 - Flags: first-review+
Great work. Patch checked in. calendar/base/content/calendar-decorated-base.xml: 1.13 -> 1.14
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
In month view: I can see i.e. "February 2007". In day view I can see i.e. "Saturday". But what's the date? IMO it should look like "Saturday, 17 Feb" or something like it
verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070216 Calendar/0.4a1
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
Blocks: 370836
Litmus testcase 3009 created
Whiteboard: [litmus testcase wanted]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: