Closed Bug 481773 Opened 15 years ago Closed 15 years ago

Default browser popup blank

Categories

(Camino Graveyard :: Preferences, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Camino2.0

People

(Reporter: mikepinkerton, Assigned: stuart.morgan+bugzilla)

Details

(Keywords: fixed1.8.1.22)

Attachments

(2 files)

On my new laptop (10.5.6 from factory, never changed the default browser from Safari), when I open preferences, the "default browser" popup is empty.

2.0beta2. What else do you need from me to help debug this?
Try running this AppleScript (brazenly stolen from Gruber and bits from a random forum and hacked together to display the result):

on GetDefaultWebBrowser()
	set _scpt to "perl -MMac::InternetConfig -le " & ¬
		"'print +(GetICHelper \"https\")[1]'"
	return do shell script _scpt
end GetDefaultWebBrowser

set httpsLSBundleID to do shell script ¬
	"defaults read com.apple.launchservices LSHandlers | " & ¬
	"grep -A 5 'https' | grep 'LSHandlerRoleAll' | awk '{print $3}'"

display dialog ¬
	"Default LaunchServices https handler is " & httpsLSBundleID
display dialog ¬
	"Default InternetConfig https handler is " & my GetDefaultWebBrowser()

That should output what InternetConfig and LaunchServices think the default https handlers are; iirc, we populate that menu with apps that can handle https.
The results of the script are:

Default LaunchServices https handler is
Default InternetConfig https handler is Safari
pink said the script gave the same results for http, and additionally that "open http://caminobrowser.org" opened Safari.

I can't believe in this day and age we have to check InternetConfig for something like this, and that InternetConfig is correct and LaunchServices is not :P

We should see if this is an easy-enough fix for 2.0; I think it's probably "cosmetic", but it still makes us look stupid on fresh systems.
Flags: camino2.0?
Per IRC, we'll just pick Safari if LS tells us that nothing is the default, since that's probably a safe bet, and much less painful that rooting around in IC for an edge case.
Attached patch fixSplinter Review
I can't test, but this should do it.
Assignee: nobody → stuart.morgan+bugzilla
Attachment #366065 - Flags: superreview?(mikepinkerton)
I presume we see the same problem in 1.6.x--and that this patch should apply there (less the 10.4+/public LS function in the context).
Flags: camino1.6.7?
Tiny nit: is there a reason the comment was line-broken the way it was? Probably makes more sense to put the "If" on the line with the rest of its sentence.
Hardware: x86 → All
Comment on attachment 366065 [details] [diff] [review]
fix

sr=pink.

poke me on irc when this goes in and i'll try a nightly to verify.
Attachment #366065 - Flags: superreview?(mikepinkerton) → superreview+
Landed on CVS trunk.

I don't have a branch tree handy at the moment; Somkey, could you land it there?
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: camino2.0?
Flags: camino2.0+
Flags: camino1.6.7?
Flags: camino1.6.7+
Resolution: --- → FIXED
Target Milestone: --- → Camino2.0
(In reply to comment #9)
> Landed on CVS trunk.
> 
> I don't have a branch tree handy at the moment; Somkey, could you land it
> there?

I thought it was just the switch to the public function names in the context, but on closer inspection (aka trying to merge for checkin), that entire block is structured entirely differently on branch. :-(
Attached patch branch fixSplinter Review
So it is; I dug out a branch tree, and this would be the branch equivalent.

(pink, in case you are wondering why I use two different variables, it's because I don't want to make assumptions about the value of the out param in the case of an error--especially since the function is undocumented.)
Attachment #366220 - Flags: superreview?(mikepinkerton)
Comment on attachment 366220 [details] [diff] [review]
branch fix

sr=pink
Attachment #366220 - Flags: superreview?(mikepinkerton) → superreview+
Just ran nightly 2.0 build from 20090324 and this is fixed on my laptop.
Status: RESOLVED → VERIFIED
Landed attachment 366220 [details] [diff] [review] on the MOZILLA_1_8_BRANCH for 1.6.7.  pink, we'll bug you tomorrow to verify the branch ;)
Keywords: fixed1.8.1.22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: