Closed Bug 338461 Opened 19 years ago Closed 18 years ago

Get file -> new navigator window working in suiterunner

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: neil)

References

Details

Attachments

(2 files)

File->New Navigator Window is currently not working in suitrunner as we're still trying to open it via the command line handler and not the via the pref as we've done elsewhere.

Patch coming up
Attached patch Use the pref not the commandline handler (deleted) β€” β€” Splinter Review
This changes tasksOverlay.js to work out the url in the same manner as we did in the bookmarks service (I think it was that one).
Attachment #222526 - Flags: superreview?(neil)
Attachment #222526 - Flags: review?(neil)
Comment on attachment 222526 [details] [diff] [review]
Use the pref not the commandline handler

Unfortunately handler is used further on in the function (this is why I originally tried to write bug 335550 in C++).
Attachment #222526 - Flags: superreview?(neil)
Attachment #222526 - Flags: superreview-
Attachment #222526 - Flags: review?(neil)
Attachment #222526 - Flags: review-
I think it might be better if someone else picks this up so that I can concentrate on profile migration.

Neil's current suggestion is to reimplement a version of nsICmdLineHandler for suiterunner. I think we should also assess where/how much it would be used before we do that (i.e. is it worth it).
Assignee: bugzilla → general
Keywords: helpwanted
It's used in three places: OpenBrowserWindow() uses to force the first browser window to open the startup page while Startup() and BrowserOpenTab() use it if the new window/tab pref specifies to open the startpage, although the logic is wrong and they actually get the startup page and not the start page :-(
Assignee: general → guifeatures
Component: General → XP Apps: GUI Features
QA Contact: general
As this is still unfixed, I still get this on "File > New > Navigator Window":

JavaScript error: , line 0: uncaught exception: [Exception... "Could not convert JavaScript argument (NULL value cannot be used for a C++ reference type)"  nsresult: "0x8057000b (NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF)"  location: "JS frame :: chrome://communicator/content/tasksOverlay.js :: OpenBrowserWindow :: line 126"  data: no]

Who can pick this up?
Attached patch Proposed patch (deleted) β€” β€” Splinter Review
The first diff overrides the xpfe version in tasksOverlay.js; the second removes the compatibility code that transitioned between bug 197671 and bug 201177.
Assignee: guifeatures → neil
Status: NEW → ASSIGNED
Attachment #260908 - Flags: review?(iann_bugzilla)
hmm, that cries for a followup that moves this into the right place after xpfe is dead ;-)
If you set suiterunner to start with mail & newsgroups and not navigator window, you get the following in the error console:
Error: [Exception... "'Illegal value' when calling method: [nsICommandLine::handleFlagWithParam]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///C:/suiterunner/seamonkey/components/nsBrowserContentHandler.js :: handle :: line 387"  data: no]
Source File: file:///C:/suiterunner/seamonkey/components/nsBrowserContentHandler.js
Line: 387

Similarly if you set chatzilla to the starting app, you get the following in the error console:
Error: [Exception... "'Illegal value' when calling method: [nsICommandLine::handleFlagWithParam]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: file:///C:/suiterunner/seamonkey/components/chatzilla-service.js :: handler_handle :: line 216"  data: no]
Source File: file:///C:/suiterunner/seamonkey/components/chatzilla-service.js
Line: 216
Comment on attachment 260908 [details] [diff] [review]
Proposed patch

I know this patch is only a temporary fix, but some of the lines are overlong and should be split over several lines.
(In reply to comment #8)
>Error: [Exception... "'Illegal value' when calling method:
>[nsICommandLine::handleFlagWithParam]"  nsresult: "0x80070057
This is partly because nsICommandLine sucks, and partly because of bug 287107.

(In reply to comment #9)
>some of the lines are overlong and should be split over several lines.
Sure, but I couldn't figure out how to wrap Components.classes["@mozilla.org/commandlinehandler/general-startup;1?type=browser"]
Comment on attachment 260908 [details] [diff] [review]
Proposed patch

r=me with those overlong lines that can sensibly be split, split.
Attachment #260908 - Flags: review?(iann_bugzilla) → review+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: helpwanted
Resolution: --- → FIXED
Depends on: 377402
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: