Closed
Bug 158881
Opened 22 years ago
Closed 22 years ago
Remove editorshell use from dialogs
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla1.2beta
People
(Reporter: akkzilla, Assigned: cmanske)
References
Details
Attachments
(1 file, 36 obsolete files)
(deleted),
patch
|
Brade
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
Our JS dialog code uses editorshell heavily. Charley and I have talked about
how we need to excise it, but there's no bug tracking it. Now there is.
Reporter | ||
Updated•22 years ago
|
Blocks: editorshell
Assignee | ||
Comment 1•22 years ago
|
||
Glad I found this; I was about to file this bug!
Brade thought it would be easier to handle if we did each dialog separately,
so I'll file bugs for each set and add dependencies to this one.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2alpha
Assignee | ||
Comment 2•22 years ago
|
||
Methods used by all dialog must be fixed first.
Assignee | ||
Updated•22 years ago
|
Comment 3•22 years ago
|
||
Comment on attachment 93729 [details] [diff] [review]
SharedMethods patch 1
I talked to charley and he's going to fix up some typos and remove some
unnecessary checks; hopefully akk or someone can r= if I'm not around
Attachment #93729 -
Flags: needs-work+
Assignee | ||
Comment 4•22 years ago
|
||
Update on EdDialogCommon.js. This was done with "-w" to make the diff much
more readable. Last one was a pain because of new "try/catch" and subsequent
indent changes. Rest assured the indendenting is correct in new code.
Attachment #93729 -
Attachment is obsolete: true
Comment 5•22 years ago
|
||
Comment on attachment 93740 [details] [diff] [review]
SharedMethods v2
seems like there is still some cleanup we can do here:
+ try {
+ var headList = editor.document.getElementsByTagName("head");
if (headList)
return headList.item(0);
+ } catch (e) {}
this could just be:
+ try {
+ var headList = editor.document.getElementsByTagName("head");
return headList.item(0);
+ } catch (e) {}
probably also in some other places involving "metaNodes"
Assignee | ||
Comment 6•22 years ago
|
||
removed "if (headlist)"
Attachment #93740 -
Attachment is obsolete: true
Comment 7•22 years ago
|
||
Comment on attachment 94049 [details] [diff] [review]
SharedMethods v3
r=brade
Attachment #94049 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need r=,sr= → [FIX IN HAND]need sr=
Comment 8•22 years ago
|
||
Comment on attachment 94049 [details] [diff] [review]
SharedMethods v3
rs=alecf
Attachment #94049 -
Flags: superreview+
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need sr= → [FIX IN HAND]
Assignee | ||
Comment 9•22 years ago
|
||
Comment on attachment 94049 [details] [diff] [review]
SharedMethods v3
This patch was checked in
Attachment #94049 -
Attachment is obsolete: true
Assignee | ||
Comment 10•22 years ago
|
||
This changes "insert/deleteElement" to "insert/deleteNode", which was missed in
previous patch.
Comment 11•22 years ago
|
||
Comment on attachment 95111 [details] [diff] [review]
Fixup patch v1
r=neil@parkwaycc.co.uk
Good catch on Page Properties dialog!
Attachment #95111 -
Flags: review+
Comment 12•22 years ago
|
||
Attachment #95111 -
Flags: superreview+
Assignee | ||
Comment 13•22 years ago
|
||
Comment on attachment 95111 [details] [diff] [review]
Fixup patch v1
checked into 1.2 trunk
Attachment #95111 -
Attachment is obsolete: true
Assignee | ||
Comment 14•22 years ago
|
||
Remove editorShell from editorUtilites and implement "isHTMLEditor()" method.
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND] → [FIX IN HAND]need r=,sr=
Assignee | ||
Comment 15•22 years ago
|
||
Fixed stuff noticed by reviewer. Removed isPlainTextEditor since we don't need
it.
Attachment #96033 -
Attachment is obsolete: true
Comment 16•22 years ago
|
||
Comment on attachment 96052 [details] [diff] [review]
EditorUtilities v2
r=brade tho remove the isPlaintextEditor function from editorUtilities.js
(I also wouldn't mind if the check for !isHTMLEditor() were at the top in
nsButtonPrefListener.observe)
be sure to test plaintext mail compose and the ability to open our dialogs in
html mail compose.
Attachment #96052 -
Flags: review+
Assignee | ||
Comment 17•22 years ago
|
||
Ok, "isPlainTextEditor()" is deleted and
if (!isHTMLEditor())
was moved as requested.
Whiteboard: [FIX IN HAND]need r=,sr= → [FIX IN HAND]need sr=
Comment 18•22 years ago
|
||
Comment on attachment 96052 [details] [diff] [review]
EditorUtilities v2
+ return (editorflags &
Components.interfaces.nsIPlaintextEditor.eEditorPlaintextMask);
need to make sure this is actually a boolean:
+ return (editorflags &
Components.interfaces.nsIPlaintextEditor.eEditorPlaintextMask)!=0;
(I'm speaking from having been bit by similar stuff before, plus you're
consistent with the boolean-negated checks in IsInTable/IsInTableCell/etc)
sr=alecf with that nit
Attachment #96052 -
Flags: superreview+
Assignee | ||
Comment 19•22 years ago
|
||
Comment on attachment 96052 [details] [diff] [review]
EditorUtilities v2
This patch checked into 1.2 trunk, minus the "isPlainTextEditor()" method, so
alecf's "nit" wasn't necessary.
Attachment #96052 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need sr= → [FIX IN HAND]
Assignee | ||
Comment 20•22 years ago
|
||
This patch removes editorShell and also has some cleanup menulist code
donated by neil@parkwaycc.co.uk that greatly simplifies the code and makes it
more readable.
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND] → [FIX IN HAND]need r=,sr=
Assignee | ||
Comment 21•22 years ago
|
||
Replaced "I" etc with const g_I etc and other small changes per reviewers
comments.
Attachment #96935 -
Attachment is obsolete: true
Comment 22•22 years ago
|
||
Comment on attachment 97206 [details] [diff] [review]
List Properties Dialog v2
r=brade
p.s. Shouldn't Neil be listed as a contributor in this file?
Attachment #97206 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need r=,sr= → [FIX IN HAND]need sr=
Comment 23•22 years ago
|
||
> p.s. Shouldn't Neil be listed as a contributor in this file?
I always overlook that, it's not that I'm modest, I just ignore comments :-)
Assignee | ||
Comment 24•22 years ago
|
||
I've added Neil as contributor to both EdListProps.js and EdListProps.xul
Comment 25•22 years ago
|
||
Comment on attachment 97206 [details] [diff] [review]
List Properties Dialog v2
sr=hewitt
Attachment #97206 -
Flags: superreview+
Assignee | ||
Comment 26•22 years ago
|
||
"List Properties Dialog v2" patch checked into 1.2 trunk.
Comment 27•22 years ago
|
||
> Created an attachment (id=97206)
> List Properties Dialog v2
>
> Replaced "I" etc with const g_I etc and other small changes per reviewers
> comments.
I missed that :-( how is g_I more readable than "I" - why not g_1, g_OL etc?
Comment 28•22 years ago
|
||
How about some more readable constants?
Assignee | ||
Comment 29•22 years ago
|
||
Comment on attachment 97206 [details] [diff] [review]
List Properties Dialog v2
This was checked in
Attachment #97206 -
Attachment is obsolete: true
Comment 30•22 years ago
|
||
Comment 31•22 years ago
|
||
Comment on attachment 98143 [details] [diff] [review]
Form dialogs
r=brade
Attachment #98143 -
Flags: review+
Assignee | ||
Comment 32•22 years ago
|
||
Assignee | ||
Comment 33•22 years ago
|
||
Comment on attachment 97955 [details] [diff] [review]
List Properties Dialog v3 :-)
r=cmanske
Attachment #97955 -
Flags: review+
Assignee | ||
Comment 34•22 years ago
|
||
Attachment #97955 -
Attachment is obsolete: true
Comment 35•22 years ago
|
||
Comment on attachment 99390 [details] [diff] [review]
Advanced Edit dialog v1.
obsoleting this since it isn't the advanced edit dialog stuff
Attachment #99390 -
Attachment is obsolete: true
Assignee | ||
Comment 36•22 years ago
|
||
Comment 37•22 years ago
|
||
Comment on attachment 99411 [details] [diff] [review]
Link Properties Dialog
in EdLinkProps.js, add a blank line in Startup after closing curly for
!gActiveEditor
Also remove the dump in ChangeLinkLocation.
Is this the correct function to call?
- editorShell.RemoveTextProperty("a", "");
+ EditorRemoveTextProperty("href", "");
r=brade
Attachment #99411 -
Flags: review+
Updated•22 years ago
|
Attachment #99411 -
Attachment description: List Properties Dilaog v4 → Link Properties Dialog
Assignee | ||
Comment 38•22 years ago
|
||
Assignee | ||
Comment 39•22 years ago
|
||
Attachment #99411 -
Attachment is obsolete: true
Comment 40•22 years ago
|
||
Comment on attachment 99413 [details] [diff] [review]
Advanced Edit dialog v2
r=brade
Attachment #99413 -
Flags: review+
Comment 41•22 years ago
|
||
Comment on attachment 99415 [details] [diff] [review]
Link Properties Dialog v1
in EdLinkProps.js, add a blank line in Startup after closing curly for
!gActiveEditor
I like the blank line in ChangeLinkLocation.
r=brade
Attachment #99415 -
Flags: review+
Comment 42•22 years ago
|
||
Comment on attachment 99419 [details] [diff] [review]
List Properties Dialog v4
r=brade but my personal bias is to prefix constants with "k" rather than "g"
(e.g. "kDecimalCSS")
Attachment #99419 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Assignee | ||
Comment 43•22 years ago
|
||
Assignee | ||
Comment 44•22 years ago
|
||
Comment 45•22 years ago
|
||
Comment on attachment 99536 [details] [diff] [review]
Insert Characters Dialog v1
r=brade
Attachment #99536 -
Flags: review+
Comment 46•22 years ago
|
||
Comment on attachment 99534 [details] [diff] [review]
Image Property Dialog and Overlay v1
r=brade
Attachment #99534 -
Flags: review+
Assignee | ||
Comment 47•22 years ago
|
||
Comment 48•22 years ago
|
||
Comment on attachment 99563 [details] [diff] [review]
Insert Table dialog and Table / Cell Properties dialog v1
r=neil@parkwaycc.co.uk on cmanske's changes (some are mine :-)
Notes:
>-var tagName = "table"
>-var tagname = "table"
Convert all these to constants for consistency in all dialogs?
> var gSelectedCellCount = 0;
>+ else
>+ gSelectedCellCount = 0;
Overkill?
Comment 49•22 years ago
|
||
Comment on attachment 98143 [details] [diff] [review]
Form dialogs
sr=dveditz
Attachment #98143 -
Flags: superreview+
Comment 50•22 years ago
|
||
Comment on attachment 99413 [details] [diff] [review]
Advanced Edit dialog v2
sr=dveditz
Attachment #99413 -
Flags: superreview+
Comment 51•22 years ago
|
||
Comment on attachment 99415 [details] [diff] [review]
Link Properties Dialog v1
sr=dveditz
Attachment #99415 -
Flags: superreview+
Comment 52•22 years ago
|
||
Comment on attachment 99419 [details] [diff] [review]
List Properties Dialog v4
sr=dveditz
Attachment #99419 -
Flags: superreview+
Comment 53•22 years ago
|
||
Comment on attachment 99534 [details] [diff] [review]
Image Property Dialog and Overlay v1
sr=dveditz
Attachment #99534 -
Flags: superreview+
Comment 54•22 years ago
|
||
Comment on attachment 99536 [details] [diff] [review]
Insert Characters Dialog v1
sr=dveditz
Attachment #99536 -
Flags: superreview+
Assignee | ||
Comment 55•22 years ago
|
||
Attachment #99563 -
Attachment is obsolete: true
Assignee | ||
Comment 56•22 years ago
|
||
Assignee | ||
Comment 57•22 years ago
|
||
A global editor variable "gEditor" was recently added to fix bug 167712, but
that is incompatable with the strategy we are using to remove editorShell
dependencies. "GetCurrentEditor()" should be used to obtain nsIEditor and
nsIHTMLEditor interfaces in dialogs. This fixes that problem so all the above
patches will work correctly.
Also changes a couple of other minor problems found.
Assignee | ||
Comment 58•22 years ago
|
||
Comment on attachment 99563 [details] [diff] [review]
Insert Table dialog and Table / Cell Properties dialog v1
r=neil@parkwaycc.co.uk
(neil reviewed above but
didn't check the box)
Attachment #99563 -
Flags: review+
Attachment #99722 -
Flags: review+
Comment 59•22 years ago
|
||
Comment on attachment 99722 [details] [diff] [review]
Insert Table dialog and Table / Cell Properties dialog v2
whew! big patch.
everything seems to be in order.
r=andreww
Comment 60•22 years ago
|
||
Comment on attachment 99730 [details] [diff] [review]
Page Color properties and Horizontal Rule dialogs
r=andreww
Attachment #99730 -
Flags: review+
Comment 61•22 years ago
|
||
Comment on attachment 99735 [details] [diff] [review]
EdDialogCommon.js fix v1
r=andreww
Attachment #99735 -
Flags: review+
Comment 62•22 years ago
|
||
Comment on attachment 99722 [details] [diff] [review]
Insert Table dialog and Table / Cell Properties dialog v2
sr=sfraser
Attachment #99722 -
Flags: superreview+
Comment 63•22 years ago
|
||
Comment on attachment 99730 [details] [diff] [review]
Page Color properties and Horizontal Rule dialogs
sr=sfraser
Attachment #99730 -
Flags: superreview+
Comment 64•22 years ago
|
||
Comment on attachment 99735 [details] [diff] [review]
EdDialogCommon.js fix v1
sr=sfraser
Attachment #99735 -
Flags: superreview+
Assignee | ||
Comment 65•22 years ago
|
||
Comment on attachment 98143 [details] [diff] [review]
Form dialogs
checked into 1.2 trunk
Attachment #98143 -
Attachment is obsolete: true
Assignee | ||
Comment 66•22 years ago
|
||
Comment on attachment 99413 [details] [diff] [review]
Advanced Edit dialog v2
checked into 1.2 trunk
Attachment #99413 -
Attachment is obsolete: true
Assignee | ||
Comment 67•22 years ago
|
||
Comment on attachment 99415 [details] [diff] [review]
Link Properties Dialog v1
checked into 1.2 trunk
Attachment #99415 -
Attachment is obsolete: true
Assignee | ||
Comment 68•22 years ago
|
||
Comment on attachment 99419 [details] [diff] [review]
List Properties Dialog v4
checked into 1.2 trunk
Attachment #99419 -
Attachment is obsolete: true
Assignee | ||
Comment 69•22 years ago
|
||
Comment on attachment 99534 [details] [diff] [review]
Image Property Dialog and Overlay v1
checked into 1.2 trunk
Attachment #99534 -
Attachment is obsolete: true
Assignee | ||
Comment 70•22 years ago
|
||
Comment on attachment 99536 [details] [diff] [review]
Insert Characters Dialog v1
checked into 1.2 trunk
Attachment #99536 -
Attachment is obsolete: true
Assignee | ||
Comment 71•22 years ago
|
||
Comment on attachment 99722 [details] [diff] [review]
Insert Table dialog and Table / Cell Properties dialog v2
checked into 1.2 trunk
Attachment #99722 -
Attachment is obsolete: true
Assignee | ||
Comment 72•22 years ago
|
||
Comment on attachment 99730 [details] [diff] [review]
Page Color properties and Horizontal Rule dialogs
checked into 1.2 trunk
Attachment #99730 -
Attachment is obsolete: true
Assignee | ||
Comment 73•22 years ago
|
||
Comment on attachment 99735 [details] [diff] [review]
EdDialogCommon.js fix v1
checked into 1.2 trunk
Attachment #99735 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need sr=
Comment 74•22 years ago
|
||
Three dialogs weren't using setShouldTxnSetSelection (shouldn't that be an
attribute?) when they should have been, also added extra try/catch on startup
for consistency.
Comment 75•22 years ago
|
||
Note: this is based on a patch previously reviewed by varga@netscape.com
Assignee | ||
Comment 76•22 years ago
|
||
Also includes removing editorShell from EdDialogTemplate.js, the simplified
template for new dialogs.
Assignee | ||
Comment 77•22 years ago
|
||
Includes the usual global var cleanup as well.
This must be checked in with "Convert Get/SetDocumentTitle methods v2" in
bug 16029 to use new Set/GetDocumentTitle utilities.
Assignee | ||
Comment 78•22 years ago
|
||
This must be checked in with "Convert Get/SetDocumentTitle methods v2" in
bug 16029 to use new Set/GetDocumentTitle utilities.
Assignee | ||
Comment 79•22 years ago
|
||
This must be checked in with "Convert Get/SetDocumentTitle methods v2" in
bug 16029 to use new Set/GetDocumentTitle utilities.
Assignee | ||
Comment 80•22 years ago
|
||
Assignee | ||
Comment 81•22 years ago
|
||
Note that these dialogs are not currently used, but hopefully they will be
revived later!
Assignee | ||
Comment 82•22 years ago
|
||
Assignee | ||
Comment 83•22 years ago
|
||
Forgot to remove "InitEditorShell()". Note that the Publish Progress dialog is
a
non-modal dialog, which is why we don't check for "GetCurrentEditor()" and
close the dialog if not found. Editor interfaces are not used in this dialog.
This must be checked in with "Convert Get/SetDocumentTitle methods v2" in
bug 169029 to use new Set/GetDocumentTitle utilities.
[Same with "Save As Charset" and "Page Properties" patches -- wrong bug cited
on those :-( ]
Attachment #100322 -
Attachment is obsolete: true
Assignee | ||
Comment 84•22 years ago
|
||
Comment on attachment 99864 [details] [diff] [review]
Cleanup for some form dialogs
r=cmanske
Attachment #99864 -
Flags: review+
Assignee | ||
Comment 85•22 years ago
|
||
Comment on attachment 99866 [details] [diff] [review]
Selection list
r=cmanske
I'd prefer if you prefixed
global variables with "g".
As you can see in other
dialogs, I've been converting other older dialogs to that pattern.
Attachment #99866 -
Flags: review+
Comment 86•22 years ago
|
||
Comment on attachment 100317 [details] [diff] [review]
list dialog patch
This isn't the patch it is labeled as; renaming it and obsoleting it since it
has already landed
Attachment #100317 -
Attachment description: ColorPicker, Insert HTML Source, Link Checker dialogs v1 → list dialog patch
Attachment #100317 -
Attachment is obsolete: true
Comment 87•22 years ago
|
||
Comment on attachment 100320 [details] [diff] [review]
Page Properties dialog
fix this typo: consistenly
This isn't a regression in this patch, but BuildRecentMenu seems really
inefficient to call here. I know we need to set the pref, but we really don't
need to rebuild the menu since this document isn't in that list by design. (I
just now filed bug 170522 on this issue.)
In UpdateWindowTitle, there is no point getting the scheme until you get inside
the "if (filename)" block.
Do we need to worry about updating the window title from a dialog? Is there
some scenario where a new title won't be reflected on the main window?
r=brade with the above
Attachment #100320 -
Flags: review+
Comment 88•22 years ago
|
||
Comment on attachment 100323 [details] [diff] [review]
Save As Charset dialog
please fix the white space after the "if" in places like this:
+ if(!gContenttypeElement && (editor.contentsMIMEType != 'text/plain'))
as well as this:
+ if( ! gContenttypeElement )
(I expect to see something like "if (!foo)")
r=brade with the above cleanup
Attachment #100323 -
Flags: review+
Comment 89•22 years ago
|
||
Comment on attachment 100326 [details] [diff] [review]
Named Anchor Dialog v1
fix the whitespace on this line (add space after if):
+ if(!gAnchorElement)
clarify this comment by using == or "means" or some other word:
+ // "false" = don't delete selected text when inserting
r=brade with the above fixes
Attachment #100326 -
Flags: review+
Comment 90•22 years ago
|
||
Comment on attachment 100328 [details] [diff] [review]
Image Map dialogs v1
I don't think you should remove these commented lines (just fix them). I think
there was an issue which is why the code remains but is commented out:
function setMapName(){
- //imageMap = editorShell.CreateElementWithDefaults("map");
- //dump(imageMap+"\n");
- //imageMap = frameDoc.createElement("map");
-
I'd say that is probably true for most of the code removal in this patch
Attachment #100328 -
Flags: needs-work+
Comment 91•22 years ago
|
||
Comment on attachment 100332 [details] [diff] [review]
Convert To Table dialog v1
in onAccept, move the setting of editor until you need it (it's odd to see it
assigned and not used until the outputToString). I'd expect to see it after
the switch. Then again, the switch seems very out of place maybe it should be
the code to move? No one seems to care about that until after you've called
outputToString (and possibly returned).
r=brade if the above is cleaned up
Attachment #100332 -
Flags: review+
Comment 92•22 years ago
|
||
Comment on attachment 100335 [details] [diff] [review]
Publishing Dialogs v2
This change doesn't seem right to me. If the page has no title, we shouldn't
show anything, should we? Showing "untitled" would be confusing.
+ if (!title)
+ title = "("+GetString("untitled")+")";
This line has inconsistent whitespace (missing space after comma):
+ SetProgressFinished(null,0);
I'm not sure if that's correct in this case; I need to review what
SetProgressFinished does.
r=brade on the rest
Assignee | ||
Comment 93•22 years ago
|
||
RE: Brade comment #87. Yes, I agree that it really isn't needed for the current
window, but rebuilding a menu isn't very expensive, so I thought that avoiding
the complication of dealing with separate methods wasn't necessary.
Not a big deal. I can redo it that way.
Assignee | ||
Comment 94•22 years ago
|
||
Commented-out code not removed; editorShell -> editor conversion done instead
as requested.
Attachment #100328 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need sr=
Comment 95•22 years ago
|
||
Comment on attachment 100609 [details] [diff] [review]
Image Map dialogs v2
I don't think you should remove the middle part here:
- //window.arguments[0] = "test";
//editorShell.editorDocument.body.appendChild(imageMap);
//editorShell.InsertElementAtSelection(imageMap, false);
+ // window.arguments[0] = "test";
//GetCurrentEditor().insertElementAtSelection(imageMap, false);
I don't think you should add "var newRect" here unless you are absolutely
certain what is going on; don't try to clean up warnings:
function createRect(which){
- //newRect = editorShell.CreateElementWithDefaults("area");
+ var newRect;
r=brade if you fix the above
Attachment #100609 -
Flags: review+
Assignee | ||
Comment 96•22 years ago
|
||
Previous patch in comment #76 was the wrong one!
ColorPicker, Insert HTML Source, Link Checker dialogs v2
Also includes removing editorShell from EdDialogTemplate.js, the simplified
template for new dialogs.
Comment 97•22 years ago
|
||
Comment on attachment 100614 [details] [diff] [review]
ColorPicker, Insert HTML Source, Link Checker v2
EdLinkChecker.js has an error:
+ if (!objects || objects.Count = 0)
should probably be:
+ if (!objects || 0 == objects.Count())
r=brade with that fix
Attachment #100614 -
Flags: review+
Comment 98•22 years ago
|
||
Comment on attachment 100614 [details] [diff] [review]
ColorPicker, Insert HTML Source, Link Checker v2
I beg of you, learn to use xargs. Keep a list of your files, like
editor/ui/dialogs/content/EdInsSrc.js
editor/ui/dialogs/content/EdLinkChecker.js
and then use xargs:
cat changed-files.list | xargs cvs diff > foo.patch
I'm not going to seperately sr= each of these patches.
Comment 99•22 years ago
|
||
I noticed that the display mode constants no longer need to match editor shell.
So, I thought they should be numbered after the tab position instead.
This makes it easier to change the selected tab when you change mode.
I've also hidden the View/Format Toolbar menuitem in source mode.
I've also set the "group" attribute which was missing on the mode menuitems.
I've also cleaned up SetDisplayMode a bit.
Comment 100•22 years ago
|
||
Comment on attachment 100335 [details] [diff] [review]
Publishing Dialogs v2
r=brade
Attachment #100335 -
Flags: review+
Assignee | ||
Comment 101•22 years ago
|
||
Fixed problems in Neil's patch:
1. The "editorOverlay" part of the patch is a bit funky!
2. Previous patch didn't uncheck the previous menuitem correctly.
3. Tabs at window bottom didn't redraw when mode was changed using menu.
Attachment #101094 -
Attachment is obsolete: true
Assignee | ||
Comment 102•22 years ago
|
||
Comment on attachment 101132 [details] [diff] [review]
Change display mode constants v2
r=cmanske for bulk of change by Neil. Brade looked at it as well.
Attachment #101132 -
Flags: review+
Comment 103•22 years ago
|
||
Comment on attachment 101132 [details] [diff] [review]
Change display mode constants v2
OK, so there's a bug in selectedItem for which I am close to landing a fix, but
that doesn't explain why you removed my menu correction.
Attachment #101132 -
Attachment is obsolete: true
Attachment #101132 -
Flags: needs-work+
Assignee | ||
Comment 104•22 years ago
|
||
Attachment #100614 -
Attachment is obsolete: true
Comment 105•22 years ago
|
||
Comment on attachment 101278 [details] [diff] [review]
Combined patch for SR
carry forward r=
Attachment #101278 -
Flags: review+
Comment 106•22 years ago
|
||
Comment on attachment 101132 [details] [diff] [review]
Change display mode constants v2
Ok, I take it all back, menuitem groups only work after the first time the menu
has been shown, sigh :-(
Attachment #101132 -
Attachment is obsolete: false
Attachment #101132 -
Flags: needs-work+
Assignee | ||
Comment 107•22 years ago
|
||
Comment on attachment 99864 [details] [diff] [review]
Cleanup for some form dialogs
see "combined patch" below
Attachment #99864 -
Attachment is obsolete: true
Assignee | ||
Comment 108•22 years ago
|
||
Comment on attachment 99866 [details] [diff] [review]
Selection list
see "combined patch" below for SR
Attachment #99866 -
Attachment is obsolete: true
Assignee | ||
Comment 109•22 years ago
|
||
Comment on attachment 100320 [details] [diff] [review]
Page Properties dialog
see "combined patch" for SR
Attachment #100320 -
Attachment is obsolete: true
Assignee | ||
Comment 110•22 years ago
|
||
Comment on attachment 100323 [details] [diff] [review]
Save As Charset dialog
see "combined patch" for SR
Attachment #100323 -
Attachment is obsolete: true
Assignee | ||
Comment 111•22 years ago
|
||
Comment on attachment 100332 [details] [diff] [review]
Convert To Table dialog v1
see "combined patch" for SR
Attachment #100332 -
Attachment is obsolete: true
Assignee | ||
Comment 112•22 years ago
|
||
Comment on attachment 100335 [details] [diff] [review]
Publishing Dialogs v2
see "combined patch" for SR
Attachment #100335 -
Attachment is obsolete: true
Assignee | ||
Comment 113•22 years ago
|
||
Comment on attachment 101132 [details] [diff] [review]
Change display mode constants v2
see "combined patch" for SR
Attachment #101132 -
Attachment is obsolete: true
Assignee | ||
Comment 114•22 years ago
|
||
Comment on attachment 100609 [details] [diff] [review]
Image Map dialogs v2
see "combined patch" for SR
Attachment #100609 -
Attachment is obsolete: true
Comment 115•22 years ago
|
||
Comment on attachment 101278 [details] [diff] [review]
Combined patch for SR
this looks a little odd:
+ {
+ treeBoxObject.invalidateRange(getParentIndex(index), index);
+ itemArray[index].level = 2;
+ treeBoxObject.view.selectionChanged();
+ }
it seems odd to invalidate a range that includes the index row, but then change
the level. Was this intentional? will selectionChanged() already cause some
kind of repaint? I see this in a few places.. At least add some comments
Another bit of possibly confusing code should at least have some comments:
+ {
+ itemArray[index].level += itemArray[index + 1].container;
+ itemArray.splice(index, 0, itemArray.splice(++index, 1)[0]);
+ }
+ selectTreeIndex(index, true);
lines like this look scary:
+ while (itemArray[--index].level > 1);
because they'll throw an exception if for some reason there is no level > 1 -
again, comments would be useful to explain why this will never happen
generally the patch looks fine but man you need to comment WAY more. There are
whole sections of code that I had to reread like 5 times to figure out what
you're doing - especially in the tree code, splicing arrays, etc. Think of it
this way: reviews will happen faster because it will take less time to figure
out what the heck is going on :)
sr=alecf if you comment the code I've quoted, and at least peruse your patch
and sprinkle some comments around some of the other code you're adding.
Attachment #101278 -
Flags: superreview+
Assignee | ||
Comment 116•22 years ago
|
||
All dialogs are converted and checked in except for Spell Checking.
These require a new interface to replace nsIEditorShell interface to spellchecker
(bug 168999).
Depends on: 168999
Whiteboard: [FIX IN HAND]need sr=
Assignee | ||
Updated•22 years ago
|
Attachment #101278 -
Attachment is obsolete: true
Comment 117•22 years ago
|
||
Notes on while (itemArray[--index].level > 1);
Since itemArray[0].level = 0 always exists this will always stop at row 0.
getParentIndex tests for index = 0 because its level is 0.
optgroupObject.prototype.moveUp can't have an index of 0 (reserved for select).
gDialog.lastChild index must start at least 1 because row 0 always exists.
Assignee | ||
Comment 118•22 years ago
|
||
Woopee!
This removes all remaining editorShell usage, including Spelling dialogs.
Attachment #100326 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need r=,sr=
Target Milestone: mozilla1.2alpha → mozilla1.2beta
Comment 119•22 years ago
|
||
Comment on attachment 102950 [details] [diff] [review]
Last remove editorShell patch for dialogs v1
in EdDialogCommon.js, you removed a comment that said each editor window should
include this file, is that still true? Should the comment remain?
in EdDictionary.js, you have a typo "gSpellCheckcer" should be gSpellChecker
in EdSpellCheck.js, shouldn't Replace and ReplaceAll be merged into one funtion
(which takes a parameter)?
r=brade with the above changes
Attachment #102950 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Whiteboard: [FIX IN HAND]need r=,sr= → [FIX IN HAND]need sr=
Comment 120•22 years ago
|
||
Comment on attachment 102950 [details] [diff] [review]
Last remove editorShell patch for dialogs v1
+ if (!GetCurrentEditor())
+ {
+ window.close();
return;
- dump("EditoreditorShell found for dialog\n");
-
+ }
seems like there should be SOME error for the user if the current editor isn't
available, no? Or is that the convention you've used elsewhere?
sr=alecf with either a good explanation for me, or some kind of warning to the
user.
Attachment #102950 -
Flags: superreview+
Assignee | ||
Comment 121•22 years ago
|
||
alecf: In current Composer, you really can never launch a dialog without an
editor! So this is an impossible event. In the future, there may be multiple
editors per window and the "current" editor changes with focus. In that case,
one can conceive of trying to launch a dialog via some command message, but
there is no currently-focused editor, so you wouldn't want a dialog in that case.
I don't think we every need to tell the user that, but we could put back the dump
to see if that situation could really happen. Right now, we have not been doing
that for any dialog.
Whiteboard: [FIX IN HAND]need sr= → [FIX IN HAND]need a=
Comment 122•22 years ago
|
||
> In that case, one can conceive of trying to launch a dialog via some command
> message, but there is no currently-focused editor, so you wouldn't want a
> dialog in that case.
In which case shouldn't the command be disabled? Or, the command may be
intrinsically focus-sensitive (like cut/copy/paste are).
Assignee | ||
Comment 123•22 years ago
|
||
checked into 1.3a trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Whiteboard: [FIX IN HAND]need a=
You need to log in
before you can comment on or make changes to this bug.
Description
•