Closed Bug 85984 Opened 23 years ago Closed 23 years ago

sys tray icon and UI for -turbo mode

Categories

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

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: cathleennscp, Assigned: bugzilla)

References

Details

(Whiteboard: [PDT+] fix checked into trunk)

Attachments

(4 files)

Blocks: 75599
Target Milestone: --- → mozilla0.9.2
QA Contact: sairuh → paw
Summary: sys try icon and UI for -turbo mode → sys tray icon and UI for -turbo mode
oh come on. there isn't a single word in this bug, and no url containing a specifiation for outsiders to visit. please provide at least one of comments or specifications. According to netscape 4 the only bug you referenced is 21 pages long (print preview{format for printing}).
No longer blocks: 75599
Blocks: 75599
Well, I guess our hopes for somebody else to provide the spec won't be realized :-(. Here's the plan, comments welcome. 1. When running in "turbo mode," Mozilla will display the default program icon in the Win32 system tray. 2. This icon will have the tooltip set from the "brandShortName" from brand.properties (I think that's where it's defined). I.e., "Mozilla". 3. Double-clicking this icon will: a. Bring the most recently used Mozilla top-level window to the foreground. b. Open a new Navigator window (if there is no current top-level window). 4. Right clicking this icon will display a very short menu with 1 item, labelled "Exit." a. This menu item will be disabled if windows are currently opened. b. It will be enabled and will close the application, if no windows are currently opened. Issues/explanation: 1. The menu is very short because it is a little hard to do more because the code that builds this menu doesn't have ready access to the information needed to build a more functional one. It would be nice if we could replicate the task bar but that's hard. Basically, we need a set of ordered pairs of (menu string, chrome URL), one for each thing you want to be able to "launch." 2. Disabling the Exit menu choice when windows are opened is because we don't have an easy means of doing the equivalent of "File->Exit." That functionality is implemented in JS (globalOverlay.js) and is hard to get to and difficult to replicate in the context where we'd need it. 3. Time constraints and aversion to risk played a role in deciding on these limitations. I think new bugs are the appropriate place to discuss enhancing this feature down the road.
would [x] run at startup, be too hard to add to the menu or explain to end users?
Both. We're constrained to use localizable info that's already in the product and I fear most user's wouldn't know what to make of that. There will be a pref for that.
*** Bug 83882 has been marked as a duplicate of this bug. ***
Is this bug a duplicate of 84882? Or at least related to it? Anyway, it would be really nice if the tray icon was optional. I hate icons cluttering up that area. I can always kill Mozilla using Ctrl-Alt-Del.
Attached patch Patch; almost ready to go. (deleted) — Splinter Review
That patch pretty much implements this feature as spec'd. Two remaining issues: 1. I position the menu centered at the mouse location. That's a little odd but I think to position it properly requires testing where the task bar is (at top/bottom/left/right) and adjusting the flags to TrackPopupMenu. I didn't have time to play with that so I'm just centering it. 2. The menu can't be dismissed except by clicking on a Mozilla window. I can't figure this out. I tried all the TrackPopupMenu options I could think of; and tried changing the way I load/create the menu (from a resource, etc.). I think it has something to do with the nature of the "owner" of the menu. I observe similar problems with some of the other systray icons on my system. I'm sure there's some workaround, I just don't have time to puzzle it out. One other thing: We don't properly handle opening Nav vs. Composer vs. Mail when the user double clicks this icon (when no windows are open). We always open a browser window. The same problem exists whenever we get a secondary request come in from another instance of the application. I think the logic in ::HandleRequest should be further enhanced so that the "last resort" doesn't open a Nav window always, but instead queries prefs to determine whether it should be nav/composer/mail.
Keywords: nsbeta1+
Priority: -- → P1
Whiteboard: mostly fix ready.
*** Bug 83882 has been marked as a duplicate of this bug. ***
--> me to drive while bill's on sabbatical.
Assignee: law → blake
Cc'ing Dean.
Status: NEW → ASSIGNED
So you're giving the user a tray icon that can't be hidden, which drives me crazy, and the functionality of the icon is to give me access to an option that will hardly ever be enabled? What's the point? Just give me an option in Preferences to run at startup, and that's it. As for problem getting the menu to dismiss that Bill mentioned, see: http://support.microsoft.com/support/kb/articles/q135/7/88.asp
Apparently we can't add more strings or I'd add more functionality. What do you mean by give you access to an option that's hardly ever enabled? The purpose would be that if you decided to preload Mozilla at startup, you'd know that it's running, and could use the systray icon to open Mozilla whenever you need. It only shows up if you use turbo mode. Most other apps I've seen that preload (MSN Messenger, winamp, realplayer, etc.) do this as well; I think it's probably safer to let the user know (or remind him) that the app is running. I agree that in its current state it's not overly useful.
Double-clicking this icon will: a. Bring the most recently used Mozilla top-level window to the foreground. b. Open a new Navigator window (if there is no current top-level window). This action should be in the menu as well, indicated in bold as the default. Use SetMenuDefaultItem to accomplish that. For not having File>Exit, I suppose there's no way that we can just fake a chrome that has globalOverlay.js as part of it? I guess that's covered by "Time constraints and aversion to risk played a role in deciding on these limitations."
Sorry, I should have put quotes around that first part. Those are law's words not mine. I agree that the icon is probably a good idea, but just give users a way to turn it off. I see it both in the prefs UI, enabled if Load at Startup is checked, and also as a context menu item.
Unfortunately I apparently can't add more strings to support that.
Target Milestone: mozilla0.9.2 → mozilla0.9.3
As I've said before, I think the icon should be optional. If it isn't I'll be forced to not use turbo mode or upgrade to Windows XP (which allows you to hide tray icons). Blake Ross said: "It only shows up if you use turbo mode. Most other apps I've seen that preload (MSN Messenger, winamp, realplayer, etc.) do this as well" But Winamp and RealPlayer allow you to hide the icon. I don't know about MSN Messenger because I've never used it (but it's bundled with Windows XP, so if I'm upgrading I may do...).
Okay, looks like we have a little more time for the strings. Cc'ing Matthew for long overdue UI advice.
Target Milestone: mozilla0.9.3 → mozilla0.9.2
Attached patch patch (deleted) — Splinter Review
Attached patch oops...updated (deleted) — Splinter Review
So like, this thing is pretty lame in its current incarnation. Unfortunately, it will take a bit of work to get this right. My feeling is screw it for now. We're going to get a lot of comments on how the one and only menu item 'exit' is dimmed when you have a window open. The only use for the icon right now is an easy way to open a new window when we're hidden. A shortcut on the desktop serves the same purpose or we could add ourselves to the quicklaunch bar (just to the right of the start menu in a default taskbar setup).
I thought the primary reason for this icon was to un-preload Mozilla, not to open a new window. If you can't un-preload Mozilla with it, it shouldn't be there at all. I definitely think you shouldn't be able to open new windows from the icon, otherwise people will be misled into thinking that that is the only way of opening Mozilla windows quickly.
There are, at a minimum, two menu items that I see us needing: Hide <appname> QuickStart Exit <appname> QuickStart I don't think we need the ability to shut down the entire application from the icon, that would be pretty weird. Using Sonique and RealPlayer as examples, they have options to close down their preloader but not the application remains. I agree with mpt that the opening of new windows and activating existing ones is a little odd. Oh, and something that I just mentioned to Blake, but should probably record here as well. The posting of WM_NULL should happen outside the "if (::TrackPopupMenu)" block. The message always needs to be posted, regardless of what TrackPopupMenu returns.
I brought this up at a meeting and no one thought the ability to hide the icon was a good idea, because it'd just make it harder to know how to exit out of turbo mode. I'm fine with providing a way to (temporarily) turn off turbo mode, once I find out how to do it (sean, do you know offhand?) I don't find the ability to open a window from the icon strange at all, actually I'd expect it from most system tray icons (see AIM, etc.). Generally, though, you're just reopening a window you already had open, but I still don't see this as that strange.
Blake, I don't know how to temporarily disable the turbo mode when it's already running. I'm not familiar with the turbo code at all.
I remember law mentioned something about -kill, don't know if that quits/kills the app, or gets the app out of -turbo mode. maybe you can check it out. I think we should definitely do something like what syd did to the preference panel, turning it off means removing the shortcut from the startup folder, so next machine boot time, -turbo won't run. should we also "refresh" the app, by sending it a WM_QUIT command and restart (if it can be done without too much effort??)
"I brought this up at a meeting and no one thought the ability to hide the icon was a good idea, because it'd just make it harder to know how to exit out of turbo mode." Well, if I was at the meeting I would have said it was a good idea. We don't want to clutter up people's tray area. I already have enough crap in there that I can't hide, I don't need more. As for making it harder to know how to exit out of turbo mode, why would anyone ever want to do that? Oh yeah, is there a particular reason that we're creating a shortcut in the startup folder instead of making a Run entry in the registry under HKCU?
Dean: I agree that there should be a way to disable the icon. My System Tray currently has four icons in it. And that's four too many. "Oh yeah, is there a particular reason that we're creating a shortcut in the startup folder instead of making a Run entry in the registry under HKCU?" I think the reason is that it makes it easy for the user to tell that they have Mozilla QuickLaunch Preloader Turbo Mode Plus+ (TM) or whatever it's called running at startup. It also makes it far easier to disable. If there was nothing in the Startup folder, people may wonder what the icon is and why they have Mozilla running when they press Ctrl+Alt+Del. Then we start to get all sorts of accusations of Mozilla running behind the user's back and spyware and stuff.
I guess, except we have the Run at Startup pref, which is all that RealPlayer and Sonique have.
Why we need a clear way to unload Mozilla (systray icon!): - load mozilla and download latest nightly build - exit mozilla ("X" on top right) - install new build - installer aborts because old mozilla is still running - the only way to currently unload mozilla is task manager (Ctr-Alt-Del)
If we can disable the systray icon ( a VERY good idea), then there MUST be another way to completely unload mozilla. I suggest to add "Exit and Unload Mozilla" to the File menu. BTW, there should also be a "Close" in the file menu to close the current window without closing the whole app (disabled, if this is the only open window).
Take a look at GetRight's behaviour: When you start it, the main window appears. In addition, an icon is sitting on the taskbar. When you close the main window, the taskbar icon is still there. The whole application will be exited only if you right-click on the taskbar icon and choose "Close Getright". And an dialog box will ask you whether to really exit the whole app or not. I appreciate such behaviour. Comments?
can we please not confuse bugs? oh wait, this is bugzilla. I surrender. (mpt) 2001-06-24 13:18 most if not all system tray icons will open a window if you double click them, this was expected behavior. Dean asked about string choices, there are lots of apps to check, real player, winamp, ... most of which i don't have on this computer :( i think mozilla -kill stops turbo w/o quiting the application, that was discussed in some other bug. why would anyone ever want to exit turbo mode? the only reasons i can think of: installing newer version, running different version. in the case of an install, the installer _will_ know how to kill turbo. in the case of running a different version we should probably kill turbo and slow start anyways. HKCU belongs in another bug, i mentioned it. basically the current reason is we're lazy and foolishly believe that the startup folder is an application dumping ground. we're confusing it w/ the registry. the startup folder is for users. Alex: if you don't want a system tray, can i suggest you replace explorer w/ another shell? there are plenty and they don't prevent you from using explorer for file management. [cmd.exe works as a shell, if you want more info, contact me on irc] Easy to disable? you use prefs, control panel [add/remove programs], or the system tray icon. Mike Lin's Startup Control Panel will let users control the 5 basic startup locations (this includes the startup folder and the registry keys). PLairo is confused, but i addressed his concerns above. I don't have getright here, but we are using the tray icon to indicate -turbo, not to indicate app running. Norton System Doctor behaved as DoctorJ described, and mpt should agree w/ me here when I say that asking me if i really want to quit is patronizing, confusing, stupid, and just plain bad ui. Thankfully system doctor has a don't ask me this stupid question again button, but that doesn't justify or excuse its ui. -- ack i'm sounding like mpt. Basically we need a Disable and an Unload. But since unload doesn't kill the application we can't really call it Quit/Exit. Disable and Unload are probably both beyond normal comprehension, i'll check RealPlayer and WinAmp later when i visit a normal computer. While we need those two options, a quick survey of my tray shows most items don't have them. [w2k] tray list: Task Manager: Close. It doesn't have a ui to set itself to run on startup, that's a user task. VShield: nothing interesting, if you want to close it you use task manager. killing the app icon doesn't kill virus scnaning, just the indicator/quick control. Volume: Adjust Audio Properties leads to the control panel which has [x] show volume control on the taskbar. Internat [Language Input]: Properties leads to the control panel which has [ ] Enable indicator on taskbar. This item is somewhat confused because i'm running it from a non standard location, if i check the button i'll get an error the next time i logon saying internat is already running :) Aim: Exit, Preferences>Sign On [ ] Start AIM when Windows starts. Again it's confused like poor internat. CDPlayer: Exit, Options>Preferences [x] Show control on taskbar LAN-cable unplugged: double click, get properties [x] Show icon in taskbar when connected. -- Is there a disconnect here? ICQ. Double click, click ICQ, Shutdown. DUN-connected: status, properties [x] Show icon in taskbar when connected. Clock, Propeties [x] Show clock. The vast majority of these items use dialogs and not menu items to allow the user to permanently hide their items. That's interesting, although almost all of my items aren't preload apps. -Sold Seperately (run just for fun)- NSNotify: Exit Talkback: odd it didn't go into the tray. Phone Dialer: Exit Phone Dialer Kerberos Ticket Manager: Exit, Properties>Manager [ ] Icon on system tray, [ ] Auto start ticket manager WinAmp: Exit, Options>[x]Preferences>Setup>Agent [ ] Enable Winamp agent [x] Show system tray icon. I don't know what the winamp agent is. Oh goody, now i have _2_ winamp icons in my tray, and they have identical menus. It's a good thing their icon tooltip tells me which thing is which... Backweb had a shutdown backweb entry. RealPlayer, RealJukeBox, RealDownload, i'll get to these later. Oh Alex mentioned that he can always kill mozilla w/ Ctrl-Alt-Del as justification for an optional icon, that is just unacceptable, anyone who accidentally gets into this state will be confused and probably upset, eventually blaming mozilla for hurting something else. I think some of our arguments will probably change w/ wXP spec, but i don't have that and i'm not installing wXP anytime soon...
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
"Why we need a clear way to unload Mozilla (systray icon!): - load mozilla and download latest nightly build - exit mozilla ("X" on top right) - install new build - installer aborts because old mozilla is still running - the only way to currently unload mozilla is task manager (Ctr-Alt-Del)" Another reason to unload Mozilla is bug 86067 (Closing all windows in -turbo mode keeps sessions information). I think that bug could be an important security threat, even if a tray icon could mitigate it...
giannici@neomedia.it: concerns that are filed as bugs that will be fixed are not serious concerns. - installer aborts because old mozilla is still running ^this is a bug, it should already be filed somewhere because it's reported and i've made comments about the installer needing to be capable of handling this, i don't know which bug that is. I can tell you it isn't this one because this one is about UI and that's about installer. If you think there is a security threat, and it's clearly not this bug as its title contains UI and not 'UI to reformat computer' or 'UI to enable viruses to take over computer' then please discuss them in a newsgroup or in some other bug.
How about a right-click menu in the sys-tray icon that includes: +-----------------------------------+ | [x] Turbo mode (enable/disable) | +-----------------------------------+ | Hide Systray Icon | <- keeps turbo mode on| Close all Mozilla Windows | <- keeps turbo mode on +-----------------------------------+ Then add a menu-item in mozilla under View -> Show/Hide called: "[x] Show Systray Icon". This was, the only was something could go wrong (Mozilla not unloaded and no visual indication thereof) would be if: 1. turbo mode is on, AND 2. Sys tray is hidden, AND 3. all Moz windows are closed. Every other combination allows the user to know what is going on (e.g. Moz loaded in turbo mode). <OT - QA IGNORE> Timeless, there is no reason for sarcasm. We are all trying to help. Federico was merely giving a reason WHY there is a need for this UI to include the ability to shut down Mozilla completely. </OT>
Keywords: nsBranch
We need to start getting the r= and sr= on this and land on the trunk, if it is to have a chance of then merging it on the branch. Blake could you start that?
Attached patch patch (verbal sr=ben) (deleted) — Splinter Review
Crap, so, calling nsAppShellService::Quit() won't prompt to save unsaved work in open windows. I see two possible solutions: * I don't see why isn't each window's onclose/onunload handlers aren't being called. Quit() enumerates through each window and closes/destroys it. jst, shouldn't nsXULWindow::Destroy be notifying the window, so onclose/onunload get called? * The way File | Exit does this is somewhat hackish. It looks for a property of |window| called tryToClose that the chrome can set (as an alias for the function that it wishes to be called upon exiting); if it finds it, it executes it. jst, what's the C++ equivalent of if ("foo" in window) window.foo(); ? jst, can you offer some insight?
Blake - lets land this in the way it was originally conceived (i.e. SysTray -> Exit only works when all windows are closed). You shd keep trying to find the general solution after that. Lets get this on the trunk so that we can get some eyeballs on the bits, so that it has a good chance of getting merged to the trunk. It would be good to land this Thursday on the trunk. Thanks! Vishy
Okay, r=kerz sr=ben with some minor modifications on the 6/22 patch, I'll check that into the trunk now and keep working on getting it to prompt.
Whiteboard: mostly fix ready. → fix checked into trunk
Keywords: vtrunk
Vishy says PDT+
Whiteboard: fix checked into trunk → [PDT+] fix checked into trunk
Fix checked into the branch also. Marking this bug fixed. I opened a new bug 89532 for the continuation of this work.
fix checked in, now really marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified in branch build 2001071006.
Status: RESOLVED → VERIFIED
No longer blocks: 75599
Blocks: 75599
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: