Closed Bug 156552 Opened 22 years ago Closed 14 years ago

hook up Work Offline mode

Categories

(Camino Graveyard :: Toolbars & Menus, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: david.haas, Assigned: alqahira)

References

()

Details

(Whiteboard: 1.9.1)

Attachments

(2 files)

There used to be a "Work Offline" item in the File menu.
I think it disappeared 6/11/2002 when fix for bug 146320 was made.

Since there's a fair amount of code to handle working offline,
it should be added back in, or the code taken out.
Confirmed using Chimera/20020708. There is no "File/Work Offline" menu item.
QA Contact: winnie → sairuh
Updating summary per comment #0 in bug 176650.
Summary: "Work Offline" menu item disappeared → Work Offline mode not available
*** Bug 176650 has been marked as a duplicate of this bug. ***
It appears that in MainMenu.nib, there is still support for this feature. All it
requires is a menu item added back attached to the correct items in the controller.
Is there anything that should be done to aid in getting this implemented? It is
quite simple to fix, and such an awesome feature to have available.
What would offline mode do? Since we don't archive entire web pages like IE, I'm
not clear on the advantages of an offline mode.
Severity: normal → enhancement
Summary: Work Offline mode not available → Add a Work Offline mode
before access to this feature was removed, how did Offline behave? ie, did it
work? i don't use the offline mode, so i wouldn't know (at this point).
Blocks: 147975
Severity: enhancement → normal
Component: Toolbars & Menus → General
Keywords: qawanted
Summary: Add a Work Offline mode → Work Offline mode not available
mozilla has an offline mode, but i'm not familiar with how it works in detail.
whoops, accidentally clobbered sfraser's changes.

i can make this a non-rfe depending on the responses to comment 7.
Severity: normal → enhancement
Summary: Work Offline mode not available → add Work Offline mode
I've never understood what "work offline" does in any browser... maybe it's
supposed to let you call up pages in your history if your net connection is down?
No longer blocks: 147975
Target Milestone: --- → Chimera1.2
It's useful for browsing HTML-formatted documentation or saved pages, and for
dial-up users who want to test web pages they are making themselves before going
online to upload them, and so forth. IE's Offline mode fetches pages from the
browser cache if the user types in a URL or opens a bookmark (er, favorite) that
corresponds to a cache entry, which is useful if the server is down or if the
user's connection doesn't work. I'm not familiar with Mozilla's Offline mode, so
I don't know if it can handle this.
Sorry for the bugzilla spam, forgot to add that in most European countries
dial-up costs serious money due to the duration-based telephone fees, which is
the basis for some of the points in my previous comment.
fff
Assignee: saari → pinkerton
Target Milestone: Camino1.2 → Future
indeed, very annoying not to have this function. It's very useful to have, when
for instance I'm not connected to the internet (like while travelling by train
with my laptop.) I can then prepare all my e-mails and put them to wait in my
outbox. As soon as I get connected, the mails will be sent and I'll be sure I
didn't forget to send any...
This afternoon my internet service was down, and trying to work in Camino was
unbelievably frustrating - it kept beachballing for a few seconds at a time at
regular intervals, which doesn't happen when I'm browsing with a working
connection.  

Anyhow, an offline mode would have probably made that a bit less frustrating.
At such time as this is implemented, we'll need to make sure it doesn't negatively impact bug 152147 (saved sessions).

cl
There is some work going on in the Core on this area for Fx 2; see bug 336285 and the tracker bug 216490.
Assignee: mikepinkerton → nobody
OS: Mac OS X 10.2 → Mac OS X 10.3
QA Contact: bugzilla → general
Is this fixed for Camino too? In Firefox there is such an item in the file menu.
No. We'd need Camino-specific work, but more importantly the recent fix was to the 1.9.1 branch, and comments there indicate that it will not be ported to 1.9.0, so the core support is still not available to Camino.
So, here's the situation on 1.9.x:

1) Offline mode in Gecko works (see attachment 220609 [details] to bug 336359 and things like http://starkravingfinkle.org/projects/offline/todo.html, and load google.com, close the tab, go offline, and load google.com again)

2) We have preexisting code to make the menu item function, which works when hooked up to a menu item (we should remove the //unused comment from MainController.h)

2a) We need to decide where in the menu it goes

3) The menu item does not get a checkmark when enabled (not sure if I needed to click an additional box somewhere when hooking up the nib, or if we need some code); alternatively, we could make the menu toggle between "Work Offline" and "Go Online" (since Gecko goes offline automatically now, we'd need to keep that in mind when deciding; Firefox just does check/uncheck)

4) We have code (or at least a localizable.string) for adding [Working Offline] to the titlebar: http://mxr.mozilla.org/seamonkey/source/camino/resources/localized/English.lproj/Localizable.strings.in#67  I think cl was the last person to run into that code, and he said it was a mess.  Firefox has nothing that I can tell, but I think I'd find it useful if we did this to the window title.

5) We'd need to tidy up the relevant strings in netError.dtd and appstrings_properties.strings.in

We need to do 2/2a, 3, and 5; 4 would be nice to have.
Component: General → Toolbars & Menus
QA Contact: general → toolbars
Summary: add Work Offline mode → hook up Work Offline mode
Whiteboard: 1.9.1
This patch (and the accompanying nib) restores the Work Offline menu item, makes the setTitle calls localizable, and tidies up the Gecko strings related to offline mode.  Our existing code used Work Offline/Go Online, and both cl and I thought that seemed better than an ambiguous/confusing "Work Offline" plus checkbox, so I kept that.

Open questions:

1) Where in the File menu (or some other menu--Camino menu? It's really not a file action, but neither are many other things in the File menu) do we want Work Offline/Go Online to appear?

Current nib has it arbitrarily between Export Bookmarks and Page Setup; that doesn't feel great, but it's decent.  Below the Print stuff kind-of makes sense (and that's where Fx has it), but no Mac app has anything below Print. Other than that, nowhere else in File really seems good.

2) The quotes around “Go Online” in netError.dtd; not sure what's best to do there, but no quotes felt odder to me.  "select" or "choose"? (Also, again it sucks that .dtds can't be localized.)

Finally, all this "works" on 1.9.0 (to the extent it works on 1.9.x; we still don't have some Core features that should be automatic); the only thing that's missing on 1.9.0 is Gecko's autodetection of network state from bug 426932.  People can manually go offline, access visited pages from cache, run the finkle demo, etc.

So I'd like to land this on 1.9.0 (once we've decided issues 1 and 2 and any other issues), and spin the page title offline indication off into another bug if we think it's worthwhile to do (I can't actually see any code for that, so maybe we removed it when cleaning up some title code; I sort-of remember cl saying it was in the way).
Assignee: nobody → alqahira
Status: NEW → ASSIGNED
Attachment #427913 - Flags: superreview?(stuart.morgan+bugzilla)
Attached file MainMenu.nib
Associated nib (saved in IB 2.5.6 on 10.5; based on our last test, that should be OK, but I did have to reimport the .h this time)
Attachment #427913 - Flags: superreview?(stuart.morgan+bugzilla) → superreview+
Comment on attachment 427913 [details] [diff] [review]
Turns offline mode UI back on

The code looks fine, except this whole section should be removed:

> 
>   // Indicate that we are working offline.
>   [[NSNotificationCenter defaultCenter] postNotificationName:@"offlineModeChanged" object:nil];

We aren't listening for the notification any more, and if we do re-add the window title stuff we can re-add this or something like it (and we can do better than a hard-coded string for the name).

On 1.9.2, if Gecko auto-detects network state, we need a follow-up bug to listen for whatever notification it gives us and update accordingly; presumably with just this patch, if Gecko decides you are offline, the menu is wrong (although at least it would toggle it, doing the opposite of whatever it said). Or, if that's a pain, we could have the menu validation code query Gecko for the current state, assuming it's not too expensive a check in their code.

1) I would put it in its own section in Camino, between the cache-clearing and Services. File is either window-related or file-related, whereas this is global application state. Be sure to move the declaration of the toggle method in the .h file accordingly, since it's nice having them in the right sections and order (and of course change the string referring to the File menu).

2) What you have in the patch sounds good to me.

sr=smorgan with those changes and the 1.9.2 bug for updating menus on autodetected changes.
(In reply to comment #23)
> On 1.9.2, if Gecko auto-detects network state, we need a follow-up bug to
> listen for whatever notification it gives us and update accordingly; presumably
> with just this patch, if Gecko decides you are offline, the menu is wrong
> (although at least it would toggle it, doing the opposite of whatever it said).

Ooops, I forgot about testing that.  It seems a bit messy currently; when we're auto-offline, selecting "Work Offline" causes us to send Gecko the 'go online' message, so it fires the DOM notifications without seeing if we're actually online (to me that seems like a Gecko bug that's papered over by people having working UI ;) ).  So, yeah, a follow-up on fixing that for sure.
Landed on cvs trunk with sr comments addressed.  Filed bug 547485 on the notification/menu updates for 1.9.x and bug 547486 on the window title thing.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: