Closed Bug 791501 Opened 12 years ago Closed 9 years ago

Default Programs UI should select Firefox by default

Categories

(Firefox :: Shell Integration, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 41
Tracking Status
firefox40 + fixed
firefox41 --- fixed

People

(Reporter: emk, Assigned: emk)

References

Details

(Whiteboard: [win8] [feature] p=0)

Attachments

(2 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #791019 +++

Steps to reproduce:
1. Install and run the latest elm build on Win8.
2. [Options]-[Advanced]-[General]-[Make Firefox the default browser].

Actual result:
I have to select Firefox from the Default Programs UI.

Expected result:
Firefox should be selected by default.

Per MSDN, IApplicationAssociationRegistrationUI::LaunchAdvancedAssociationUI will do the job.
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144154%28v=vs.85%29.aspx#ui
The screen we want to use is the one with the "Set this program as default" button:
http://i.msdn.microsoft.com/dynimg/IC420413.png

But I think the screen that the function you quoted gives you the advanced details one: 
http://i.msdn.microsoft.com/dynimg/IC420414.png

Do you know if in preferences for IE10, when you set default browser, does it auto select the correct program? I don't have my win8 machine in front of me at the moment.
Hm, IE10 didn't auto select the program.
We may be able to find the window handle of the control panel window, then find the list box, then send it messages to select the right item.
Alternately since the SendMessage way is really hacky, we could switch to the other UI with the advanced details.  Or since we're at parity with IE10 already we could just leave it as is.  

I wish there was a command line or function to set the default selection too on the first screenshot window.
If we open the assoc dialog, we could auto-click the "Select All" checkbox. We should be able to find that by id pretty easily.
At least, click count required for "Set Program Associations" (two clicks: [Select All] > [Save]) is not worse than "Set Default Programs" (Select the program > [Set this program as default]).
I wonder what prevents us from just sending a button click event to the set as defaults button hwnd. MS wouldn't like that, but just saying.
(In reply to Masatoshi Kimura [:emk] from comment #6)
> At least, click count required for "Set Program Associations" (two clicks:
> [Select All] > [Save]) is not worse than "Set Default Programs" (Select the
> program > [Set this program as default]).

The reason I think it is worse is because it's more confusing, so some people may not click 'select all' at all, and instead click only the protocols.
No longer depends on: 791019
Depends on: 791019
As I think about this more I think the association Firefox specific window is better. The current window's list can get fairly long making Firefox hard to find in the list.   I think we can make this change for v17 but not v16.
Assignee: nobody → netzen
Attached patch Patch v1 (obsolete) — Splinter Review
Here's a patch that uses the alternate UI for setting defaults, it is a Firefox specific page with the checkbox for select all associations.

The problem though is that is seems to always launch behind the browser :(
The current functionality at least for me only opens in the back when control panel is already open.

Unfortunately the method to launch this assoc UI only takes the name of the application and nothing else.
Blocks: 831612
Hi Juan, you recently asked about this, so CC'ing you on the bug.
Assignee: netzen → nobody
Blocks: metrobacklog
Whiteboard: [win8] → [win8] [feature] p=0
Priority: P1 → --
(In reply to Brian R. Bondy [:bbondy] from comment #10)
> Created attachment 668872 [details] [diff] [review]
> Patch v1
> 
> Here's a patch that uses the alternate UI for setting defaults, it is a
> Firefox specific page with the checkbox for select all associations.
> 
> The problem though is that is seems to always launch behind the browser :(
> The current functionality at least for me only opens in the back when
> control panel is already open.

Now, the current dialog shows behind the browser, but this alternative UI does not.
Rebased bbondy's patch to tip.
Assignee: nobody → VYV03354
Attachment #668872 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8626547 - Flags: review?(jmathies)
(In reply to Masatoshi Kimura [:emk] from comment #12)
> (In reply to Brian R. Bondy [:bbondy] from comment #10)
> > Created attachment 668872 [details] [diff] [review]
> > Patch v1
> > 
> > Here's a patch that uses the alternate UI for setting defaults, it is a
> > Firefox specific page with the checkbox for select all associations.
> > 
> > The problem though is that is seems to always launch behind the browser :(
> > The current functionality at least for me only opens in the back when
> > control panel is already open.
> 
> Now, the current dialog shows behind the browser, but this alternative UI
> does not.

What does this mean? Did win8 behavior improve since the last time we tested on a pre-release?
(In reply to Jim Mathies [:jimm] from comment #14)
> What does this mean? Did win8 behavior improve since the last time we tested
> on a pre-release?

Maybe.
Comment on attachment 8626547 [details] [diff] [review]
bug791501_default_programs_ui.diff

Review of attachment 8626547 [details] [diff] [review]:
-----------------------------------------------------------------

This is working for me on 8.1.
Attachment #8626547 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/28e6664ad1a1
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
[Tracking Requested - why for this release]:
We have done a lot of work towards default browser UI with Firefox 40, as the default browser UI is much more complicated in Windows 10.

Can you please attach a patch that can be uplifted to mozilla-beta? The patch that landed in 41 does not apply cleanly on mozilla-beta.
Flags: needinfo?(VYV03354)
This change is only relevant to Windows 8. Firefox will never use LaunchAdvancedAssociationUI on Windows 10 because it does not work on Windows 10.
Flags: needinfo?(VYV03354)
My reasoning is that we will want to make the process as easy possible for users to set Firefox as their default on pre-Windows 10 so that when they upgrade to Windows 10 we can use the registry hash that is cached by bug 1184508.
Attached patch patch for betaSplinter Review
I see.

Approval Request Comment
[Feature/regressing bug #]: N/A
[User impact if declined]: Default browser UX would be worse on Windows 8.
[Describe test coverage new/current, TreeHerder]: manually tested.
[Risks and why]: Low, using a documented API on Windows 8.
[String/UUID change made/needed]: none
Attachment #8637836 - Flags: approval-mozilla-beta?
Tracking 40 as this is important for Windows 10.
Comment on attachment 8637836 [details] [diff] [review]
patch for beta

Taking this change somewhat late in the cycle in support of browser default on Windows 10. Note that this change has been in 41 for several weeks already. Beta+
Attachment #8637836 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Note for sheriffs - this patch conflicts with that in bug 1184508. There is an alternative patch in that bug that has been requested for uplift instead of this one.
Flags: qe-verify+
This issue no longer requires verification due to bug 1184508, which was uplifted and verified on Firefox 40.

Removing the qe-verify+ flag.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.