Hi,
I will try to explain better what I want to do.
If you have a look at
http://ianlawrence.info/downloads/UME/flash/flash_home.html this is the
Gnash UI. If you scroll you will see the Location Services Plugin icon.
Clicking that icon should
launch this python code:
import gtk
import pygtk
import hildondesktop
import dbus
import os
import webbrowser
class GeocluePlugin(hildondesktop.HomeItem):
def __init__(self):
hildondesktop.HomeItem.__init__(self)
# Start with getting position from GeoClue
bus = dbus.SessionBus()
# TODO: Get the GeoClue interface to use from
/schemas/apps/geoclue/position/defaultpath
# and /schemas/apps/geoclue/position/defaultserviceGConf keys
proxy_obj = bus.get_object('org.foinse_project.geoclue.position.hostip',
'/org/foinse_project/geoclue/position/hostip')
geoclue_iface = dbus.Interface(proxy_obj,
'org.foinse_project.geoclue.position')
# Get the coordinates from the service
coordinates = geoclue_iface.current_position()
#print "According to GeoClue you are in %s %s." % (coordinates[0],
coordinates[1])
url = "http://mapufacture.com/search?lat=%s" % coordinates[0] +
"&lng=%s" % coordinates[1]
webbrowser.open(url, new=1, autoraise=1)
def hd_plugin_get_objects():
plugin = GeocluePlugin()
return [plugin]
This code uses d-bus to get the users co-ordinates (either from GPS device or
hostip.info) and
then using the default system browser queries a geo-aggregator to find out what
is going on in the
users area.
I have placed:
geoclue.desktop in fs/usr/share/applications
geoclue.py in fs/usr/lib/hildon-desktop and made it executable (dunno if this
needs to be done?).
[I am pretty confident that these are in the right place]
I have put nothing yet in the fs/etc/hildon-desktop folder so maybe this is my
problem?
thanks for your help
[]'s
Ian
--
http://ianlawrence.info
--
Ubuntu-mobile mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile