Last Comment Bug 82487 - offline: Startup mode "remember my prev mode" or "Ask me at startup"
: offline: Startup mode "remember my prev mode" or "Ask me at startup"
Status: VERIFIED WORKSFORME
[ADT3] [nsSupport] PDT-
:
Product: SeaMonkey
Classification: Client Software
Component: UI Design (show other bugs)
: Trunk
: All All
: P2 normal with 11 votes (vote)
: mozilla1.2alpha
Assigned To: David :Bienvenu
: benc
:
Mentors:
: 91938 97993 99596 127633 134403 161438 (view as bug list)
Depends on:
Blocks: 79480 104166 107067 122274 221734
  Show dependency treegraph
 
Reported: 2001-05-23 18:59 PDT by grylchan
Modified: 2004-11-23 18:54 PST (History)
43 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
proposed patch v1.0 (14.27 KB, patch)
2001-06-18 17:48 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
startup mode : screen shot (7.39 KB, image/jpeg)
2001-06-18 20:54 PDT, Mohan Bhamidipati
no flags Details
proposed patch : v1.1 (14.35 KB, patch)
2001-06-18 20:56 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
improved patch v1.2 (14.32 KB, patch)
2001-06-19 09:17 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
updated screenshot for UI change (8.84 KB, image/jpeg)
2001-06-19 12:58 PDT, Mohan Bhamidipati
no flags Details
Suggested dialog (7.40 KB, image/gif)
2001-06-19 14:14 PDT, jglick
no flags Details
Latest screenshot v2.0 (7.60 KB, image/jpeg)
2001-06-20 10:39 PDT, Mohan Bhamidipati
no flags Details
Proposed patch : v2.0 (11.52 KB, patch)
2001-06-20 10:41 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
new patch : startup mode for browser, messenger, mailnews (14.31 KB, patch)
2001-06-21 20:39 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
Latest Patch : startup mode for navigator, messenger, composer, profile-manager; (17.22 KB, patch)
2001-06-23 22:48 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
improved patch (19.90 KB, patch)
2001-06-25 15:34 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
screen shot of "ask me" dialog in 4.x (5.75 KB, image/gif)
2001-06-26 01:32 PDT, (not reading, please use seth@sspitzer.org instead)
no flags Details
new startup dialog (16.89 KB, image/jpeg)
2001-06-26 17:38 PDT, Mohan Bhamidipati
no flags Details
new patch with seth's suggestions. (21.70 KB, patch)
2001-06-26 17:56 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
patch : with "preferences panel" changes (22.68 KB, patch)
2001-06-26 20:40 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
new patch with seh's modifications. (23.82 KB, patch)
2001-06-27 13:13 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review
example of suggestions (10.26 KB, image/gif)
2001-06-27 13:56 PDT, jglick
no flags Details
new screenshot acc. to jglick's suggestions. (14.46 KB, image/jpeg)
2001-06-27 14:26 PDT, Mohan Bhamidipati
no flags Details
modified screenshot. (16.40 KB, image/jpeg)
2001-06-27 15:06 PDT, Mohan Bhamidipati
no flags Details
new patch with bhuvan's suggestions. (24.95 KB, patch)
2001-06-27 18:49 PDT, Mohan Bhamidipati
no flags Details | Diff | Splinter Review

Description grylchan 2001-05-23 18:59:48 PDT
This is based on how 4.x works. If you only have one
profile and you go to offline pref|startup mode
and select one of the options: "Remember my previous mode"
or "Ask me at Startup". Then go offline. Quit the
browser. Restart Netscape, it doesn't "ask you" or
"remember" your previous mode.

Reproducible: Always
Steps to Reproduce:
1.Make sure you have only 1 profile otherwise the Startup Mode prefs
  will be ignored. (ie when you start the browser, no profile manager
  pops up).
2.Start the browser
3.Go to Edit|Preferences|Offline
4.You have two choices (select one)
  a) Remember my previous mode
     -select that
     -click ok
  b) Ask me at startup
     -select that
     -click ok
5.Go Offline by either
  a) Clicking the icon
  b) File|Work Offline
6.While offline, exit Netscape entirely
7.ReStart the browser

Actual Results:  
a. if you have chosen 'Remember my previous mode', the browser 
   starts and you are online
b. if you have chosen 'Ask me at Startup' then before the browser
   starts, the browser starts and you are online

Expected Results:  
a. if you have chosen 'Remember my previous mode' then when 
   the browser starts you should be in offline mode
b. if you have chosen 'Ask me at Startup' then before the browser
   starts, a new window should pop up. 
   The window (based on 4.x look/behavior) should give these options:
     -start the browser in online mode
     -start the browser in offline mode
     -a pref to select 'remember my previous mode'
   After selecting one of those choices, then the browser starts.

Tried this on the following builds:
2001052304 on NT 4.0
2001052308 on Linux 2.2
2001052308 on Mac OS 9.0.4

And it doesn't work on any platform.
Comment 1 David :Bienvenu 2001-05-23 19:07:34 PDT
front end issue.
Comment 2 Mohan Bhamidipati 2001-05-23 19:53:35 PDT
taking.
Comment 3 Jussi-Pekka Mantere 2001-06-12 21:03:01 PDT
PDT+ per 6/12 mtg.
Comment 4 Mohan Bhamidipati 2001-06-14 13:54:54 PDT
bienvenu, do we need to use "nsIPromptService" for this, similar to 
"Windows Desktop Integration Dialog" need to display "Startup Mode Dialog" and
get, set preference for startup mode?
Similar to : mozilla/ xpfe/ components/ winhooks/ nsWindowsHooks.cpp
-thanks, mohan.


Comment 5 David :Bienvenu 2001-06-14 13:59:03 PDT
er, yes, I think we use nsIPromptService to put up prompts, but beyond that I'm
pretty much in the dark :-( Seth or someone else who works in the front end
could say better.
Comment 6 Mohan Bhamidipati 2001-06-18 17:48:23 PDT
Created attachment 39021 [details] [diff] [review]
proposed patch v1.0
Comment 7 Mohan Bhamidipati 2001-06-18 17:52:20 PDT
cc 'ing bhuvan for review & sspitzer for super review;
Comment 8 Håkan Waara 2001-06-18 18:42:43 PDT
This patch is in conflict with bug 80581. Please don't add _even more_ files
that are simply dialogs that you could invoke via nsIPromptService via an API call.

It's better to learn how to use those calls, instead of adding new dialog-files
all the time that will totally bloat our UI.
Comment 9 Mohan Bhamidipati 2001-06-18 20:54:21 PDT
Created attachment 39061 [details]
startup mode : screen shot
Comment 10 Mohan Bhamidipati 2001-06-18 20:56:41 PDT
Created attachment 39064 [details] [diff] [review]
proposed patch : v1.1
Comment 11 Mohan Bhamidipati 2001-06-19 09:17:47 PDT
Created attachment 39128 [details] [diff] [review]
improved patch v1.2
Comment 12 racham 2001-06-19 12:09:48 PDT
Changes related to this bug looked OK to me. But indentation is totally off. 
Please make sure tab width contains only spaces and uniform tabwidth style is 
followed through out.

Adding Jennifer & Robin to the cc list for the approval of the UI & 
wording of the posted screentshot (id:39061).

bhuvan
Comment 13 Mohan Bhamidipati 2001-06-19 12:58:31 PDT
Created attachment 39167 [details]
updated screenshot for UI change
Comment 14 jglick 2001-06-19 14:14:02 PDT
Created attachment 39190 [details]
Suggested dialog
Comment 15 jglick 2001-06-19 14:17:23 PDT
Removed the groupbox and the "Cancel" button. Changed wording to closer match 
that of the offline pref panel.  "Remember my previous mode" shouldn't be 
selected by default or the user would have to uncheck it each time if they 
wanted the Ask me option.
Comment 16 (not reading, please use seth@sspitzer.org instead) 2001-06-19 15:43:12 PDT
hwaara brings up a good point

"This patch is in conflict with bug 80581. Please don't add _even more_ files
that are simply dialogs that you could invoke via nsIPromptService via an API call.

It's better to learn how to use those calls, instead of adding new dialog-files
all the time that will totally bloat our UI."

is this something you can do with the common dialog?


Comment 17 Mohan Bhamidipati 2001-06-20 10:39:44 PDT
Created attachment 39346 [details]
Latest screenshot  v2.0
Comment 18 Mohan Bhamidipati 2001-06-20 10:41:14 PDT
Created attachment 39347 [details] [diff] [review]
Proposed patch : v2.0
Comment 19 Mohan Bhamidipati 2001-06-20 10:42:30 PDT
we need regular common dialog here right?
Comment 20 Håkan Waara 2001-06-20 10:46:51 PDT
Yes, we need nsIPrompt - as I and Seth commented (and which is standard for
displaying dialogs nowadays).
Comment 21 Mohan Bhamidipati 2001-06-20 11:26:50 PDT
we need radio group right? which is not part of "nsIPromptService",
correct me, We need accesskeys also.
Comment 22 (not reading, please use seth@sspitzer.org instead) 2001-06-20 21:47:42 PDT
my mistake.  if that is the design we are going with, we can't use the common
dialog.   common dialog doesn't do radio buttons.

I'm assuming you have buy off from jglick or german on this UI.  is it in the spec?

some general questions:  

1)  are these the same prefs as we had in 4.x?  (it would be good to re-use, if
possible).

Say I'm offline, I quit, and I choose to remain offline for next time.

2)  what happens if the next time I start up -mail or something other than
navigator?  (what did 4.x do?)  it looks like your change only makes me offline
if I start up navigator.

3)  what happens if when I start I bring up the profile manager.  Will the "work
offline" check box be checked?  (what did 4.x do?)

4) what if I only using mail, and I go offline, and then quit.  I won't get that
dialog.  should I get it?  (what did 4.x do?)
Comment 23 grylchan 2001-06-21 10:31:08 PDT
To answer some of Seth's questions:

>Say I'm offline, I quit, and I choose to remain offline for next time.
>2)  what happens if the next time I start up -mail or something other than
>navigator?  (what did 4.x do?) 

 Messenger/Composer, etc.. start up in offline mode (icon disconnected)

>3)  what happens if when I start I bring up the profile manager.  Will the
>    "work offline" check box be checked?  (what did 4.x do?)

 The profile manager starts. But it's the Profile manager that manges
 your profiles (ie Create new profile, delete profile, rename, or
 go back). If you Click go back, it brings you up to drop down profile manager
 window and you have a choice of either your existing profile or 'guest'.
 (That profile manager window has check box for 'work offline' as it
  it is intended only if you have mulitple profiles and you want certain
  one to start in offline mode).
    -If I choose my existing profile: Netscape starts ONline. So it doesn't
     remember previous mode (I guess bringing up the profile manager
     overrides it because my pref "remember previous mode" is still checked.
    -If I choose guest: roaming profile window comes up and you have to
     fill in the correct information

  

>4) what if I only using mail, and I go offline, and then quit.  I won't get
>  that dialog.  should I get it?  (what did 4.x do?)

 I'm assuming you're asking what happens when you start browser, messenger,
 etc..if you only had messenger up, had gone offline, had remember my 
 previous mode set, and quit messenger?
 If that is the case. When you start:
    -browser/messenger/composer - all start up in offline mode. No dialog
     window appears.
    
Hope this helps.



Comment 24 grylchan 2001-06-21 10:32:47 PDT
one more thing
>3)  what happens if when I start I bring up the profile manager.  Will the
> "work offline" check box be checked?  (what did 4.x do?)

No it is not checked. sorry forgot to add that part.
Comment 25 Mohan Bhamidipati 2001-06-21 20:39:33 PDT
Created attachment 39634 [details] [diff] [review]
new patch : startup mode for browser, messenger, mailnews
Comment 26 Mohan Bhamidipati 2001-06-21 21:02:37 PDT
This patch covers "Startup Mode" for browser, messenger, composer.

1. Pops up dialog when starting navigator, if "Ask Me" is selected.
2. Previous mode is remembered for navigator, messenger, composer.
3. If "Remember my previous mode" is selected, current mode when the navigator / 
messenger / composer quits is remembered and no dialog appears.
4. Have to check with "Profile Manager"; 
   Because ioService.offline set in the begining itself, the value gets checked;
   (will post comment shortly)
5. setting "ioService.offline" based on 
   a) "offline.startup_state" - (0-ask me; 1-remember previous mode)
   b) "offline.startup.previous_mode" - (0-offline; 1-online)

-- requesting review.
Comment 27 Mohan Bhamidipati 2001-06-23 22:48:04 PDT
Created attachment 39848 [details] [diff] [review]
Latest Patch :  startup mode for navigator, messenger, composer, profile-manager;
Comment 28 Mohan Bhamidipati 2001-06-24 14:47:29 PDT
requesting hwaara & bhuvan for review & seth for sr.
Comment 29 Håkan Waara 2001-06-25 12:16:43 PDT
I defer this review to Bhuvan, if that is OK (hey, I just finished the
mega-review in bug 79865 :-) ).
Comment 30 racham 2001-06-25 12:20:53 PDT
I will do the review. np. thanks for your help.

bhuvan
Comment 31 racham 2001-06-25 13:46:42 PDT
I have some minor comments :

* Please get rid of inline styling. Create classes if needed.

style="width: 8em;" in startupMode.xul 

block :

<box autostretch="never" halign="center">
<button class="exit-dialog" label="OK" oncommand="onOk()" style="width: 8em;"/>
</box>

* How is this getting used ? Where do you set any other all values to this pref ?

+pref("offline.getMessages.get_messages",    0);

* Somehow your indentation is still off in several places. If you have to make
next round of changes, please do take care of indentation. If you look at the
patch you will know all those places that are misaligned. Viewing vc++ would not
give the right picture if the settings are not right.

Get that styling into a class, let me know the deal with that pref, then r=bhuvan

PS : Please do test your changes.

Comment 32 timeless 2001-06-25 14:27:53 PDT
Normally having just an ok button is sort of bad.

I think having buttons <Work Offline> <Work Online> might be better.

Or work <offline> <online>. I'll leave that debate to someone else.
Comment 33 Mohan Bhamidipati 2001-06-25 15:34:29 PDT
Created attachment 39983 [details] [diff] [review]
improved patch
Comment 34 Mohan Bhamidipati 2001-06-25 15:39:36 PDT
1. inline styling : (removed for the button)
2. removed pref("offline.getMessages.get_messages", 0);
3. fixed indentation & tested.
Comment 35 Mohan Bhamidipati 2001-06-25 15:41:39 PDT
requesting seth for sr; 
Comment 36 Scott Tran (Wildcard) 2001-06-25 20:10:20 PDT
I agree with timeless, having just an OK button is bad. Having <offline> <online>
in my opinion would be best...
 
Comment 37 (not reading, please use seth@sspitzer.org instead) 2001-06-26 01:32:57 PDT
Created attachment 40062 [details]
screen shot of "ask me" dialog in 4.x
Comment 38 (not reading, please use seth@sspitzer.org instead) 2001-06-26 01:36:37 PDT
mohan, as I wrote on 2001-06-20 21:47 

> 1)  are these the same prefs as we had in 4.x?  (it would be good to re-use, 
if
possible).

You aren't using the 4.x prefs.  By doing that you are making it so users who 
migrate
from 4.x will have a bad experience.

from 4.x:

localDefPref("offline.startup_mode", 0);     // 0 online work, 1 offline work, 
2 ask me
localDefPref("offline.startup_state", 0);     // 0 remember previous state, 1 
ask me
localDefPref("offline.send.unsent_messages",            0);     // 0 ask me, 1 
Automatically send, 2 do not send
localDefPref("offline.prompt_synch_on_exit",            false);

you have:

+pref("offline.startup_state",               0);     // 0:ask me  1:use prev 
mode;
+pref("offline.startup.previous_mode",       0);     // 0:online  1:offline;
+pref("offline.send.unsent_messages",        0);     // 0:ask 1:automatic 
2:don't

Use the same names as in 4.x if possible.'

Notice, you've got "offline.startup_state" backwards.  
(in 4.x, 0 is prev mode, in your patch, 0 is ask me)

double check the pref names (and values and comments)

from the comment, it looks like 4.x supported 2 for "offline.startup_mode".

use lxr.mcom.com to investigate that, see how a user could get 2 for that value.
if you can, make 6.x do the same thing when that pref value is 2.

http://lxr.mcom.com/nova/source/modules/libpref/src/init/all.js


2)  "ask me" dialog

your "ask me" dialog doesn't look as good as the 4.x one.  

specifically, it is missing a lot of the informative text.

I've attached a screen shot of the 4.x dialog.  

Like yours, 4.x has just an "OK" button.  But I can see why people think that's 
not ideal.

Run it by jglick or german.

I stopped super reviewing at this point.  I'll wait for another patch to get 
through the review process.

Comment 39 Mohan Bhamidipati 2001-06-26 17:37:41 PDT
Posting the new screenshot; 
I have made the patch compatible with 4x preferences,
and modified the UI according to 4x;

1. Need UI approval
2. Need sr=
3. Would like to check in today before UI freeze.

Posting the patch shortly;

thanks, mohan.
Comment 40 Mohan Bhamidipati 2001-06-26 17:38:44 PDT
Created attachment 40206 [details]
new startup dialog
Comment 41 Mohan Bhamidipati 2001-06-26 17:56:40 PDT
Created attachment 40208 [details] [diff] [review]
new patch with seth's suggestions.
Comment 42 Mohan Bhamidipati 2001-06-26 20:40:56 PDT
Created attachment 40235 [details] [diff] [review]
patch : with "preferences panel" changes
Comment 43 (not reading, please use seth@sspitzer.org instead) 2001-06-26 23:30:08 PDT
1)  don't do inline styles

as racham pointed out:  

"Please get rid of inline styling. Create classes if needed."

in your patch you have:

style="font-size:8pt; font-weight:bold;"

2)  

+  var ioService =
nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}",
+                                                      "nsIIOService");

don't use the IOService CID, use the contract ID.

I just noticed that this patch hasn't been reviewed yet.

after you make those changes, please seek a review (and then I'll do the super
review.)  if he's got the cycles, racham would be a good reviewer for this code.

the reviewer should check that your pref and behaviour mimic 4.x (since that is
the desired goal, right?) 
Comment 44 (not reading, please use seth@sspitzer.org instead) 2001-06-26 23:41:03 PDT
other comments:

1) the "ask me" dialog in 4.x has some access keys, "Work O_n_line"

You should add those to the .dtd file now since you won't be able to add them
after the l10n freeze.

2) you're using your own "ok" button.  have you made it so hitting the "enter"
key fires the button?

jglick, can you add this dialog to the spec?
Comment 45 Mohan Bhamidipati 2001-06-27 13:13:14 PDT
Created attachment 40328 [details] [diff] [review]
new patch with seh's modifications.
Comment 46 Mohan Bhamidipati 2001-06-27 13:20:38 PDT
1. in-line style replaced by class=bold etc. 
  (ex. style="font-size:8pt;")
2. IOService CID replaced by contract ID.
3. added key support for "enter", "return", added keys Online(n), Offline(f), 
Remember(R) etc.

--requesting bhuvan for review;

Comment 47 jglick 2001-06-27 13:55:16 PDT
attach_id=40206, looks fine.  

A few comments:
1. Title of dialog. "Ask Me" isn't very useful.  Would recommend "Startup Mode" 
instead (the purpose of the dialog).  And remove "Startup Option" from the body 
of dialog.
2. Don't repeat "work" in the radio buttons. It was already included in the 
question.  Just have "Offline" and "Online".
3. Bold only "Online" and "Offline" not "Remember...".  Those are the two things 
users must choose between.
Comment 48 jglick 2001-06-27 13:56:09 PDT
Created attachment 40336 [details]
example of suggestions
Comment 49 Mohan Bhamidipati 2001-06-27 14:26:58 PDT
Created attachment 40349 [details]
new screenshot acc. to jglick's suggestions.
Comment 50 jglick 2001-06-27 14:55:24 PDT
id=40349, very nice.  Thank you.  :-)

Nit: remove period from "Remember my previous mode."
Comment 51 Mohan Bhamidipati 2001-06-27 15:06:29 PDT
Created attachment 40358 [details]
modified screenshot.
Comment 52 racham 2001-06-27 16:09:20 PDT
Here are couple of minor comments. 

1. I guess you can get rid of 
class="bold" in
<checkbox class="bold" id="rememberCheck" label="&rememberCheck.label;"
accesskey="&rememberCheck.accesskey;"/>

2. Looks like you accidentally missed '.' 
change from 
+                  getService(Components.interfaces.nsIIOService);
to 
+                  .getService(Components.interfaces.nsIIOService);

3.
+  // add a pref to check whether profile manager is enabled.
you may want to say (unless I missed it totally)
+  // Profile Manager is enabled. Set appropriate default preferences.

4. This is just for my understanding. Under what circumstances, is the following
value is used/set by the user ? We have online (0) or offline (1) startup modes
in the dialog you posted. 

"offline.startup_mode", 2

5. In the startupMode.xul, you have reversed notation of assinging values to
online, offline. The online radio item's value is set to "1" and offline's to
"0". In the js files (except startupMode.js) you have used 0 for online and 1
for offline. Though you are consistent enough to not to cause a problem, but it
will be tough for you to maintain the code. This is just a thing I noticed. No
need to worry about this at this juncture. 

6.
key="key_check_remember" should go 
from
<text class="label" value="&remember.label;" crop="left" key="key_check_remember" />
to
<checkbox class="bold" id="rememberCheck" label="&rememberCheck.label;"
accesskey="&rememberCheck.accesskey;"/>

7. style="width:10px"
is still around...?

you may want to do the following to 'classify' then :

change from :
+<box autostretch="never" halign="center" style="width:10px">
to
+<box autostretch="never" halign="center" class="startupModeOkButtonBox">

then in mozilla/themes/modern/messenger/messenger.css,
mozilla/themes/classic/messenger/win/messenger.css,
mozilla/themes/classic/messenger/mac/messenger.css
add
// styles for startup mode dialog
#startupModeOkButtonBox {
  width: 10px;
}

and similarly for any other items you want to remove inline items. (Note : If
you have more than one item that need similar styling all you have to do is
replace '#' with '.')

8. Lastly, please run all the test scenarios (I have no cycles at the moment to
do that) with new and migrated profiles and make sure they work as expected.
Patch looks good and seemed to be covering all cases. But it will certain be
useful.

bhuvan
Comment 53 Mohan Bhamidipati 2001-06-27 18:49:36 PDT
Created attachment 40401 [details] [diff] [review]
new patch with bhuvan's suggestions.
Comment 54 Mohan Bhamidipati 2001-06-27 19:11:09 PDT
----------
1. removed class="bold" for checkbox.
2. added .getService
3. changed the comment.
4. value 2 is internally used : 
   0:online  1:offline  2:ask me;
5. key="key_check_remember" moved to checkbox.
6. class="startupModeOkButtonBox" is added to .css files;
7. tested;
----------
Comment 55 Mohan Bhamidipati 2001-06-27 19:12:28 PDT
requesting seth for super review.
Comment 56 Mohan Bhamidipati 2001-06-27 19:20:54 PDT
requesting bhuvan for re-review;
Comment 57 racham 2001-06-28 00:12:22 PDT
r=bhuvan.
Comment 58 Matthew Paul Thomas 2001-06-28 01:29:07 PDT
Let's assume (in the absence of any better information) that if the user has 
chosen to have this dialog appear, they are equally likely to work online or 
offline when they start Mozilla. (Even if this isn't true, the results below 
vary only in magnitude, not in direction.) The current UI is, in essence:
|
| How would you like to work on startup?
| (*) Online
| ( ) Offline
|                             ((  OK  ))

Work required = (probability of wanting online) * (clicks required to go 
online) + (probability of wanting offline) * (clicks required to go offline) = 
50% * 1 + 50% * 2 = 1.5 clicks, on average, required to deal with the dialog.

Let's make a couple of further assumptions. (1) Clicking a push button is just 
as easy as clicking a radio button. (Probably easier, actually, since a push 
button has a larger obvious area.) (2) Any difference in spacing between 
controls has a relatively negligible effect on the speed of getting to them. 
(That's true, which is partly why Mac OS has a global menu bar.) Now, here's an 
alternative design:
|
| Would you like to go online now?
|
| (If you choose to work offline, you can go online later
| by choosing `Work Online' from the `File' menu.)
|
| ( Work Offline )          ( Exit ) (( Go Online ))

Work required = (probability of wanting online) * (clicks required to go 
online) + (probability of wanting offline) * (clicks required to go offline) = 
50% * 1 + 50% * 1 = 1 click required to deal with the dialog.

In other words, this design is *33 percent more efficient* to use than the 
design implemented by the current patch. In addition:
*   it's 29 percent quicker to scan (five elements instead of seven), speeding
    up the user still further;
*   it offers UI for something which the current design doesn't (cancelling the
    startup and exiting Mozilla);
*   it's probably considerably easier to code.

Please note that you still can't use nsIPrompt for the new design, as this is a 
dialog rather than an alert. You're asking the user a question, but the user 
isn't in danger and is fully expecting the question (since he specifically 
turned on the option in the first place). So the criteria for an alert aren't 
met -- this has to be a dialog.

Future work could look at merging this dialog with the profile selector, for 
even greater usability wins.
Comment 59 (not reading, please use seth@sspitzer.org instead) 2001-06-28 01:51:59 PDT
there are some problems, I apologize for not catching these problems the first 
time I reviewed.

1) this dialog startupMode.xul does not (and can not) belong in 
mozilla/mailnews.  here's the main reason:  not everyone installs mailnews.  if 
the user chooses not to install mailnews, their build will break.  (so you'll 
have to move your styles from messenger.css to startupMode.css)

somewhere under mozilla/xpfe.  (probably mozilla/xpfe/communicator or 
mozilla/xpfe/global, I'm not sure.)

2) profileSelection.js changes

I'm not sure you can do (or want to do) pref stuff in profileSelection.js.
at that point, we don't have profile.  so who's prefs.js are you reading / 
writing? 

+  gPrefs.SetDefaultBoolPref("offline.profmgr_enabled", true);
+  gPrefs.SetBoolPref("offline.profmgr_enabled", true);
+  gPrefs.SetDefaultIntPref("offline.startup_mode", 0);

3) something I noticed about 4.x.  If I have multiple profiles, the profile 
manager comes up.  even if I have "ask me" set in my prefs, the "work offline" 
checkbox in the profile manager dialog overrides it.  so if I start from the 
profile manager (select profile dialog), I never see the "ask me" dialog.  does 
your fix behave the same way?  (is that what the "offline.profmgr_enabled" pref 
is for?)

4) navigator.js changes

you should not be launching the "Ask Me" dialog from there.  For one, 4.x pops 
up the "ask me" dialog if I launch mail.  your fix doesn't look like it will do 
that.

Overall, this isn't looking like the right fix.

1) if the pref "offline.startup_mode" is used to remember the last offline 
mode, then you should set the state when we go offline.  probably in 
nsIOService::SetOffline(), but note, the nsIOService destructor calls 
SetOffline(), so you'll need to deal with that.  (you don't want routine 
shutting down to change the previous state.)  we'll need to see who calls 
SetOffline().  there might be other calls (like the one in the dtor) that 
should not affect our remembered state.

2) when (and how) do you launch the "ask me" dialog?  this is tricky, because 
(if we follow 4.x) you should not see it if we've seen the "select profile" 
dialog.  but any other window (browser, mail, compose, etc) should get it.
I'm not sure how we'll know if we've already seen the "select profile" dialog.  
it looks like you are using prefs for that, but I'm not sure that is the right 
approach.

This might belong in nsAppRunner.cpp, where we launch applications.

you need to reconsider your fix.  it is turning into something that is very 
xpapps.  before you write any more code for this, we need to figure out the 
right approach.

getting feedback from alecf is essential.
Comment 60 (not reading, please use seth@sspitzer.org instead) 2001-06-28 02:02:57 PDT
additional thought:

one of our goals is to not show the "ask me" dialog if the "select profile" 
dialog (with "Work offline" checkbox) has already been up.

on launch, when there is only one profile (or if the user does -P <foo>), after 
we've loaded the users prefs, we can throw up the "ask me" dialog, and then 
throw start up the necessary apps (mail, browser, both, etc)
Comment 61 Conrad Carlen (not reading bugmail) 2001-06-28 05:31:27 PDT
I think this patch is overkill in terms of its size which turns me against it
before considering whether it does the right thing.

In terms of the UI, I think mpt's dialog:

|
| Would you like to go online now?
|
| (If you choose to work offline, you can go online later
| by choosing `Work Online' from the `File' menu.)
|
| ( Work Offline )          ( Exit ) (( Go Online ))


is
(1) more informative - it relates the setting to that on the file menu
(2) is more easily read and clicked
(3) can be done with nsIPromptService which reduces bloat

Now, in terms of implementation, this should be easier. We should wait to do
anything until after the profile mgr is initalized (so we know we have user
prefs and don't have to touch default prefs). We could even stick this in a js
component which was a profile change observer so as not to clutter up apprunner. 
Here's all that it needs to do:

if (profile dialog has not shown)
{
  if (pref says to ask)
    do mpt's dialog and get value
  else
    get value from pref
    
  set ioService.offline to value
}

The ugliest part is determining that the profile dialog has been shown. I'll
have to think of a good way to do that.
Comment 62 Mohan Bhamidipati 2001-06-28 11:08:51 PDT
cc'ing alecf for comments regarding the following :

a) location of startupMode.xul
b) "it is turning into something that is very xpapps.  
    before you write any more code for this, 
    we need to figure out the right approach."
c) and other details;




Comment 63 Mohan Bhamidipati 2001-06-28 11:50:31 PDT
(1) If I have multiple profiles, the profile manager comes up.  even if I have
"ask me" set in my prefs, the "work offline" checkbox in the profile manager
dialog overrides it.  so if I start from the profile manager (select profile
dialog), I never see the "ask me" dialog.  does your fix behave the same way? 
(is that what the "offline.profmgr_enabled" pref is for?)

--yes, when we have multiple profiles, profile manager comes up; even if "ask
me" is set, "work offline" checkbox in the profile manager dialog overrides it,
so when we stat from profile manager dialog, "ask me" dialog is never displayed; 
when "offline.profmgr_enabled" is set, 
  it would not pick "offline.startup_state" (0: use prev mode, 1: ask me);
  when "offline.profmgr_enabled" is not set,
  if "offline.startup_state" is 1 : "ask me" is displayed;
  else prev mode is used;

(2) navigator.js changes
you should not be launching the "Ask Me" dialog from there. For one, 4.x pops 
up the "ask me" dialog if I launch mail. your fix doesn't look like it will do 
that.

--- I thought our previous discussion was :
--->Say I'm offline, I quit, and I choose to remain offline for next time.
--->what happens if the next time I start up -mail or something other than
--->navigator?  (what did 4.x do?) 
  "Messenger/Composer, etc.. start up in offline mode (icon disconnected)"

(3) "This might belong in nsAppRunner.cpp, where we launch applications."
    requesting alec's comments;





Comment 64 Alec Flett 2001-06-28 12:20:27 PDT
wow! yeah, the current approach to fixing this problem is totally wrong - this
is not a front-end issue at ALL except for the actual dialog itself... not to
mention that this is not mail-specific in the slightest - this is a combination
of XPApps and Networking. Updating the components to reflect this

First of all, you need to save the previous online/offline mode when necko shuts
down, not when we close windows, and we need to initialize the state when necko
starts, not when we open windows. Therefore, some of the pref changes should
probably happen in the IO service somewhere.

Why is this? what happens if I install some new extension (say chatzilla) and
launch it with -chat? we can't impose this upon every application.

- what if we had 3 navigator windows open, do we prompt the user every time the
window closes?
Seth is right that any prompting (i.e. user interaction) should probably come
from nsAppRunner.cpp or somewhere similar.. I'm actually thinking perhaps
nsAppShellService.Quit() or something. We have to be careful with
nsAppShellService though, because I believe that it might be used by embedding.

Any change which requres you to update all "known" applications (i.e. navigator,
composer, mail, aim, etc) should be an instant red-flag that you are probably
doing the wrong thing, mainly because there is no limit to the number of
applications that may be running on mozilla.
Comment 65 Asa Dotzler [:asa] 2001-06-28 21:32:33 PDT
pushing out. 0.9.2 is done. (querying for this string will get you the list of
the 0.9.2 bugs I moved to 0.9.3)
Comment 66 Jussi-Pekka Mantere 2001-06-29 19:53:02 PDT
Removing PDT+, marking nsbranch; should be checked into the 0.9.3 trunk ASAP,
tested & verified, then submitted for limbo builds.
Comment 67 Christopher Blizzard (:blizzard) 2001-07-23 12:10:20 PDT
*** Bug 91938 has been marked as a duplicate of this bug. ***
Comment 68 Blake Ross 2001-07-31 10:03:39 PDT
Missed 0.9.3.
Comment 69 Christopher Aillon (sabbatical, not receiving bugmail) 2001-09-02 13:09:33 PDT
*** Bug 97993 has been marked as a duplicate of this bug. ***
Comment 70 Jussi-Pekka Mantere 2001-09-05 12:35:56 PDT
Reassigning 0.9.4 Offline IMAP UI bugs to David; TFV 0.9.5.
Comment 71 Jaime Rodriguez, Jr. 2001-09-12 10:25:11 PDT
Plusing this one, because it already has an nsenterprise+.

Greg - Is this still a stop ship?
Comment 72 David :Bienvenu 2001-09-12 10:29:34 PDT
at this point, mscott and I strongly suggest that we just remove this feature
from the UI, since the whole solution needs to be redesigned and re-implemented.
If grega thinks having this feature is a stop-ship problem, then we'll have to
reconsider.
Comment 73 grega 2001-09-12 11:06:10 PDT
Not stop ship.  Making nsenterprise-,PDT-.
Comment 74 Scott MacGregor 2001-09-12 11:38:20 PDT
nsBranch- status for real this time.
Comment 75 Tuukka Tolvanen (sp3000) 2001-09-14 06:24:08 PDT
*** Bug 99596 has been marked as a duplicate of this bug. ***
Comment 76 grylchan 2001-09-27 12:57:17 PDT
Just curious. Is the UI going to be removed for final candidate or should I just
release note this instead?
Comment 77 grega 2001-09-27 16:48:18 PDT
if you think it should be removed please file a bug, cc me and I'll bring it up
in the PDT.  Thanks!
Comment 78 grylchan 2001-09-27 18:25:32 PDT
Spoke with Greg. We'll release note it instead.
And fix it for the next build.
Comment 79 David :Bienvenu 2001-10-02 10:33:24 PDT
moving to .9.6 - would recommend that someone else do this since it's mostly UI.
Comment 80 scottputterman 2001-10-24 14:40:10 PDT
reassigning to ssu.  Moving to 0.9.8
Comment 81 Arthur 2002-02-25 08:26:28 PST
*** Bug 127633 has been marked as a duplicate of this bug. ***
Comment 82 Donnie Cranford 2002-03-11 08:48:06 PST
Ok,

Heres my 2 cents, many software programs remember last state used.Here is my
thinking. Say you were just working in the office surfing the web and doing
mail, you then shutdown and go home. You then start up moz again and to find out
whether or not you are in the previous state (which was online) it sends out a
simple TCP packet, which if it doesnt recieve an ACK, a dialog will pop up and
say you dont appear to be online, would you like to work offline? Which could be
disabled by a pref, [x]dont give offline warnings, otherwise I think this would
be the simplest solution to this issue.

-dcran-
Comment 83 [not reading bugmail] 2002-03-13 23:04:19 PST
see the http://bugzilla.mozilla.org/show_bug.cgi?id=101091#c17 #c18 comment here
with my analysis of the problem also.
Comment 84 Michael Buckland 2002-03-21 16:34:29 PST
Discussed in Mail News bug mtg with Engineering QA Mktng PjM.  Decided to minus
this bug. Entered bug  Bugscape 12753 to remove UI described in this bug, which
does not work.
Comment 85 Christian :Biesinger (don't email me, ping me on IRC) 2002-03-31 12:28:13 PST
*** Bug 134403 has been marked as a duplicate of this bug. ***
Comment 86 Michael Graubart 2002-08-03 05:48:01 PDT
This problem was present in Netscape 6. In Mozilla (I am now using Build No.
2002080108) the option to start up offline does not even exist.  It would be
very useful if it were re-introduced and made to work.  There are situations
when one wants to read already-downloaded mail, draft a new mail message or edit
one's bookmarks while someone else is conducting a telephone conversation on the
same ’phone line (we do not all have broadband!).

The option to do this via the Profile Manager window is cumbersome.
Comment 87 Jo Hermans 2002-08-07 04:00:05 PDT
*** Bug 161438 has been marked as a duplicate of this bug. ***
Comment 88 Phil Schwartau 2002-08-30 12:10:44 PDT
*** Bug 165648 has been marked as a duplicate of this bug. ***
Comment 89 Jens Müller (:tessarakt) 2002-12-19 05:05:50 PST
This was obviously not in 1.2, so the target milestone should be altered.
Comment 90 Diego Biurrun 2003-01-08 18:17:26 PST
Over in bug 127423 I am moving the "Offline & Disk Space" section in the prefs
panel to the "Mail & Newsgroups" section.  The startup preferences are also
located in that panel but commented out until this bug is fixed:

http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/content/pref-offline.xul#63

I thought I'd let you know your target is moving and would like to get some
advice from you where to put the startup prefs.  I want to put them under
Advanced at them moment.  Any objections or better ideas?
Comment 91 James Ross 2003-01-08 18:55:35 PST
Advanced seems like a good place to put them (though the source looks like it's
only got two options for the off-line mode, and I'd have expected four).

The only other place I can think of would be to group all the "When X starts up"
things into one Startup group - I can find 3 others that have stuff that would
fit into it (Appearance, Navigator, ChatZilla > Startup).
Comment 92 :aceman 2003-07-30 03:38:17 PDT
Even setting the offline.startup_mode manually does not seem to work in 1.3. 
With any value of it, Moz starts up online. Dialup users must always manually 
click the icon.
Comment 93 David :Bienvenu 2003-10-15 13:42:37 PDT
I'm looking into implementing this somehow. The main trick I see is how to
determine if the profile mgr has come up or not. The most direct solution might
just be to set an attribute on nsIProfile if the profile mgr has come up. The
other question is where to put this code that prompts the user for their desired
online/offline state, and the code that sets the initial online state if the
user has set that preference. It's unclear to me why most of this code shouldn't
just live in the profile manager instead of some js component...I also need to
figure where to store the current offline state - nsIOService is one
possibility, except for the fact that we go offline when shutting down...I
suppose we could add a js component that both listens for offline state changes
and for profile changes and do it all there.
Comment 94 Christopher Blizzard (:blizzard) 2003-10-20 11:47:07 PDT
Why don't you just store it as a pref and have the profile manager override the
pref (not sure how to do this) if the user selects something other than what
they used last time?
Comment 95 Christian :Biesinger (don't email me, ping me on IRC) 2003-11-15 18:08:50 PST
*** Bug 202529 has been marked as a duplicate of this bug. ***
Comment 96 benc 2003-12-29 14:16:47 PST
What is the status of this bug?

It seems like "ask me" is working.

It also seems like "remember" works when network.online is working, although
there is no UI to pref that value. (Flaky behavior is documented in bug 205044).



Comment 97 Croco Dil 2003-12-29 14:30:46 PST
I just tested it on a 2003122608 on Win 2k and it works fine

Went offline closed all windows,started it again, still was offline
"ask" also works.

So I suggest a "works 4 me" status
anyone else aggree??
Comment 98 Andrei Boros 2004-01-21 00:09:12 PST
I confirm this bug : 
I just upgraded from 1.5 to release 1.6
I do not use startup accelerator
I do not use multiple profiles.

Upgrade was performed by : uninstall old version (keep some plugins though),
install new version with custom. Old profile data was preserved.

Now Mozilla _ALWAYS_ asks me at startup wheather I want to work online or
offline (behaviour changed since 1.5). 
This has quickly become _horribly_ annoying. (I have LAN access)

I looked all through the preferences dialog and found nothing that would allow
me to configure this new behaviour.
Then, I looked at my profile and found in prefs.js : 
user_pref("offline.startup_state", 1);
which I set to 0 and now Mozilla no longer asks me about work online/offline. 

I suggest that this behaviour be configurable somewhere in the preferences
dialog (because _MOST_ people are not that skilled to look for such settings as
I described above) and this behaviour be OFF by default (as up to 1.5 included)


This text has also been submitted to bug #202529
(maybe some pathces here triggered #202529)
Comment 99 Sébastien Desvignes 2004-01-21 02:02:31 PST
Works for me
Mozilla 1.6 MacOSX / Win2k
The pref has moved under MailNew prefs (bug 127423), which is inexistant when
you do a browser only installation. But I think it is another matter.
Comment 100 David :Bienvenu 2004-01-22 10:30:17 PST
yes, this bug is fixed - ask me works, and remember last setting works. The
remaining problem is that some people have this pref migrated from 4.x and don't
know how to turn it off, as several people have reported. We could add a don't
ask me again checkbox or something to the dialog...
Comment 101 Jason Bassford 2004-01-23 16:01:01 PST
No patch / checkin has been identified for having fixed the bug.

->WORKSFORME
Comment 102 Dave 2004-01-29 07:28:27 PST
(In reply to comment #100)
> yes, this bug is fixed - ask me works, and remember last setting works. The
> remaining problem is that some people have this pref migrated from 4.x and don't
> know how to turn it off, as several people have reported. We could add a don't
> ask me again checkbox or something to the dialog...

I first installed Mozilla 1.5 and had no problem with the offline mode. With a
Broadband connection (cable) I am always online and was never asked about being
offline and needing to go online.  As soon as I installed 1.6 (after
uninstalling 1.5 first), I started getting profiles (I use 4) that would not
check email immediately. When I click get msgs, then I would be asked if I
wanted to go online.

I set the remember last active state preference.

If I open Mozilla from the desktop, get my mail for a certain profile, and then
close Mozilla, I can then reopen Mozilla and that profile and find that the
online state is remembered.  I made sure all 4 profiles were "online" and then
spent 2 days opening Mozilla and choosing one profile at a time and then closing
Mozilla.  That works, but it defeats the use of the Switch profiles option under
Tools.

If I open Mozilla, am online, use switch profiles to move from one profile to
another and then close Mozilla, then the next time I open Mozilla in any profile
I'm offline again.

I don't believe the bug is resolved. 

I'm running Win2K SP4.

Comment 103 David :Bienvenu 2004-01-29 07:46:48 PST
ah, it my not work with switching profiles, since I think the notification we
receive when switching profiles is like the notification we receive when
shutting down, which causes us to remember state, and to stop paying attention
to online/offline switches. I'd file a new bug for the specific case of
switching profiles interacting with this pref, thx!
Comment 104 Daniel Wang 2004-01-30 01:57:24 PST
Remove doc person robinf from CC. If anyone think this should be in the FAQ,
please contact me or file a bug.
Comment 105 Peter Schäfer 2004-02-19 23:44:19 PST
Sorry for the spam, but i can confirm the problem described in 
#102 because i'm also using two profiles (Moz 1.6 / W2K). 

What's the bug number for this?
Comment 106 benc 2004-03-21 08:52:09 PST
Okay, I'd like to get this bug wrapped up, so here is what I'd like to do.

1- Can someone confirm the essence of this bug was to implement the backend
prefs? If so, I'd like to update the bug to reflect that more accurately.

2- I'm going to take QA and mark this verified.

3- I'm going to document the prefs as networking prefs, and essentially take
over some QA aspects of this feature.

4- Get a plan for moving the offline/online controls back the root Pref UI level
(or come up w/ a better solution).
Comment 107 :aceman 2004-03-29 04:46:45 PST
The backend probably works now, except the profile switching case. In normal
case, starting up offline is now possible. That was the most critical point in
this bug.

The remaining work is probably left on the UI for this. E.g. there is no UI in
the prefs panel to choose 'always start offline'. There is only 'remember' and
'ask'. None of them actually represents the behaviour we had till now ('always
start online'). Users may think it does not exist (anymore). And editing
prefs.js isn't the way to go.

And as you said in 4) the prefs shouldn't be hidden under Mail, they affect the
browser as well (history, cache).
Comment 108 benc 2004-04-03 13:42:13 PST
Each of those problems should be put into separate bugs. I'm going to write some
necko/browser level test cases, verify this bug and file some followup bugs soon.

Bug 202529 is for movin the Offline-Online prefs that are not MailNews specific
OUT of the MailNews Pref UI.
Comment 109 benc 2004-04-15 08:57:15 PDT
VERIFIED/worksforme.
I'll file bugs if my test-suite turns up problems.

Note You need to log in before you can comment on or make changes to this bug.