Closed Bug 83366 Opened 23 years ago Closed 22 years ago

-turbo mode: alternative 3-pane mail view setting is ignored

Categories

(Core Graveyard :: Cmd-line Features, defect, P2)

x86
Windows 98
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla0.9.2

People

(Reporter: bugzilla3, Assigned: alecf)

References

Details

Attachments

(3 files)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9+) Gecko/20010529
BuildID:    2001052920

In preferences I have selected alternative 3-pane Mail & News view. This works
fine unless I open Mail & News while Mozilla is resident (-turbo session). In
the same Windows session, after quitting Mozilla with File->Exit (resident part
is killed) and restarting it in the normal way (no -turbo), Mail & News view
restores Preferences setting.

Reproducible: Always
Steps to Reproduce:
1. If you hadn't already use alternative view, go to Prefs->Mail & Newsgroups
and set layout fot the second option (the one in the right)
2. Close Mozilla and restart with -turbo option.
3. Open Mail & News

Actual Results:  Mail & News main window is displayed in the default mode,
ignoring Preferences setting

Expected Results:  Mails & News main window should be displayed in the
alterative view, as set in Preferences
Blocks: 75599
I am unable to confirm this bug...

I tried the following combinations:

- start mozilla
- go to Edit|Preference|Mail&News change layout to 2nd option
- File|Exit quit mozilla
- start mozilla with -turbo
- open Mail&News -> changes are applied
- File|Exit quit mozilla

- start mozilla with -turbo
- go to Edit|Preference|Mail&News change layout to 1st (different) option
- File|Exit quit mozilla
- start mozilla with -turbo
- open Mail&News -> changes are applied
- File|Exit quit mozilla

- start mozilla with -turbo
- go to Edit|Preference|Mail&News change layout to 2nd (different) option
- close mozilla window (leave app running in -turbo mode)
- start mozilla
- open Mail&News -> changes are applied
- File|Exit quit mozilla

The only thing I can think of is this may be an issue on win98 only.  My windows 
box is win2000.

Can anyone else comfirm?
QA Contact: sairuh → paw
law said that he was able to confirm this bug in last performance meeting.  :-)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla0.9.2
nav +pdt triage: nsbeta1+, P2. 
Keywords: nsbeta1+
Priority: -- → P2
Yes, I did say I had verified it.  But I was full of shit.

I mistook this for a different bug.  It was bug 83569 that I confirmed.  I don't
think this bug is real, or if it is real, has anything to do with -turbo mode.
Still seing it on Win98, build 2001060420. Also seeing it on a different
(corporate pc) machine running Win95 OSR2, same Moz build. In the above cases,
both Mozillas are configured to show alternative view but return to the default
view on -turbo mode of operation. Both systems migrated from previous NS4
installations, if that helps. I 'll try to test a Win2k system to see what happens.
I think I understand what's going on.  This isn't a "turbo mode" problem, per 
se.  The problem is that the code that fields the request to open mail news 
*when Mozilla is already running* does not use the proper chrome URL to get the 
user-selected mailnews window.  It just uses chrome://messenger/content.

The code in question is in nsNativeAppSupportWin::HandleRequest where it looks 
for the "-mail" option.  At the time I wrote it, the logic that determined the 
chrome URL was elsewhere in nsAppRunner.cpp.  Now, I believe that code is in 
the mailnews "cmd line handler" interface implementation and we can get at it 
by using the category manager to find that interface and query it for the 
chrome url.

Alec, Vishy suggests you take over this bug.  I know you're an expert on the 
cmd-line handler stuff so you can probably fix this easier than I can, anyway.  
Probably we can fix the similar problem with "-edit" and add support so it 
supports other things like "-aim," etc.  Basically, the same code that's still 
in nsAppRunner.cpp.
Assignee: law → alecf
ah yes, I think I know what to do here - might be a little tricky, but basically
I need to ask the -mail command line handler for the chromeUrlForTask.
Status: NEW → ASSIGNED
adding sspitzer for r=/sr=, since he knows this commandline handler stuff the
best...

ok, here's what these patches do:
- adds a new API to nsICmdLineService, getHandlerForParam() which allows you to
get the nsICmdLineHandler associated with a given parameter - does the work of
constructing a ProgID, etc
- adds some documentation to nsICmdLineService, and appropriately labels stuff
[noscript] so scripts don't go whacking memory they don't own
- getHandlerForParam will go through all of the parsed parameters, and keep
trying to find a handler for the given command, and returns the first one it
finds. (they are stored in command-line order, so if I say mozilla -mail -edit,
-mail will be the handler returned)
- updates nsAppRunner to use this mechanism, so we aren't duplicating code
- updates nsNativeAppSupport to try to handle arbitrary command lines, instead
of hardcoding -mail and -edit
- reorganizes some of the nsNativeAppSupportWin stuff to more cleanly show the
flow of control

With this patch, not only will alternate 3-pane work, but -chat, -xmlterm, and
all future mozilla apps will work through DDE.
Whiteboard: fix in hand, waiting on reviews
Looks good to me. r=blake
File nsCommandLineService.cpp:

+  int i;
+  for (i=0; i< paramList->Count(); i++) {

Shouldn't that be a PRUint32?

+    // skip past leading / and -
+    while ((*param == '-') ||
+           (*param == '/')) param++;

So this skips past -, --, ---, etc., /, //, ///, etc., -/-/-/-, etc.
Is this desired behaviour?

Why not something like:

if (*param == '-' || *param == '/') {
  ++param;
  if (*param == *(param-1))
    ++param;
}


+    printf("Looking for contractID %s\n", contractID.get());

Comment out, remove, or put inside a #ifdef DEBUG_alecf
r=sspitzer, looks good to me.

make sure to test really well.  all the profile related ones, and then the ones
that can take arguments, like -chrome, -edit etc.

for testing:  let's come up with a list of a bunch of cases that we should run
through before landing changes to this code.

I'll start it and put it on www.mozilla.org.

It seems like cmd line arg bugs fall on to sarah.  sarah, does a document like
this already exist?
Whiteboard: fix in hand, waiting on reviews → fix in hand, waiting on approval
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
argh, I'm without a windows box today, so I'm going to land this on 6/14
Whiteboard: fix in hand, waiting on approval → approved fix in hand, landing on 6/14
ok, I still don't have a windows box, so I've now landed everything except for
nsNativeAppSupportWin.cpp - I'll check that in on 6/15
Whiteboard: approved fix in hand, landing on 6/14 → approved fix in hand, landing on 6/15
yay, fix finally in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
I going to reopen this bug.  The first time you launch mail in turbo mode, the
default view appears.  In subsequent mail launches the alternative view appears.

Steps:
1. In the perference panel set the view to alternative (Right side view) and
exit the browser.
2. Start the browser in -turbo mode.
3. Start mail.  It comes up in the default view (Left side view). Close mail.
4. Relaunch mail. It comes up in the alternative view. 

This occurs each time the setting is changed to the alternative view.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
reassign to vishy... alecf is on sabbatical till 9/3.

vishy, this is a regression... can you get someone to work on it??  -thanks!
Keywords: nsBranch
-> blaker, could you take a look Blake? 
Assignee: alecf → blaker
Status: REOPENED → NEW
I retested this using today's build 2001071006 and it looks ok.  I'm thinking I
might have used a trunk build when I tested yesterday. My bad.
Paul: still, shouldn't this be fixed on the trunk as well?
Blake could you confirm that this is not a branch problem? 
If its trunk only, we shd keep it open but reduce its priority. 
If its branch, we shd go full court press to find the fix. 
Whiteboard: approved fix in hand, landing on 6/15
Paul said he was going to try a new build to confirm his sanity ;)
I rechecked the trunk with the 7/10 build and I no longer see the problem. 
Looks good on both the branch and trunk.  OK to mark this bug resolved/fixed and
I will verify.
wfm
Status: NEW → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → WORKSFORME
Verified on Windows branch build 2001071006.
Status: RESOLVED → VERIFIED
No longer blocks: 75599
Blocks: 75599
for my sanity i'm going to twiddle this bug.
Status: VERIFIED → REOPENED
Resolution: WORKSFORME → ---
alecf did the work
Assignee: blakeross-dead → alecf
Status: REOPENED → NEW
this was fixed 2001-06-15 15:00:13
Status: NEW → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: