Last Comment Bug 574612 - Add "Restart in Safe Mode" menuitem to the Help menu.
: Add "Restart in Safe Mode" menuitem to the Help menu.
Status: VERIFIED FIXED
: ux-control, ux-error-recovery
Product: SeaMonkey
Classification: Client Software
Component: General (show other bugs)
: Trunk
: All All
: -- enhancement with 1 vote (vote)
: seamonkey2.1b3
Assigned To: Philip Chee
:
Mentors:
Depends on:
Blocks: 646897 1194744 646894
  Show dependency treegraph
 
Reported: 2010-06-25 03:09 PDT by Tony Mechelynck [:tonymec]
Modified: 2015-08-14 08:35 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
b3+


Attachments
Patch v1.0 (8.15 KB, patch)
2011-03-29 08:51 PDT, Philip Chee
jh: feedback-
Details | Diff | Splinter Review
Patch v1.1 Restart in Safe Mode only [Checked in: Comment 23] (5.82 KB, patch)
2011-03-31 03:06 PDT, Philip Chee
neil: review+
jh: feedback+
Details | Diff | Splinter Review

Description Tony Mechelynck [:tonymec] 2010-06-25 03:09:42 PDT
A permanent "Restart" UI used to be present, but has long since disappeared in favour of a button which is only present when there are one or more addons which need a restart to be enabled / disabled / installed / uninstalled / updated. It seems that Firefox won't get the permanent UI back in a foreseeable future, see bug 414961 and bug 417272.

Maybe we could add the button back in our "general" UI, and go one-up on Firefox, but even if that is voted down, we have a special "builtin addon for testers", namely the debugQA extension, which Firefox hasn't got; and testers need to restart more often that "ordinary users", especially when checking whether they can reproduce bugs. Also, testers, and SeaMonkey testers in particular, are more likely than the rank-and-file Firefox user (who used IE until last month ;-) ) to add tweaks to userChrome.css and userContent.css, which won't take effect without a restart but are totally unknown to the addons manager.

For all these reasons I believe that (ideally) two menuitems, "Restart SeaMonkey" and "Restart in Safe Mode" would be worthy additions to the debugQA component (and despite all my investigations I haven't found where in SeaMonkey, Other Apps or Webtools the bugs about this component belong).

There is already a "File => Restart Mozilla" menuitem and a Restart button in the "MR-Tech Toolkit" third-party extension, but it doesn't support trunk nightlies at the moment; I expect that a third-party extension (however worthy) will often lag behind bleeding-edge development, yet it is bleeding-edge testers who would most profit by this addition.
Comment 1 Justin Wood (:Callek) 2010-09-07 20:18:35 PDT
nice to have but the Debug and QA extension is not shipped by default in release (final) builds, so I don't think it should be wanted+ or blocking+.
Comment 2 Serge Gautherie (:sgautherie) 2011-03-26 14:45:23 PDT
Fwiw, see (Thunderbird)
Bug 641783 - Add an option to the help menu to restart with add-ons disabled
Comment 3 Philip Chee 2011-03-27 04:16:25 PDT
> Fwiw, see (Thunderbird)
> Bug 641783 - Add an option to the help menu to restart with add-ons disabled
I have a working patch for this.
Comment 4 Robert Kaiser 2011-03-27 16:20:38 PDT
(In reply to comment #3)
> > Fwiw, see (Thunderbird)
> > Bug 641783 - Add an option to the help menu to restart with add-ons disabled
> I have a working patch for this.

If you end up doing this in debugQA (I hate how large the help menu is getting and I'm not sure it belongs there), then please also bump the debugQA version in the same patch, as this is the first significant change of this add-on since we shipped 2.0 (sigh).
Comment 5 Philip Chee 2011-03-29 08:51:38 PDT
Created attachment 522690 [details] [diff] [review]
Patch v1.0

feedback? -> Jens on the grounds that he's a SM Help peer.

I'm putting the "Restart in safe mode" menu item under "Help" since this is what Firefox and Thunderbird do:
  FX [Bug 542122] Replace safe mode shortcut with keyboard modifier and menu command.
  TB [Bug 641783] Add an option to the help menu to restart with add-ons disabled.

The plain "Restart SeaMonkey" also goes there to keep safemode company.

> +++ b/suite/browser/navigator.js
> -function restartApp() {
Originally for the "Apply Themes" menu item. Currently not used so moving to utilityOverlay.js

> +  Services.prefs.setBoolPref("browser.sessionstore.resume_session_once", true);
If we can get rid of this line restartApp() can just be replaced by Application.restart()
Comment 6 neil@parkwaycc.co.uk 2011-03-29 09:34:10 PDT
(In reply to comment #5)
> > -function restartApp() {
> Originally for the "Apply Themes" menu item. Currently not used so moving to
> utilityOverlay.js
Of course it's still used...
Comment 7 neil@parkwaycc.co.uk 2011-03-29 09:40:10 PDT
(In reply to comment #5)
> > +  Services.prefs.setBoolPref("browser.sessionstore.resume_session_once", true);
> If we can get rid of this line restartApp() can just be replaced by
> Application.restart()
misak would know...
Comment 8 neil@parkwaycc.co.uk 2011-03-29 09:41:14 PDT
(In reply to comment #4)
> If you end up doing this in debugQA (I hate how large the help menu is getting
> and I'm not sure it belongs there)
The problem with debugQA is that once you've restarted in Safe Mode, there's no going back, since the menu isn't there to restart normally...
Comment 9 neil@parkwaycc.co.uk 2011-03-29 09:42:02 PDT
Comment on attachment 522690 [details] [diff] [review]
Patch v1.0

>+<!ENTITY helpSafeMode.label                 "Restart with Add-ons Disabled…">
I'm not sure that a confirmation prompt warrants an ellipsis...
Comment 10 Jens Hatlak (:InvisibleSmiley) 2011-03-29 10:09:05 PDT
Comment on attachment 522690 [details] [diff] [review]
Patch v1.0

(In reply to comment #9)
> >+<!ENTITY helpSafeMode.label                 "Restart with Add-ons Disabled…">
> I'm not sure that a confirmation prompt warrants an ellipsis...

+1 (i.e. I think we can do without)

The "Restart with Add-ons Disabled" menu item is fine with me, f=me for that part. I think it's in the right place (Help -> check whether issues are solved with extensions disabled) and useful. [File a Help follow-up bug please.]

I thought about the general Restart item and came to the conclusion that it's in the wrong place. There's no connection between Help and Restart (other than the newly added other Restart item, but that's not important enough for me). That alone warrants f- for that part, sorry.

Additionally, I think it might come unexpected to normal users that Restart executes immediately under certain conditions (like with a single tab, or from MailNews). I know Quit behaves the same and it's indeed quite in line with that but still it's not quite the same for the average user.

If however you want to add Restart to Debug/QA, I'm fine with that (different user focus, and not included in release builds). I need Restart quite often myself.

In sum, f- for the moment/the current patch, but you're heading the right way.
Comment 11 Jens Hatlak (:InvisibleSmiley) 2011-03-29 15:53:50 PDT
Contains string changes, needs to block b3.
Comment 12 Tony Mechelynck [:tonymec] 2011-03-29 21:51:36 PDT
Just FYI, some extensions (at least "Nightly Tester Tools" and "MR-Tech Toolkit" IIRC) have a Restart menuitem near the bottom of the File menu (I currently have Nightly Tester Tools enabled because it works on current trunk builds, and there it's just above the "Quit" submenu).
Comment 13 Jens Hatlak (:InvisibleSmiley) 2011-03-30 00:08:56 PDT
(In reply to comment #12)
> Just FYI, some extensions (at least "Nightly Tester Tools" and "MR-Tech
> Toolkit" IIRC) have a Restart menuitem near the bottom of the File menu

Yes, that might indeed be a good place to put it (if we want it to have for non-developers): It is very similar to Exit in that it quits the application, so even if you hit the wrong menuitem you don't lose much.
Comment 14 Robert Kaiser 2011-03-30 05:35:04 PDT
IMHO, Help is now becoming one more menu that it getting overloaded (it was probably the last one that was clean enough to be understood by newcomers) - but then, I should be counted as a decision instance on such things any more.
Comment 15 Jens Hatlak (:InvisibleSmiley) 2011-03-30 06:22:09 PDT
(In reply to comment #14)
> IMHO, Help is now becoming one more menu that it getting overloaded (it was
> probably the last one that was clean enough to be understood by newcomers) -
> but then, I should be counted as a decision instance on such things any more.

If you are concerned about the menu length (which to me is much less important than having things there that fit into it thematically), let's remove About Plugins while we're here. It can be reached from Troubleshooting Information, (which is in the same menu) and adds little benefit to have that prominently (IMO of course).
Comment 16 Jens Hatlak (:InvisibleSmiley) 2011-03-30 06:23:09 PDT
(In reply to comment #14)
> IMHO, Help is now becoming one more menu that it getting overloaded (it was
> probably the last one that was clean enough to be understood by newcomers) -
> but then, I should be counted as a decision instance on such things any more.

If you are concerned about the menu length (which to me is much less important than having things there that fit into it thematically), let's remove About Plugins while we're here. It can be reached from Troubleshooting Information, (which is in the same menu) and adds little benefit to have that prominently (IMO of course).
Comment 17 Robert Kaiser 2011-03-30 07:14:04 PDT
I am concerned about menu length, yes, but with a one-off there's not much help done. Someone needs to do a decent concept on how to make SeaMonkey menus more reasonable and cleaner, and that deserves its own bug. I don't expect that to be touched for 2.1 though, too much stuff to juggle around there, and 2.1 should really be about ready for release right now.
Comment 18 neil@parkwaycc.co.uk 2011-03-31 02:15:26 PDT
Switch Profile tries to avoid restarting when you click Use Profile. Would it be worthwhile disabling that restart protection?
Comment 19 Philip Chee 2011-03-31 03:06:13 PDT
Created attachment 523268 [details] [diff] [review]
Patch v1.1 Restart in Safe Mode only
[Checked in: Comment 23]

> neil@parkwaycc.co.uk 2011-03-29 09:42:02 PDT
> 
> Comment on attachment 522690 [details] [diff] [review]
> Patch v1.0
> 
>>+<!ENTITY helpSafeMode.label                 "Restart with Add-ons Disabled…">
> I'm not sure that a confirmation prompt warrants an ellipsis...
Fixed.

> Jens Hatlak (:InvisibleSmiley) 2011-03-29 10:09:05 PDT
> 
> (In reply to comment #9)
> I thought about the general Restart item and came to the conclusion that it's
> in the wrong place. There's no connection between Help and Restart (other than
> the newly added other Restart item, but that's not important enough for me).
> That alone warrants f- for that part, sorry.
OK. Removed the Restart item. That will be in some followup bug.

> neil@parkwaycc.co.uk 2011-03-31 02:15:26 PDT
> 
> Switch Profile tries to avoid restarting when you click Use Profile. Would it
> be worthwhile disabling that restart protection?
No idea what this means. But isn't that another bug?
Comment 20 Jens Hatlak (:InvisibleSmiley) 2011-03-31 07:01:42 PDT
Comment on attachment 523268 [details] [diff] [review]
Patch v1.1 Restart in Safe Mode only
[Checked in: Comment 23]

A native speaker should check whether "with" in the dialog title can/needs to be capitalized (but from what I understand, title case is not really standardized).
Comment 21 neil@parkwaycc.co.uk 2011-03-31 08:00:14 PDT
Comment on attachment 523268 [details] [diff] [review]
Patch v1.1 Restart in Safe Mode only
[Checked in: Comment 23]

Jens had the neat idea of providing a checkbox in the prompt to choose between safe and normal restart, but we could do that in a followup. (I don't know how easy it would be to share the label of the checkbox with that of the menuitem.)
Comment 22 Justin Wood (:Callek) 2011-03-31 09:52:05 PDT
land me
Comment 23 Philip Chee 2011-03-31 10:15:57 PDT
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/e2bcb515fcee
Comment 24 Philip Chee 2011-03-31 10:35:33 PDT
> neil@parkwaycc.co.uk      2011-03-31 08:00:14 PDT
> 
> Comment on attachment 523268 [details] [diff] [review]
> Patch v1.1 Restart in Safe Mode only.
> 
> Jens had the neat idea of providing a checkbox in the prompt to choose between
> safe and normal restart, but we could do that in a followup. (I don't know how
> easy it would be to share the label of the checkbox with that of the menuitem.)

I filed Bug 646894 for this and a separate Help bug
Bug 646897 Document "Restart in Safe Mode" menuitem in the Help menu.
Comment 25 Tony Mechelynck [:tonymec] 2011-03-31 17:02:02 PDT
Mozilla/5.0 (X11; Linux x86_64; rv:2.2a1pre) Gecko/20110331 Firefox/4.2a1pre SeaMonkey/2.2a1pre ID:20110331123751

This tinderbox-build has a menu, "Help → Restart with Add-ons Disabled", which does indeed restart in Safe Mode. (From Safe Mode, and without changing any addon's enabled/disabled status, the only way to come back to "non-safe" mode was still Quit then Start: this is expected, see bug 646894).

I'm marking this bug VERIFIED on the assumption that menus are platform-agnostic. REOPEN with a comment if you don't see this menu in a trunk build dated after comment #23, or if you see the menu but it doesn't work.

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