Closed Bug 405037 Opened 17 years ago Closed 17 years ago

Should "Don't Save" really be the default button when Quitting with lots of tabs?

Categories

(Firefox :: Session Restore, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hwaara, Assigned: mconnor)

Details

Attachments

(2 files, 1 obsolete file)

Firefox 3 beta 1, all platforms

I'm used to the safe option being the default, so sometimes I tend to be a little sloppy. The computer is supposed to help me make the safe decision, right? 

In this case, I was asked by Firefox whether I wanted to save tabs, quickly hitting Enter, assuming it would save it for me. I think Camino saves the tabs by default, and this is probably why I was so quick.
Flags: blocking-firefox3?
Taking.
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P1
Pretty straightforward, set the default as appropriate to the context of the quit dialog.
Assignee: beltzner → mconnor
Status: NEW → ASSIGNED
Attachment #290561 - Flags: review?(gavin.sharp)
Comment on attachment 290561 [details] [diff] [review]
change default for normal quit dialog

POS_0 has "OK" semantics, POS_1 is "Cancel", and POS_2 is "Extra". 0 is the default if no other default is specified. We have two scenarios:

1) "Quit", "Save and Quit", and "Cancel"
2) "Restart" and "Cancel"

For 2, the obvious solution is to have "Restart" be OK, and "Cancel" be "Cancel", and default to OK (which is what we currently do). For 1, we currently use POS_0 for "Quit", POS_1 for "Cancel", and POS_2 for "Save and Quit". This patches keeps that positioning but makes POS_2 the default. For case 2, shouldn't we instead move "Save and Quit" to POS_0, and leave POS_0_DEFAULT for both cases?
hmm, that makes sense, new patch upcoming tonight
Attached patch patch v2Splinter Review
Attachment #290561 - Attachment is obsolete: true
Attachment #290653 - Flags: review?(gavin.sharp)
Attachment #290561 - Flags: review?(gavin.sharp)
Comment on attachment 290653 [details] [diff] [review]
patch v2

>Index: browser/components/nsBrowserGlue.js

>+      var button0Title, button2Title;
>+      var button1Title = quitBundle.GetStringFromName("cancelTitle");
>+      var neverAskText = quitBundle.GetStringFromName("neverAsk");
>+
>+      if (aQuitType != "restart") {
>         flags += promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2;
>+        button0Title = quitBundle.GetStringFromName("saveTitle");
>+        button2Title = quitBundle.GetStringFromName("quitTitle");
>+      }
>+      else
>+        button0Title = quitBundle.GetStringFromName("restartTitle");

super nits: perhaps use "okButtonTitle"/"cancelButtonTitle"/"extraButtonTitle" rather than the numbered variable names? And flip the then/else blocks arounds and instead test aQuitType == "restart"?
Attachment #290653 - Flags: review?(gavin.sharp) → review+
Attached patch as checked inSplinter Review
left the button title vars as is, since that maps better to the consts already in use, but flipped the if/else
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-litmus?
OS: Mac OS X → All
Hardware: PC → All
verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b2pre) Gecko/2007113004 Minefield/3.0b2pre. "Save and Quit" is now the default choice.
Status: RESOLVED → VERIFIED
https://litmus.mozilla.org/show_test.cgi?id=5116 added in Litmus.
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: