Closed Bug 102683 Opened 25 years ago Closed 24 years ago

Extract file associated with help menu from the XPI directory

Categories

(CCK Graveyard :: CCK-General, defect, P1)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: shrutiv, Assigned: shrutiv)

Details

Attachments

(1 obsolete file)

Currently CCK ships the file associated with the help menu. Instead we must provide a way to extract this file from the XPI directory.
qa to blee
QA Contact: barrettl → blee
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: need r=
Right now CCK creates the file associated with the help menu (communicator.xul), from files (help1.txt and help2.txt) shipped with the ccktool. This patch eliminates the procedure of shipping help1.txt & help2.txt and creates the file associated with the help menu by extracting it directly from the xpi. Also, I have renamed the file helpmenu.cpp as MailNews.cpp, since the code in helpmenu.cpp no longer handles modifying the help menu.
I know some of this is cut-and-paste, but here are some comments anyway. + char *xpiname = strtok(NULL, ",)"); + char *jname = strtok(NULL, ",)"); + char *xpifile = strtok(NULL, ",)"); + char *value = strtok(NULL, ",)"); + char *newvalue = value; Can you choose better variable names than xpiname and xpifile? I have trouble keeping track of the difference between the two. + if (!t) + return TRUE;//*** Changed FALSE to TRUE + *t = '\0'; This comment is not useful. + if (!srcf) + { + AfxMessageBox("Cannot open input file: " + CString (xpifile),MB_OK); + exit(3); + } + ofstream dstf(newfile); + if (!dstf) + { + AfxMessageBox("Cannot open output file: " + CString (newfile), MB_OK); + exit(3); + } I think we have removed MessageBox errors from ib.
There are still MessageBox errors in ib. I think, at some point, we should get away from this and use printf's (for command line) and alter ExecuteCommand to check for errors (is this bug 102537 ?).
(1) When we add the name for the additional menu entry, we still appear to be hardcoding it into the XUL. For localizability, UI strings and URLs should be in the localized DTD and RDF files, right? (2) The code seems to be dependent upon Security help entry being the last entry in the second to the last subsection. This might change in a different release. Could we add a magic comment to the generic communicatorOverlay.xul and use that for positioning the additional help entry?
Is communicatorOverlay.xul in the ns tree? If so, this bug probably should have been in bugscape...
Attachment #62864 - Attachment is obsolete: true
The xul file is a dynamic overlay which is a recommended mechanism for customizability. Ideally, as you suggested, there should be some magic in the code to parse the xul correctly and insert the add-on menu item accordingly.
But if a distributor wants to localize the help menu, then we should keep the UI and URL in the DTD and RDF files. Otherwise, they must reinstall the overlay for each localized version.
Whiteboard: need r=
Following up on previous comment... (But we do not have to address this issue in this bug/patch.) Instead of hardcoding the menu label into communicatorOverlay.xul dstf << " <menuitem label=\"" << HelpMenuName << "\"\n"; I think we should do something like dstf << " <menuitem label=\""&custHelp.label;"\"\n"; and then add the entity to communicatorOverlay.dtd which would use the value of HelpMenuName. Likewise, the URL should not be hardcoded either. Even for the same language the URL could be different (e.g., US v. UK).
Localizability issue separated and filed as bug 122895.
Marking closed. Opened Bugscape Bug 13928 to address this issue.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: