Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 459413 - Geolocation prompt for SeaMonkey
: Geolocation prompt for SeaMonkey
Product: SeaMonkey
Classification: Client Software
Component: UI Design (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Robert Kaiser
Depends on: 444642 459893
Blocks: 464774
  Show dependency treegraph
Reported: 2008-10-10 11:37 PDT by Robert Kaiser
Modified: 2008-11-13 13:41 PST (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

port geolocation notification bar to SeaMonkey (4.64 KB, patch)
2008-10-10 12:59 PDT, Robert Kaiser
neil: superreview-
Details | Diff | Splinter Review
nsSuiteGlue version (4.89 KB, patch)
2008-10-15 16:49 PDT,
no flags Details | Diff | Splinter Review
patch v2: port based on bug 459893 patch (4.23 KB, patch)
2008-10-21 11:56 PDT, Robert Kaiser
neil: review+
neil: superreview+
Details | Diff | Splinter Review

Description Robert Kaiser 2008-10-10 11:37:34 PDT
Bug 444642 Implemented the geolocation notification bars in Firefox, we should get those into SeaMonkey 2 as well. AFAIK, the basic functionality it calls is all toolkit, so it's easy to leverage it.
Comment 1 Robert Kaiser 2008-10-10 12:59:34 PDT
Created attachment 342621 [details] [diff] [review]
port geolocation notification bar to SeaMonkey

Here's a rather simple patch to add this notification bar.

Steps for testing:
1) Get a build with this patch up and running.
2) Install - either by downloading it and hacking in SeaMonkey compat into its install.rdf or by switching off extension compat checking via the hidden pref (I did the former and will ask DougT to add SeaMonkey 2.0a2pre to the compatible apps in AMO)
3) Go to the Add-Ons Manager and click "Preferences" on that Add-Ons to set your longitude/latitude
4) Once that's set, go to
5) The notification bar should come up and after allowing it exact position or neighborhood, it should output your location repeatedly (AFAIK, it even should pick up changes you enter with the pref window)
Comment 2 2008-10-10 13:49:58 PDT
Comment on attachment 342621 [details] [diff] [review]
port geolocation notification bar to SeaMonkey

>+  geolocationService.prompt = function(request) {
Sorry, but you can't set a service callback to a window object, because that will do nasty things when the window closes. It might be possible to use a module, but you're probably better off moving this to suite glue. Either way you'll have to get the bundle manually (i.e. rather than via xbl) unfortunately.

>+    function getChromeWindow(aWindow) {
This is all way too complicated when all you want is the notification box, which you should should be able to get something like this: request.requestingWindow.QI(nsIInterfaceRequestor).gI(nsIWebNavigation).QI(nsIDocShell).chromeEventHandler.parentNode;
Comment 3 2008-10-13 08:20:32 PDT
Patch looks OK apart from those two points, although I had some issues which apppear to be the default of the the demo geolocation add-in.
Comment 4 Robert Kaiser 2008-10-14 11:25:28 PDT
I filed bug 459893 on Firefox, which probably is the same problem you are talking about here.
Comment 5 2008-10-15 16:49:07 PDT
Created attachment 343320 [details] [diff] [review]
nsSuiteGlue version
Comment 6 Robert Kaiser 2008-10-21 11:45:58 PDT
Will do our fix based on the new bug 459893 work, which makes this nicer to do.
Comment 7 Robert Kaiser 2008-10-21 11:56:50 PDT
Created attachment 344146 [details] [diff] [review]
patch v2: port based on bug 459893 patch

This is a new patch that builds upon the recent bug 459893 patch, which now makes the geolocation service just look for a prompt implementation, so it's easier for us to implement that.
Comment 8 2008-10-22 03:32:10 PDT
Comment on attachment 344146 [details] [diff] [review]
patch v2: port based on bug 459893 patch

Looks good but obviously we need to give our implementation a different class ID.
Comment 9 Robert Kaiser 2008-10-22 04:24:12 PDT
Comment on attachment 344146 [details] [diff] [review]
patch v2: port based on bug 459893 patch

Oh, OK, sure. Make this line:

>diff --git a/suite/common/src/nsSuiteGlue.js b/suite/common/src/nsSuiteGlue.js
>+  classID:          Components.ID("{C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}"),

this instead:

+  classID:          Components.ID("{450a13bd-0d07-4e5d-a9f0-448c201728b1}"),

Changed locally, I think I don't need to upload another patch for review just for this, right?
Comment 10 2008-10-22 05:41:45 PDT
Comment on attachment 344146 [details] [diff] [review]
patch v2: port based on bug 459893 patch

>+  classID:          Components.ID("{C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}"),
Don't forget ;-)

>+                    .createBundle("chrome://communicator/locale/");
Nice :-)

>+geolocation.exactLocation=Exact Location (within 10 feet)
>+geolocation.neighborhoodLocation=Neighborhood (within 1 mile)
>+geolocation.requestMessage=%S wants to know where you are.  Tell them:
It's more readable if you put the message before the options!
Comment 11 Doug Turner (:dougt) 2008-10-22 10:52:46 PDT
neil, does that work?  


What I was finding that anything less than what I was doing would find the current tab, instead of the tab that contained the window that the geolocation was for.
Comment 12 Robert Kaiser 2008-10-25 09:02:44 PDT
Pushed as

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