offline: Startup mode "remember my prev mode" or "Ask me at startup"

VERIFIED WORKSFORME

Status

SeaMonkey
UI Design
P2
normal
VERIFIED WORKSFORME
16 years ago
13 years ago

People

(Reporter: grylchan, Assigned: Bienvenu)

Tracking

Trunk
mozilla1.2alpha
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ADT3] [nsSupport] PDT-)

Attachments

(20 attachments)

14.27 KB, patch
Details | Diff | Splinter Review
7.39 KB, image/jpeg
Details
14.35 KB, patch
Details | Diff | Splinter Review
14.32 KB, patch
Details | Diff | Splinter Review
8.84 KB, image/jpeg
Details
7.40 KB, image/gif
Details
7.60 KB, image/jpeg
Details
11.52 KB, patch
Details | Diff | Splinter Review
14.31 KB, patch
Details | Diff | Splinter Review
17.22 KB, patch
Details | Diff | Splinter Review
19.90 KB, patch
Details | Diff | Splinter Review
5.75 KB, image/gif
Details
16.89 KB, image/jpeg
Details
21.70 KB, patch
Details | Diff | Splinter Review
22.68 KB, patch
Details | Diff | Splinter Review
23.82 KB, patch
Details | Diff | Splinter Review
10.26 KB, image/gif
Details
14.46 KB, image/jpeg
Details
16.40 KB, image/jpeg
Details
24.95 KB, patch
Details | Diff | Splinter Review
(Reporter)

Description

16 years ago
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.
(Assignee)

Comment 1

16 years ago
front end issue.
Assignee: bienvenu → dianesun

Comment 2

16 years ago
taking.
Assignee: dianesun → mohanb

Updated

16 years ago
Keywords: nsbeta1

Updated

16 years ago
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2

Comment 3

16 years ago
PDT+ per 6/12 mtg.
Whiteboard: [PDT+]

Comment 4

16 years ago
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.


(Assignee)

Comment 5

16 years ago
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

16 years ago
Created attachment 39021 [details] [diff] [review]
proposed patch v1.0

Comment 7

16 years ago
cc 'ing bhuvan for review & sspitzer for super review;
Whiteboard: [PDT+] → [PDT+] requesting for r & sr

Comment 8

16 years ago
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

16 years ago
Created attachment 39061 [details]
startup mode : screen shot

Comment 10

16 years ago
Created attachment 39064 [details] [diff] [review]
proposed patch : v1.1

Comment 11

16 years ago
Created attachment 39128 [details] [diff] [review]
improved patch v1.2

Comment 12

16 years ago
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

16 years ago
Created attachment 39167 [details]
updated screenshot for UI change

Comment 14

16 years ago
Created attachment 39190 [details]
Suggested dialog

Comment 15

16 years ago
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.
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

16 years ago
Created attachment 39346 [details]
Latest screenshot  v2.0

Comment 18

16 years ago
Created attachment 39347 [details] [diff] [review]
Proposed patch : v2.0

Comment 19

16 years ago
we need regular common dialog here right?

Comment 20

16 years ago
Yes, we need nsIPrompt - as I and Seth commented (and which is standard for
displaying dialogs nowadays).

Updated

16 years ago
Whiteboard: [PDT+] requesting for r & sr → [PDT+] requesting for r & sr Planning for checkin by FRI : 06/22

Comment 21

16 years ago
we need radio group right? which is not part of "nsIPromptService",
correct me, We need accesskeys also.
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?)
(Reporter)

Comment 23

16 years ago
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.



(Reporter)

Comment 24

16 years ago
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

16 years ago
Created attachment 39634 [details] [diff] [review]
new patch : startup mode for browser, messenger, mailnews

Comment 26

16 years ago
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.

Updated

16 years ago
Whiteboard: [PDT+] requesting for r & sr Planning for checkin by FRI : 06/22 → [PDT+]

Updated

16 years ago
Whiteboard: [PDT+] → [PDT+] patch available

Comment 27

16 years ago
Created attachment 39848 [details] [diff] [review]
Latest Patch :  startup mode for navigator, messenger, composer, profile-manager;

Comment 28

16 years ago
requesting hwaara & bhuvan for review & seth for sr.
Whiteboard: [PDT+] patch available → [PDT+] patch ready; requesting for r& sr

Comment 29

16 years ago
I defer this review to Bhuvan, if that is OK (hey, I just finished the
mega-review in bug 79865 :-) ).

Comment 30

16 years ago
I will do the review. np. thanks for your help.

bhuvan

Comment 31

16 years ago
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

16 years ago
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

16 years ago
Created attachment 39983 [details] [diff] [review]
improved patch

Comment 34

16 years ago
1. inline styling : (removed for the button)
2. removed pref("offline.getMessages.get_messages", 0);
3. fixed indentation & tested.

Comment 35

16 years ago
requesting seth for sr; 
I agree with timeless, having just an OK button is bad. Having <offline> <online>
in my opinion would be best...
 
Created attachment 40062 [details]
screen shot of "ask me" dialog in 4.x
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.

Updated

16 years ago
Blocks: 79480

Comment 39

16 years ago
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

16 years ago
Created attachment 40206 [details]
new startup dialog

Comment 41

16 years ago
Created attachment 40208 [details] [diff] [review]
new patch with seth's suggestions.

Comment 42

16 years ago
Created attachment 40235 [details] [diff] [review]
patch : with "preferences panel" changes
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?) 
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

16 years ago
Created attachment 40328 [details] [diff] [review]
new patch with seh's modifications.

Comment 46

16 years ago
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

16 years ago
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

16 years ago
Created attachment 40336 [details]
example of suggestions

Comment 49

16 years ago
Created attachment 40349 [details]
new screenshot acc. to jglick's suggestions.

Comment 50

16 years ago
id=40349, very nice.  Thank you.  :-)

Nit: remove period from "Remember my previous mode."

Comment 51

16 years ago
Created attachment 40358 [details]
modified screenshot.

Comment 52

16 years ago
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

16 years ago
Created attachment 40401 [details] [diff] [review]
new patch with bhuvan's suggestions.

Comment 54

16 years ago
----------
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

16 years ago
requesting seth for super review.
Whiteboard: [PDT+] patch ready; requesting for r& sr → [PDT+] patch ready; requesting sr

Comment 56

16 years ago
requesting bhuvan for re-review;

Comment 57

16 years ago
r=bhuvan.

Comment 58

16 years ago
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.
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.
Whiteboard: [PDT+] patch ready; requesting sr → [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)
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

16 years ago
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

16 years ago
(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

16 years ago
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.
Component: Offline → XP Apps
Product: MailNews → Browser

Comment 65

16 years ago
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)
Target Milestone: mozilla0.9.2 → mozilla0.9.3

Comment 66

16 years ago
Removing PDT+, marking nsbranch; should be checked into the 0.9.3 trunk ASAP,
tested & verified, then submitted for limbo builds.
Keywords: nsBranch
Whiteboard: [PDT+]
*** Bug 91938 has been marked as a duplicate of this bug. ***

Comment 68

16 years ago
Missed 0.9.3.
Target Milestone: mozilla0.9.3 → mozilla0.9.4

Updated

16 years ago
Keywords: nsenterprise

Updated

16 years ago
Keywords: nsenterprise → nsenterprise+
*** Bug 97993 has been marked as a duplicate of this bug. ***

Updated

16 years ago
Target Milestone: mozilla0.9.4 → mozilla0.9.5

Comment 70

16 years ago
Reassigning 0.9.4 Offline IMAP UI bugs to David; TFV 0.9.5.
Assignee: mohanb → bienvenu

Updated

16 years ago
Blocks: 99230

Comment 71

16 years ago
Plusing this one, because it already has an nsenterprise+.

Greg - Is this still a stop ship?
Keywords: nsbranch → nsbranch+
(Assignee)

Comment 72

16 years ago
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

16 years ago
Not stop ship.  Making nsenterprise-,PDT-.
Keywords: nsenterprise+ → nsenterprise-
Whiteboard: PDT-

Comment 74

16 years ago
nsBranch- status for real this time.
Keywords: nsbranch+ → nsbranch-

Updated

16 years ago
No longer blocks: 99230
*** Bug 99596 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 76

16 years ago
Just curious. Is the UI going to be removed for final candidate or should I just
release note this instead?

Comment 77

16 years ago
if you think it should be removed please file a bug, cc me and I'll bring it up
in the PDT.  Thanks!
(Reporter)

Comment 78

16 years ago
Spoke with Greg. We'll release note it instead.
And fix it for the next build.

Updated

16 years ago
Keywords: relnoteRTM
(Assignee)

Comment 79

16 years ago
moving to .9.6 - would recommend that someone else do this since it's mostly UI.
Target Milestone: mozilla0.9.5 → mozilla0.9.6

Updated

16 years ago
Blocks: 104166

Updated

16 years ago
Keywords: nsbeta1
Whiteboard: PDT- → [nsSupport] PDT-

Comment 80

16 years ago
reassigning to ssu.  Moving to 0.9.8
Assignee: bienvenu → ssu
Target Milestone: mozilla0.9.6 → mozilla0.9.8

Updated

16 years ago
Blocks: 107067

Updated

16 years ago
Keywords: nsbranch-

Updated

16 years ago
Keywords: nsbeta1 → nsbeta1+

Updated

16 years ago
Priority: P2 → P1

Updated

16 years ago
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.8 → mozilla0.9.9

Updated

16 years ago
Priority: P1 → P2
Target Milestone: mozilla0.9.9 → mozilla1.0

Comment 81

16 years ago
*** Bug 127633 has been marked as a duplicate of this bug. ***

Comment 82

16 years ago
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-

Updated

16 years ago
Whiteboard: [nsSupport] PDT- → [ADT3] [nsSupport] PDT-
see the http://bugzilla.mozilla.org/show_bug.cgi?id=101091#c17 #c18 comment here
with my analysis of the problem also.

Comment 84

16 years ago
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.
Blocks: 122274
Keywords: nsbeta1+ → nsbeta1-
Target Milestone: mozilla1.0 → mozilla1.2alpha
*** Bug 134403 has been marked as a duplicate of this bug. ***

Comment 86

15 years ago
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

15 years ago
*** Bug 161438 has been marked as a duplicate of this bug. ***

Comment 88

15 years ago
*** Bug 165648 has been marked as a duplicate of this bug. ***
This was obviously not in 1.2, so the target milestone should be altered.

Comment 90

15 years ago
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

15 years ago
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

14 years ago
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.
(Assignee)

Comment 93

14 years ago
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.
Assignee: ssu → bienvenu
Status: ASSIGNED → NEW
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?
*** Bug 202529 has been marked as a duplicate of this bug. ***

Comment 96

14 years ago
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

14 years ago
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

14 years ago
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

14 years ago
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.
(Assignee)

Comment 100

14 years ago
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...
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

14 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 101

14 years ago
No patch / checkin has been identified for having fixed the bug.

->WORKSFORME
Status: REOPENED → RESOLVED
Last Resolved: 14 years ago14 years ago
Resolution: --- → WORKSFORME

Comment 102

14 years ago
(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.

(Assignee)

Comment 103

14 years ago
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

14 years ago
Remove doc person robinf from CC. If anyone think this should be in the FAQ,
please contact me or file a bug.

Comment 105

14 years ago
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

14 years ago
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

14 years ago
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).

Updated

14 years ago
Blocks: 221734

Comment 108

14 years ago
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.
Summary: offline: Startup mode doesn't work-"remember my prev mode" or "Ask me at startup" → offline: Startup mode "remember my prev mode" or "Ask me at startup"

Comment 109

14 years ago
VERIFIED/worksforme.
I'll file bugs if my test-suite turns up problems.
Status: RESOLVED → VERIFIED
QA Contact: grylchan → benc
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.